From 9b76c0de9fefaf5a86ff4da94acae62b2dea2ac3 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 24 Jul 2025 15:58:55 -0700 Subject: [PATCH] fix _map_tool_helper --- litellm/llms/anthropic/chat/transformation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/litellm/llms/anthropic/chat/transformation.py b/litellm/llms/anthropic/chat/transformation.py index 8075d95bd18..c74a8b14706 100644 --- a/litellm/llms/anthropic/chat/transformation.py +++ b/litellm/llms/anthropic/chat/transformation.py @@ -199,6 +199,11 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig): }, ) 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_schema: AnthropicInputSchema = AnthropicInputSchema(**input_schema_filtered) + _tool = AnthropicMessagesTool( name=tool["function"]["name"], input_schema=input_schema,