[BUG] 2.1.129 sends unsupported anthropic_beta flags in request body that Bedrock rejects with 400

Status Fixed / completed
Reported on v2.1.129
Maintainer reply None cached
Activity 14 comments · opened May 6, 2026 · closed May 6, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code 2.1.129 sends an anthropic_beta array in the request body that AWS Bedrock does not recognise, causing all requests to fail with 400 invalid beta flag.

The offending field in the request body:

"anthropic_beta": [
  "interleaved-thinking-2025-05-14",
  "tool-search-tool-2025-10-19",
  "extended-cache-ttl-2025-04-11"
]

This is a regression — 2.1.119 (stable channel) does not include these flags and works correctly on the same Bedrock endpoint.

What Should Happen?

Beta flags that are not supported by the Bedrock API should not be included in the request body when CLAUDE_CODE_USE_BEDROCK=1.

Error Messages/Logs

Captured with ANTHROPIC_LOG=debug:

[log_a94f98] sending request {
  method: "post",
  url: "https://bedrock-runtime.eu-west-1.amazonaws.com/model/arn:aws:bedrock:eu-west-1:...:application-inference-profile%2F.../invoke-with-response-stream",
  options: {
    body: {
      anthropic_beta: [
        "interleaved-thinking-2025-05-14",
        "tool-search-tool-2025-10-19",
        "extended-cache-ttl-2025-04-11"
      ],
      thinking: [Object ...],
      output_config: [Object ...],
      anthropic_version: "bedrock-2023-05-31",
    },
    headers: {
      "anthropic-beta": "claude-code-20250219,effort-2025-11-24",
      "user-agent": "claude-cli/2.1.129 (external, sdk-cli)",
    },
  },
}

[log_a94f98] post ...invoke-with-response-stream failed with status 400 in 1121ms - error; not retryable

API Error: 400 invalid beta flag

Steps to Reproduce

  1. Configure Claude Code for Bedrock:
  • CLAUDE_CODE_USE_BEDROCK=1
  • ANTHROPIC_MODEL set to an application inference profile (Opus 4.6)
  • AWS_REGION=eu-west-1
  1. Ensure Claude Code is on version 2.1.129 (default updates channel)
  2. Start Claude Code and send any message
  3. Immediate failure: API Error: 400 invalid beta flag

Workaround

Set "autoUpdatesChannel": "stable" in ~/.claude/settings.json and restart. This downgrades to 2.1.119 where the issue is not present.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.119 (current stable channel release). Versions between 2.1.119 and 2.1.129 were not tested.

Claude Code Version

2.1.129 (Claude Code)

Platform

AWS Bedrock Commercial

Operating System

macOS

Terminal/Shell

zsh

Additional Information

  • Same regression pattern as #30926 (2.1.69 sent advanced-tool-use-2025-11-20 which Bedrock rejected)
  • The anthropic-beta header contains claude-code-20250219,effort-2025-11-24 — unclear if these are also rejected or if only the body anthropic_beta array is the problem
  • Model: Opus 4.6 via application inference profile
  • SDK version reported in user-agent: @anthropic-ai/sdk 0.93.0

View original on GitHub ↗

14 Comments

Jodre11 · 3 months ago

Confirming this is a regression in 2.1.129. The immediately prior version (2.1.128) works fine with Bedrock — no inappropriate beta flags sent.

harshal-shah · 3 months ago

We were able to use ENABLE_PROMPT_CACHING_1H till 2.1.129, but the latest upgrade fails with the error above.

sassdavid · 3 months ago

Yes, situation is the same for us.
Without ENABLE_PROMPT_CACHING_1H works correctly.

descampsk · 3 months ago

Same on Google Vertex.
claude install --force v2.1.128 as workaround

ngabhanenetskope · 3 months ago

it affects 2.1.131 too.
Current solution: Downgrade to 2.1.128 (npm install -g @anthropic-ai/claude-code@2.1.128)

jahwag · 3 months ago

Confirmed on 2.1.131. Also: setting CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS does not suppress extended-cache-ttl-2025-04-11 — the flag is still sent to Bedrock. Workaround: downgrade to 2.1.128.

jjiburg · 3 months ago

Using Bedrock with ENABLE_PROMPT_CACHING_1H enabled. Was getting API Error: 400 invalid beta flag on 2.1.131. Downgrade to 2.1.128 fixed.

ericsampson · 3 months ago

Confirmed that the issue appears limited to when using ENABLE_PROMPT_CACHING_1H.

tewarivarun · 3 months ago

Am affected on claude 2.1.131 and have PROMPT_CACHING_1H set.

notitatall · 3 months ago

Thanks for the reports, a fix will be included in today's release (coming very soon). Apologies for the disruption

notitatall · 3 months ago

This issue should be fixed in the latest version (2.1.132). Appreciate your reports and patience!

Jodre11 · 3 months ago

Fix confirmed

adrianmck1 · 3 months ago

Claude updated on my machine to v2.1.132 (after I previously downgraded to v2.1.128) and the issue has returned, so I'm not sure that it's fixed in v2.1.132.

github-actions[bot] · 1 month ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.