fix(anthropic): Claude Code OAuth identity floor — Fable 5.x no longer rejected (port prime-agent#1993) - #106414
fix(anthropic): Claude Code OAuth identity floor — Fable 5.x no longer rejected (port prime-agent#1993)#106414teknium1 wants to merge 1 commit into
Conversation
…1.251 floor Port from PrimeIntellect-ai/prime-agent#1993: Anthropic now gates Claude Fable 5.x models on a Claude Code identity >= 2.1.251 and rejects OAuth requests from older versions with "Claude Code X does not support this model". Our fallback was 2.1.74, and a stale installed CLI could report an equally old version, so OAuth subscription users hit the rejection on the newest models. - fallback bumped to 2.1.266 (current @anthropic-ai/claude-code latest) - detected CLI versions below the (2, 1, 251) floor clamp to the fallback instead of undercutting it - invariant test: fallback always >= floor, stale detection clamps, recent detection wins
૮ >ﻌ< ა ci reviewran on 2b60e98 — fix(anthropic): raise Claude Code OAuth identity to 2.1.266
|
ehz0ah
left a comment
There was a problem hiding this comment.
Reviewed exact head 2b60e988b2ba13abf4ca49fa3c5b31e6a0c216b7.
The OAuth-only identity path now preserves the documented Claude Code 2.1.251 floor for released numeric versions while leaving API-key and third-party client headers unchanged. Prime Agent #1993 provides the rejection threshold, and npm currently reports 2.1.266 as the latest Claude Code release, matching the fallback.
Validation:
scripts/run_tests.sh tests/agent/test_anthropic_adapter.py: 98 passed- focused floor and version-shape probes: numeric boundaries passed
- Ruff and
git diff --check: passed
I found no blocking correctness or regression issue.
|
Review notes at 2b60e98 (no blockers):
|
Anthropic OAuth (Claude subscription) requests no longer get rejected on Claude Fable 5.x models because Hermes presented a stale Claude Code identity.
Symptom
Anthropic now gates the newest model families (Fable 5.x) on a Claude Code client identity >= 2.1.251 and rejects OAuth requests carrying older versions ("Claude Code X does not support this model"). Hermes' fallback identity was
2.1.74, and a machine with a stale installedclaudeCLI would detect and send an equally old version — breaking OAuth exactly for subscription users on the newest models.Upstream evidence: PrimeIntellect-ai/prime-agent hit the identical rejection and bumped their impersonated version in prime-agent#1993 (their pinned 2.1.75 was rejected for Fable 5.x; fixed at >= 2.1.251), then again in prime-agent#2069.
Change
_CLAUDE_CODE_VERSION_FALLBACK:2.1.74→2.1.266(current@anthropic-ai/claude-codenpm latest at time of PR)._CLAUDE_CODE_VERSION_FLOOR = (2, 1, 251): a detected CLI version below the floor clamps to the fallback instead of undercutting it. Prime pins a constant; Hermes detects the installed CLI, so the port needs the floor to fix the whole class — otherwise machines with an old CLI stay broken after the fallback bump.Validation
scripts/run_tests.sh tests/agent/test_anthropic_adapter.pyclaudeCLI installed)2.1.266, floor satisfied2.1.74) clamps; recent detection (2.1.260) winsruff, windows-footguns, compat pointersread_text/write_textin the touched test file per checker policy)Live repro: before —
_get_claude_code_version()on this machine returned2.1.74(the stale fallback), the exact identity class Anthropic rejects for Fable 5.x per the upstream A/B; after — returns2.1.266, above the 2.1.251 gate. (A full wire A/B against a Fable 5.x OAuth request was not run: no Anthropic OAuth credential is configured on this host; the gate threshold is taken from prime-agent's live A/B in #1993.)Root cause in one sentence: the impersonated Claude Code version was pinned in Feb-2026 territory while Anthropic moved the minimum accepted identity forward.
Ported by the weekly prime-agent PR scout (cron). Credit: Sebastian Müller (@badlogic lineage repo, PrimeIntellect-ai/prime-agent#1993).
Infographic