You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(cursor): map optional Max Mode from the SDK catalog - #27908
Cursor catalog variants can require or optionally offer max mode, but T3 model selection did not set SDK maxMode from the catalog and had no composer control when the same params matched both max and non-max variants.
Change
Return catalog sdkModels from the timed status probe, cache them on the driver, derive forced maxMode from matching variants, expose an optional Max Mode boolean when the catalog offers both, and ignore the option when the selected params have no matching max variant.
Scope and approval
Depends on #27906 (SDK 1.2.0). Catalog/maxMode mapping only; no summarize/compaction changes. Closed precursor: #26262 (split for one-problem).
Verification
vp test run packages/provider-cursor/src/server/sdkModel.test.ts packages/provider-cursor/src/server/status.test.ts packages/provider-cursor/src/server/driver.test.ts packages/provider-cursor/src/server/adapter.test.ts
Macroscope's review found this PR requires human approval — Cursor now derives Max Mode from catalog variants and supports ambient MCP/plugins alongside T3 tools. Human review is needed to confirm the changed default model and tool behavior is intended.
Needs human approval because:
1 blocking correctness issue found at or above your repo's Minimum Blocking Severity
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
No actionable comments were generated in the recent review.
Walkthrough
The Cursor provider now returns SDK model metadata with successful status checks. It uses model variants to determine Max Mode behavior, exposes optional Max Mode as a capability, and passes SDK models into agent and turn model selection.
Changes: Cursor SDK model selection
Layer / File(s)
Summary
Max Mode variant matching packages/provider-cursor/src/server/sdkModel.ts, packages/provider-cursor/src/server/sdkModel.test.ts
Variant matching determines when Max Mode is required or optional. Model selection sets maxMode separately from SDK parameters. Tests cover variant matching and Max Mode selection.
Status results and model capabilities packages/provider-cursor/src/server/status.ts, packages/provider-cursor/src/server/status.test.ts
Status checks return SDK models when catalog loading succeeds, or undefined on failure paths. Models with optional Max Mode receive a default-false capability. Tests cover returned models and capabilities.
Catalog propagation to model selection packages/provider-cursor/src/server/driver.ts, packages/provider-cursor/src/server/adapter.ts, packages/provider-cursor/src/server/driver.test.ts
The driver retains available SDK models and exposes them to the adapter. Agent creation and turn sending provide those models to model selection. The driver test expects Max Mode for a Max-only default variant.
pingdotgg/t3code#26262 — Introduces the Cursor SDK catalog variant behavior that this change uses to select Max Mode.
pingdotgg/t3code#28722 — Extends the catalog-to-model-selection flow by passing catalog models through the adapter.
pingdotgg/t3code#28718 — Changes the catalog implementation and model-discovery path consumed by the status and driver changes.
Suggested reviewers:noahcuadrado, bil0000
Merge Risk: Minimal · up to c2831
No actionable merge-blocking risk is identified in the reviewed change.
Pre-merge checks: 3 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Description check
The description covers the problem, the change, scope and approval, and verification. The Problem and Change sections clearly describe the behavior gap and the fix. The Scope section names a dependenc…
Add a link to the triaged bug issue or the maintainer-approved discussion, with the approval comment. If no prior issue exists, explain why this qualifies as a small, focused fix or as focused configuration of an established capability. Und…
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title "feat(cursor): map optional Max Mode from the SDK catalog" follows conventional commit format and names the main change. The changeset maps SDK catalog variants to a maxMode parameter, force…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat(cursor): map optional Max Mode from the SDK catalog" follows conventional commit format and names the main change. The changeset maps SDK catalog variants to a maxMode parameter, forces maxMode when variants require it, and exposes an optional Max Mode boolean when the catalog offers both modes. The title is specific and concise, and a reviewer scanning history can identify the primary change.
Full details: Description check
Explanation
The description covers the problem, the change, scope and approval, and verification. The Problem and Change sections clearly describe the behavior gap and the fix. The Scope section names a dependency on #27906 and a closed precursor PR. The Verification section lists a focused test command. Gaps against the template: the Scope and approval section does not link a triaged bug issue or maintainer approval, and the template requires explaining why an optional Max Mode setting is a focused configuration of an established capability. The Verification section does not state observed results or note what was not checked, such as live Cursor catalog behavior. The description also omits the required agent model and harness line, although it includes a 'Composer (Cursor harness) via T3 Code' note that may serve that purpose.
Resolution
Add a link to the triaged bug issue or the maintainer-approved discussion, with the approval comment. If no prior issue exists, explain why this qualifies as a small, focused fix or as focused configuration of an established capability. Under Verification, state the observed results for the changed behavior, for example the number of passing tests and the Max Mode behavior checked. State what was not verified, such as live Cursor catalog and Max Mode interaction. Confirm that the agent model and harness line matches the template requirement.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
CodeRabbit Verify
Run CodeRabbit Verify to test the changes in this pull request.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Merged current main into the existing head without conflicts and pushed the merge commit. No additional feature changes.
Verified the contributor's default-parameter Max Mode fix with its existing regression assertion and resolved that review thread. All 44 focused Cursor tests pass. Blacksmith vp run check:changed github/main passes formatting, lint, knip, GraphQL generation checks, typechecks for 39 packages, and 46 tests. Two independent code reviews found no blocking issues.
Live Cursor catalog and Max Mode interaction remain unverified because this VM has no Cursor login. No synthetic catalog or UI evidence was substituted.
Final head: 90d5b00bc432b3e529b31bac8e0fef7c4bb3d211. All 28 GitCafe check contexts are green; GitHub reports CLEAN and MERGEABLE. CodeRabbit completed successfully with no actionable merge-blocking risk.
Cache catalog models from the timed status probe, expose a Max Mode composer boolean when matching variants allow it, and set send maxMode only when forced or admitted by the selected params.
Co-authored-by: Cursor <cursoragent@cursor.com>
When the composer only toggles Max Mode, resolve the default variant's params so matching max-mode variants are admitted instead of requiring isDefault on every candidate.
Co-authored-by: Cursor <cursoragent@cursor.com>
checkCursorProviderStatus now returns { provider, sdkModels }; assert on the provider snapshot after main's auth cases landed beside the Max Mode catalog change.
Co-authored-by: Cursor <cursoragent@cursor.com>
Rebased onto current main (cherry-picked the three Max Mode commits; dropped the ambient commit now on main). Conflicts were only stale package.json / workspace catalog noise — feature code applied cleanly. sdkModel / status tests pass locally (21).
272-273: Major · Functional Correctness · Quick win
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Test Max Mode propagation through the driver.
Extend the existing catalog-refresh case in driver.test.ts with a Max-only variant. Assert that the model passed to the runner includes maxMode: true after refresh. The current helper and status tests would not catch a broken driver-to-adapter catalog connection.
As per coding guidelines, “Backend behavior changes ship with focused tests.”
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Addressed CodeRabbit’s driver coverage note: the existing catalog-refresh case now uses a Max-only default variant and asserts maxMode: true on the model sent after refresh (and retained after a failed status probe).
CI on c28316e is stuck at action_required (fork workflow approval), not a real failure — I don't have rights to approve runs on pingdotgg/t3code. A maintainer click on Approve and run workflows will unblock the same checks that were green on 67d9fda.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:L100-499 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Cursor catalog variants can require or optionally offer max mode, but T3 model selection did not set SDK
maxModefrom the catalog and had no composer control when the same params matched both max and non-max variants.Change
Return catalog
sdkModelsfrom the timed status probe, cache them on the driver, derive forcedmaxModefrom matching variants, expose an optional Max Mode boolean when the catalog offers both, and ignore the option when the selected params have no matching max variant.Scope and approval
Depends on #27906 (SDK 1.2.0). Catalog/maxMode mapping only; no summarize/compaction changes. Closed precursor: #26262 (split for one-problem).
Verification
vp test run packages/provider-cursor/src/server/sdkModel.test.ts packages/provider-cursor/src/server/status.test.ts packages/provider-cursor/src/server/driver.test.ts packages/provider-cursor/src/server/adapter.test.tsComposer (Cursor harness) via T3 Code.