Skip to content
Source
Sign inSign up
pingdotgg/t3code

Add Claude Opus 5 model #4472

Mergedthomaslittle(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/4472/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

What

Adds claude-opus-5 ("Claude Opus 5") to the Claude provider's built-in model list, following the same shape as #3009 (Fable 5) and #2849 (Opus 4.8).

  • Listed above Opus 4.8, gated on Claude Code v2.1.219 — the release that shipped Opus 5 as the default Opus model.
  • Effort options low → ultracode, defaulting to high, plus ultrathink as a prompt-injected value.
  • fastMode toggle and a contextWindow select (200k default, 1M opt-in, which resolveClaudeApiModelId renders as claude-opus-5[1m]).
  • normalizeClaudeCliEffort no longer downgrades xhigh to max for this model, since Opus 5 supports it natively.
  • The bare opus alias now resolves to claude-opus-5; opus-5 / claude-opus-5.0 / claude-opus-5-0 were added alongside. Existing 4.8/4.7/4.6 aliases are untouched.

Why

Claude Code v2.1.219 makes Opus 5 the default Opus model, so anyone on a current CLI can't select it from t3 code without this entry. Older CLIs are unaffected — the version gate hides the model and surfaces the usual upgrade message.

Testing

  • ProviderRegistry.test.ts: model shown at v2.1.219, hidden with the upgrade message at v2.1.218.
  • ClaudeAdapter.test.ts: xhigh reaches the SDK unchanged.
  • packages/shared/src/model.test.ts: updated for the opus alias target.
  • Server typecheck and lint clean.

Three pre-existing failures in ProviderRegistry.test.ts on Windows (CLAUDE_CONFIG_DIR expecting a POSIX /tmp path, the codex binaryPath re-probe, and the OpenCode removal test) reproduce on main without this change.

Note

No UI screenshots — this is a data-only entry that renders through the existing model picker rows.

Separately: v2.1.219 also removed fast mode for Opus 4.7, so the fastMode descriptor on claude-opus-4-7 is now stale. Left out of this PR to keep it focused; happy to send a follow-up.

🤖 Generated with Claude Code


Note

Low Risk Data and alias mapping changes in the Claude model catalog; the main behavioral shift is opus resolving to Opus 5 instead of 4.8.

Overview Adds claude-opus-5 to the Claude provider built-in list (reasoning effort through ultrathink, fast mode, 200k/1M context), shown only when Claude Code is v2.1.219+; older CLIs get an Opus 5 upgrade nudge in the provider status message chain.

normalizeClaudeCliEffort keeps xhigh for Opus 5 instead of mapping it to max. Contract aliases repoint bare opus (and opus-5 / versioned variants) to claude-opus-5 rather than Opus 4.8.

Tests cover registry visibility at/ below the version cutoff, adapter effort passthrough, and slug normalization.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 38a3cd208e2ef2303b9164c8736a6d7d82aee3e1. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Add Claude Opus 5 model with version gating and effort normalization

  • Adds claude-opus-5 as a built-in model with effort options (low, medium, high, xhigh, max, ultracode, ultrathink), a fastMode toggle, and a 200k/1m context window selector.
  • Gates the model behind a minimum Claude Code version (2.1.219), showing an upgrade message when the version is too old.
  • Fixes xhigh effort normalization for claude-opus-5 so it is passed through as-is instead of being coerced to max.
  • Updates the opus slug alias in model.ts to resolve to claude-opus-5 instead of claude-opus-4-8, and adds opus-5, claude-opus-5.0, and claude-opus-5-0 as new aliases.
  • Behavioral Change: any client using the opus alias will now route to claude-opus-5 rather than claude-opus-4-8.
Macroscope summarized 38a3cd2.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: bea7ba7c-a366-421d-8184-2c224d74c75d

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. @@ -176,4 +176,4 @@
      176176 "gpt-5.3-spark": "gpt-5.3-codex-spark",
      177177 },
      178178 [CLAUDE_DRIVER_KIND]: {
      179- opus: "claude-opus-4-8",
      179+ opus: "claude-opus-5",

      Opus alias breaks older CLI

      Medium Severity

      The opus alias was updated to claude-opus-5 in model.ts. This change breaks model resolution for older CLIs because claude-opus-5 is only available from Claude Code v2.1.219. Consequently, resolveSelectableModel fails to find opus, causing the system to fall back to an incorrect default model instead of claude-opus-4-8.

      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 84c70bb84902be3b19bd60f3454f2b144ee480b4. Configure [here](https://www.cursor.com/dashboard/bugbot).
    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs human review

      This PR adds a new model capability and has two unresolved medium-severity findings: the 'opus' alias change may break older CLI users, and the context window default appears to contradict the intended behavior. These issues warrant human review before merging.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      There are 2 total unresolved issues (including 1 from previous review).

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 38a3cd208e2ef2303b9164c8736a6d7d82aee3e1. Configure [here](https://www.cursor.com/dashboard/bugbot).
      @@ -89,0 +101,21 @@
      101+ { value: "low", label: "Low" },
      102+ { value: "medium", label: "Medium" },
      103+ { value: "high", label: "High", isDefault: true },
      104+ { value: "xhigh", label: "Extra High" },
      105+ { value: "max", label: "Max" },
      106+ { value: "ultracode", label: "Ultracode" },
      107+ { value: "ultrathink", label: "Ultrathink" },
      108+ ],
      109+ promptInjectedValues: ["ultrathink"],
      110+ }),
      111+ buildBooleanOptionDescriptor({
      112+ id: "fastMode",
      113+ label: "Fast Mode",
      114+ }),
      115+ buildSelectOptionDescriptor({
      116+ id: "contextWindow",
      117+ label: "Context Window",
      118+ // Claude Code selects the 1M variant explicitly (`claude-opus-5[1m]`).
      119+ options: [
      120+ { value: "200k", label: "200k" },
      121+ { value: "1m", label: "1M", isDefault: true },

      Wrong Opus 5 context default

      Medium Severity

      This flips the claude-opus-5 contextWindow default to 1m, so unset selections resolve through resolveClaudeApiModelId to claude-opus-5[1m]. That conflicts with the PR’s stated 200k default / 1M opt-in behavior and with the nearby note that Claude Code selects the 1M variant explicitly.

      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 38a3cd208e2ef2303b9164c8736a6d7d82aee3e1. Configure [here](https://www.cursor.com/dashboard/bugbot).

Sign in to join this conversation.