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

2 min read Original article ↗

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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
  2. Ensure Claude Code is on version 2.1.129 (default updates channel)
  3. Start Claude Code and send any message
  4. 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