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
- 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 [BUG] 2.1.69 sends advanced-tool-use-2025-11-20 beta flag that Bedrock/LiteLLM rejects (regression from 2.1.68) #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