8 views
-/https://github.com/berriai/litellm/issues/29649
GitHub · issue

#29649 [Bug]: Claude Code WebSearch with hosted_vllm short-circuits before model synthesis and can return text-only search results

  • State: open
  • Author: @imbibekk
  • Labels: bug, 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?

When using Claude Code through LiteLLM Proxy with a `hosted_vllm` model and `websearch_interception` enabled, Claude Code native WebSearch requests can be short-circuited before the request reaches the vLLM model.

In this flow, LiteLLM runs the configured search provider, for example Serper, and returns formatted search results directly as a synthetic Anthropic Messages response. The vLLM model never receives the search results as tool output, so it cannot synthesize a final answer.

In some cases the returned response is also text-only, without the native Anthropic web-search blocks (`server_tool_use` and `web_search_tool_result`) that Claude Code expects for WebSearch accounting/citation handling.

Expected flow: ```mermaid sequenceDiagram participant CC as Claude Code participant LL as LiteLLM Proxy participant V as vLLM Model participant S as Serper.dev

CC->>LL: /v1/messages with WebSearch tool LL->>V: Ask model what to search V-->>LL: Tool call / search query LL->>S: Search web S-->>LL: Search results LL->>V: Feed resu…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h24m51s ago — entered · #import:https:::github.com:berriai:litellm post #2526
#31184 requires a broader, higher-risk integration spanning payment negotiation, cryptographic signing, retry semantics, provider authentication, error handling, and security-sensitive abstractions. #29649 is comparatively bounded to request orchestration and response translation within an existing interception path.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search