fix(provider-cursor): bump @cursor/sdk to 1.0.38 so long-context tiers send Max Mode #21074
main fromrefs/pull/21074/head·merged by juliusmarminge View on GitHubProblem#
Cursor rejects the Max Mode variants that T3 Code selects by default. With Grok 4.7 at Context 500K, every turn fails with AI Model Not Found Invalid parameters for registry model: "grok-4.7". Claude Sonnet 5.5 at 1M fails the same way. This is #15788.
@cursor/sdk 1.0.35 builds agent.v1.RequestedModel from modelId and parameters only and never sets max_mode. Cursor.models.list() marks the 500K and 1M variants isMaxMode: true and often names one of them as the default variant.
Change#
This PR bumps @cursor/sdk from 1.0.35 to 1.0.38 in packages/provider-cursor and apps/server. SDK 1.0.38 resolves the model selection against the catalog on Agent.create, Agent.resume, and send. It sets maxMode: true when every variant that matches the selected params requires Max Mode. T3 Code's own code does not change.
1.0.38 lists zod as a peer dependency, so the lockfile now resolves it to the workspace's zod@4.6.5.
Scope and approval#
This fixes the bug reported in #15788, which has several independent reproductions. The change is a dependency version bump with no T3 Code code changes. It is an alternative to #18700. That PR patches RequestedModel and turns on Max Mode for contexts above 300K. The SDK decides from the catalog's isMaxMode flag instead, so it also covers Max Mode only values that aren't context sizes, such as fast=true on Claude Opus.
Verification#
I ran the SDK directly on macOS arm64 with a real Cursor account, using the exact params T3 Code sent in the failing turns (from the provider event log):
| SDK | Model and params | Result |
|---|---|---|
| 1.0.35 | grok-4.7 with context=500k, fast=true, reasoning_effort=xhigh | AI Model Not Found Invalid parameters for registry model: "grok-4.7" |
| 1.0.35 | grok-4.7 with context=256k, fast=true, reasoning_effort=xhigh | finished |
1.0.35, RequestedModel.maxMode forced true | grok-4.7 with context=500k, fast=true, reasoning_effort=xhigh | finished |
| 1.0.38, unmodified | grok-4.7 with context=500k, fast=true, reasoning_effort=xhigh | finished |
| 1.0.35 | claude-sonnet-5-5 with context=1m, reasoning_effort=high | same Invalid parameters error |
| 1.0.38, unmodified | claude-sonnet-5-5 with context=1m, reasoning_effort=high | finished |
From packages/provider-cursor on this branch, vp test run passed (15 files, 118 tests) and vp run typecheck reported no errors.
With 1.0.38 and zod@4.6.5 from this branch's install, I also created a grok-4.7 agent at context=256k, then called Agent.resume on it with context=500k, the same path T3 Code uses for an existing thread. Both turns finished.
These checks have limits. I did not run the full T3 Code server or a desktop build against this branch.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
No actionable comments were generated in the recent review.
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 689763a
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
4f5e6004-c0d9-42ab-91d3-8ad0c6963584
Commits-
Reviewing files that changed from the base of the PR and between 9b26392e4981e606d8f6db55f6fa9fff2b414274 and d18f5e029ce761b10c9ef1925c17eb233e3327d6.
Files ignored due to path filters: 1-
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
Files selected for processing: 1-
apps/server/package.json
Files skipped from review as they are similar to previous changes: 1-
- apps/server/package.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
Walkthrough
-
The server and Cursor provider package manifests update
@cursor/sdkfrom version1.0.35to1.0.38.Changes: Cursor SDK Dependency Update
Priority:Layer / File(s) Summary Update Cursor SDK dependency versions
apps/server/package.json,packages/provider-cursor/package.jsonBoth packages now declare @cursor/sdkversion1.0.38. NormalEstimated code review effort: 1 (Trivial) | ~5 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#24920: This PR changes the SDK version targeted by the patch in PR
#24920.
Suggested reviewers:
juliusmarminge - pingdotgg/t3code#24920: This PR changes the SDK version targeted by the patch in PR
Merge Risk:
Minimal · up tod18f5-
The dependency update appears mergeable after normal checks; the supplied evidence identifies no actionable regression.
Architecture risk:
Low · up toae23c-
The change affects 2 systems.
Changed systems:
apps/server,packages/provider-cursorArchitecture concerns No architecture-level concerns identified.
Review details
-
Systems and components
- observed — apps/server (service) was modified; 1 changed file maps to changed impact.
- observed — packages/provider-cursor (library) was modified; 1 changed file maps to changed impact.
Before / after behavior
- observed — Modified behavior in apps/server/package.json: The
@cursor/sdkdependency version changed from1.0.35to1.0.38. - observed — Modified behavior in packages/provider-cursor/package.json: Updated the
@cursor/sdkdependency from version1.0.35to1.0.38.
-
Pre-merge checks:
4-
Check name Status Explanation Description check The description includes all required sections. It clearly explains the problem, the SDK version change, scope and issue reference, focused verification results, and testing limitations. Title check The title is concise, specific, and accurately describes the dependency bump and its purpose for Max Mode support in long-context tiers. 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.
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
mihaicojoaca(GitHub profile, opens in a new tab) approved these changes
Confirmed the SDK bump on Linux x64 (WSL2), using the Cursor account from a local T3 nightly rather than a separate macOS setup.
The installed nightly is
0.1.1-nightly.20261020.3411and still ships@cursor/sdk1.0.35. I ran the SDK directly, withlocal: { cwd }pointed at an empty temp directory. I did not replace the running server'snode_modulesand did not build T3 from this branch.Params:
grok-4.7,context=500k,fast=true,reasoning_effort=xhigh. Prompt:Reply with exactly: pong. Do not use tools.SDK Result 1.0.35 from that nightly status: error, 2668ms,AI Model Not Found Invalid parameters for registry model: "grok-4.7". Resultmodelhasidandparamsonly.1.0.38 unmodified status: finished, 4910ms. Resultmodel.maxModeistrue.That matches the 500K row in the verification table. 1.0.38's local runtime forwards
maxModeonly when the selection already has it (...t.model.maxMode ? { maxMode: true } : {}), and the catalog resolver sets it when every matching variant hasisMaxMode.@nkoynov Just checking in on the status of getting this PR merged
I'm not a maintainer here, so I can't merge it. It's waiting on a maintainer review (Macroscope marked it as needing human approval). It checks out on my side: 1.0.38 fixes it, and rcatajar confirmed the same on WSL2.
Oh got it, sorry!
Independent verification on macOS (arm64), T3 Code 0.1.1 release (bundled
@cursor/sdk1.0.35), Cursor provider:In T3,
grok-4.7at the default Context 500K andmuse-wonder-1.0at Context 1M both fail immediately withAI Model Not Found Invalid parameters for registry model: "<model>"; the same threads complete at 256K / 300K.Standalone control with the same account and synthetic reply-only prompts:
Model / params @cursor/sdk 1.0.35 @cursor/sdk 1.0.38 (this PR) grok-4.7, context=500k, reasoning_effort=xhigh, fast=false status: error, registry-model message above status: finished, result model includes "maxMode":truemuse-wonder-1.0, context=1m, reasoning_effort=xhigh status: error, same message status: finished, "maxMode":truegrok-4.7, context=256k, reasoning_effort=xhigh, fast=false status: finished status: finished, no maxMode set So the bump in this PR fixes the long-context rejection for both models, and leaves the standard tier off Max Mode. This confirms request acceptance and a completed response; I did not read the conversation-checkpoint token limit, so it does not by itself prove a 1M selection reached 1,000,000 tokens.
No account identifiers, credentials, local paths, or conversation content included.
juliusmarminge added labelsbugfix
juliusmarminge added labelspr:gate-failed
juliusmarminge merged this850d1e7
juliusmarminge closed this
Sign in to join this conversation.
Approvability#
Verdict: Needs Human Approval
Macroscope's review found this PR requires human approval — Although limited to dependency manifests and the lockfile, this upgrade changes existing default long-context requests so they send Max Mode. That production default behavior change warrants human review.
Notes:
- No code objects were reviewed. Approvability was decided on eligibility alone.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).