[BUG] "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1" does not suppress anthropic-beta "advanced-tool-use-2025-11-20"

Resolved 💬 13 comments Opened Feb 3, 2026 by robert-hencke Closed Apr 18, 2026

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?

The latest versions of Claude Code (everything post-2.1.18) do not always honor the environment variable CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 which is documented as: "Set to 1 to disable Anthropic API-specific anthropic-beta headers. Use this if experiencing issues like “Unexpected value(s) for the anthropic-beta header” when using an LLM gateway with third-party providers"

Even if you set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1, Claude will pass the following additional anthropic-beta header of advanced-tool-use-2025-11-20. This breaks setups using the recommended configuration from Claude through an LLM gateway when consuming Anthropic models through Bedrock or Vertex AI, as this beta header is not yet supported by either provider.

What Should Happen?

CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 should disable Anthropic API-specific anthropic-beta headers as the documentation states.

Error Messages/Logs

An example (wrapped) Vertex AI error response through LiteLLM looks like:

API Error: 400 {"error":{"message":"{\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"Unexpected value(s) `advanced-tool-use-2025-11-20` for the
    `anthropic-beta` header. Please consult our documentation at docs.anthropic.com or try again without the header.\"},\"request_id\":\"req_vrtx_011CXWC8PWHg6fQyb7LXBcEs\"}. Received Model
     Group=claude-opus-4-5\nAvailable Model Group Fallbacks=None","type":"None","param":"None","code":"400"}}

Steps to Reproduce

  1. Set up a basic LiteLLM instance according to https://docs.litellm.ai/docs/proxy/docker_quick_start
  2. Add an Anthropic model to LiteLLM offered through Vertex AI.
  3. Set up Claude Code to use a LiteLLM LLM Gateway Configuration using Anthropic's recommendation of "Unified endpoint".
  4. Ensure environment variable CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 is set properly.
  5. Install Claude Code 2.1.19.
  6. Run "claude" and prompt it a few times. (the first succeeds, the remaining fail with the above error.)
  7. Install Claude Code 2.1.18
  8. Run "claude" and prompt it a few times. (all prompts succeed)
  9. Install latest Claude Code (as of writing, 2.1.30)
  10. Run "claude" and prompt it a few times. (all prompts fail with the above error.)

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.18

Claude Code Version

2.1.19 through 2.1.30

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

This is using a LiteLLM Gateway configured as recommended by Anthropic with a backend provider of Vertex AI and the recommended frontend unified (Anthropic-compatible) LiteLLM endpoint.

View original on GitHub ↗

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