The publish run for d9c858c (cursor 0.2.28) went red in
conversation.test.mjs: its first Run went to 127.0.0.1:42583, a closed
agent server of listwait.test.mjs, got ECONNRESET and fell back to
HTTP/1.1, which its fake API doesn't answer. listwait's tokens were
{exp: now+7200+n} with a counter from 0, byte for byte the tokens
conversation.test.mjs mints, so within one second the plugin's agent
endpoint and model list kept for listwait's token were found by
conversation's. conversation, maxmode and usage had the same latent
collision with each other. Each of those files, and context's tokens,
now carry a sub of their own (as http1, latency and the native tests
already did).
Run: on Linux (wsl-run), listwait then conversation was red 6 of 6
before and 0 of 6 after; listwait, conversation, maxmode and usage in
one run 0 of 4 red; bun test packages/cursor 314 pass. On mote, the
whole repo's bun test (2997 pass, 0 fail) and bun scripts/check.mjs (ok).
Broken by hand: the failing order was found by replaying CI's file order
and logging open()'s HTTP/2 failure (ECONNRESET to listwait's port).
Not tried: CI's exact random order beyond the replay.
The usage windows went Cursor Models, Other Models, On-demand, Grok Bot,
Total. magpie's tray panel draws an account's first three, so on an
account that may spend on-demand without a limit, the On-demand ring
(always 0%, only a dollar figure) pushed Grok Bot out, while an account
with no on-demand showed Bot third.
An On-demand with no limit (aside) now goes after Bot, beside Total. One
with a limit keeps its third place ahead of Bot: it is the window that
can stop the account's requests, with the pools aside.
Run: bun test in packages/cursor (89 pass), bun scripts/check.mjs (all
packages ok). The new test fails on 0.2.11's index.mjs (Bot fourth,
On-demand third). Not tried with a real Cursor account that has Grok Bot
and on-demand.
PaSSw0rds' Team account has on-demand turned on for the whole
organization: spendLimitUsage has no individualLimit, pooledLimit
"45120000" and pooledRemaining "38785730" are int64 strings, pooledUsed
6334270 a number, and GetHardLimit answers {"hardLimit": 451200} with or
without a team id. onDemandOf read that as "unlimited", as cursor-agent's
own usage view does, so the On-demand row showed only the member's own
$198.55 at 0%, and a spent team pool never counted the account used up.
Now a team member with no individualLimit and a pooledLimit > 0 gets a
fixed On-demand window on the pool: used = pooledUsed / pooledLimit,
display "$63,342.70 / $451,200.00 (you: $198.55)", not aside, so magpie
stops routing to it when the pool is spent. A hard limit that forbids
on-demand still reads as disabled; a team with no pool and a hard limit
still reads as unlimited. Dollar figures group thousands.
Run: bun test in packages/cursor (86 pass), bun scripts/check.mjs (exit 0).
The new test, built from the payloads quoted in yetone/magpie#1476, fails
on the old index.mjs (On-demand "$198.55", used 0, aside) and on a fix
that shows the member's spend against the pool instead of the pool's own.
Not tried against a real Team account.
A Cursor team (or personal plan) with on-demand spend allowed keeps being
served once Cursor Models / Other Models reach 100% of the included usage.
The usage read gave only those pools, so magpie counted the account used
up: smart routing put it last, and any failure while a pool read 100%
rested it until the billing period renewed (held to 8 days).
usage now also reads GetHardLimit and the period's spendLimitUsage, and
derives the On-demand state exactly as cursor-agent 2026.10.01's usage
view does (fixed limit, unlimited, disabled, unavailable). When on-demand
is fixed or unlimited, the pools are still shown but marked aside, and an
On-demand window ($used / $limit) is the allowance: used up at its limit,
never when there is none (then aside too). Disabled or not known: the
pools are the allowance, as before. Bot stays before Total.
Verified: bun test (77 pass); the three new on-demand tests fail on the
old index.mjs (pools not aside, no On-demand window); bun
scripts/check.mjs cursor. Fixture shapes come from cursor-agent's own
protobuf schema (GetCurrentPeriodUsageResponse.SpendLimitUsage,
GetHardLimitResponse); not tried against a real enterprise account.
Grok Bot has an allowance of its own, apart from Cursor's monthly usage,
and it shows on cursor.com's dashboard only. auth.usage now also reads
https://cursor.com/api/dashboard/get-sand-usage-status with the sign-in
as the dashboard session (WorkosCursorSessionToken, as Cursor's dashboard
and CodexBar's CursorSandUsage.swift send it), and adds a "Grok Bot"
window: a paid grant with its weekly reset, a live trial as
"Grok Bot (trial)" without one. The window is aside, so Bot running out
never stops Cursor model requests, and it comes before Total so it is
among the Usage card's three rings. No grant, an expired trial, a
non-2xx, a redirect (not followed), a hang past 5 s or a reply that
isn't JSON each leave Cursor's own windows as they were.
Rebased onto main after cursor 0.2.4 (7516d63); package version is 0.2.5.
Optional pins for the 5 s AbortSignal.timeout and the Origin header are
not in this commit (Codex CLI unavailable for the edits); the runtime
guards stay.
Tests: usagePercent 130 is shown as 100 (and -5 as 0), and a 307 to a
login page is refused rather than followed; each fails with its guard
removed from botUsage.
HOME=$(mktemp -d) bun test packages/cursor: 73 pass, 0 fail.
HOME=$(mktemp -d) bun test (whole repo, on this commit atop main
7516d63): 1033 pass, 0 fail. bun scripts/check.mjs: all 15 ok. Checked
by hand once before an earlier squash: a Free Cursor account linked to
SuperGrok showed the Bot ring in magpie. Not tried with a paid Cursor
grant.
The model list offers Grok 4.7 only at its context sizes, grok-4.7@256k
and grok-4.7@500k, while a routing group picked before the list had sizes
still asks for bare grok-4.7, which named() runs at its default size.
usage() built the Cursor Models window's models (and Other Models'
notModels) from the listed ids only, so magpie counted bare grok-4.7 in
Other Models: used up, 0% left on the Routing page, ranked last, while
Cursor Models had ~84% left. The pool now also names each listed id's
bare name; inPool still decides which pool it is in.
magpie 99009b93 makes the same match on its side for every plugin (a bare
id and its id@size count as one); this release covers magpie versions
before it.
Verified: the new usage.test.mjs case fails on 0.2.3's index.mjs ("Grok
4.7" counted false/true) and passes now; packages/cursor 67 pass;
check.mjs green. The whole-repo bun test needs HOME=$(mktemp -d) (CI does
it), not run here that way.
* cursor 0.2.0: the list is Cursor's picker, a model once for each context size with that window (claude-opus-5-5@300k, @1m), and effort and fast are the request's, sent as the variant's parameters
The usable list (AgentService/GetUsableModels) names a model once for each effort and speed, and the window was read off the name: 1M when it said 1M, else 200K. The names say 1M of models Cursor serves at 300K outside Max Mode ("Claude Opus 5.5 1M"), and nothing of the 300K Sonnet and Haiku or the 256K Grok have, so on this account 110 of 153 names gave a wrong window: Opus too large, Sonnet, Haiku and Grok too small, and the agents compacted at the wrong point. The request carried no context parameter either, so the window Cursor ran at was its own choice, not the one magpie reported. The same id could go to a 300K and a 1M variant.
Now the list is Cursor's model picker alone (AiService/AvailableModels, asked as the CLI asks it: useModelParameters, doNotUseMarkdown), the way pi-cursor-sdk lists Cursor's catalog. A model with a context parameter is offered once for each size, as <model>@<size> named "<name> @ <size>", its window that many tokens; one without is offered once, its window Cursor's contextTokenLimit (Max Mode's for a model served only there), 200K when Cursor gives none. Effort is not a model of its own: the model's efforts (effort / reasoning_effort / reasoning; extra-high is xhigh) are its variants, the request's reasoning_effort is fitted to the nearest and sent as that parameter, and none turns a Claude's thinking off. Fast is not one either: a service_tier of priority or fast sends fast=true, anything else fast=false, so it is paid for only when asked. A request goes as the variant those parameters pick, by the variant's legacySlug (claude-opus-5-5-medium): the agent API refuses the picker's base name with 502 "AI Model Not Found: Model name is not valid". It goes in Max Mode when that variant is Max Mode's (a 1M size; Opus 300K with fast), or, with no variant for the size, when the size is over Cursor's limit outside it; the "Max Mode Required" retry stays. Hidden, Tab-only and chat-only models stay out, as in the CLI.
The ids change (cursor/claude-opus-5-5 is cursor/claude-opus-5-5@300k; the -fast, -low and -thinking models are gone), so 0.2.0: a model picked in magpie or an agent's config has to be picked again. An id the list doesn't have goes to Cursor as it is named, with the default window. poolBase and firstParty take the @size off, so usage pools as before (grok-4.7@256k Cursor Models, claude-opus-5-5@300k Other Models).
context.test.mjs (new) covers the list, the windows, the variants and the request's parameters and mode; maxmode.test.mjs (rewritten) checks what reaches a fake agent API; usage.test.mjs adds the sized ids. HOME=$(mktemp -d) bun test: 45 pass, 0 fail; check.mjs cursor passes. Tried with a real Cursor account: claude-opus-5-5@300k goes as claude-opus-5-5-medium with context=300k and answers, grok-4.6 as cursor-grok-4.6-high, and pi -p --model magpie/cursor/claude-opus-5-5@300k answers; the base name got the 502 above.
* cursor 0.2.0: an id 0.1.x listed still runs as the variant it stood for, and a variant the account hasn't got is neither offered nor asked for (review of #51)
An id the new list doesn't have went to Cursor as it was named. The ids 0.1.11 listed are families of the variants' own ids (claude-opus-5-5, claude-opus-5-5-fast, claude-haiku-5-5-thinking, cursor-grok-4.6), and they are saved in agents' configs, magpie's picks and routing groups: request(raw, "claude-opus-5-5", "high") was {id: "claude-opus-5-5", params: [], maxMode: false}, the bare name the agent API answers 502 "AI Model Not Found" for, with the effort dropped.
Now an id the list doesn't have is read as one of Cursor's own (named): a variant's legacySlug is that variant; a family of them, taken apart as 0.1.x's splitID did, is the family's variant nearest the default, fast for a -fast family, thinking as the family says, at the effort the id names when the request names none; the picker's name for a model, one of its legacySlugs or idAliases, is its default. Each is at the variant's context size, the default's when two sizes share the id. The request's reasoning_effort and service_tier count as for a listed model. The family is tried before the picker's name, so claude-haiku-5-5 stays the Claude without thinking it was in 0.1.11 where Cursor has variants named so; where it has none it is the model's default. Anything else still goes as it is named.
The usable list (AgentService/GetUsableModels) is read again, beside the picker: a variant whose legacySlug isn't in it is dropped, the model's efforts and sizes are the ones its remaining variants have, and a request no remaining variant matches goes as the nearest of them, not as the default's id with parameters the account hasn't got. A model the usable list has nothing of is the picker's alone (GLM-5.3, as 0.1.7 found) and is kept whole; a usable list Cursor can't give leaves the picker as it is.
answerOf's comment says what pick does with no service_tier (fast off). context.test.mjs checks the PICKER_SKIP names stay out (claude-4.5-haiku, claude-haiku-4-5), each id 0.1.11's offered() gives for the fixture's slugs, variant ids and a model's legacy slug, and the usable list's filter; maxmode.test.mjs checks claude-opus-5-5 reaches the fake agent API as claude-opus-5-5-medium. On b33ec2f's index.mjs the three new context tests and that maxmode test fail. HOME=$(mktemp -d) bun test: 48 pass, 0 fail; check.mjs cursor passes. Not tried with a real Cursor account, and not read against cursor-agent's source (neither is on this machine): the old-id rules follow the review's description and 0.1.11's splitID.
The Run's model went as ModelDetails and RequestedModel with its id alone, never max_mode (ModelDetails field 7, RequestedModel field 2), so a model Cursor serves only in Max Mode was refused. cursor-agent (2026.10.01) turns Max Mode on for such a model itself: requiresMaxMode is supportsNonMaxMode === false or a variant's isMaxMode in AiService/AvailableModels, and a usable model's own maxMode is kept. Now the list notes Max Mode from GetUsableModels' maxMode and from the picker (AvailableModels with useModelParameters, as the CLI asks for it), the Run sends it, and a model neither says it of is asked once more in Max Mode when Cursor answers "Max Mode Required" (the CLI's MAX_MODE_REQUIRED), and in Max Mode from then on. An account Max Mode isn't open to gets Cursor's own answer.
The list was GetUsableModels alone, which is `cursor-agent models`; Cursor's picker offers models it leaves out. The picker's models that no usable id, name or slug names are added: one per variant with a legacy slug, else the model by its name with its default variant's parameters, sent as RequestedModel.parameters; hidden, chat-only, Tab-only and non-agent models, and the four the CLI drops, stay out. A picker Cursor can't give leaves the list as it was.
The tests now import nonet.mjs first: fetch and HTTP/2 reach only this machine, so a test without its fake, or work still running after it, can't send a token to Cursor. maxmode.test.mjs (fake API and agent API: the list with GLM-5.3 and its Flash and Max Mode marked, the picker down, the Run's max_mode and parameters, the retry after Cursor's refusal) fails without the change (5 of 5) and passes with it; bun test packages/cursor (27 pass) and bun scripts/check.mjs pass. No request was made to Cursor.