Skip to content

🤖 feat: promote Claude Opus 5.1 as the opus model - #3993

Draft
ThomasK33 wants to merge 3 commits into
mainfrom
opus-51-prep
Draft

ThomasK33 wants to merge 3 commits into
mainfrom
opus-51-prep

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

Prepares Xum for the Claude Opus 5.1 drop: promotes Opus 5.1 (anthropic:claude-opus-5-1) to the OPUS known model, so the opus alias, the /opus command, tokenizer warming, the default model, the mux-gateway first-time model list, and the CI agent workflows all route to the new model. Opus 5 stays usable as the custom model string anthropic:claude-opus-5 and keeps its metadata entry and tokenizer approximation.

Important

Merge gate: hold until Anthropic officially announces Opus 5.1, then verify the assumptions below against the announcement before merging. Merging early would break opus-alias sends (the API id would not exist yet). This PR stays a draft until then.

Originally stacked on #3988 (Fable 5.1 promotion); now rebased onto main after that PR merged and Fable 5.1 / Mythos 5.1 shipped (Sept 1), which upgraded two of the three assumptions below from pure guesses to precedent-backed guesses.

Background

Opus 5.1 is still unannounced; this PR is prepared ahead of the drop (same play as the Opus 5 promotion in #3750 and the Fable 5.1 promotion in #3988), with assumptions to confirm on release day — all remain provisional until Anthropic's official announcement/docs:

  • API id: claude-opus-5-1 (dash form, dateless). Now precedent-backed: Fable 5.1 shipped exactly this convention (claude-fable-5-1, claude-mythos-5-1), but unconfirmed for Opus.
  • Pricing: $5/M input, $25/M output, cache write 1.25× input (unchanged from Opus 5), cache read 0.025× input ($0.125/M) — mirroring the cache-read cut Fable 5.1 / Mythos 5.1 shipped with (they went 0.1× → 0.025×; Opus 5 is currently 0.1×). This is the most speculative number: if Opus 5.1 keeps 0.1× cache reads, models-extra.ts needs a one-line fix before merge.
  • Envelope: unchanged from Opus 5 — native 1M context, 128K max output, full effort ladder with native xhigh and max, thinking on by default but disable-able (unlike Mythos-class models, "off" remains a valid level), and no Fable-style safeguard classifiers (so Opus 5.1 stays a refusal-fallback target, not a source). Consistent with Fable 5.1 shipping zero wire-format changes, but unconfirmed.

Implementation

  • knownModels.ts: OPUS -> claude-opus-5-1 (keeps the opus alias, warming, and the Opus 4.5 tokenizer approximation). The retired anthropic:claude-opus-5 id joins LEGACY_TOKENIZER_MODEL_OVERRIDES (alongside main's claude-fable-5 / claude-mythos-5 entries) so exact-id lookup keeps its approximation instead of warning and falling back to the generic per-provider tokenizer.
  • models-extra.ts: new claude-opus-5-1 pricing/limits entry; the Opus 5 entry is retained.
  • models.ts: claude-opus-5-1 added to the native-1M patterns — the existing claude-opus-5 pattern only tolerates date suffixes, not -1 (the exact trap 🤖 feat: promote Claude Fable 5.1 as the fable model #3988 documented for Fable).
  • No wire-format changes needed for thinking/effort: anthropicSupportsNativeXhigh already matches any Opus 5+ (claude-opus-[5-9], unanchored), anthropicRejectsDisabledThinking correctly does NOT match (Mythos-class only), and the native web-fetch parser reads claude-opus-5-1 as major 5 / minor 1. Tests pin all three plus display formatting (Opus 5.1).
  • Fallback target migration (the Opus-side counterpart of 🤖 feat: promote Claude Fable 5.1 as the fable model #3988's defaultModelFallbacksSeededFable51): promoting OPUS moves the target of the shipped default chain (Fable 5.1 → Opus 5 becomes Fable 5.1 → Opus 5.1), and already-seeded configs would keep the stale target forever — a key-gap re-seed can't help because no source key changed (and re-running it would resurrect user-deleted chains). A new one-shot flag (defaultModelFallbacksSeededOpus51) guards a target migration in src/node/config/index.ts: a chain that still deep-equals the superseded shipped default ({ models: ["anthropic:claude-opus-5"] }, no enabled/triggers customization, canonical key) moves to the current default exactly once; any deviation — edits, deletions, gateway-prefixed keys — is user intent and is never touched. The migration runs after the key-gap seed in the same load pass, so freshly seeded chains (already on the new target) are no-ops, and it is idempotent if an old build strips the flag.
  • Downgrade byte-stability: LEGACY_DEFAULT_MODEL_FALLBACKS' Fable 5 chain now pins the literal anthropic:claude-opus-5 target instead of KNOWN_MODELS.OPUS.id (which would have silently drifted to Opus 5.1). The legacy chain exists for downgraded pre-5.1 builds whose own shipped default was Fable 5 → Opus 5; pinning keeps the seeded bytes identical regardless of which build ran the original seed pass, and the target migration deliberately skips it.
  • Gateway first-time defaults (providerService.ts), CI agent workflows (auto-cleanup, terminal-bench), terminal-bench leaderboard MODEL_METADATA (Codex round 1), docs model table, docs/guides/github-actions.mdx, and built-in skill content regenerated — mirroring 🤖 feat: add support for Claude Opus 5 #3750's surface set.

Validation

  • Behavioral coverage for the new id: native-1M classification (incl. gateway-prefixed form), 6-level thinking policy with "off" retained, provider options (adaptive + summarized display, native xhigh/max effort), native web-fetch support, display formatting, alias/tokenizer-override registry wiring, and the config migration semantics (exact-default chain migrated once with the legacy chain byte-identical on disk, customized/deleted/gateway-keyed chains untouched, no-op re-run after downgrade, fresh installs carrying all three flags).
  • Audited remaining anthropic:claude-opus-5 fixtures: all use it as an explicit custom model string, which stays valid; default-model-derived fixtures (CLI --help, workspace creation, e2e display name) were updated.
  • Rebase onto main (post-🤖 feat: promote Claude Fable 5.1 as the fable model #3988-merge) re-verified: conflicts resolved additively (Mythos 5.1 promotion, gemini 3.8 fixture churn, config.tsconfig/index.ts split) and make static-check green. The full unit suite was re-run locally on the pinned Bun in fail-closed chunks; every failure was classified as pre-existing: a host git init.templateDir quirk (passes with GIT_TEMPLATE_DIR set), Storybook snapshot-budget and BackupRepoCache failures that reproduce identically on clean origin/main, and suite-load flakes that pass in isolation. CI on this head is fully green and is the authoritative gate.

Risks

Low-to-medium: additive registry/metadata changes plus one config migration. The main user-visible effect is that the opus alias, /opus, and the default model route to Opus 5.1; until the model exists at the API, those sends would fail, which is why the merge gate above matters. The target migration rewrites exactly one chain shape and only when it deep-equals the superseded shipped default — a user who deliberately hand-wrote that exact default shape is indistinguishable from the seed and will be migrated (accepted tradeoff, same class as any default migration). Existing Opus 5 selections and user-edited fallback chains are unaffected. Cost tracking uses the provisional 0.025× cache-read price until the announcement confirms it.


Generated with xum • Model: anthropic:claude-fable-5 • Thinking: xhigh • Cost: $49.52

@ThomasK33

This comment has been minimized.

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 26d3cc4921

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

Comment thread .github/workflows/nightly-terminal-bench.yml Outdated
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Addressed round 1: registered anthropic/claude-opus-5-1 in MODEL_METADATA (display name "Claude Opus 5.1", folder Claude-Opus-5.1) in 2259d65. Please take another look.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 2259d651e3

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

This comment has been minimized.

@ibetitsmike
ibetitsmike force-pushed the mike/fable-5-1-drop branch 2 times, most recently from 83cd075 to 9c427cc Compare September 1, 2026 18:50
Base automatically changed from mike/fable-5-1-drop to main September 1, 2026 19:19
@ThomasK33
ThomasK33 marked this pull request as draft September 1, 2026 20:15
Promotes the OPUS known model to claude-opus-5-1 (opus alias, /opus,
tokenizer warming, gateway defaults, CI workflows). Opus 5 stays usable
as the custom model string anthropic:claude-opus-5 with metadata and a
legacy tokenizer override retained. Adds a one-shot chain-target
migration (defaultModelFallbacksSeededOpus51) that moves the shipped
Fable 5.1 -> Opus 5 refusal-fallback default to Opus 5.1 without
touching user-edited chains, and pins the legacy Fable 5 chain to the
literal Opus 5 id for downgrade byte-stability.
… 5.1

The shipped Fable 5.1 / Mythos 5.1 releases kept standard pricing but cut
cache reads from 0.1x to 0.025x input; mirror that precedent for the
provisional Opus 5.1 entry (still to confirm on announcement day).
@mintlify

mintlify Bot commented Sep 15, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Mux 🟢 Ready View Preview Sep 15, 2026, 10:36 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Rebased onto main after #3988 merged: conflicts resolved (Mythos 5.1, config.ts → config/index.ts split), target migration relocated, and the provisional Opus 5.1 cache-read price now mirrors the shipped Fable 5.1 precedent (0.025× input). Final review round for this draft.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-15T10:39:54.505993Z e78cf41 Manual request
🔒 Security Review Completed 2026-09-15T10:40:21.858288Z e78cf41 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: e78cf41e78

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

🛡️ Codex Security Review · Automatically triggered

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

Reviewed commit: e78cf41e78

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.

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