diff --git a/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py b/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py index de77a74e3f4..091ed4a7190 100644 --- a/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py +++ b/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py @@ -733,7 +733,9 @@ class LiteLLMAnthropicMessagesAdapter: name=truncated_name, ) if "input_schema" in tool: - function_chunk["parameters"] = tool["input_schema"] + # Deep-copy so extra kwargs merged below (see #34510) never mutate + # the caller's original `input_schema` dict. + function_chunk["parameters"] = copy.deepcopy(tool["input_schema"]) if "description" in tool: function_chunk["description"] = tool["description"] if "strict" in tool: