fix(cursor): send Grok 4.5 Fast parameters - #881
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughCursor Grok Fast routing now sends ChangesCursor Grok Fast routing
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant createCursorRequest
participant protobuf-request
participant Cursor
Caller->>createCursorRequest: select cursor/grok-4.5-fast
createCursorRequest->>protobuf-request: pass grok-4.5 and requested parameters
protobuf-request->>Cursor: send requestedModel with effort and fast=true
protobuf-request->>Cursor: omit modelDetails when explicit parameters exist
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs-site/src/content/docs/reference/adapters.md`:
- Around line 171-172: Update the translated Cursor adapter sections in the ja,
ko, ru, and zh-cn adapter reference documents to state that cursor/grok-4.5-fast
remains selectable while the request sends canonical grok-4.5 with separate
effort and fast=true parameters.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 672d6a48-7c92-4494-8597-435bd8f459a8
📒 Files selected for processing (8)
docs-site/src/content/docs/reference/adapters.mdsrc/adapters/cursor/effort-map.tssrc/adapters/cursor/protobuf-request.tssrc/adapters/cursor/request-builder.tssrc/adapters/cursor/types.tsstructure/04_transports-and-sidecars.mdtests/cursor-blob.test.tstests/cursor-effort-suffix.test.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs-site/src/content/docs/ja/reference/adapters.md`:
- Around line 107-108: Align the translated Cursor adapter documentation with
the wire contract by identifying requested_model.parameters as the container for
effort and fast=true in docs-site/src/content/docs/ja/reference/adapters.md
lines 107-108, docs-site/src/content/docs/ko/reference/adapters.md lines
126-127, docs-site/src/content/docs/ru/reference/adapters.md lines 137-138, and
docs-site/src/content/docs/zh-cn/reference/adapters.md lines 120-121; preserve
the existing localized wording while adding the localized equivalent of the
field name at each site.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: c3c7f1c9-362a-4741-af6f-1574e4affd5c
📒 Files selected for processing (4)
docs-site/src/content/docs/ja/reference/adapters.mddocs-site/src/content/docs/ko/reference/adapters.mddocs-site/src/content/docs/ru/reference/adapters.mddocs-site/src/content/docs/zh-cn/reference/adapters.md
|
Landed in #892 as 0793edc + 05bb74f + ab6a1ed (authorship preserved). Adversarial review of the stacked branch found no issues in the requested_model path — the model_details/requested_model exclusivity and the discovery-gating were verified against the wt2 cursor blob/frame work. Closing as superseded; thanks for the corrective follow-up to #797. |
Summary
cursor/grok-4.5-fastas the Codex-facing selector, but send Cursor's canonicalgrok-4.5model with separateeffortandfast=trueparametersAgentRunRequest.requested_modelwithout also sending the conflicting legacymodel_detailsWhy
This is a corrective follow-up to my earlier PR #797, which added
cursor/grok-4.5-fastsupport and was included in OpenCodex 2.9.1. After the release, I tested the model through OpenCodex and found that the Fast selector was visible but every request returned 502, whilecursor/grok-4.5continued to work. The earlier PR correctly fixed discovery, but it also assumed Cursor accepted the flattenedgrok-4.5-{effort}-fastid as the outgoing model selection. This PR corrects that request-side assumption.Current Cursor clients represent this selection as base model
grok-4.5plus model parameters (effort=<tier>,fast=true). Cursor's generated protobuf already exposes the same string-valuedRequestedModel.parameterschannel, and the current official SDK leaves legacymodel_detailsunset when it sends a requested model. Using that contract also resolves the ordering concern raised in the automated review on #797: discovered flattened ids now gate availability only and no longer determine the outgoing request shape.The working non-Fast Grok path remains unchanged and continues to use its existing flat effort id. Cursor Router behavior is also unchanged: its already-live
model_details + requested_model(optimization)shape remains intact.Protocol evidence
@cursor/sdk1.0.24 models selections as{ id, params }; its local runtime serializes that shape intoRequestedModel.model_idand string-valuedparameters.{ id: "fast", value: "false" }instead of treating the resolved Fast slug as the request model id.effortandfast; the live probes below verify the exact Grok 4.5 combination used by this patch.User impact
Selecting
cursor/grok-4.5-fastnow reaches Cursor Grok 4.5 Fast instead of failing before generation. Low, medium, high, clamped xhigh, and omitted-effort selections all preserve their existing picker behavior; only the Cursor wire representation changes.Verification
bun test tests/cursor-discovery.test.ts tests/cursor-effort-suffix.test.ts tests/cursor-blob.test.ts tests/cursor-request-builder.test.ts tests/cursor-adapter.test.ts— 111 passedbun test tests/cursor-effort-suffix.test.ts tests/cursor-blob.test.ts— 61 passed after the final regression assertionbun run prepushcd docs-site && bun run buildgit diff --checkcursor-agent 2026.07.23-e383d2blive probe:--model 'grok-4.5[effort=high,fast=true]'completed withOKgrok-4.5witheffort=high,fast=trueand completed withdone / OKChecklist
Summary by CodeRabbit
New Features
cursor/grok-4.5-fast.Bug Fixes
Documentation