Skip to content

fix(cursor,quota): adopt the Grok wire prefix (#1159) and unlimited A6API keys (#1171) - #1208

Merged
lidge-jun merged 2 commits into
devfrom
codex/260807-adopt-cursor-quota
Aug 7, 2026
Merged

fix(cursor,quota): adopt the Grok wire prefix (#1159) and unlimited A6API keys (#1171)#1208
lidge-jun merged 2 commits into
devfrom
codex/260807-adopt-cursor-quota

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

Adopts #1159 and #1171. Stacked on #1207.

Both originals should be closed in favor of this PR. Neither needed changes — they were independently re-audited against the current tree and confirmed correct. They are rebuilt here as our own commits per the stack convention, with the original authors credited in the commit messages.

Worth stating plainly: these two sat unmergeable not because of their quality but because 524 workflow runs were queued awaiting maintainer approval, 39 of them on open-PR branches. The readiness gate verifies the ci check, and a run that was never allowed to start has no result to verify — so neither PR could leave draft no matter what its author did. Approving the open-PR subset is what unblocked them.

#1159 — Cursor Grok wire model prefix

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} while Cursor's live discovery advertises cursor-grok-4.5-{tier}.

The fix keeps the two paths separate rather than changing normalization: a request-side helper composes the wire id and leaves the discovery-side one alone. 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 id with effort and fast=true as separate parameters.

Scope correction: despite what the issue discussion implies, this prefixes only regular Grok 4.5. Claude-family ids are unchanged, and this does not address #1162 (Cursor Claude-family resource_exhausted), which still has no code-level cause identified.

Known limitation: the fixture pins the mapping against recorded discovery output, not live Cursor state. It catches mapper drift; it cannot catch a Cursor rename without a manual refresh.

#1171 — A6API unlimited quota keys

An unlimited A6API key reports zero finite credit totals. Finite-total validation treated that as terminal and returned before the key could be represented, so a working key looked dead in the providers dashboard. The unlimited branch now runs ahead of that validation and emits the generic customWindows row the dashboard and CLI already consume, preserving expiry. It accepts true, 1, and "true".

Known limitations: creditsUsd and its expiry are not yet surfaced in the dashboard — visibility comes from customWindows — and finite-key behavior is unchanged.

Verification

bun run typecheck                          # clean
bun test cursor-effort-suffix              # 11 pass, 0 fail
bun test provider-quota                    # 86 pass, 0 fail

The full prepush gate ran and passed on push. This PR touches no frontend files — git diff --name-only returns zero paths under that directory, so there is no UI change to screenshot.

Both adoptions are ablation-confirmed: reverting the Cursor request-builder change fails 2 tests, disabling the unlimited branch fails 1.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d12824f9-3e6b-405d-89a6-8aa8ff9ddb73

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

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

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed.

@github-actions
github-actions Bot marked this pull request as draft August 7, 2026 09:57
@github-actions github-actions Bot added the bug Something isn't working label Aug 7, 2026
@github-actions
github-actions Bot marked this pull request as ready for review August 7, 2026 09:58
@lidge-jun
lidge-jun force-pushed the codex/260807-adopt-cursor-quota branch from d36e408 to e916ec7 Compare August 7, 2026 10:29
@lidge-jun
lidge-jun force-pushed the codex/260807-npm-cache-preflight branch from ec3a31d to ef89b72 Compare August 7, 2026 11:02
@lidge-jun
lidge-jun force-pushed the codex/260807-adopt-cursor-quota branch from e916ec7 to 6db8e6a Compare August 7, 2026 11:02
@lidge-jun
lidge-jun force-pushed the codex/260807-npm-cache-preflight branch from ef89b72 to 46aec35 Compare August 7, 2026 11:34
@lidge-jun
lidge-jun force-pushed the codex/260807-adopt-cursor-quota branch from 6db8e6a to 1b4d7c8 Compare August 7, 2026 11:34
@lidge-jun
lidge-jun force-pushed the codex/260807-npm-cache-preflight branch from 46aec35 to 913579e Compare August 7, 2026 16:47
@lidge-jun
lidge-jun force-pushed the codex/260807-adopt-cursor-quota branch from 1b4d7c8 to 6b7635b Compare August 7, 2026 16:47
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.
Adopted from PR #1171 by @byongshintv, rebuilt on the current stack. Original
closed in favor of this commit.

An unlimited A6API key reports zero finite credit totals. Finite-total
validation then treated that as a terminal failure and returned before the key
could be represented at all, so a perfectly working key looked dead in the
dashboard.

The unlimited branch now runs ahead of that validation and emits the generic
`customWindows` row the GUI and CLI already consume, preserving expiry. It
accepts `true`, `1`, and `"true"` for the upstream flag.

Two known limitations, stated rather than discovered later: `creditsUsd` and
its expiry are not yet surfaced by the GUI — visibility comes from
`customWindows` — and neither changes existing behavior for finite keys.

Confirmed to fail with the unlimited branch disabled.
@lidge-jun
lidge-jun force-pushed the codex/260807-adopt-cursor-quota branch from 6b7635b to aabee91 Compare August 7, 2026 17:15
@lidge-jun
lidge-jun force-pushed the codex/260807-npm-cache-preflight branch from 913579e to 821a845 Compare August 7, 2026 17:15
@lidge-jun
lidge-jun changed the base branch from codex/260807-npm-cache-preflight to dev August 7, 2026 17:32
@lidge-jun
lidge-jun merged commit 347de8c into dev Aug 7, 2026
25 of 43 checks passed
@lidge-jun
lidge-jun deleted the codex/260807-adopt-cursor-quota branch August 8, 2026 00:49
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.

1 participant