Return True if *err* is the OpenAI "unsupported_parameter" error for *param*.
(err: BadRequestError, param: str)
| 213 | |
| 214 | def _create_litellm_openai_client(config: Config) -> OpenAI: |
| 215 | """ |
| 216 | Create an OpenAI-compatible client backed by litellm's proxy. |
| 217 | |
| 218 | litellm translates OpenAI API calls to Bedrock, Anthropic, etc. |
| 219 | """ |
| 220 | # Configure litellm for the provider |
| 221 | if config.provider == "bedrock": |
| 222 | import os |
| 223 | |
| 224 | os.environ.setdefault("AWS_DEFAULT_REGION", config.aws_region) |
| 225 | os.environ.setdefault("AWS_REGION_NAME", config.aws_region) |
| 226 | |
| 227 | # litellm exposes an OpenAI-compatible Router we can use, |
| 228 | # but the simplest path is to use litellm.completion() directly. |