Skip to content

fix(anthropic): bump forged Claude Code pin to 2.1.280 - #168

Merged
caidaoli merged 2 commits into
caidaoli:masterfrom
ChenYCL:feat/anthropic-cli-2.1.280
Sep 23, 2026
Merged

caidaoli merged 2 commits into
caidaoli:masterfrom
ChenYCL:feat/anthropic-cli-2.1.280

Conversation

@ChenYCL

@ChenYCL ChenYCL commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Anthropic now returns:

Claude Code 2.1.209 does not support this model; version 2.1.280 or newer is required.

for claude-opus-5-5 (also seen with 2.1.278). The forged pin was still 2.1.258, and native Claude Code passthrough forwarded the caller UA unchanged, so old CLIs 400'd.

npm @anthropic-ai/claude-code latest is 2.1.280.

Changes

  • anthropicCLIVersion 2.1.258 → 2.1.280
  • Callers older than the pin are not treated as native; rewrite raises UA / billing cc_version to 2.1.280
  • Callers at or above the pin still passthrough (prompt cache intact)
  • Wire goldens updated

Test plan

  • go test ./internal/app -run AnthropicClientVersion|AnthropicWireGolden|ValidAnthropicClaudeCLIUserAgent|AnthropicOAuthPreservesNative|AnthropicNativeClaudeCode
  • Opus 5.5 through an Anthropic OAuth channel with an old claude-cli/2.1.209 UA no longer 400s on version

Anthropic rejects opus-5-5 (and newer models) unless the Claude Code
client is 2.1.280 or newer. Native passthrough was forwarding old UAs
such as 2.1.209 unchanged, which 400'd the request.

Raise the forged pin to npm's current 2.1.280. Callers below the pin
are rewritten onto that version; current or newer official CLIs still
passthrough so prompt cache stays intact.
Native Claude Code detection now requires UA >= 2.1.280. Tests still
using 2.1.236 were skipped for anyrouter fallback-tool injection.
@caidaoli
caidaoli merged commit b7ed3a7 into caidaoli:master Sep 23, 2026
3 checks passed
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.

2 participants