Skip to content

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

Open
ThomasK33 wants to merge 2 commits into
mike/fable-5-1-dropfrom
opus-51-prep
Open

🤖 feat: promote Claude Opus 5.1 as the opus model#3993
ThomasK33 wants to merge 2 commits into
mike/fable-5-1-dropfrom
opus-51-prep

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

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 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). 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:

  • API id: claude-opus-5-1 (guess: dash form, dateless, matching the 5-generation convention of claude-sonnet-5 / claude-opus-5 and the dash style of claude-haiku-4-5).
  • Pricing: guessed unchanged from Opus 5, $5/M input, $25/M output (cache write 1.25x input, cache read 0.1x input); no signal either way in the leaks.
  • Envelope: guessed 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).

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 so 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 gave claude-fable-5).
  • 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 documents 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 now 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: 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.
  • 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 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.
  • Gateway first-time defaults (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

  • Behavioral coverage added 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 (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-check green locally; full bun test run 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 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. 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

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

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