Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test(websearch): carry a reasoned test-quality suppression on the router patch

mateo-berrif65bee6d7432
diff --git a/tests/pass_through_unit_tests/test_websearch_interception_e2e.py b/tests/pass_through_unit_tests/test_websearch_interception_e2e.py
index cc7901b1710..fd95b7fa8f2 100644
--- a/tests/pass_through_unit_tests/test_websearch_interception_e2e.py
+++ b/tests/pass_through_unit_tests/test_websearch_interception_e2e.py
@@ -995,7 +995,10 @@ async def test_pre_request_hook_modifies_request_body():
with patch(
"litellm.llms.anthropic.experimental_pass_through.messages.handler.anthropic_messages_handler",
side_effect=mock_anthropic_messages_handler,
- ), patch("litellm.proxy.proxy_server.llm_router", mock_router):
+ ), patch( # test-quality-ok: the hook imports this process-global router at call time; no injection seam exists to register search_tools
+ "litellm.proxy.proxy_server.llm_router",
+ mock_router,
+ ):
print(
"\n📝 Making request with native web_search_20250305 tool (stream=True)..."