From 07516c334bb97525289a1417512c2d18207bab2e Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Tue, 13 Oct 2026 22:43:32 -0700 Subject: [PATCH] fix(anthropic): name the proxy drop_params setting in the tool_search 400 --- litellm/llms/anthropic/chat/transformation.py | 3 ++- .../llms/anthropic/chat/test_anthropic_chat_transformation.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/llms/anthropic/chat/transformation.py b/litellm/llms/anthropic/chat/transformation.py index cea6a2d4398..ec2b8fc3ff2 100644 --- a/litellm/llms/anthropic/chat/transformation.py +++ b/litellm/llms/anthropic/chat/transformation.py @@ -352,7 +352,8 @@ def tools_without_unsupported_tool_search( message=( f"{model} on {route} cannot run the OpenAI `tool_search` tool as sent. Only a server-executed " "`tool_search` on a route that supports tool search becomes Anthropic's tool search. To drop it " - "and the `defer_loading` of the other tools, set `litellm.drop_params = True`." + "and the `defer_loading` of the other tools, set `litellm.drop_params=True` or for proxy:\n\n" + "`litellm_settings:\n drop_params: true`\n" ), status_code=400, ) diff --git a/tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py b/tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py index b652007beed..56255609626 100644 --- a/tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py +++ b/tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py @@ -8915,6 +8915,7 @@ def test_map_openai_params_answers_400_for_an_openai_tool_search_tool_it_cannot_ ) assert raised.value.status_code == 400 assert "tool_search" in str(raised.value) + assert "drop_params: true" in str(raised.value) @pytest.mark.parametrize(("config", "model", "provider", "execution"), _UNRUNNABLE_TOOL_SEARCH_CASES)