🤖 feat: pre-release prep for Claude Opus 5.1 / Fable 5.1 (DO NOT MERGE until GA) - #3989
🤖 feat: pre-release prep for Claude Opus 5.1 / Fable 5.1 (DO NOT MERGE until GA)#3989ThomasK33 wants to merge 1 commit into
Conversation
|
@codex review |
|
@codex security review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Security review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Closing: superseded by the course-corrected split — Fable 5.1 is owned by #3988 (mike/fable-5-1-drop) and Opus 5.1 is being prepared in a dedicated workspace. A gap audit of this branch's Fable 5.1 changes against #3988 found no gaps (#3988 is a strict superset: same models-extra entry, native-1M pattern, and behavioral test coverage, plus the promotion machinery this PR deliberately omitted). Branch left in place for reference. |
Caution
DO NOT MERGE until Anthropic officially releases these models. Everything below is pre-release preparation seeded from unconfirmed rumors; the ids, pricing, and limits must be confirmed against the official announcement first.
Summary
Pre-release preparation for two rumored upcoming Anthropic models, Claude Opus 5.1 (
claude-opus-5-1) and Claude Fable 5.1 (claude-fable-5-1), so that the moment they go live we only confirm the id/price facts and merge. Adds pricing/capability metadata entries plus native-1M-context pattern coverage, with behavioral tests asserting that both ids inherit the correct thinking-policy ladders, native-xhigh wire transforms, display formatting, and native web-fetch qualification.Background
This replicates the shape of the repo's prior model-addition commits, minus any default-model promotion:
models-extra.tsmetadata + native-1M pattern + behavioral-test shape. Mythos 5 is also this repo's precedent for a model that is declared but not generally available: metadata + regex coverage + tests, no curatedKNOWN_MODELSentry.KNOWN_MODELS.OPUSrepoint, gateway default seeds, docs/skill regeneration) are deliberately not replicated.Both new ids are already matched by the existing forward-compatible regexes for native xhigh (
anthropicSupportsNativeXhigh), Mythos-class no-disabled-thinking clamping, display formatting (Opus 5.1/Fable 5.1), and native web-fetch qualification — those needed only test coverage, no source changes. The two source changes that were needed:models-extra.tsmetadata entries (pricing/limits/capabilities) andmodels.tsnative-1M patterns (anchored, so-1suffixes did not auto-match).Confirm-before-merge checklist
Every item below is seeded from the model's direct predecessor (Opus 5 → Opus 5.1, Fable 5 → Fable 5.1) and is unverified. Confirm each against the official announcement/docs before merging:
Model ids (naming convention extrapolated, may differ at release):
claude-opus-5-1is the real API id for Opus 5.1claude-fable-5-1is the real API id for Fable 5.1Opus 5.1 (seeded from
claude-opus-5):input_cost_per_token: 0.000005)output_cost_per_token: 0.000025)max_input_tokens: 1000000+ native-1M pattern, no beta header)max_output_tokens: 128000)off/low/medium/high/xhigh/maxwith native xhigh effort anddisplay: "summarized"wire transforms (i.e. still matched byanthropicSupportsNativeXhigh, and disabled thinking still allowed →offstays in the policy)webFetch_20250910) supportedFable 5.1 (seeded from
claude-fable-5):input_cost_per_token: 0.00001)output_cost_per_token: 0.00005)low/medium/high/xhigh/max(API rejectsthinking: {type: "disabled"}, sooffis excluded and clamped tolow— same as Fable 5)claude-mythos-5was added)Deliberately not in this PR (follow-up at release, matching the Opus 5 commit):
KNOWN_MODELS.OPUS/FABLE(aliasesopus/fable, app default) — not done here per the no-default rule; docs/skill content regeneration and gateway default seeds only apply if/when that repoint happensId-literal locations (for a mechanical rename at merge time)
If the release uses different ids, rename the literal at every location below (source first, tests after). Current as of HEAD of this branch:
Source (behavior-defining):
src/common/utils/tokens/models-extra.ts:143—"claude-fable-5-1"metadata entry key (comment block above it references the id in prose)src/common/utils/tokens/models-extra.ts:204—"claude-opus-5-1"metadata entry key (comment block above it references the id in prose)src/common/utils/ai/models.ts:185—^claude-fable-5-1native-1M regexsrc/common/utils/ai/models.ts:186—^claude-opus-5-1native-1M regexTests:
src/common/utils/ai/models.test.ts:172-178— native-1M classification assertions (both ids, incl. dated +mux-gateway:forms)src/common/utils/thinking/policy.test.ts:435— Opus 5.1 6-level laddersrc/common/utils/thinking/policy.test.ts:463— Fable 5.1 5-level (no-off) laddersrc/common/utils/ai/providerOptions.test.ts:142(comment) and:147— Opus 5.1 in the native-xhigh wire-transform loopsrc/common/utils/ai/modelDisplay.test.ts:34-35— display-name formatting (Opus 5.1/Fable 5.1)src/common/utils/tools/tools.test.ts:75-76— native web-fetch qualification rowsNo other occurrences exist (
grep -rn "claude-opus-5-1\|claude-fable-5-1" src/).Implementation notes
models.jsonor a curatedKNOWN_MODELSentry, they are usable as custom model strings (anthropic:claude-opus-5-1) with correct stats/capabilities via themodels-extra.tsfallback — exactly howclaude-mythos-5shipped. They do not appear in the model picker or the "Treat as" catalog, and nothing defaults to them.Validation
make static-checkgreen locally (typecheck, eslint, prettier, docs/generated-content sync).models,policy,modelDisplay,tools,providerOptions,modelStats,modelCatalog,knownModels— 408 tests.Risks
Low while unmerged; the entries are additive and unreachable except via explicit custom model strings. The main risk is merging before confirming seeded facts — hence the checklist above and the DO-NOT-MERGE gate.
Generated with
xum• Model:anthropic:claude-fable-5• Thinking:xhigh