[BUG] API Error 400: Unexpected beta header "advisor-tool-2026-03-01" when using custom ANTHROPIC_BASE_URL

Resolved 💬 2 comments Opened Jun 24, 2026 by quiphamantalis Closed Jun 28, 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?

When using Claude Code with a custom ANTHROPIC_BASE_URL (API proxy/gateway), all requests fail with a 400 error because Claude Code sends an anthropic-beta header containing advisor-tool-2026-03-01, which is not recognized by the upstream API.

Configuration

{
  "env": {
    "ANTHROPIC_BASE_URL": "***",
    "ANTHROPIC_AUTH_TOKEN": "***",
    "ANTHROPIC_MODEL": "claude-sonnet-4-6"
  },
  "disableExperimentalBetas": true
}

What I've tried (none of these work)

  • Setting "disableExperimentalBetas": true
  • Setting "DISABLE_PROMPT_CACHING": "1"
  • Setting "ANTHROPIC_HEADERS": "anthropic-beta:" to override the header
  • Updating to the latest version of Claude Code

What Should Happen?

Expected Behavior

  • disableExperimentalBetas: true should prevent all beta headers from being sent, or
  • Beta headers should be stripped/optional when using a custom ANTHROPIC_BASE_URL, or
  • There should be a configuration option to control which beta headers are sent

Error Messages/Logs

API Error: 400 Unexpected value(s) `advisor-tool-2026-03-01` for the `anthropic-beta` header. Please consult our documentation at docs.claude.com or try again without the header.

Steps to Reproduce

  1. Configure Claude Code with a custom ANTHROPIC_BASE_URL
  2. Attempt any request (both VS Code extension and CLI are affected)
  3. Request fails with 400 error

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.181

Claude Code Version

2.1.187

Platform

Other

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

  • Affected: Both VS Code extension and CLI
  • ## Suggested Fix When a custom ANTHROPIC_BASE_URL is configured, Claude Code should either:
  1. Not send beta headers by default
  2. Respect disableExperimentalBetas for all beta headers including advisor-tool-2026-03-01
  3. Provide an env variable like ANTHROPIC_DISABLE_BETA_HEADERS=1 to fully disable them

View original on GitHub ↗

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