[BUG] 2.1.69 sends advanced-tool-use-2025-11-20 beta flag that Bedrock/LiteLLM rejects (regression from 2.1.68)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
Upgrading from 2.1.68 to 2.1.69 causes an immediate API 400 error when using AWS Bedrock via a LiteLLM gateway proxy:
API Error: 400 {"error":{"message":"{\"message\":\"invalid beta flag\"}. Received Model Group=us.anthropic.claude-opus-4-6-v1\nAvailable Model Group Fallbacks=None","type":"None","param":"None","code":"400"}}
Version 2.1.69 now sends the advanced-tool-use-2025-11-20 beta flag, which was not sent in 2.1.68. The LiteLLM/Bedrock gateway rejects this flag.
Captured with ANTHROPIC_LOG=debug:
2.1.68 (works):
"anthropic-beta": "claude-code-20250219,interleaved-thinking-2025-05-14,effort-2025-11-24,adaptive-thinking-2026-01-28"
2.1.69 (fails):
"anthropic-beta": "claude-code-20250219,interleaved-thinking-2025-05-14,advanced-tool-use-2025-11-20,effort-2025-11-24"
The new beta advanced-tool-use-2025-11-20 is the culprit. It is added by the u57() function in 2.1.69 which selects between two tool betas based on provider:
// Decompiled from 2.1.69 binary
function u57() {
let T = V8(); // provider detection
if (T === "vertex" || T === "bedrock")
return "tool-search-tool-2025-10-19"; // Bedrock-safe alternative
return "advanced-tool-use-2025-11-20"; // firstParty only
}
Since CLAUDE_CODE_USE_BEDROCK is not set (this is a gateway proxy, not direct Bedrock), the provider is detected as firstParty, and the Bedrock-incompatible beta is sent. There is no env var or setting to disable this beta.
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 has no effect because advanced-tool-use is not gated behind the experimental betas check.
What Should Happen?
Claude Code 2.1.69 should work with Bedrock-backed LiteLLM gateways the same as 2.1.68. Options:
- Add
advanced-tool-use-2025-11-20to the Bedrock beta filter set, or - Gate it behind
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS, or - Use
tool-search-tool-2025-10-19(the Bedrock-safe alternative) whenANTHROPIC_BASE_URLis notapi.anthropic.com, or - Add a
CLAUDE_CODE_DISABLE_ADVANCED_TOOL_USEenv var (consistent withCLAUDE_CODE_DISABLE_ADAPTIVE_THINKING)
Error Messages/Logs
[log] sending request {
url: "https://<gateway>/v1/messages?beta=true",
headers: {
"anthropic-beta": "claude-code-20250219,interleaved-thinking-2025-05-14,advanced-tool-use-2025-11-20,effort-2025-11-24",
},
}
[log] post https://<gateway>/v1/messages?beta=true failed with status 400 in 844ms - error; not retryable
[log] response error {
status: 400,
headers: {
"x-litellm-version": "1.81.9",
},
}
API Error: 400 {"error":{"message":"{\"message\":\"invalid beta flag\"}. Received Model Group=us.anthropic.claude-opus-4-6-v1\nAvailable Model Group Fallbacks=None","type":"None","param":"None","code":"400"}}
Steps to Reproduce
- Configure Claude Code with a Bedrock-backed LiteLLM gateway:
````
ANTHROPIC_BASE_URL=https://<litellm-gateway>
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1
- Run Claude Code 2.1.68 -- works normally
- Upgrade to Claude Code 2.1.69
- Run any prompt -- immediately fails with "invalid beta flag" 400 error
- Setting
CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1does not help (only changes which thinking beta is sent, not the tool beta)
No known workaround. The advanced-tool-use-2025-11-20 beta has no disable flag.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.68
Claude Code Version
2.1.69 (Claude Code)
Platform
LiteLLM + AWS Bedrock Commercial
Operating System
macOS and Linux
Terminal/Shell
wezterm
Additional Information
- Gateway: LiteLLM 1.81.9 proxying to AWS Bedrock Commercial
- Model:
us.anthropic.claude-opus-4-6-v1but all models are affected CLAUDE_CODE_USE_BEDROCKis not set because auth is via API key through the gateway, not IAMCLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1is set but does not affect this beta- This is a recurring pattern. Related closed issues: #21676 (prompt-caching-scope regression in 2.1.23), #20031 (DISABLE_BETAS not working for Bedrock proxies)
- The root cause is that provider detection (
V8()) only checksCLAUDE_CODE_USE_BEDROCKenv var, not the actual backend. Users routing through LiteLLM/API gateways to Bedrock are treated asfirstPartyand receive betas that Bedrock does not support.
This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗