🤖 feat: promote Claude Opus 5.1 as the opus model - #3993
Conversation
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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 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".
|
Codex Review: Didn't find any major issues. More of your lovely PRs 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". |
Summary
Prepares Xum for the Claude Opus 5.1 drop, stacked on #3988 (base:
mike/fable-5-1-drop): promotes Opus 5.1 (anthropic:claude-opus-5-1) to theOPUSknown model, so theopusalias, the/opuscommand, 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 stringanthropic:claude-opus-5and 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). Merge #3988 first — this PR is intentionally based on it and contains only the Opus delta.Background
Opus 5.1 is not yet announced; leak reports point at an imminent launch alongside Fable 5.1 (#3988). This PR is prepared ahead of the drop (same play as the Opus 5 promotion in #3750), with assumptions to confirm on release day — all three are educated guesses, not verified facts:
claude-opus-5-1(guess: dash form, dateless, matching the 5-generation convention ofclaude-sonnet-5/claude-opus-5and the dash style ofclaude-haiku-4-5).Implementation
knownModels.ts:OPUS->claude-opus-5-1(keeps theopusalias, warming, and the Opus 4.5 tokenizer approximation). The retiredanthropic:claude-opus-5id joinsLEGACY_TOKENIZER_MODEL_OVERRIDESso exact-id lookup keeps its approximation instead of warning and falling back to the generic per-provider tokenizer (same treatment 🤖 feat: promote Claude Fable 5.1 as the fable model #3988 gaveclaude-fable-5).models-extra.ts: newclaude-opus-5-1pricing/limits entry; the Opus 5 entry is retained.models.ts:claude-opus-5-1added to the native-1M patterns — the existingclaude-opus-5pattern only tolerates date suffixes, not-1(the exact trap 🤖 feat: promote Claude Fable 5.1 as the fable model #3988 documents for Fable).anthropicSupportsNativeXhighalready matches any Opus 5+ (claude-opus-[5-9], unanchored),anthropicRejectsDisabledThinkingcorrectly does NOT match (Mythos-class only), and the native web-fetch parser readsclaude-opus-5-1as major 5 / minor 1. Tests now pin all three plus display formatting (Opus 5.1).defaultModelFallbacksSeededFable51): promotingOPUSmoves 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: 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. Both 🤖 feat: promote Claude Fable 5.1 as the fable model #3988 flags and this one coexist: 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.LEGACY_DEFAULT_MODEL_FALLBACKS' Fable 5 chain now pins the literalanthropic:claude-opus-5target instead ofKNOWN_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 whether 🤖 feat: promote Claude Fable 5.1 as the fable model #3988's build or this one ran the original seed pass, and the target migration deliberately skips it.providerService.ts), CI agent workflows (auto-cleanup, terminal-bench), 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
anthropic:claude-opus-5fixtures (stories, task/CLI tests): 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.make static-checkgreen locally; fullbun testrun has 14 failures in unrelated suites (git-fixture/env and UI-flake classes) that reproduce on the base commit without this diff — CI is the authoritative gate.Risks
Low-to-medium: additive registry/metadata changes plus one config migration. The main user-visible effect is that the
opusalias,/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. The stacking on #3988 means merging this PR without #3988's HEAD would be a mistake; GitHub retargets stacked PRs on merge, so merge order (#3988 → this) must be respected.Generated with
xum• Model:anthropic:claude-fable-5• Thinking:xhigh