[WRONG BRANCH] fix(cursor): accept trailing -fast Grok wire ids - #730
[WRONG BRANCH] fix(cursor): accept trailing -fast Grok wire ids#730chasehuh wants to merge 1 commit into
Conversation
Cursor GetUsableModels now returns grok-4.5-{effort}-fast instead of
grok-4.5-fast-{effort}, so live discovery dropped Fast and requests used
not_found wire ids. Match both shapes and emit the trailing-fast form.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
This pull request currently targets @chasehuh Please retarget this PR to Its title has been prefixed with This pull request is being kept as a draft automatically. Once every issue above is resolved, it will be marked ready for review again. |
|
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 (5)
📝 WalkthroughWalkthroughCursor effort-tier handling now constructs trailing-fast wire IDs, uses that construction during request normalization, and recognizes the same format during live model discovery. Tests cover valid and invalid effort-tier ordering. ChangesCursor effort-tier wire IDs
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
|
Closing for now — will reopen against |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9677a8bbab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Live GetUsableModels returns grok-4.5-{low,medium,high}-fast, not grok-4.5-fast-{effort}. | ||
| expect(modelIdFor("cursor/grok-4.5-fast", "medium")).toBe("grok-4.5-medium-fast"); | ||
| expect(modelIdFor("cursor/grok-4.5-fast", "high")).toBe("grok-4.5-high-fast"); | ||
| expect(modelIdFor("cursor/grok-4.5-fast", "xhigh")).toBe("grok-4.5-xhigh-fast"); |
There was a problem hiding this comment.
Align Grok tiers with the current wire lineup
When cursor/grok-4.5-fast is requested with xhigh—or with no explicit effort, because cursorEffortSuffix selects the last configured tier—this expectation produces grok-4.5-xhigh-fast. The live lineup documented in this change contains only low, medium, and high, so that request targets an unavailable model; the stale tier map also clamps an explicit low request to medium and advertises xhigh in the picker. Update both Grok tier arrays to low/medium/high and cover low and the default mapping instead of accepting this nonexistent wire ID.
Useful? React with 👍 / 👎.
| export function cursorWireModelIdWithEffort(baseModelId: string, effortSuffix: string): string { | ||
| if (baseModelId.endsWith("-fast")) { | ||
| const stem = baseModelId.slice(0, -"-fast".length); | ||
| return `${stem}-${effortSuffix}-fast`; |
There was a problem hiding this comment.
Preserve the wire form accepted during discovery
When an account's GetUsableModels response contains only the retained legacy form such as grok-4.5-fast-medium, discovery still exposes cursor/grok-4.5-fast (as explicitly covered in tests/cursor-discovery.test.ts), but every subsequent request is unconditionally rewritten here to grok-4.5-medium-fast, which is not among that account's advertised usable IDs. Either stop treating legacy-only discovery results as available or retain which form was discovered and emit that form for requests, otherwise the compatibility path produces an exposed model that cannot be called.
Useful? React with 👍 / 👎.
Summary
{stem}-{effort}-fastin live discovery (keep older{stem}-fast-{effort}too).-fastwire ids when resolvingcursor/grok-4.5-fast+ reasoning effort.Closes #731
Why
Cursor accounts with Grok Fast unlocked were still filtered out of the Codex catalog because OpenCodex expected
grok-4.5-fast-highwhile upstream returnsgrok-4.5-high-fast.Test plan
bun test tests/cursor-discovery.test.ts tests/cursor-effort-suffix.test.tsbun run typecheckgrok-4.5-fastavailability flips to true; wiregrok-4.5-high-fastpresentocx syncon a Cursor account with Grok Fast and pickcursor/grok-4.5-fastSummary by CodeRabbit
Bug Fixes
grok-4.5-fast.Tests