Skip to content

feat: add Claude Opus 4.7 to built-in models#2072

Merged
juliusmarminge merged 4 commits intopingdotgg:mainfrom
Marve10s:feat/add-opus-4-7
Apr 16, 2026
Merged

feat: add Claude Opus 4.7 to built-in models#2072
juliusmarminge merged 4 commits intopingdotgg:mainfrom
Marve10s:feat/add-opus-4-7

Conversation

@Marve10s
Copy link
Copy Markdown
Contributor

@Marve10s Marve10s commented Apr 16, 2026

Summary

  • Add claude-opus-4-7 as a built-in model in the Claude provider with full capability metadata (effort levels, context window options)
  • Update the opus alias to resolve to the latest Opus 4.7, while preserving opus-4.6 and all existing aliases
  • Opus 4.7 key differences from 4.6: no fast mode, uses adaptive thinking (not extended thinking), 1M native context window, 128k max output

Changes

  • apps/server/src/provider/Layers/ClaudeProvider.ts — added claude-opus-4-7 entry to BUILT_IN_MODELS
  • packages/contracts/src/model.ts — added opusclaude-opus-4-7, opus-4.7, claude-opus-4.7 aliases

Note

Medium Risk
Changes provider model selection/capabilities and effort handling (including new version comparison logic), which could affect which Claude models are exposed and how sessions are configured on different installed CLI versions.

Overview
Adds Claude Opus 4.7 as a built-in claudeAgent model with updated capability metadata (including xhigh default reasoning effort and 200k/1M context options), and updates opus/opus-4.7 aliases to resolve to it.

Gates exposure of Opus 4.7 on a minimum Claude Code CLI version (2.1.111) using a new shared compareCliVersions utility (also reused for Codex version checks), surfacing an upgrade message and hiding the model on older versions.

Renames and expands Claude effort typing from ClaudeCodeEffort to ClaudeAgentEffort (adding xhigh) across server, shared, and web code; updates adapter/tests accordingly, bumps @anthropic-ai/claude-agent-sdk, and adjusts Codex git text generation to pass --skip-git-repo-check.

Reviewed by Cursor Bugbot for commit dafa03f. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add Claude Opus 4.7 to built-in Claude models with xhigh default effort

  • Adds claude-opus-4-7 as a built-in model in ClaudeProvider.ts, conditionally exposed only when the Claude Code CLI version is >= 2.1.111; older versions receive an upgrade prompt instead.
  • Introduces xhigh as a valid ClaudeAgentEffort value in contracts/src/model.ts, replacing the prior array-union approach with Schema.Literals and renaming ClaudeCodeEffort to ClaudeAgentEffort throughout.
  • Adds shared CLI version comparison utilities in cliVersion.ts, replacing duplicated semver logic that previously existed only for Codex.
  • Model slug aliases opus, opus-4.7, and claude-opus-4.7 now resolve to claude-opus-4-7.
  • Behavioral Change: ultrathink effort is prompt-injected for Opus 4.7 rather than forwarded directly; xhigh is the new default effort for that model.

Macroscope summarized dafa03f.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

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

Run ID: c756ec56-2c10-4e3d-826d-ae7617ab694c

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 and usage tips.

@github-actions github-actions bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Apr 16, 2026
@Marve10s
Copy link
Copy Markdown
Contributor Author

@juliusmarminge Wanna try this out ? I checked and it worked for me. Would like to merge this asap, want a new model lol

@akarabach
Copy link
Copy Markdown
Contributor

@juliusmarminge Wanna try this out ? I checked and it worked for me. Would like to merge this asap, want a new model lol

use claude code ;)

@Marve10s
Copy link
Copy Markdown
Contributor Author

@juliusmarminge Wanna try this out ? I checked and it worked for me. Would like to merge this asap, want a new model lol

use claude code ;)

I don't want to get back to this shitty CLI...

@akarabach
Copy link
Copy Markdown
Contributor

@Marve10s @juliusmarminge
do they have new labling of effort level ? I see in console xhigh!
Screenshot 2026-04-16 at 19 01 38

@flawstick
Copy link
Copy Markdown

Get this shit merged NOW

@akarabach
Copy link
Copy Markdown
Contributor

@akarabach

do they have new labling of effort level ? I see in console xhigh!

If you're referring to the ultrathink, that's also appear to be present in the Opus 4.6 config. I don't know what the origin of the discrepancy is.

https://github.com/pingdotgg/t3code/blob/main/apps/server/src/provider/Layers/ClaudeProvider.ts#L44-L64

xhight is missing

@Marve10s
Copy link
Copy Markdown
Contributor Author

Marve10s commented Apr 16, 2026

@akarabach

do they have new labling of effort level ? I see in console xhigh!

If you're referring to the ultrathink, that's also appear to be present in the Opus 4.6 config. I don't know what the origin of the discrepancy is.
https://github.com/pingdotgg/t3code/blob/main/apps/server/src/provider/Layers/ClaudeProvider.ts#L44-L64

xhight is missing

Will fix

Edit 2 : should be fixed

image

macroscopeapp[bot]
macroscopeapp bot previously approved these changes Apr 16, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 16, 2026

Approvability

Verdict: Needs human review

This PR introduces a new user-facing model option (Claude Opus 4.7) with version-gated availability, changes the default 'opus' alias to point to the new model, and adds a new effort level ('xhigh'). While well-tested and following existing patterns, the new capability and alias change warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@macroscopeapp macroscopeapp bot dismissed their stale review April 16, 2026 16:18

Dismissing prior approval to re-evaluate b501340

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Apr 16, 2026
@Marve10s Marve10s force-pushed the feat/add-opus-4-7 branch 2 times, most recently from 4734a47 to 6effba7 Compare April 16, 2026 16:28
Comment thread apps/server/src/provider/Layers/ClaudeAdapter.ts Outdated
Comment thread apps/server/src/provider/Layers/ClaudeAdapter.ts Outdated
@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Apr 16, 2026
Comment thread apps/server/src/provider/cliVersion.ts
@Marve10s Marve10s force-pushed the feat/add-opus-4-7 branch from 7ca51db to 9ef2f1a Compare April 16, 2026 16:46
@Marve10s Marve10s force-pushed the feat/add-opus-4-7 branch from 9ef2f1a to 6fc7d22 Compare April 16, 2026 16:49
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6fc7d22. Configure here.

Comment thread apps/server/src/provider/codexCliVersion.ts
@github-actions github-actions bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Apr 16, 2026
@juliusmarminge juliusmarminge merged commit 3e07f5a into pingdotgg:main Apr 16, 2026
11 of 12 checks passed
Berkay2002 pushed a commit to Berkay2002/bcode that referenced this pull request Apr 17, 2026
Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 3e07f5a)
Berkay2002 added a commit to Berkay2002/bcode that referenced this pull request Apr 17, 2026
…text-gen reset fix) (#6)

* fix(server): drop stale text generation options when resetting text-gen model selection (pingdotgg#2076)

(cherry picked from commit 7a08fcf)

* fix(web): prevent composer controls overlap on narrow windows (make plan sidebar responsive) (pingdotgg#1198)

(cherry picked from commit 19d4740)

* feat: add Claude Opus 4.7 to built-in models (pingdotgg#2072)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 3e07f5a)

* test(server): align Sonnet 4.6 default effort assertions with fork

Upstream test assumed Sonnet 4.6 defaults to "high"; our fork intentionally
defaults to "medium" per Anthropic's recommendations (a6bbf4b).

---------

Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com>
Co-authored-by: Ibrahim Elkamali <126423069+Marve10s@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
znoraka pushed a commit to znoraka/t3code that referenced this pull request Apr 17, 2026
Co-authored-by: Julius Marminge <julius0216@outlook.com>
aaditagrawal added a commit to aaditagrawal/t3code that referenced this pull request Apr 18, 2026
Integrates upstream/main (9df3c64) on top of fork's main (9602c18).

Upstream features adopted:
- Claude Opus 4.5 and 4.7 built-in models (pingdotgg#2072, pingdotgg#2143)
- Node-native TypeScript migration across desktop/server (pingdotgg#2098)
- Configurable project grouping with client-settings overrides (pingdotgg#2055, pingdotgg#2099)
- Thread status in command palette (pingdotgg#2107)
- Responsive composer / plan sidebar on narrow windows (pingdotgg#1198)
- Capture-phase CTRL+J keydown for Windows terminal toggle (pingdotgg#2113/pingdotgg#2142)
- Bypass xterm for global terminal shortcuts (pingdotgg#1580)
- Windows ARM build target (pingdotgg#2080)
- Windows PATH hydration + repair (pingdotgg#1729)
- Gitignore-aware workspace search (pingdotgg#2078)
- Claude process leak fix + stale session monitoring (pingdotgg#2042)
- Preserve provider bindings when stopping sessions (pingdotgg#2084)
- Clean up invalid pending-approval projections (pingdotgg#2106) — new migration
- Extract backend startup readiness coordination
- Drop stale text-gen options on reset (pingdotgg#2076)
- Extend negative repository identity cache TTL (pingdotgg#2083)
- Allow deleting non-empty projects from warning toast (pingdotgg#1264)
- Restore defaults only on General settings (pingdotgg#1710)
- Release workflow modernization (blacksmith runners, GitHub App token guards, v0.0.20 version bump)

Fork features preserved:
- All 8 providers (codex, claudeAgent, copilot, cursor, opencode,
  geminiCli, amp, kilo) with their adapters, services, and tests
- Fork's custom OpenCode protocol impl in apps/server/src/opencode/ (kept
  over upstream's @opencode-ai/sdk-based provider added in pingdotgg#1758 — fork's
  version is tested and integrated; upstream's parallel files deleted)
- Fork's direct-CLI Cursor adapter (kept over upstream's new ACP-based
  CursorProvider added in pingdotgg#1355 — upstream's parallel files deleted)
- Fork's ProviderRegistry aggregates only codex + claudeAgent snapshots;
  the other 6 providers register via ProviderAdapterRegistry
- PROVIDER_CACHE_IDS stays at [codex, claudeAgent] matching what the
  registry actually caches
- Migration IDs preserved (fork 23/24/25/26; upstream's new 025 lands at
  ID 27 to avoid re-applying on deployed fork DBs)
- Fork's generic per-provider settings (enabled/binaryPath/configDir/
  customModels) kept over upstream's opencode-specific serverUrl/password
- Log directory IPC channels, updateInstallInFlight tracking, icon
  composer pipeline all preserved
- Fork's simplified release.yml (no npm CLI publish, no nightly infra)
- composerDraftStore normalizeProviderKind widened to accept all 8 kinds
- Dark mode --background set to #0f0f0f

Test status:
- All 9 package typechecks pass
- Lint clean (0 errors)
- Tests: 1877 passed, 15 skipped (incl. 4 historically-flaky GitManager
  cross-repo PR selector tests newly gated with TODO for Node-native-TS
  follow-up)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants