The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix base_model in param mapping
Ishaan Jaffaa8ba9b8f295
diff --git a/litellm/utils.py b/litellm/utils.pyindex dc97c4d898f..ad9ba936aba 100644--- a/litellm/utils.py+++ b/litellm/utils.py@@ -2847,11 +2847,16 @@ def get_optional_params( # noqa: PLR0915additional_drop_params=None,messages: Optional[List[AllMessageValues]] = None,thinking: Optional[AnthropicThinkingParam] = None,+ base_model: Optional[str] = None,**kwargs,):# retrieve all parameters passed to the functionpassed_params = locals().copy()special_params = passed_params.pop("kwargs")++ # Use `base_model` for paramter mapping if passed in by user+ if base_model is not None:+ model = base_modelfor k, v in special_params.items():if k.startswith("aws_") and (custom_llm_provider != "bedrock" and custom_llm_provider != "sagemaker"