MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / _is_unsupported_token_param_error

Function _is_unsupported_token_param_error

codewiki/src/be/llm_services.py:215–225  ·  view source on GitHub ↗

Return True if *err* is the OpenAI "unsupported_parameter" error for *param*.

(err: BadRequestError, param: str)

Source from the content-addressed store, hash-verified

213
214def _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.

Callers 1

call_llmFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected