diff --git a/litellm/integrations/websearch_interception/handler.py b/litellm/integrations/websearch_interception/handler.py index 52e88eb9da0..3a01921b7f8 100644 --- a/litellm/integrations/websearch_interception/handler.py +++ b/litellm/integrations/websearch_interception/handler.py @@ -302,9 +302,7 @@ class WebSearchInterceptionLogger(CustomLogger): # legitimately points at a client-side tool we left alone. if "tool_choice" in kwargs: rewritten_names = collect_rewritten_tool_names(tools) - kwargs["tool_choice"] = rewrite_web_search_tool_choice( - kwargs["tool_choice"], rewritten_names - ) + kwargs["tool_choice"] = rewrite_web_search_tool_choice(kwargs["tool_choice"], rewritten_names) if kwargs.get("stream"): verbose_logger.debug("WebSearchInterception: deployment hook converting stream=True to stream=False") @@ -479,9 +477,7 @@ class WebSearchInterceptionLogger(CustomLogger): # has to be applied here too (issue #30822). if "tool_choice" in kwargs: rewritten_names = collect_rewritten_tool_names(tools) - kwargs["tool_choice"] = rewrite_web_search_tool_choice( - kwargs["tool_choice"], rewritten_names - ) + kwargs["tool_choice"] = rewrite_web_search_tool_choice(kwargs["tool_choice"], rewritten_names) # Also convert here for direct callers that bypass the deployment hook. if kwargs.get("stream"):