[BUG] 2.1.69 sends advanced-tool-use-2025-11-20 beta flag that Bedrock/LiteLLM rejects (regression from 2.1.68)

Resolved 💬 12 comments Opened Mar 5, 2026 by cjpeterein Closed Mar 9, 2026

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:

  1. Add advanced-tool-use-2025-11-20 to the Bedrock beta filter set, or
  2. Gate it behind CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS, or
  3. Use tool-search-tool-2025-10-19 (the Bedrock-safe alternative) when ANTHROPIC_BASE_URL is not api.anthropic.com, or
  4. Add a CLAUDE_CODE_DISABLE_ADVANCED_TOOL_USE env var (consistent with CLAUDE_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

  1. Configure Claude Code with a Bedrock-backed LiteLLM gateway:

``
ANTHROPIC_BASE_URL=https://<litellm-gateway>
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1
``

  1. Run Claude Code 2.1.68 -- works normally
  2. Upgrade to Claude Code 2.1.69
  3. Run any prompt -- immediately fails with "invalid beta flag" 400 error
  4. Setting CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1 does 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-v1 but all models are affected
  • CLAUDE_CODE_USE_BEDROCK is not set because auth is via API key through the gateway, not IAM
  • CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 is 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 checks CLAUDE_CODE_USE_BEDROCK env var, not the actual backend. Users routing through LiteLLM/API gateways to Bedrock are treated as firstParty and receive betas that Bedrock does not support.

View original on GitHub ↗

This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗