fix(ai): bump impersonated Claude Code version to 2.1.257 for Fable 5.x - #1993
Merged
Conversation
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
self-requested a review
September 2, 2026 15:40
sethkarten
approved these changes
Sep 2, 2026
This was referenced Sep 5, 2026
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-1fail 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.75to2.1.257in 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’suser-agentheader (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.257in Anthropic providerUpdates the Claude Code version used by Anthropic stealth-mode impersonation in anthropic.ts from
2.1.75to2.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.