Skip to content

fix(agents): Claude Code sends no Anthropic beta parameters for a model that isn't Claude - #626

Merged
andrewpark-scaleai merged 1 commit into
mainfrom
andrew.park/claude-code-non-claude-betas
Nov 12, 2026
Merged

andrewpark-scaleai merged 1 commit into
mainfrom
andrew.park/claude-code-non-claude-betas

Conversation

@andrewpark-scaleai

@andrewpark-scaleai andrewpark-scaleai commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Why

Claude Code run on a model that isn't Claude fails its first turn. On 11-11, starting about 22:00 UTC, every task-snapshot-hg4-with-gsuite-bundle-1174-*-glm-ts and -ds-ts run ended at its prompt step with:

claude CLI exited with code 1: API Error: 400 litellm.UnsupportedParamsError: fireworks_ai does not support parameters: ['context_management'], for model=accounts/fireworks/models/glm-5p3-flash

The CLI sends Anthropic's beta parameters whatever the model is. LiteLLM forwards a Fireworks model's request to Fireworks and refuses the parameters that provider doesn't take. The Claude Code 2.1.322 bump didn't cause this, because 2.1.280 sends context_management to a Fireworks model too. What's new is tasks running Claude Code on Fireworks models.

What

When the run's model isn't a Claude model (its name doesn't contain claude), cli_env sets CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1. That stops the CLI sending context_management and the other experimental betas. A value already set in the environment wins. Claude models keep every beta they get today.

Validation

I ran the real claude 2.1.322 against a local server that records each request, on fireworks_ai/glm-5p3-flash:

Environment context_management in the body anthropic-beta
without the flag (today) yes includes context-management-2025-06-27
cli_env with this change no claude-code-20250219,interleaved-thinking-2025-05-14,effort-2025-11-24
a Claude model (claude-sonnet-5-5) yes, unchanged unchanged

New unit tests cover a Fireworks model, a Claude model, a Bedrock Claude model, and an explicit setting winning. The Fireworks case fails on main. tst/unit/agents/claude_code: 280 passed.

Not verified: a run against the real LiteLLM proxy.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Sets CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 for non-Claude models using a configured endpoint.

  • Claude Code skips experimental betas for non-Claude models.

No actionable issues found. Request behavior against the real LiteLLM proxy remains unverified, as the author notes.

Reviews (1) · Last reviewed commit: "fix(agents): Claude Code sends no Anthro..." · Reviewed by Greptile

@andrewpark-scaleai
andrewpark-scaleai requested a review from a team as a code owner November 11, 2026 23:14
@andrewpark-scaleai
andrewpark-scaleai enabled auto-merge (squash) November 11, 2026 23:15
@andrewpark-scaleai
andrewpark-scaleai merged commit 9d56f9a into main Nov 12, 2026
59 of 61 checks passed
@andrewpark-scaleai
andrewpark-scaleai deleted the andrew.park/claude-code-non-claude-betas branch November 12, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants