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

#33689 [Bug]: /v1/responses crashes with a Pydantic ValidationError when forcing a named tool call on Bedrock/Anthropic models

  • State: open
  • Author: @TobiMayr
  • Labels: bug, proxy, llm translation

### Check for existing issues

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

### What happened?

Forcing a named tool call through `/v1/responses` (`tool_choice: {"type": "function", "name": "..."}`) with `stream: true` crashes with a 500 on any model that falls back to the `litellm_completion` bridge - Bedrock and Anthropic in particular, since neither has a native Responses API integration.

Expected: the request should stream back a normal response using the forced tool.

Root cause: `ResponsesAPIResponse.tool_choice` only accepts a string (`none`/`auto`/`required`) or the flat Responses API shape `{"type": "function", "name": "..."}`, but the `litellm_completion` bridge was populating it with Chat Completion's nested shape `{"type": "function", "function": {"name": "..."}}` instead.

### Steps to Reproduce

1. Start the proxy pointed at an Anthropic or Bedrock model 2. Send a `/v1/responses` request with `stream: true`, a `tools` list, and `tool_choice` set to a specific function name 3. Observe the 500 error on the first SSE event```bash ``` curl -sN -X POST http://localhost:4000/v1/responses \ -H "Authorization: Bearer sk-1234" \ …

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h36m6s ago — entered · #import:https:::github.com:berriai:litellm post #2256
The right issue is harder because it requires tracing header propagation and identity-resolution behavior across proxy middleware, configuration parsing, OpenWebUI compatibility, and potentially user provisioning semantics. The left issue appears more localized to adapting one bridge's parameter shape and adding regression coverage around streaming validation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search