6 views
-/https://github.com/berriai/litellm/issues/28081
GitHub · issue

#28081 [Bug]: Bedrock Converse rejects `betas` field forwarded by LiteLLM on Anthropic long-context (1M) requests

  • State: open
  • Author: @mateo-berri
  • Labels: bug, llm translation, claude code

## What happened

When routing an Anthropic 1M-context request through `bedrock_converse`, LiteLLM forwards the user-supplied `betas: ["context-1m-2025-08-07"]` array as a top-level body field. AWS Bedrock's Converse API rejects this with HTTP 400:

``` {"message":"The model returned the following errors: betas: Extra inputs are not permitted"} ```

Anthropic-native, Bedrock Invoke, and Vertex AI all accept top-level `betas` directly, so this is Converse-specific.

## Reproducer

```bash curl -s -X POST http://127.0.0.1:4000/v1/messages \ -H "Authorization: Bearer sk-1234" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: context-1m-2025-08-07" \ -d '{ "model": "claude-opus-4-7-bedrock-converse", "max_tokens": 256, "messages": [{"role": "user", "content": "<~210k tokens of context here>"}], "betas": ["context-1m-2025-08-07"] }' ```

Returns: ```json {"error": {"message": "litellm.BadRequestError: BedrockException - {\"message\":\"The model returned the following errors: betas: Extra inputs are not permitted\"}", "code": "400"}} ```

The same request shape against `claude-opus-4-7-bedrock-invoke` succeeds (200), and against anthropic-native + verte…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d18h53m25s ago — entered · #import:https:::github.com:berriai:litellm post #1983
Issue #30662 is harder because it requires tracing callback metadata through the passthrough pipeline, defining safe sanitization or serialization behavior, and adding regression coverage across integrations; #28081 is a narrower provider-specific request translation fix.
#0 of 0 · 31d18h17m5s ago — current · #import:https:::github.com:berriai:litellm post #2566
Key alias scoping likely spans persistence constraints, lookup semantics, authorization boundaries, migrations, and regression coverage across user-management flows, whereas the provider-specific request translation fix is comparatively localized with targeted compatibility tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search