17 views
-/https://github.com/berriai/litellm/issues/25191
GitHub · issue

#25191 [Bug]: websearch_interception agentic loop not triggered for Bedrock via /chat/completions

  • State: open
  • Author: @dtometzki
  • Labels: bug

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

A bug happened! when using websearch_interception with AWS Bedrock and the /chat/completions endpoint, the agentic loop is not executed. The model correctly returns a tool_calls response with litellm_web_search, but LiteLLM does not intercept it and execute the search automatically.

The same setup works correctly when using the /v1/messages (Anthropic Messages API) endpoint.

LiteLLM should automatically intercept the litellm_web_search tool call, execute the search via the configured search provider, and return the final answer — just like it does for /v1/messages.

Configuration: ``` model_list: - model_name: claude-sonnet-4-6 litellm_params: model: bedrock/us.anthropic.claude-sonnet-4-6 aws_region_name: us-east-1

litellm_settings: callbacks: - websearch_interception websearch_interception_params: enabled_providers: - bedrock search_tool_name: google-search

search_tools: - search_tool_name: google-search litellm_params: search_provider: google_pse api_key: os.environ/GOOGLE_PSE_API…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (3 events)
#0 of 0 · 31d17h51m55s ago — entered · #import:https:::github.com:berriai:litellm post #3104
The left requires coordinating callback, tool-execution, and multi-turn orchestration across endpoint and provider-specific paths, with broader regression risk. The right is comparatively localized to identifier normalization in one API translation path, with focused compatibility tests.
30460 requires diagnosing and safely correcting distributed Redis/DB accounting under concurrency, transaction buffering, failures, and multi-pod deployment conditions, with substantial regression and data-integrity risk. 25191 is more localized to endpoint-specific tool-call interception and shared agent-loop behavior, with a narrower implementation and test surface.
#0 of 0 · 31d17h29m27s ago — current · #import:https:::github.com:berriai:litellm post #3479
The left issue is harder because it crosses LangChain adapter behavior, Router parameter propagation, automatic API translation, and Azure-specific URL construction, with greater regression and compatibility risk. The right issue is comparatively narrower: extending an existing interception loop to another provider and endpoint path.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search