Skip to content

fix(anthropic): present Claude Code 2.1.321 so Fable 5.2 is accepted - #8474

Merged
lidge-jun merged 1 commit into
devfrom
goat/claude-code-version-fable52
Nov 10, 2026
Merged

lidge-jun merged 1 commit into
devfrom
goat/claude-code-version-fable52

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

Calling claude-fable-5-2 through an Anthropic OAuth (Claude subscription) route fails upstream with:

400 invalid_request_error: Claude Code 2.1.280 does not support this model; version 2.1.290 or newer is required.

opencodex presents a fixed Claude Code identity on those routes from src/providers/claude-cli-identity.ts, and it was pinned at 2.1.280. This bumps it to 2.1.321:

  • User-Agent: claude-cli/2.1.321 (external, cli)
  • Stainless package: 0.128.0
  • Stainless runtime: v26.12.1

router-for-me/CLIProxyAPI#7392, merged today for the identical 400, measured the same baseline with a mitmproxy capture of the real client. The locally installed Claude Code 2.1.319 binary carries the same SDK and runtime strings. The SDK pin also updates the API-key @anthropic-ai/sdk/… User-Agent.

Native passthrough that forwards a caller's own Claude Code identity is unchanged. A caller still on Claude Code < 2.1.290 needs claude update.

The other changes in that CPA PR do not apply here: beta-header reordering and the billing cc_version. opencodex builds no version-specific billing header and only passes caller betas through its allowlist.

Verification

  • bun test tests/clients/client-fingerprint.test.ts: 17 pass. A new regression test asserts the presented version is >= 2.1.290 and matches the User-Agent; it fails with the old 2.1.280 identity.
  • The 17 test files that reference these constants (fingerprint, client identity, reset grants, beta allowlist, native passthrough, pickers, intercept, attribution, vision): 410 pass, 0 fail.
  • bun run typecheck: clean.
  • Not run: a live OAuth call. This machine has no Claude Code OAuth login, so the upstream acceptance relies on the CPA capture.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Anthropic refuses claude-fable-5-2 below Claude Code 2.1.290 ("Claude Code 2.1.280 does not support
this model"). The proxy-generated identity now presents 2.1.321 with @anthropic-ai/sdk 0.128.0 on
runtime v26.12.1, the same baseline router-for-me/CLIProxyAPI#7392 measured for the identical 400.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner November 10, 2026 10:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T10:26:03.232867Z 4053b5c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Nov 10, 2026
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@lidge-jun
lidge-jun merged commit 00c0216 into dev Nov 10, 2026
26 of 28 checks passed
@lidge-jun
lidge-jun deleted the goat/claude-code-version-fable52 branch November 10, 2026 10:28
jack-o-mania added a commit to alexalok/opencodex that referenced this pull request Nov 11, 2026
Backport Fable 5.2 client identity from lidge-jun#8474 (00c0216) and per-account tray recoveries from #35 (21226c7).

Keep all version mirrors at 2.96.7, one patch increment per feature. Current-head CI and external Codex code/security review passed for 2547c8e. Owner authorized integration and local installation; pinned upstream synchronization landed through #38.

Co-authored-by: JUN <[email protected]>
Co-authored-by: Aleksei Chistiakov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant