Skip to content

fix(ai): bump impersonated Claude Code version to 2.1.257 for Fable 5.x - #1993

Merged
sethkarten merged 2 commits into
mainfrom
fix/anthropic-claude-code-version
Sep 2, 2026
Merged

fix(ai): bump impersonated Claude Code version to 2.1.257 for Fable 5.x#1993
sethkarten merged 2 commits into
mainfrom
fix/anthropic-claude-code-version

Conversation

@snimu

@snimu snimu commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

The Anthropic API now requires Claude Code version 2.1.251 or newer for Fable 5.x models. Our Anthropic provider identifies itself as Claude Code 2.1.75 on OAuth requests, so claude-fable-5 / claude-fable-5-1 fail with "Claude Code 2.1.75 does not support this model; version 2.1.251 or newer is required" while Opus 5 keeps working with the same login.

This bumps the impersonated version constant to 2.1.257, the version reporters verified. The version is asserted in exactly one place (the user-agent: claude-cli/<version> header for OAuth clients); the other identity pieces (anthropic-beta: claude-code-20250219, x-app: cli, the Claude Code system prompt) carry no version and are unchanged. This constant has been bumped the same way twice before (2.1.2 -> 2.1.62 in #1677, -> 2.1.75 in #2119) whenever the API started gating on a newer floor; it is stale by nature, not a deliberate handshake pin.

Adds one test pinning that the version constant reaches the OAuth request headers (fails on the old constant), plus a note on why the floor is 2.1.251.

Linear: https://linear.app/primeintellect/issue/RES-1257

Fixes #1962


Note

Low Risk
Single constant update for OAuth user-agent impersonation; no auth flow or API contract changes beyond satisfying Anthropic’s version floor.

Overview
Raises the impersonated Claude Code version from 2.1.75 to 2.1.257 in the Anthropic provider so OAuth requests advertise a client new enough for Fable 5.x models.

Anthropic now rejects older claude-cli/* user-agents on those models; the version is wired into the OAuth client’s user-agent header (other Claude Code identity headers stay the same). A changeset documents the fix for RES-1257 / #1962.

Reviewed by Cursor Bugbot for commit 6dcc457. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Bump impersonated Claude Code version to 2.1.257 in Anthropic provider

Updates the Claude Code version used by Anthropic stealth-mode impersonation in anthropic.ts from 2.1.75 to 2.1.257. This fixes an Anthropic OAuth failure that occurred with the older version. A release note was added documenting the change.

Macroscope summarized 6dcc457.

The Anthropic API now gates Fable 5.x models on Claude Code >= 2.1.251
and rejects the previously pinned 2.1.75 identity for OAuth requests.

Fixes #1962
@sethkarten
sethkarten self-requested a review September 2, 2026 15:40
@sethkarten
sethkarten merged commit 3f02aa5 into main Sep 2, 2026
23 checks passed
@sethkarten
sethkarten deleted the fix/anthropic-claude-code-version branch September 2, 2026 15:40
xeophon pushed a commit that referenced this pull request Sep 6, 2026
…2069)

* chore(ai): bump impersonated Claude Code and Copilot client versions

Claude Code 2.1.257 -> 2.1.261 (npm dist-tag latest). The mirrored tool-name
surface is unchanged: the ToolInputSchemas union in the packaged
sdk-tools.d.ts is identical between the two versions (only a Skill prompt
string and one enum value differ), so this is a version-only bump like #1993;
the anthropic-beta strings stay untouched.

GitHub Copilot Chat 0.35.0 -> 0.48.1 (marketplace stable, no pre-release
flag, engine ^1.120.0) on VS Code 1.136.1 (current stable per
update.code.visualstudio.com). The client identity previously lived in two
drift-prone copies (the OAuth flow and the generator's static headers baked
into every Copilot catalog row); both now import one owner,
src/copilot-client-version.ts.

Catalog regenerated: all 28 Copilot rows pick up the new headers; 5
openrouter price-jitter rows rode along (itemized in the PR body).
Byte-stable double regen, unchanged through the CI-mirror build.

Fixes RES-1311

* fix(ai): commit peak tariffs for time-windowed OpenRouter pricing

OpenRouter publishes clock-dependent pricing for some models via
pricing.overrides entries with utc_start/utc_end windows, and the top-level
price reflects whichever window is active when the API is queried. The
evening regen in this PR therefore snapshotted Tencent Hy3's 16:00-24:00 UTC
off-peak tariff (37.5% below the daytime rate) — and the same mechanism, not
a lasting price cut, produced the deepseek-v4-flash-vision-exp "halving"
committed earlier (its listing alternates 0.22/0.44 across six daily
windows).

The OpenRouter cost parse now takes the per-field maximum across the
time-windowed tariffs and the top-level price, so committed costs never
undercount and regens are hour-independent. Overrides without UTC bounds
(context-tier and batch rates) are a different mechanism and stay untouched.
Regen restores both affected rows to their peak rates; no other row changes.

Fixes RES-1311

* chore(ai): regenerate the catalog after merging main

Post-merge regen reflects both lines: the #2074 codex Astra row and this
branch's client headers + hour-independent peak tariffs. 36 rows differ from
main: the 28 Copilot rows (incl. the new gpt-6-astra) pick up the
0.48.1/1.136.1 headers, deepseek-v4-flash-vision-exp returns to its peak
tariff (main committed an off-peak snapshot), and 7 openrouter listing/price
updates rode along. hy3 stays at peak (main's #2074 regen ran inside the
peak window; the tariff derivation keeps it there at any hour). Byte-stable
double regen.

Fixes RES-1311
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.

Fable 5.1 fails because Claude Code is reported as version 2.1.75

2 participants