Skip to content

fix(cursor): support current Grok 4.5 Fast wire IDs - #797

Merged
lidge-jun merged 1 commit into
lidge-jun:devfrom
jbaehova:agent/fix-cursor-grok-fast-wire-ids
Jul 31, 2026
Merged

fix(cursor): support current Grok 4.5 Fast wire IDs#797
lidge-jun merged 1 commit into
lidge-jun:devfrom
jbaehova:agent/fix-cursor-grok-fast-wire-ids

Conversation

@jbaehova

@jbaehova jbaehova commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • recognize Cursor's current Grok 4.5 Fast wire IDs, where -fast follows the effort tier
  • align Grok 4.5 and Grok 4.5 Fast with Cursor's current low / medium / high effort names
  • use one wire-ID composer for live discovery and outgoing Cursor requests
  • keep discovery compatibility with the older grok-4.5-fast-{effort} ordering

Why

Cursor now exposes Fast variants as IDs such as cursor-grok-4.5-high-fast, while the adapter only matched and emitted grok-4.5-fast-high. Live model filtering therefore removed cursor/grok-4.5-fast from the GUI and Codex catalog even when the account could use it, and direct requests selected a wire ID Cursor no longer serves.

Cursor staff documented the current slug migration from grok-4.5-fast-{medium,high,xhigh} to cursor-grok-4.5-{low,medium,high}-fast: https://forum.cursor.com/t/cursor-grok-4-5-high-fast-doesnt-offer-a-50-discount-at-all/165551/8

Related context: #731 and the closed wrong-target PR #730.

User impact

Accounts whose live model list includes Grok 4.5 Fast can retain cursor/grok-4.5-fast as a separately selectable model. Requests now send the matching trailing-Fast wire ID, including the default/top-tier grok-4.5-high-fast.

Test plan

  • bun test tests/cursor-discovery.test.ts tests/cursor-effort-suffix.test.ts
  • bun run typecheck
  • bun run prepush

Summary by CodeRabbit

  • New Features

    • Added support for low, medium, and high effort levels across additional Cursor models, including Grok and Fast variants.
    • Improved recognition of Cursor model identifiers so supported standard and Fast models appear correctly.
  • Bug Fixes

    • Fixed model availability matching for current and legacy effort identifier formats.
    • Prevented mismatched model and effort combinations from being selected.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e346ca73-4be3-4ac4-aaa7-fee5c64eac6b

📥 Commits

Reviewing files that changed from the base of the PR and between afe2aa3 and c879ec9.

📒 Files selected for processing (5)
  • src/adapters/cursor/discovery.ts
  • src/adapters/cursor/effort-map.ts
  • src/adapters/cursor/request-builder.ts
  • tests/cursor-discovery.test.ts
  • tests/cursor-effort-suffix.test.ts

📝 Walkthrough

Walkthrough

Cursor effort mapping now supports Grok low/medium/high tiers and places -fast after the effort suffix in wire IDs. Request normalization and account discovery use the new format while retaining legacy matching.

Changes

Cursor effort wire-ID handling

Layer / File(s) Summary
Effort mapping and request construction
src/adapters/cursor/effort-map.ts, src/adapters/cursor/request-builder.ts, tests/cursor-effort-suffix.test.ts
Grok tiers now use low/medium/high. cursorWireModelIdWithEffort builds standard and -fast wire IDs. normalizeCursorModelId uses the helper. Tests cover clamping, canonical ladders, and Fast identifiers.
Account discovery compatibility
src/adapters/cursor/discovery.ts, tests/cursor-discovery.test.ts
Account matching recognizes standard IDs, current -{effort}-fast IDs, and the legacy -fast-{effort} format. Tests reject mismatched combinations and retain both Grok variants during filtering.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: wibias, lidge-jun, koopmannleon19977-cmyk, ingwannu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the Cursor fix for current Grok 4.5 Fast wire IDs, which is the primary change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Jul 31, 2026
@jbaehova
jbaehova marked this pull request as ready for review July 31, 2026 04:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c879ec95ce

ℹ️ 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".

*/
export function cursorWireModelIdWithEffort(baseModelId: string, effortSuffix: string): string {
if (baseModelId.endsWith("-fast")) {
return `${baseModelId.slice(0, -"-fast".length)}-${effortSuffix}-fast`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the discovered Fast wire-ID ordering

When GetUsableModels returns only a legacy ID such as cursor-grok-4.5-fast-medium, isCursorModelAvailableForAccount deliberately keeps grok-4.5-fast visible, but every request is now unconditionally rewritten to grok-4.5-medium-fast. For the exact legacy-account context this compatibility branch handles, the selected model can therefore fail with ERROR_BAD_MODEL_NAME; either stop exposing legacy-only discoveries or retain the discovered ordering when constructing the request.

Useful? React with 👍 / 👎.

@lidge-jun
lidge-jun merged commit cd9ad73 into lidge-jun:dev Jul 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants