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
[LLM Translation] - Bug fix Anthropic Tool calling (#12959)
Ishaan Jaff6174609685bd
diff --git a/litellm/llms/anthropic/chat/transformation.py b/litellm/llms/anthropic/chat/transformation.pyindex b3cf302532f..ce874bfde9a 100644--- a/litellm/llms/anthropic/chat/transformation.py+++ b/litellm/llms/anthropic/chat/transformation.py@@ -198,10 +198,14 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):"properties": {},},)- input_schema: AnthropicInputSchema = AnthropicInputSchema(**_input_schema)++ _allowed_properties = set(AnthropicInputSchema.__annotations__.keys())+ input_schema_filtered = {k: v for k, v in _input_schema.items() if k in _allowed_properties}+ input_anthropic_schema: AnthropicInputSchema = AnthropicInputSchema(**input_schema_filtered)+_tool = AnthropicMessagesTool(name=tool["function"]["name"],- input_schema=input_schema,+ input_schema=input_anthropic_schema,)_description = tool["function"].get("description")