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

#29272 [Bug]: workspace_id is sent in the Anthropic Messages request body (not just the header) on the bedrock/claude_platform chat-completions route

  • State: open
  • Author: @ZeroClover
  • Labels: bug, llm translation, SDK

### Check for existing issues

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

### What happened?

On the **`bedrock/claude_platform/<model>`** route, when a `workspace_id` is supplied (which is **required** for this route), the value is correctly set as the `anthropic-workspace-id` HTTP header **but is ALSO serialized as a top-level `workspace_id` field inside the JSON body** POSTed to `…/v1/messages`.

`workspace_id` is not a valid field of the Anthropic Messages API request body. Anthropic's `/v1/messages` rejects unknown top-level fields, so the gateway (`aws-external-anthropic.<region>.api.aws`) is expected to return a `400 invalid_request_error`. The value ends up duplicated — once in the header (correct) and once in the body (incorrect).

This affects the **chat-completions surface only** (`litellm.completion(...)` and the proxy `/v1/chat/completions`, which uses `BedrockClaudePlatformConfig` → `AnthropicConfig`). The **native messages surface** (`litellm.anthropic_messages(...)` / `/v1/messages`, which uses `BedrockClaudePlatformMessagesConfig` → `AnthropicMessagesConfig`) is **not affected**, because it builds the body through an ex…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d17h43m8s ago — entered · #import:https:::github.com:berriai:litellm post #3251
The right issue is harder because it likely requires tracing proxy authorization and role-resolution paths, reconciling the earlier fix, and adding coverage across user/team permission combinations. The left issue appears localized to request-body field filtering with focused regression tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search