Skip to content

CLI: Add Opus 4.7 support to code agent with max effort thinking - #3124

Merged
youknowriad merged 3 commits into
trunkfrom
add-opus-4-7-support
Apr 20, 2026
Merged

CLI: Add Opus 4.7 support to code agent with max effort thinking#3124
youknowriad merged 3 commits into
trunkfrom
add-opus-4-7-support

Conversation

@youknowriad

Copy link
Copy Markdown
Contributor

Related issues

  • Related to support for the newly released Opus 4.7 model in the CLI code agent.

How AI was used in this PR

Claude Code (running on Opus 4.7) located the model registry and wired itself in. I reviewed the two-line diff in agent.ts.

Proposed Changes

  • Add claude-opus-4-7 (label: "Opus 4.7") to AI_MODELS in apps/cli/ai/agent.ts. The /model picker, status line, session-resume validator, and AiModelId type all derive from this object and pick up the new entry automatically.
  • Pass effort: 'max' to the Agent SDK query() when the selected model is any Opus variant (matches claude-opus-*). Sonnet stays on the SDK default ('high') since 'max' is currently documented as Opus-only.

Testing Instructions

  • npm run cli:build
  • Launch the CLI code agent and run /model — confirm "Opus 4.7" appears, select it, and verify the status line switches to "Opus 4.7".
  • Send a prompt and confirm Opus 4.7 responds. (Max-effort thinking should take effect; unverified whether the SDK fully supports 'max' on 4.7 yet — if the API errors, we can narrow the gate to claude-opus-4-6.)

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@wpmobilebot

wpmobilebot commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing dcaec9c vs trunk

app-size

Metric trunk dcaec9c Diff Change
App Size (Mac) 1283.06 MB 1283.07 MB +0.01 MB ⚪ 0.0%

site-editor

Metric trunk dcaec9c Diff Change
load 1874 ms 1925 ms +51 ms 🔴 2.7%

site-startup

Metric trunk dcaec9c Diff Change
siteCreation 8100 ms 8119 ms +19 ms ⚪ 0.0%
siteStartup 4934 ms 4955 ms +21 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@youknowriad
youknowriad merged commit 7f85c63 into trunk Apr 20, 2026
10 checks passed
@youknowriad
youknowriad deleted the add-opus-4-7-support branch April 20, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants