litellm/tests/unit/integrations/websearch_interception
Mateo Wang b143cbbf74
feat(websearch_interception): accept "*" in enabled_providers and treat an empty list as the Bedrock default (#55590)
* feat(websearch_interception): accept "*" in enabled_providers and treat an empty list as the Bedrock default

A "*" entry turns web search interception on for every provider, so a gateway in front of many
providers no longer has to list each one. A YAML enabled_providers: [] now falls back to Bedrock,
matching the Admin UI path and the docstring, instead of intercepting nothing

Builds on #55470

Co-authored-by: CrypticDriver <107245892+CrypticDriver@users.noreply.github.com>

* test(websearch_interception): cover "*" at every interception point

The pre-request hook, the web-search-only short-circuit and the chat and
Responses loops each read enabled_providers, and none of them had a "*"
test, so putting the old membership check back in any of them still passed

* fix(websearch_interception): match an LlmProviders enum in the pre-request hook

The pre-request hook turned the provider into a string with str(), which gives
'LlmProviders.BEDROCK' for the enum an SDK caller can pass. The deployment hook
had already converted the web search tool, so the request reached Bedrock with
a function tool and got a 400 instead of an intercepted search

---------

Co-authored-by: CrypticDriver <107245892+CrypticDriver@users.noreply.github.com>
2026-12-02 03:34:25 +00:00
..
__init__.py
conftest.py fix(websearch_interception): answer a web search turn that reaches max_agentic_loops (#54053) 2026-11-24 01:55:38 -08:00
test_websearch_agentic_loop_cap.py fix(websearch_interception): answer a web search turn that reaches max_agentic_loops (#54053) 2026-11-24 01:55:38 -08:00
test_websearch_chat_completion.py fix(websearch_interception): answer a web search turn that reaches max_agentic_loops (#54053) 2026-11-24 01:55:38 -08:00
test_websearch_interception_handler.py feat(websearch_interception): accept "*" in enabled_providers and treat an empty list as the Bedrock default (#55590) 2026-12-02 03:34:25 +00:00
test_websearch_interception_thinking.py
test_websearch_native_blocks.py
test_websearch_responses.py fix(websearch_interception): answer a web search turn that reaches max_agentic_loops (#54053) 2026-11-24 01:55:38 -08:00
test_websearch_rich_query_shape.py refactor(router): move router callers onto the entry points and invert the proxy imports (#48847) 2026-10-29 17:26:33 +00:00
test_websearch_short_circuit.py fix(messages): answer 400 for a non-string user or system text block and keep count_tokens in step with inference (#54165) 2026-11-25 00:48:41 +00:00
test_websearch_streaming_wrap.py refactor(anthropic): rename llms/anthropic/pass_through to llms/anthropic/messages (#48510) 2026-10-27 10:08:25 -07:00
test_websearch_thinking_constraint.py fix(agentic)!: surface a failed agentic follow-up call instead of the pre-loop tool call (#49227) 2026-11-04 02:00:33 +00:00