From 5e0ad06725cb97b0c87b27da7072926938e244c4 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Fri, 18 Sep 2026 18:02:25 -0700 Subject: [PATCH] docs(websearch): drop the docstring paragraphs the fix reworded --- litellm/integrations/websearch_interception/handler.py | 5 ----- litellm/llms/anthropic/common_utils.py | 7 ------- 2 files changed, 12 deletions(-) diff --git a/litellm/integrations/websearch_interception/handler.py b/litellm/integrations/websearch_interception/handler.py index 4558d6c2c04..b7238629c85 100644 --- a/litellm/integrations/websearch_interception/handler.py +++ b/litellm/integrations/websearch_interception/handler.py @@ -1354,11 +1354,6 @@ class WebSearchInterceptionLogger(CustomLogger): ) -> tuple[AgenticLoopRequestPatch, tuple[SearchOutcome, ...]]: """ Execute litellm.search() and build follow-up request patch. - - Returns the patch alongside the parallel tuple of search outcomes (one - per tool_call). The caller uses these to optionally build - Anthropic-native ``web_search_tool_result`` content blocks for the - final response and to decide whether a follow-up call is worth making. """ # Extract search queries from tool_use blocks diff --git a/litellm/llms/anthropic/common_utils.py b/litellm/llms/anthropic/common_utils.py index 06561faae8c..05e22ecb55e 100644 --- a/litellm/llms/anthropic/common_utils.py +++ b/litellm/llms/anthropic/common_utils.py @@ -1446,13 +1446,6 @@ def _flattenable_web_search_tool_result(block: object) -> _ReplayedWebSearchTool """ The parsed block when it is a ``web_search_tool_result`` carrying no ``encrypted_content``, else None for anything Anthropic itself issued. - - An empty ``content`` list is flattenable too. It is what the interceptor emits - when a search legitimately returns nothing, and it carries neither evidence to - preserve nor an ``encrypted_content`` to respect, so leaving it in place only - buys the 400 this whole function exists to avoid. The same goes for the - ``web_search_tool_result_error`` object the interceptor emits when a search - raises: it never carries ``encrypted_content``, so it is flattened as well. """ try: parsed: Final = _WEB_SEARCH_TOOL_RESULT_ADAPTER.validate_python(block)