fix(cursor): preserve Grok wire model prefix - #1159
Conversation
📝 WalkthroughWalkthroughCursor now sends ChangesCursor Grok 4.5 effort ID handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. 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 `@tests/cursor-effort-suffix.test.ts`:
- Around line 122-136: The test named “regular grok-4.5 requests exactly match
live prefixed discovery ids” uses hard-coded values rather than discovery data
and cannot validate the exact wire ID. Rename it as a static mapping test, or
replace liveIds with a clearly sourced discovery/recorded fixture and assert the
discovery-to-request invariant separately from isCursorModelAvailableForAccount.
🪄 Autofix
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: adea0bce-25ed-44f9-8a8b-44d0ca59bcf7
📒 Files selected for processing (4)
docs-site/src/content/docs/reference/adapters.mdsrc/adapters/cursor/effort-map.tssrc/adapters/cursor/request-builder.tstests/cursor-effort-suffix.test.ts
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This PR stays in draft until every box above is ticked. |
|
✅ Deterministic PR hygiene checks passed. |
|
Closing in favor of #1208, which adopts this change as-is. To be clear about why: this PR needed no changes. It was independently re-audited against current Worth saying plainly: this sat unmergeable because 524 workflow runs were queued awaiting maintainer approval, 39 of them on open-PR branches including this one. The readiness gate verifies the Two notes carried into #1208: the fixture pins against recorded discovery output rather than live Cursor state, so it catches mapper drift but not a future rename without a manual refresh; and the change prefixes only regular Grok 4.5, so it does not address #1162. Thanks — this was a clean fix. |
Adopted from PR #1159 by @jonathanli12, rebuilt on the current stack. Original closed in favor of this commit. Discovery normalizes Cursor's optional `cursor-` prefix so catalog matching can compare canonical ids. Requests then inherited that prefix-free form, so regular Grok 4.5 went out as `grok-4.5-{tier}` when Cursor's live discovery advertises `cursor-grok-4.5-{tier}`. The fix keeps the two paths separate rather than changing normalization: `cursorRequestWireModelIdWithEffort` composes the request-side id and leaves `cursorWireModelIdWithEffort` alone for discovery. Touching normalization would have fixed the request and broken catalog matching in the same edit. Grok Fast is untouched: it keeps the canonical `grok-4.5` model id with `effort` and `fast=true` as separate parameters. Scope note: only regular Grok 4.5 gets the prefix. This does not change Claude-family ids, and it does not address #1162 (Cursor Claude-family resource_exhausted), which has no code-level cause identified yet. Both tests confirmed to fail with the request-builder change reverted.
…un#1159) Adopted from PR lidge-jun#1159 by @jonathanli12, rebuilt on the current stack. Original closed in favor of this commit. Discovery normalizes Cursor's optional `cursor-` prefix so catalog matching can compare canonical ids. Requests then inherited that prefix-free form, so regular Grok 4.5 went out as `grok-4.5-{tier}` when Cursor's live discovery advertises `cursor-grok-4.5-{tier}`. The fix keeps the two paths separate rather than changing normalization: `cursorRequestWireModelIdWithEffort` composes the request-side id and leaves `cursorWireModelIdWithEffort` alone for discovery. Touching normalization would have fixed the request and broken catalog matching in the same edit. Grok Fast is untouched: it keeps the canonical `grok-4.5` model id with `effort` and `fast=true` as separate parameters. Scope note: only regular Grok 4.5 gets the prefix. This does not change Claude-family ids, and it does not address lidge-jun#1162 (Cursor Claude-family resource_exhausted), which has no code-level cause identified yet. Both tests confirmed to fail with the request-builder change reverted.
Summary
cursor-prefix for regular Grok 4.5 outbound wire IDsValidation
Summary by CodeRabbit
Bug Fixes
Documentation
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.