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(converse_transformation.py): fix 'thinking' param check for claude-3-7 on bedrock
Krrish Dholakia6c669734a6ee
diff --git a/litellm/llms/bedrock/chat/converse_transformation.py b/litellm/llms/bedrock/chat/converse_transformation.pyindex b39544cd650..b86fb7f0f37 100644--- a/litellm/llms/bedrock/chat/converse_transformation.py+++ b/litellm/llms/bedrock/chat/converse_transformation.py@@ -117,6 +117,10 @@ class AmazonConverseConfig(BaseConfig):# only anthropic and mistral support tool choice config. otherwise (E.g. cohere) will fail the call - https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ToolChoice.htmlsupported_params.append("tool_choice")+ if (+ "claude-3-7" in model+ ): # [TODO]: move to a 'supports_reasoning_content' param from model cost map+ supported_params.append("thinking")return supported_paramsdef map_tool_choice_values(@@ -258,7 +262,8 @@ class AmazonConverseConfig(BaseConfig):)if _tool_choice_value is not None:optional_params["tool_choice"] = _tool_choice_value-+ if param == "thinking":+ optional_params["thinking"] = valuereturn optional_params@overloaddiff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex 0255a8b8904..d1228afb80d 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -2754,6 +2754,7 @@"litellm_provider": "anthropic","mode": "chat","supports_function_calling": true,+ "supports_vision": true,"tool_use_system_prompt_tokens": 264,"supports_assistant_prefill": true,"supports_prompt_caching": true,@@ -2772,6 +2773,7 @@"litellm_provider": "anthropic","mode": "chat","supports_function_calling": true,+ "supports_vision": true,"tool_use_system_prompt_tokens": 264,"supports_assistant_prefill": true,"supports_prompt_caching": true,