litellm/tests/test_litellm/integrations/websearch_interception
Jonathan Barazany 32cb6f0cd9 fix: guard short-circuit against providers with native agentic loop
- Skip short-circuit for providers that have a BaseAnthropicMessagesConfig
  (bedrock, vertex_ai, azure_ai, anthropic) — they use the agentic loop
  which includes a follow-up LLM synthesis step. Short-circuiting would
  return raw search text instead of an LLM-synthesized answer.
- Add fallback to litellm.get_llm_provider() for custom_llm_provider
  derivation when litellm_params is overwritten by kwargs.
- Add test for bedrock guard.

Addresses Greptile review comments #3 and #4.
2026-03-20 01:07:20 +02:00
..
test_websearch_chat_completion.py Add tests for WebSearch interception with chat completions API 2026-02-09 13:41:29 +05:30
test_websearch_interception_handler.py fix: replace sk-fake with safe test key to avoid secret scanner 2026-03-05 18:29:28 +01:00
test_websearch_interception_thinking.py fix(websearch_interception): preserve thinking blocks in agentic loop follow-up messages 2026-02-19 21:51:00 +01:00
test_websearch_short_circuit.py fix: guard short-circuit against providers with native agentic loop 2026-03-20 01:07:20 +02:00
test_websearch_thinking_constraint.py fix: WebSearch interception fails with thinking enabled + SpendLimit constraint 2026-03-04 22:44:52 +01:00