6 views
-/https://github.com/berriai/litellm/issues/30822
GitHub ยท issue

#30822 [Bug]: websearch_interception doesn't convert tool_choice, so forced web_search fails on Bedrock (400 "Tool 'web_search' not found")

  • State: open
  • Author: @yatoum
  • Labels: bug, proxy, llm translation, claude code

### Check for existing issues

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

### What happened?

With `websearch_interception` enabled for Bedrock, a `/v1/messages` request that **forces the web search tool via `tool_choice`** fails with:

``` litellm.llms.base_llm.chat.transformation.BaseLLMException: {"message":"Tool 'web_search' not found in provided tools"} # HTTP 400 from bedrock-runtime .../invoke ```

This is exactly the shape **Claude Code (v2.1.183)** sends for web search โ€” a standalone request with only the web_search tool plus `tool_choice` naming it (captured via a logging proxy) โ€” so web search via Claude Code โ†’ LiteLLM โ†’ Bedrock is completely broken, while a plain API call without `tool_choice` works.

### Steps to Reproduce

Config: ```yaml model_list: - model_name: bedrock/claude-haiku-4-5 litellm_params: model: bedrock/anthropic.claude-haiku-4-5-20251001-v1:0 # any bedrock claude custom_llm_provider: bedrock litellm_settings: callbacks: ["websearch_interception"] websearch_interception_params: enabled_providers: ["bedrock"] search_tool_name: "my-search" search_tools: - search_tool_name: "mโ€ฆ

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 ยท 31d18h35m30s ago โ€” entered ยท #import:https:::github.com:berriai:litellm post #2281
The left task has broader cross-provider request-normalization implications, involving interception behavior, tool-selection semantics, and compatibility testing. The right task is comparatively localized to endpoint construction and regression coverage.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search