[BUG] 2.1.129 sends unsupported anthropic_beta flags in request body that Bedrock rejects with 400
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
- Configure Claude Code for Bedrock:
CLAUDE_CODE_USE_BEDROCK=1ANTHROPIC_MODELset to an application inference profile (Opus 4.6)AWS_REGION=eu-west-1
- Ensure Claude Code is on version 2.1.129 (default updates channel)
- Start Claude Code and send any message
- 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-20which Bedrock rejected) - The
anthropic-betaheader containsclaude-code-20250219,effort-2025-11-24— unclear if these are also rejected or if only the bodyanthropic_betaarray is the problem - Model: Opus 4.6 via application inference profile
- SDK version reported in user-agent:
@anthropic-ai/sdk 0.93.0
14 Comments
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.
We were able to use
ENABLE_PROMPT_CACHING_1Htill 2.1.129, but the latest upgrade fails with the error above.Yes, situation is the same for us.
Without ENABLE_PROMPT_CACHING_1H works correctly.
Same on Google Vertex.
claude install --force v2.1.128as workaroundit affects 2.1.131 too.
Current solution: Downgrade to 2.1.128 (npm install -g @anthropic-ai/claude-code@2.1.128)
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.
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.
Confirmed that the issue appears limited to when using
ENABLE_PROMPT_CACHING_1H.Am affected on claude 2.1.131 and have PROMPT_CACHING_1H set.
Thanks for the reports, a fix will be included in today's release (coming very soon). Apologies for the disruption
This issue should be fixed in the latest version (2.1.132). Appreciate your reports and patience!
Fix confirmed
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.
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.