Skip to content

🤖 feat: pre-release prep for Claude Opus 5.1 / Fable 5.1 (DO NOT MERGE until GA) - #3989

Closed
ThomasK33 wants to merge 1 commit into
mainfrom
opus-fable-51-prep
Closed

🤖 feat: pre-release prep for Claude Opus 5.1 / Fable 5.1 (DO NOT MERGE until GA)#3989
ThomasK33 wants to merge 1 commit into
mainfrom
opus-fable-51-prep

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

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:

  • ba36c81 (🤖 feat: add Claude Fable 5 / Mythos 5 support #3499, "add Claude Fable 5 / Mythos 5 support") — the models-extra.ts metadata + 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 curated KNOWN_MODELS entry.
  • ae6406a (🤖 feat: add support for Claude Opus 5 #3750, "add support for Claude Opus 5") — the test-coverage shape (native-xhigh provider options loop, thinking policy, 1M classification, native web-fetch rows). The default-promotion parts of that commit (KNOWN_MODELS.OPUS repoint, 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.ts metadata entries (pricing/limits/capabilities) and models.ts native-1M patterns (anchored, so -1 suffixes 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-1 is the real API id for Opus 5.1
  • claude-fable-5-1 is the real API id for Fable 5.1

Opus 5.1 (seeded from claude-opus-5):

  • Input price $5/MTok (input_cost_per_token: 0.000005)
  • Output price $25/MTok (output_cost_per_token: 0.000025)
  • Cache write $6.25/MTok, cache read $0.50/MTok
  • Native 1M context window (max_input_tokens: 1000000 + native-1M pattern, no beta header)
  • 128K max output (max_output_tokens: 128000)
  • Thinking levels: full 6-level ladder off/low/medium/high/xhigh/max with native xhigh effort and display: "summarized" wire transforms (i.e. still matched by anthropicSupportsNativeXhigh, and disabled thinking still allowed → off stays in the policy)
  • Vision / PDF / function calling / response schema support unchanged
  • Native web fetch (webFetch_20250910) supported

Fable 5.1 (seeded from claude-fable-5):

  • Input price $10/MTok (input_cost_per_token: 0.00001)
  • Output price $50/MTok (output_cost_per_token: 0.00005)
  • Cache write $12.50/MTok (1.25× input), cache read $1.00/MTok (0.1× input)
  • Native 1M context window, 128K max output
  • Thinking levels: Mythos-class 5-level ladder low/medium/high/xhigh/max (API rejects thinking: {type: "disabled"}, so off is excluded and clamped to low — same as Fable 5)
  • Vision / PDF / function calling / response schema support unchanged
  • Native web fetch supported
  • Whether a restricted-access Mythos 5.1 twin exists (if so, add its entry the way claude-mythos-5 was added)

Deliberately not in this PR (follow-up at release, matching the Opus 5 commit):

  • Decide whether to repoint KNOWN_MODELS.OPUS/FABLE (aliases opus/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 happens

Id-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-1 native-1M regex
  • src/common/utils/ai/models.ts:186^claude-opus-5-1 native-1M regex

Tests:

  • 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 ladder
  • src/common/utils/thinking/policy.test.ts:463 — Fable 5.1 5-level (no-off) ladder
  • src/common/utils/ai/providerOptions.test.ts:142 (comment) and :147 — Opus 5.1 in the native-xhigh wire-transform loop
  • src/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 rows

No other occurrences exist (grep -rn "claude-opus-5-1\|claude-fable-5-1" src/).

Implementation notes

  • Until the ids appear in upstream models.json or a curated KNOWN_MODELS entry, they are usable as custom model strings (anthropic:claude-opus-5-1) with correct stats/capabilities via the models-extra.ts fallback — exactly how claude-mythos-5 shipped. They do not appear in the model picker or the "Treat as" catalog, and nothing defaults to them.
  • No existing model was removed, deprecated, or repointed.

Validation

  • make static-check green locally (typecheck, eslint, prettier, docs/generated-content sync).
  • Targeted suites green: 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

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 7558a80c25

ℹ️ 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".

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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 7558a80c25

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

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.

@ThomasK33 ThomasK33 closed this Aug 27, 2026
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.

1 participant