Commit Graph
180 Commits
Author SHA1 Message Date
kazecreator 5b67ff41aa cursor 0.2.3: a Run HTTP/2 can't open goes over HTTP/1.1, as RunSSE + BidiAppend on api2 (#59, kazecreator)
Where a proxy or network blocks HTTP/2, a Cursor Run goes over HTTP/1.1 on api2: RunSSE down, a BidiAppend for each client message up. A failure that says HTTP/2 itself can't be had keeps later Runs on HTTP/1.1 for 10 minutes; a refused connection or a reset stream falls back for that Run only. Reviewed at f5c11b7, merged onto 0437abb: cursor 66 pass, whole repo 1026 pass, check.mjs all 15; each guarded piece broken by hand turns http1.test.mjs red.
2026-10-10 09:33:23 +08:00
yetone 0437abbe30 factory 0.1.22: Claude Code's restored-context turn after /compact reaches Factory adapted (#68, Vigilans)
After /compact, Claude Code 2.1.280 sends the files it restores and the
session's runtime context as one system text block with no reminder
wrappers and no opening token marker: restored-file notes ("Note: <path> was
read before the last conversation was summarized…"), "Called the Read tool
with the following input: {…}" and its result, "# Environment\nYou have been
invoked in the following environment:", the model line, token and date.
The reporter's bisect shows Factory 403s on each of those fixed fragments,
and 0.1.21 matched none of them: SYSTEM_ENV_CONTEXT is anchored at the
block's start, COMPACT_READ / COMPACT_FILE need a standalone wrapped
reminder, and the token-prefixed bundle path needs a leading token marker.

restoredContext recognizes the complete turn: its first paragraph is a
generated restored-file note or Read call (as COMPACT_FILE / COMPACT_READ
would match it wrapped), and a later paragraph, before any hook output, is
the generated environment paragraph or a token marker. Then
announcedContext adapts every paragraph from the first on, with the
existing compat spellings (Previously read file…, # Runtime context / The
session environment is:, Current model name / Model ID / Model knowledge
cutoff) and the lossless JSON encoding of Read results; everything else
stays byte-for-byte. It runs for system-role strings and text blocks and
for the same block folded into user text. An adapted turn no longer opens
with the generated note, so a second pass is byte-for-byte.

Quoted, incomplete (no environment or token), hook-owned and assistant
forms are left untouched.

Run: bun test (packages/factory: 116 pass; repo: 1010 pass, 0 fail),
bun scripts/check.mjs (all pass). The two new tests use the issue's literal
fragments (several notes, Read call + result, environment, model line with
claude-opus-5-5[1m], token, date); the adapting one fails on 0.1.21's
index.mjs, and removing the env/token requirement, the hook guard, the
user-text path or starting at paragraph 1 each turns a test red. PR #66
applied on top passes too (119 factory tests). Stubbed fetch only; no
request was sent to Factory (no Factory account here).
2026-10-10 03:37:05 +08:00
yetone aa2d99bd13 qoder 0.2.12: a chat Qoder refuses (401/403) keeps Qoder's own reason in the error
Yayoi_no_yume on X: a request made right after signing in came back
"Qoder: the sign-in lapsed — sign in again" (401), and only installing and
signing in to Qoder CLI made it work. failure() replaced whatever Qoder said
with that fixed text, so the real reason for the refusal could not be seen.
The message is the same, with "(Qoder said <status>: <its message>)" added
when Qoder gave one; the account is still left unmarked (X-Magpie-Sign-In:
kept), as before.

usage.test.mjs gains the case (a 401 whose body says why); it fails on
0.2.11 and passes. bun test (89 pass) and scripts/check.mjs qoder under a
scratch HOME pass. Not tried against Qoder itself (no Qoder account here),
so the cause of the reporter's 401 is not known yet.
2026-10-10 01:10:39 +08:00
yetone 5189b287e7 grok 0.1.11: a plain Codex agent_message (a subagent's task or reply) reaches Grok as a user message (#61, congee949)
Releases #61 (13e813d), which merged without a version bump: Grok's
Responses backend turned these requests away with 422 unknown item type
"agent_message". Sealed tasks are still sent as they came.

Verified at #61's head merged onto e1efc3d: bun test packages/grok 31 pass,
the whole repo 1007 pass, bun scripts/check.mjs ok. Without the change in
index.mjs, agent-message.test.mjs fails 2 of 4. Sent through
loader().fetch to a local fake of cli-chat-proxy.grok.com: main gives 422,
this version gives 200.
2026-10-09 22:32:53 +08:00
congee949 13e813ddb0 grok: plain Codex collaboration messages reach the Responses backend as user messages (#61) 2026-10-09 22:32:27 +08:00
tearsleeand李 3e6a8d0e03 trae: a model keeps the name its lists agree on (#62)
Trae's usage page books a request under the name of the list it was served
through, and its lists name a model differently: chat_v3 calls
deepseek-v4.1-flash "DeepSeek-V4-Flash 正式版", where the SOLO lists call it
"DeepSeek-V4.1-Flash" (yetone/magpie#681). On 2026-10-09 Trae renamed its
official entries — DeepSeek-V4-Flash-Official is "DeepSeek-V4-Flash" now —
which left chat_v3 the only list still calling deepseek-v4.1-flash by
another's name, so the collision the misnamed test leans on no longer
matches and chat_v3's entry won on list order alone: the page then showed
"DeepSeek-V4-Flash 正式版" for every request, where Trae's own client, served
through a SOLO list, shows "DeepSeek-V4.1-Flash".

A model's name is now the one most of its lists give it — the name Trae's
own client is served under — and the entry carrying it is preferred for the
model's window, reply limit and serving function, as is the Max entry asked
for it. deepseek-v4.1-flash goes back to "DeepSeek-V4.1-Flash", a 200K
window and a 32K reply limit (was 116K/16K from chat_v3's entry), asked
through the SOLO list that names its __dev/__max models.

Co-authored-by: 李 <oncwnuKMG1gRkPtw27nJROKWWRUM@git.weixin.qq.com>
2026-10-09 22:32:20 +08:00
yetone e1efc3d623 kiro 0.1.8: a tool named past 64 characters is sent under a short name, and its calls come back under the caller's (yetone/magpie#1393)
Kiro answers a tool name longer than 64 characters "Invalid tool use
format." (REQUEST_BODY_INVALID), and has declined to raise the limit
(kirodotdev/Kiro#7684). Claude Code names a plugin's MCP tools
mcp__plugin_<plugin>_<server>__<tool>, e.g. the Cloudflare plugin's
mcp__plugin_cloudflare_cloudflare-docs__search_cloudflare_documentation
(71), so every turn that offered it failed. The plugin passed t.name
through as it was.

toolName keeps a name of [a-zA-Z0-9_-]{1,64} as it is; any other becomes
its head (other characters as _) plus _ and 12 hex of its sha256, at most
64 characters. It is the same each turn, so the declaration, the history's
toolUses and the tools declared for the history all agree without state.
toolNames maps each such name back from the request's tools and history,
and reply gives the caller's name on tool_use blocks, streamed and not.
Results pair by toolUseId, which is unchanged.

tool-names.test.mjs (the reporter's 71- and 70-character names) fails 3
of 3 without the change and passes; HOME=$(mktemp -d) bun test: 1003
pass, 0 fail across the repo; bun scripts/check.mjs kiro passes. Not
tried against Kiro itself: no Kiro sign-in on this machine.
2026-10-09 19:25:13 +08:00
ayuand尤贺雨 d21d10f0da qoder 0.2.11: isolate VPC account state (#40)
Co-authored-by: 尤贺雨 <youheyu@sungrowpower.com>
2026-10-09 12:43:23 +08:00
d3711248aa trae: one conversation keeps one session_id (#58)
* trae: one conversation keeps one session_id

The plugin gave every request a fresh `randomUUID()` for both `request_id`
and `session_id` (chatBody), so each request of one agent turn reached Trae
as a different session. Trae counts a conversation by the session its
requests name: a user send that takes several steps (a tool result sent back,
a retry, another function answering) was counted as several conversations,
each a row of its own in the usage detail with no conversation under it —
which is what showed as "Prompt" where the IDE's own sessions show their
title.

`session_id` is now the conversation's, as the IDE keeps one per
conversation: the session magpie (or OpenCode) names the request by, carried
from a new `chat.headers` hook, else the chat's first user message, which
every later turn repeats. Nothing is made up when neither names one — a
made-up conversation of the request's own is the splitting this ends — and
the caller then makes a fresh id per request, as before. The id is salted, so
it says nothing of the words it was made from, and keeps the UUID shape
`randomUUID()` returned. `request_id` stays the request's own.

The title column is not this fix: the IDE's titles are generated by its agent
(`session_title_message`) and reported through its hub, which has no call on
the path this plugin takes. With the session stable, Trae has one
conversation to hang a title on, once it is sent one.

* trae: a conversation is named with the account answering it too

The id a chat's session_id is made of was the conversation alone, so when
magpie failed over, or rotated, between two Trae accounts inside one
conversation, both accounts were sent the same session_id — an id the fresh
random one before it never linked, and one Trae can read one account's
conversation as another's. The account (its uid, else its name) is now part
of what the id is made of: conversationID(req, session, who), who being the
account already resolved just above the request.

The cost, as the comment says: a conversation answered by two accounts is
counted as two again, which is what it did before it was named at all.

Two tests: two accounts of one conversation (named by magpie's session and
by the chat's own first message, and an account named by its name alone) are
two conversations to Trae, and one account's two conversations stay two.
The first fails with the account left out of the id.

---------

Co-authored-by: tearslee <16331052+tearslee@users.noreply.github.com>
Co-authored-by: 李 <oncwnuKMG1gRkPtw27nJROKWWRUM@git.weixin.qq.com>
2026-10-09 11:48:59 +08:00
yetone fb253f91d5 cursor 0.2.2: a model listed at a size Cursor has a fast variant of says fast: true (yetone/magpie#1360, loosheng)
0.2.0 stopped listing a model's -fast one and takes fast as the request's
service_tier, so magpie, which offered its Fast switch (the agent picker's
lightning, a group member's 标准速度/快速) for a model with a -fast one,
offered it for none. The runtime model now says fast: true when a variant
the account is served at that context size has fast=true (Opus 5.5 @ 300k,
Composer 2.5, Grok 4.7), and nothing otherwise (a size with no fast variant,
a model with no fast parameter, an account the usable list doesn't serve the
fast variants). Requests are unchanged.

Tested: new context.test.mjs case, which fails on 0.2.1 (no model says
fast); the whole package (50 tests) and scripts/check.mjs pass. Not tried
with a real Cursor account.
2026-10-09 05:14:56 +08:00
yetone af4a0b365d mimo 0.1.9: an account with a Token Plan and no app membership gets answers (yetone: 2 个模型中有 2 个没有响应). The app's /route answers such an account 403 membership_required ("未开通会员或会员已到期,请订阅后使用") for every model. The plugin now reads the plan's tp- key and endpoint from the open platform with the same passToken (/tokenPlan/apiKey's openaiBaseUrl, /tokenPlan/apiKey/raw), sends the request there with Bearer <key> and no cookies, mimo-pro/mimo-flash asked as mimo-v2.6-pro/mimo-v2.6-flash, and goes straight to the plan for an hour after. A key the plan turns away (401) is read again next time; no plan or no key passes the app's 403 through as it was. The usage card's Token Plan window is the account's allowance, not an aside, when there is no app plan.
Tested on the owner's real account (Token Plan Lite, no app membership): mimo-pro, mimo-flash (streamed) and mimo-auto answered 200 through the loader's fetch; usage shows Token Plan Lite with the "Token Plan" window. bun test (990 pass) and scripts/check.mjs under a temp HOME; 3 of the new tests fail on 0.1.8.
2026-10-09 01:50:45 +08:00
geoqiao cf0de01e2a cursor 0.2.1: an id 0.1.x listed, at an effort only its other branch has, goes as its own branch's nearest, not as the default's id with parameters that contradict it (review of #51) (#54)
An old id names a branch of a model's variants (claude-opus-5 is the Opus 5
without thinking). When the effort asked for exists only in the other branch,
no variant matched and the request went as the default's legacySlug with the
parameters it had been given: cursor/claude-opus-5 at xhigh went as
claude-opus-5-thinking-high with thinking=false, effort=xhigh. On this
account Opus 5 without thinking stops at high, so it happens today: 40 of
5040 old id × effort × fast combinations, all claude-opus-5. 0.1.11 sent
claude-opus-5-high there.

Now, for an old id, a request no variant matches goes as the variant of
its own branch (every parameter but the effort as asked) at the nearest
effort it has (branch()): claude-opus-5 at xhigh or max is claude-opus-5-high,
-fast at xhigh is claude-opus-5-high-fast, as 0.1.11 sent them. Where the
default differs from what is asked in the effort alone, the effort still goes
as asked. A listed id is not changed.

context.test.mjs adds a picker shaped like this account's Opus 5 and checks
those cases and that every id sent agrees with its parameters (which holds
where the default's branch is complete, as in this picker; see Not covered);
it fails on 8cd5a0f's index.mjs. HOME=$(mktemp -d) bun test packages/cursor:
49 pass, 0 fail; check.mjs cursor passes. Offline against this account's
picker and usable list: the contradicting requests go from 40 to 0.

With a real Cursor account, this version installed into magpie (packed from
this code plus one temporary line logging what request() returns):
cursor/claude-opus-5 at reasoning_effort xhigh (max_tokens 16) went as
claude-opus-5-high with thinking=false, context=300k, effort=high,
fast=false, maxMode=false, and answered 200 ("ok", 14 in / 4 out, 5.2s;
magpie's usage log: effort xhigh, status 200). On 0.2.0 the contradicting
request cursor/claude-opus-5-low at xhigh also answered 200, so it failed
silently.

Not covered. branch() steps aside when what is asked differs from the
default variant in the effort alone, so that an effort goes as asked, as
for a listed model (the existing claude-opus-5-5-xhigh test expects
effort=xhigh). So when the branch that stops short is the default's own,
the request still goes as the default's slug with the effort asked: with a
default of m-high (no thinking, low to high) and a thinking branch up to
max, m at xhigh goes as m-high with effort=xhigh. Dropping that early
return fixes it (effort=high) and changes that one assertion; left for the
maintainer to decide. On this account no model's default branch is the
shorter one (of 20 models with two or more branches, only non-default
branches stop short: claude-opus-5's without thinking, and gpt-5.4's fast
one after the usable list).
2026-10-09 00:25:32 +08:00
geoqiao 8cd5a0fad8 cursor 0.2.0: the list is Cursor's picker, a model once per context size with that window; effort and fast are the request's (#51)
* 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.
2026-10-08 22:03:11 +08:00
yetone f4c0d96c9c factory 0.1.21: pi's compaction summary reaches Factory without its fixed opening sentence (yetone/magpie#1316, Eriice)
After pi compacted a session, every turn on factory/claude-opus-5-5 was 403
"Factory: Forbidden". The reporter's replays through magpie found the
refused part: the sentence pi opens its summary message with,
"The conversation history before this point was compacted into the
following summary:" (pi-coding-agent dist/core/messages.js
COMPACTION_SUMMARY_PREFIX, the same in 1.0.4 and 1.1.0), whole; with it
removed, reworded or halved the request was answered.

A user text that is pi's whole summary message (the sentence, a blank line,
<summary>, and </summary> last) now opens "Earlier conversation context is
summarized below:", the summary itself unchanged. pi's other fixed summary
opening, BRANCH_SUMMARY_PREFIX ("The following is a summary of a branch
that this conversation came back from:"), is reworded the same way; that
Factory refuses it is not confirmed. On Messages (string content and text
blocks), chat completions and Responses user messages alike. The sentence
quoted by a user, without pi's summary around it, or in an assistant turn
goes on as it is.

pi.test.mjs: 3 new tests; the two adaptation tests fail on 0.1.20
(Expected/Received differ on the summary text), the third checks what is
left alone. bun test (114 pass) and bun scripts/check.mjs factory pass.
Not tried against Factory itself (no Factory account here).
2026-10-08 21:03:04 +08:00
yetone 5e80f39d3f qoder 0.2.10: international check-in finds Qoder's device identity runtime where Qoder CLI and the Linux desktop really keep it (ARNO on Discord: "device identity runtime not found")
0.2.9 (#49) looked for the CLI's cached runtime in ~/.qoder/.bin/umid-<platform>-<arch>-*/ on every platform. qodercli 1.1.66 (npm) and the worker in Qoder desktop 0.4.3 (extractBinary) make that folder only on Windows (umid-win32-<arch>-<hash>\runtime-info.exe with sgsdk.dll); on macOS and Linux they write a file, ~/.qoder/.bin/runtime-info-<platform>-<arch>-<hash>. And the Linux desktop installs to /opt/Qoder/resources/umid/runtime-info (Qoder 0.4.3's .deb and .rpm), which wasn't looked at. So a macOS user with only the CLI, and every Linux user, got HTTP 502 on the international check-in, while Qoder CN (which needs no runtime) checked in.

campaignRuntime now looks at /opt/Qoder on Linux, reads the CLI's cache as the CLI writes it (the newest matching file, a .tmp being written skipped), and follows the CLI's own folder settings (QODER_CONFIG_DIR, QODER_CLI_HOME, QODER_CONFIG_DIR_NAME). Windows and macOS desktop lookup is unchanged.

checkin.test.mjs lays out the CLI cache as qodercli writes it on win32/x64, darwin arm64/x64 and linux x64/arm64, plus /opt/Qoder and the config-folder variables: 6 of the new tests fail on 0.2.9 (the Windows case passes on both, as 0.2.9 had it right), all pass now. bun test packages/qoder (87 pass) and scripts/check.mjs qoder under a temp HOME pass. On this Mac the real lookup returns /Applications/Qoder.app/Contents/Resources/umid/runtime-info. Not run: the runtime itself against a real account, or on Linux/Windows.
2026-10-08 20:35:44 +08:00
yetone d33df7e21a devin 0.1.13: a call's id goes to the agent of [A-Za-z0-9_-] only, and back to Devin as Devin gave it (yetone/magpie#1304, StarMoonCity)
SWE-2 names a call after its tool and turn ("Bash:0#a65b6a5e02194b87bbc796c4428c946d"), and the plugin passed that on as the call's id. Claude Code takes a tool_use id only of [A-Za-z0-9_-]: it dropped every such call and the turn failed with "The model's tool call could not be parsed (retry also failed)". Codex and pi take any id and were fine.

An id with any other character, or one that begins "dv_", now goes out as "dv_" and its base64url (stateless, so it holds across restarts and accounts); build() turns it back into Devin's own id on the assistant's call and on the tool result that answers it, so Devin still sees the id it gave. A safe id goes both ways as it came. magpie passes a chat tool_call id through unchanged to Anthropic's tool_use.id, Responses' call_id and Chat, so the one mapping covers all three.

tool-ids.test.mjs builds Devin's reply frame from the reporter's literal id: with the change taken out, both the whole and the streamed test fail (Received: "Bash:0#a65b6a5e02194b87bbc796c4428c946d" against /^[A-Za-z0-9_-]+$/); with it, the id out is safe and the call and its result reach Devin as "Bash:0#a65b…". HOME=$(mktemp -d) bun test packages/devin: 45 pass; the 4 CLI tests in identity.test.mjs time out at 30 s on this Mac with and without the change (a script just written under $TMPDIR doesn't start: exec of a fresh /bin/sh script hangs here), and pass in CI. bun scripts/check.mjs devin passes. Not tried against a real Devin account.
2026-10-08 19:41:57 +08:00
Versun c70c9df24e devin 0.1.12: a temperature or top_p of 0 goes to Devin as 1e-6 — Devin answered every request carrying exactly 0 with 400 "an internal error occurred (trace ID …)" (in=0/out=0), on claude-opus-5-5, claude-sonnet-5-5 and swe-2 alike, streamed or not, so a caller that asks for greedy output (Hermes Agent's command approvals send temperature 0, max_tokens 16) failed on every devin/* model and, the 400 not being one magpie falls back on, never reached the next member of a group. 1e-6 is the smallest step above 0 and goes through, as do 0.1, 1 and 2; any other value is sent as it came, and none still as Devin's defaults (1, 0.95). sampling.test.mjs decodes field 8 of build()'s request: its first test fails with the fix taken out. HOME=$(mktemp -d) bun test packages/devin (45 pass, 0 fail) and bun scripts/check.mjs pass. Tried against a real Devin account through magpie: temperature 0 and top_p 0 → 400; 1e-6 → 200. (#50) 2026-10-08 17:58:41 +08:00
yetone 17e75329b1 workbuddy 0.1.12: a chat's tools get shapes WorkBuddy AI's models take, so ZCode's and DeepSeek Harness's chats on deepseek-v4.1-flash aren't 400 "Invalid request parameters" (wyh on Discord)
WorkBuddy AI answers 11133 "Invalid request parameters" (the model
provider rejected them) when a tool's parameters or name are of a shape
its model turns away. Tried on the owner's account through magpie:
deepseek-v4.1-flash and -sg refuse each of a pattern's \0, a root anyOf,
parameters with no type, empty parameters, a tuple's items, and a name
holding . : / a space or CJK; Kimi, GPT, Gemini and GLM refuse some;
MiniMax none. Every client protocol reached the same error, so it is the
tools, not the protocol.

fitTools now gives each the shape that passes: an object root (unions
merged as magpie's provider.ObjectRoot does), \0 as \u0000, a tuple's
items as one anyOf, and a safe name, with the model's calls named back in
JSON and streamed answers and the history's calls named as sent. A clean
chat goes as the same bytes.

Run: HOME=$(mktemp -d) bun test packages/workbuddy (54 pass), bun
scripts/check.mjs workbuddy; through a sandbox magpie gateway with this
package, deepseek-v4.1-flash, -sg, glm-5.3, gpt-5.4, gemini-3.5-flash and
kimi-k3 answer 200 to every shape above (400 before), and an Anthropic
Messages call of a tool named fs.read, streamed and not, comes back as
fs.read. wyh's own ZCode/DeepSeek Harness tool set was not seen.
2026-10-08 17:39:00 +08:00
yetone f35c18981c kiro tests: a turn's parallel tool_use split over two assistant messages keeps its results (yetone/magpie#1275)
buildKiro already joins consecutive assistant messages, so #1275's request
reaches Kiro with both calls in one assistantResponseMessage and both real
results after; a call that went unanswered is still answered for. The test
keeps it so. Test-only, no version bump; HOME=$(mktemp -d) bun test (30
pass, 0 fail) and bun scripts/check.mjs pass.
2026-10-08 16:54:49 +08:00
yetone 994d58077a devin 0.1.11: a turn's parallel tool calls split over two consecutive assistant messages keep their results (yetone/magpie#1275)
An agent can send one turn's tool calls in two assistant messages in a
row, answered together after. build() answered the first message's calls
at the second one: toolu_a went to Devin as "Tool use was interrupted and
did not produce a result." and its real result A! was dropped.
joinSplitCalls now joins an assistant message onto an assistant message
before it that made tool calls, as Anthropic reads consecutive assistant
messages and as magpie's built-in buildDevin does since 7067fce5. A call
of the split turn that really went unanswered is still answered for; two
text-only assistant messages stay two.

split-calls.test.mjs is #1275's request in Chat form: 3 of its 4 tests fail
on 0.1.10 and pass now. HOME=$(mktemp -d) bun test (43 pass, 0 fail) and
bun scripts/check.mjs pass. Not tried against a real Devin account.
2026-10-08 16:54:48 +08:00
yetone 78780b81be cursor 0.1.11: a turn's parallel tool calls split over two consecutive assistant messages keep their results (yetone/magpie#1275)
An agent can send one turn's tool calls in two assistant messages in a
row, answered together after. conversation() answered the first
message's calls at the second one: toolu_a went to Cursor as "Tool use
was interrupted and did not produce a result." and its real result A!
was dropped. joinSplitCalls now joins an assistant message onto an
assistant message before it that made tool calls, as Anthropic reads
consecutive assistant messages and as magpie's built-in does since
7067fce5, so the calls are pending together. A call of the split turn that
really went unanswered is still answered for; two text-only assistant
messages stay two; the caller's messages are not changed.

split-calls.test.mjs is #1275's request in Chat form: 3 of its 5 tests fail
on 0.1.10 (trace user assistant(toolu_a) tool(toolu_a=interrupted)
assistant(toolu_b) tool(toolu_b=B!)) and pass now. HOME=$(mktemp -d) bun
test (43 pass, 0 fail) and bun scripts/check.mjs pass. Not tried against
a real Cursor account.
2026-10-08 16:54:30 +08:00
yetone fbee8a0abf devin 0.1.10: a tool's root union whose branches are unions themselves keeps their fields, so a model can create a Codex automation (yetone/magpie#1271)
objectRoot dropped any anyOf/oneOf branch that was itself a union. Codex
desktop's automation_update (zod 4: root anyOf of view, delete, and create
and update, each a union on kind) folded to only view's mode and id, both
required, so the model was offered a tool that could only view. Found
while fixing the same fold in magpie's built-in for #1271.

A nested union branch is now folded first (up to 8 deep); a field the
root doesn't define takes every distinct schema the branches give it, as
anyOf when they differ; a field every branch requires stays required.

Verified: schema.test.mjs's new test fails on 0.1.9 (no "name" among
[id mode]) and passes now; HOME=$(mktemp -d) bun test in packages/devin:
39 pass, 0 fail.
2026-10-08 16:51:46 +08:00
yetone a6910fd50a grok 0.1.10: a tool whose parameters are a union at the root reaches Grok as an object, so Codex desktop's turns are no longer refused (yetone/magpie#1271)
xiaocui12: Codex on Grok failed every turn with "[invalid_client_tool_schema]
mcp__codex_app__automation_update: tool parameter root must be an object
type (root schema is an anyOf/oneOf union with a non-object branch)".
Codex desktop's codex_app automation_update has an anyOf at its
parameters' root (ChatGPT.app 26.930 builds it with zod 4's toJSONSchema),
and its create and update branches are unions themselves.

rewrite() now folds a function's parameters to an object root as magpie's
built-in provider.ObjectRoot does, nested union branches folded first so
their fields (name, prompt, rrule, kind...) are kept and only "mode" is
required. Before, the plugin sent the union as it came; magpie's grokBody
folded it for requests through magpie, but not for OpenCode's own.

Verified: the real schema (testdata, rebuilt with zod 4.1.8) sent to the
real Grok subscription raw gets 400 with the reporter's exact message;
folded it gets 200 and a correct create call
({"mode":"create","kind":"heartbeat",...,"rrule":"FREQ=MINUTELY;INTERVAL=30"}).
schema.test.mjs: 2 of its 3 tests fail on 0.1.9 and pass now.
HOME=$(mktemp -d) bun test: the rest of the package matches main (login and
refresh tests time out here on main as well; CI runs them on Linux).
2026-10-08 16:51:46 +08:00
yetone 972c0a9f81 qoder 0.2.9: international check-in sees the daily 100 credits (yetone/magpie#1268, #49)
Releases #49: international campaign requests carry Qoder's native device
identity (Cosy-MachineToken, Cosy-MachineType) from its own runtime-info
helper, as Qoder.app 0.4.3 does. Without it Qoder answers 200 with only
VIEW_DETAILS.

Verified with a real international account (GET only, no claim):
CLAIM_BENEFIT/CLAIMABLE/100 with the identity, VIEW_DETAILS only without.
bun test packages/qoder: 82 pass; check.mjs qoder passes.
2026-10-08 16:50:09 +08:00
Strelizia d8431fbfcf qoder: include native device identity in international campaigns (#49) 2026-10-08 16:49:44 +08:00
tearsleeandtearslee 5d1beb37e0 workbuddy: one user send, one X-Conversation-Request-ID (#48)
WorkBuddy's backend counts a user send as one request by
X-Conversation-Request-ID. The China build was sent no conversation headers
at all, and the international build a new pair on every request, so one send
that takes several steps — a tool result sent back, a retry, another account
answering — was counted as a request of its own: one conversation showed up
in the usage detail as many requests.

The ids are now made as workbuddy2api's fix makes them: the turn's from the
body's last user message (its place and its signature, a tool result's part
left out), the conversation's from the session magpie or OpenCode names —
the chat.headers hook now carries it — else from the chat's first user
message; nothing is made up when neither names one. The message and request
ids stay each request's own, and both builds carry the ids now.

Co-authored-by: tearslee <16331052+tearslee@users.noreply.github.com>
2026-10-08 16:41:53 +08:00
Xiaolei f0b34e2e53 block-patterns: turn away requests carrying listed words or patterns, in every API magpie serves (#39)
* jev-guard: Jev System One guardrail middleware for request inspection and rejection

* block-patterns 0.1.0: turn away requests carrying text you list, in every API magpie serves

yetone's review of the jev-guard PR (#39) showed the guard only caught a plain-string last user message: Claude Code's content blocks, Codex's Responses input_text items, Chat Completions parts, Gemini parts and the system prompt all passed it through, and the README claimed gemini was covered when no code read it. The package is renamed block-patterns, since "Jev" and "System One" are not explained anywhere and "System One" is already magpie's own routing feature, so users would read it as part of it. It is now plain substring and regular-expression matching, described as such, and the README says plainly that it is literal matching rather than a safety classifier: it does not understand a request, and a synonym or an obfuscated spelling passes it.

build() now reads every shape an agent sends text in — plain strings, text and input_text blocks, Responses input items and Gemini parts — across all four APIs, and every user turn rather than only the last, so a pattern earlier in the conversation is caught. "system" (true by default) also reads the system prompt and the Responses instructions; set it to false to leave them out. Tool calls, tool arguments, tool results and Gemini thought parts are never read. The no-op onResponse is gone rather than kept for a hook call. Its cases.json covers each shape and each exclusion, and the middleware itself is only onRequest now.

bun test packages/block-patterns (25 pass, 0 fail) and bun scripts/check.mjs pass. Not tried against a live gateway.

* block-patterns 0.1.1: read every system prompt an API actually sends, and stop one bad pattern from throwing

Four gaps in 0.1.0, all reported in the second review of #39 and confirmed against the code here before changing anything.

Anthropic keeps its system prompt out of messages: it is the top-level `system` field, a string or the block array Claude Code sends, and only the Chat branch saw it as a message — so a listed word in an Anthropic system prompt passed even with "system": true. It is now read on the same terms as a system message, and left out with "system": false.

Gemini's systemInstruction is documented as a Content, and only its string form was read; the `{ parts: [{ text }] }` object and the system_instruction spelling both passed. All three are read now, via a new systemTexts() that skips thought parts as the rest of the scan does.

The Responses branch read `system` but not `developer`, though the Chat branch read both — now consistent.

matcher() called new RegExp unguarded, so a single invalid pattern threw on every request the gateway saw, including ones that matched nothing. Each pattern is now compiled on its own first and one that fails is left out, so the others still work and nothing is thrown. The combined expression is compiled under a guard too, though an alternation of valid patterns cannot fail.

cases.json is 39 (was 25): the four shapes above with their real request bodies, the two system:false counterparts, a Gemini thought part in a system instruction, four invalid-pattern cases, and a case pinning that Chat Completions has no top-level `system` to read. Both READMEs now carry a "Word Guard vs this" section and word-guard's README points back, so the two packages' split is documented rather than a reader's guess. The system prompt's home in each of the four APIs is a table rather than prose.

Re-ran the first review's six shapes against the committed middleware: 6/6 blocked, and tool_result / tool_use input / assistant turns / Gemini thought parts / function_call_output all still pass through. Not tried against a live magpie gateway.

bun test packages/block-patterns (39 pass, 0 fail), bun test packages/word-guard (13 pass, 0 fail), bun scripts/check.mjs pass.
2026-10-08 16:38:01 +08:00
yetone aca7c59261 zcode 0.1.14: a gift-only account lists its gift's models by their own names, as ZCode does (yetone/magpie#1261)
sun1090's account has no GLM Coding Plan, only ZCode's Start Plan, whose
buckets serve GLM-5.3 (3,000,000) and GLM-5.3-Flash (5,000,000). magpie's
usage card counted GLM-5.3, but the model list had GLM-5.3-Flash, GLM-5.2
and GLM-5-Turbo (the Start Plan's providerId in ZCode's provider config,
revisions 23 and 30, which leaves GLM-5.3 out) plus GLM-5.3-Trial and
GLM-5.3-Flash-Trial, so GLM-5.3 itself was missing.

ZCode 3.14.3 (host/index.js, resolveZaiStartPlanBalanceModelIds and the
start-plan overlay's builtinModelIds) lists a Start Plan account's models
as the balance's bucket capabilities, by their own names. A gift-only
account's requests all go to zcode.z.ai's Start Plan anyway, so the plugin
now also lists each gift model under its own name for such an account.
The -Trial entries stay, so a model a user already picked keeps working;
a coding plan account's gift is still reached only through its -Trial
entries. A gift model's context, output and efforts now also come from
the coding plan's config and the fallback table, so GLM-5.3(-Trial) on
a Start Plan account gets low/high/max rather than no efforts.

gift.test.mjs: "a gift-only account lists its gift's models by their own
names" fails on 0.1.13 (GLM-5.3 undefined); it also checks every model the
card counts is listed and that GLM-5.3 goes to zcode.z.ai. "a coding plan
account's gift stays on its trial entries alone" guards the dual route.
HOME=$(mktemp -d) bun test packages/zcode (75 pass) and
bun scripts/check.mjs zcode pass. Not tried with a real Start Plan
account.
2026-10-08 16:12:53 +08:00
SadWood ce9755092b fix(factory): quote repeated summaries and changed-file context (#42)
* fix(factory): 无损适配摘要引用和文件变更通知

* fix(factory): 保留 hook 后元数据适配并补齐编码边界
2026-10-08 12:46:47 +08:00
如是 f06dacd1ec zcode 0.1.13: the claim line's name is a sentence magpie translates; its count and plan name are the display (#43)
The claim line was a window named after the plan and displaying
"1 to claim · claim it in the ZCode app". magpie shows a window's
display as it came — quotaCount (internal/gui/assets/app.js) returns
w.display when the window has no limit — and translates only the name
(t(w.name), on the card, the tips and the chart), so the line stayed
English on a Chinese interface (yetone/magpie#1001). The plugin cannot
know the interface's language (host.js and provider.Provider hand it no
locale) and magpie's translation is keyed by the string, so the
sentence has to be the name.

The window is now named "Gift plans to claim in the ZCode app" and its
display is "1 · ZCode Trust Build": the count and the plan's own name,
which are data and stay as they came, and one name for any number, so
no plural forms are needed. aside, the placement after every real
window, and the failure handling (nothing to claim, a failed preview or
an error card add no line) are unchanged. magpie adds the zh/ja/de
entries for that name alongside this.

usage.test.mjs: the fixtures carry the new name and display, and the
names list of "a coding account's line goes after its coding and gift
windows". Four of them fail on 0.1.12; bun test packages/zcode (73
pass) and bun scripts/check.mjs zcode pass.
2026-10-08 11:52:36 +08:00
yetone e2c01edc83 trae 0.2.5: a tool call written into the text that can't be read ends the turn as an error, never as the answer (#38) (#46)
#38 (deepseek-v4.1-flash on trae-cn): 64 of 3112 turns came back with
the model's text-form <tool_call> block as the answer, no call made, as
a 200 with a normal finish, so the gateway had nothing to fail over on.
ARNO (trae-cn, Discord) sent two more: a write whose JSON is whole but
has no </tool_call> (the stream ended), and a closed write block.

ARNO's two replies, as sent (content redacted to xxxx), are read as calls
by 0.2.4 too, whole or one character at a time, with the tool declared
as write or Write; prose before the block and arguments as an object
don't matter. What breaks the closed one is in its content: a written-out
analysis with a quote left unescaped ("官方"), a backslash JSON doesn't
know (\| \_ C:\Users) or a JSON sample of its own makes JSON.parse fail,
and 0.2.4 then printed the block as text. Those are the fixtures here.

TextTools now:
- reads a block as models get its JSON wrong: every quote escaped
  ({\"name\":…}, #38's most common shape), unknown backslash escapes
  doubled, and quotes inside a string escaped unless they end it (a key's
  before its colon, a value's before closing braces and the end or a
  comma and the next key);
- takes an opener with attributes, <tool_call name="bash"> with
  <parameter name="k">v</parameter>, and DeepSeek's {"name":"x"}> head
  with parameters (magpie's paramCall, #917), its values typed by the
  tool's schema;
- when a block is closed but can't be read, or is cut short at the end
  (JSON not whole, a parameter not closed), returns an error instead of
  the text: parts() yields it, so a stream ends with the error event and
  [DONE] and no finish, and a body is a 502;
- leaves a <tool_call> in backticks or a code fence, or named in prose
  with no JSON after it, as text.

Not done: #38's fourth point (text on done/response_done events): there
is no raw event showing Trae puts text there, and reading it blind could
send a whole reply twice.

textcall.test.mjs builds from ARNO's literal bytes and #38's repro cases.
Against 0.2.4's index.mjs 4 of its 6 tests fail (the two that pass are
ARNO's literal replies, which 0.2.4 already reads). HOME=$(mktemp -d)
bun test: 870 pass, 0 fail; bun scripts/check.mjs passes. Not tried with
a real Trae CN account.
2026-10-08 11:23:03 +08:00
yetone ecca97cadd qoder 0.2.8: Qoder CN enterprise VPC sign-in (yetone/magpie#312) (#41)
A new method, Sign in with Qoder CN Enterprise (VPC), asks for the
instance (its name or <instance>.vpc.qoder.com.cn) and serves the account
from the instance's own hosts: <i>.vpc.qoder.com.cn for the sign-in page,
<i>-openapi.vpc.qoder.com.cn for poll, tokens, user info and usage, and
<i>-gateway.vpc.qoder.com.cn for models and chat, the paths unchanged, as
@qodercn-ai/qoderclicn 1.1.64 rewrites the public origins once a VPC
instance is set. The instance is kept on the account; an account with
none is served as before, and one with an instance that names none is
asked to sign in again rather than sent to the public hosts.

Not tried with a real VPC account. vpc.test.mjs builds its fixtures from
AwadYoo's redacted shapes on #312; 12 of its 13 tests fail on 0.2.7 (the
one that passes is the public sign-in staying as it was). bun test
packages/qoder: 67 pass; HOME=$(mktemp -d) bun test: 864 pass; bun
scripts/check.mjs: all pass.
2026-10-08 10:30:17 +08:00
SadWood 3a9533aacb fix(factory): adapt Claude Code compaction and runtime metadata (#37)
* fix(factory): adapt Claude Code compaction and runtime metadata

* fix(factory): adapt standalone skill updates with trailing token context

* fix(factory): adapt runtime context after subagent startup hooks

* fix(factory): adapt skill paragraphs after runtime notifications

* fix(factory): encode compaction quotes in tool results for 0.1.19

* fix(factory): cover provenance summaries and restored Read content
2026-10-08 09:49:30 +08:00
yetone c9b811d288 devin 0.1.9: a tool whose parameters have anyOf, oneOf or allOf at the root goes to Devin as a plain object (yetone/magpie#1196, iron-water) — Devin's Claude models answered every request offering one with 502 "There is an issue with this request, please try a different model" (in=0/out=0), so Codex desktop, whose codex_app automation_update has a root oneOf, hung on devin/claude-opus-5-5 while swe-2 and gpt-6-1-sol were fine. build() now folds the schema as magpie's built-in folds it for Anthropic (provider.ObjectRoot, #646): allOf's branches are all merged, properties and required alike; of anyOf's and oneOf's object branches the properties are merged, a field each requires stays required, the other branches go; local $refs into $defs/definitions are followed. A schema with no root combinator is sent as it came, and the caller's own is not changed. schema.test.mjs builds from the issue's literal parameters: its three build tests fail with the fold taken out of build() (the oneOf/anyOf/allOf arrives at Devin). HOME=$(mktemp -d) bun test packages/devin (37 pass, 0 fail) and bun scripts/check.mjs devin pass. Not tried against a real Devin account. 2026-10-08 05:19:57 +08:00
midasandyetone ac3b697e5b workbuddy 0.1.10: explain credits exhausted (code 14018) errors with hint and extract nested error message (#25)
* workbuddy 0.1.10: explain credits exhausted (code 14018) errors with hint and extract nested error message

When calling WorkBuddy / WorkBuddy AI models (including 0-rate / free models), accounts with no active packages or depleted credits receive 429 code 14018 ('Credits exhausted...').

- Extract nested error message from v?.error?.data?.msg and v?.data?.msg
- Match code 14018 on parsed fields (error.data.code, code, error.code) or 'code':14018 to avoid false positives on requestId/timestamps
- Append EXHAUSTED_HINT explaining that WorkBuddy requires an active credit package even for 0-rate free models
- Return standard OpenAI-shaped { error: { message, type: 'insufficient_quota', code: 14018 } }
- Add tests in refused.test.mjs covering code 14018, error.data.msg extraction, and untouched pass-through of unrelated errors with 14018 in requestId

* workbuddy 0.1.10: match code 14018 whole, so a code that only begins with it (140185) passes through instead of resting the account as out of credit

---------

Co-authored-by: yetone <yetoneful@gmail.com>
2026-10-07 18:47:32 +08:00
wizzy-yangandwizzy-yang c2b0462227 zcode 0.1.12: a counted window says its count as used or as left, as the share beside it is (#659) — the Coding Plan limits and the Start Plan / Trust Build buckets told only the vendor's own text, "28746939 / 100000000", so magpie's card froze that used-first count beside a "71.3% left" figure. Each counted window now carries the count as amount of limit, as WorkBuddy's credits do. usage.test.mjs: "a counted window carries what is used of the whole" fails on 0.1.11; bun test packages/zcode (73 pass) and bun scripts/check.mjs zcode pass. (#35)
Co-authored-by: wizzy-yang <wizzy-yang@users.noreply.github.com>
2026-10-07 18:46:04 +08:00
wizzy-yangandwizzy-yang f791646a91 cline 0.1.5: a balance with no whole is the card's balance, not a meter — an account Cline serves only {balance} got a Credits window with used 0, so the card read a full bar and "100% left" whatever the balance ($0.48 in the report). The balance now goes to the card's balance field, as magpie's built-in Cline says it; a whole still makes a window, carrying amount of limit (#659). "a balance with no whole is the card's balance, not a meter" fails on 0.1.4; bun test packages/cline (67 pass) and bun scripts/check.mjs cline pass. (#36)
Co-authored-by: wizzy-yang <wizzy-yang@users.noreply.github.com>
2026-10-07 18:45:30 +08:00
xiaofei f5dc146c2c Add OpenCode Zen Free provider plugin (#31)
* Add OpenCode Zen Free provider and market listing

* Guard Zen tool calls and address provider review

* Preserve upstream SSE error frames in Zen tool guard

* Restore Zen Free package name and simplify README title
2026-10-07 08:24:54 +08:00
yetone b35eee46de grok 0.1.9: the same code as 0.1.8, published because magpie asks for 0.1.9 (yetone/magpie#1065) — magpie daeb108b, Command Code's mover change, raised Grok's mover min to 0.1.9 as well, a version never published, so from magpie v0.1.1078 every "Move to plugin" for Grok failed with "@magpie-community/opencode-grok-auth 0.1.8 is installed; moving needs 0.1.9 or newer" and keepMovedCurrent couldn't update moved users. Publishing 0.1.9 lets released magpie builds move again. bun test (24 pass) and check.mjs grok pass. 2026-10-07 08:22:41 +08:00
yetone 288c6bc9c9 cursor 0.1.10: far from Cursor a conversation's tool steps add up to what Cursor counted, cache included (yetone/magpie#1053, #33). The tool-step usage-event wait of 0.1.9 (first ask at 1.5 s, every 0.5 s, up to 6 s) never met an event on the reporter's network (Windows, mainland China: a GetFilteredUsageEvents round trip of ~4.2 s, the event 4–5 s after the Run closes), so tool steps were counted as their whole prompt estimated with no cache (fable 13/13 steps, 0% cached; opus 27%) where Cursor counted 95–99%, and every tool step waited the full 6 s. A tool step's Run is now owed by its conversation (only when a conversation_id names the session): the step counts every event of the conversation's owed Runs that shows within the same wait, its own or earlier ones, and says 0 used when none has; the conversation's next Runs collect the rest in the background from 5 s after the owed Run closed, and a step that ends the turn waits for whatever is still owed (in-flight collections, then a poll for the rest). Events are claimed once, by count, so the conversation's prompt, cache read, cache write and output add up to Cursor's dashboard, some of it a step late. After 3 steps in a row left something owed an account's tool steps stop waiting (asked again every 10th). A Run that fails after collecting gives it back; an account that can't read its events (4xx) and a Run with no session id are estimated as before. latency.test.mjs runs whole conversations through the plugin against a fake Cursor with the reporter's latency scaled 1/20 and the reporter's literal events (in 2 / cacheRead 63457 / cacheWrite 3081, in 2 / 66538 / 14756, in 4 / 67872 / 2392): on 0.1.9 the 3-step conversation sums to 137936 prompt / 131329 cached instead of 218104 / 197867, and skipped steps still wait the full window (292 ms > 150); both pass now, 20 of 20 runs, and stepusage + latency pass with --rerun-each 20. HOME=$(mktemp -d) bun test: 682 pass, 0 fail; check.mjs cursor passes. Not tried with a real Cursor account on a high-latency network. 2026-10-07 03:17:08 +08:00
yetone 3884236b21 devin tests: the two "without the CLI" images tests take the devin CLI out of reach themselves — they relied on no devin being on PATH, so on a machine with the CLI installed (~/.local/bin on PATH) provider.models took the CLI's path, returned full runtime models and both failed; CI has no CLI and stayed green. They now point PATH at an empty temp dir (removed after) and say so if /usr/local/bin or /opt/homebrew/bin holds the CLI. Test-only, no version bump; HOME=$(mktemp -d) bun test (676 pass, 0 fail) and check.mjs devin pass. 2026-10-07 01:36:01 +08:00
yetone bf01ffc4d9 mimo 0.1.8: a Token Plan bought at the open platform shows on the card (yetone: 我明明已经订阅了啊为啥说我是 free 账号啊). The card read only the MiMo app's /user/xiaomi/subscription/self, which is empty for an account whose plan is the platform's Token Plan, so it said Free. The same passToken signs on at platform.xiaomimimo.com (401 loginUrl, sid api-platform, through /sts), whose /api/v1/tokenPlan/detail and /usage give the plan, its end (UTC), renewal and credits: the card's plan is the Token Plan when the app has none, and its credits are an aside window (they are spent by the tp- key, not this account's requests). A platform that can't be read leaves the card as it was. Tested against the reporter's real account (Token Plan Lite, 6.81M / 4.1B credits, the second read keeping the platform session); the new tests use its literal replies and 3 of them fail on 0.1.7. 2026-10-07 00:49:43 +08:00
如是 bcec59ec31 zcode 0.1.11: a gift plan ZCode holds but hasn't granted is named on the card ("1 to claim · claim it in the ZCode app") (#30)
ZCode hands out one-off trust-build / gift plans that are not on the
account until the ZCode app claims them; the plugin only ever consumed
gifts already granted, so an account signed in through magpie alone sat
on the entitlement and it lapsed unclaimed (yetone/magpie#1001). The
claim itself cannot be made here: POST /billing/claim is answered 400
code 3007 "captcha verify failed" without the Aliyun captcha
attestation, and the SDK that makes it (AliyunCaptcha.js) throws unless
window and document exist, so only the app's renderer can claim one.
The author asked for the read-only half instead: ask the app's own list
(GET /api/v1/zcode-plan/billing/preview, the call the app's settings
dialog makes) while the usage card is read, and name what it lists.

The line is a window set aside, so the card shows it and routing, usage
caps and the menu bar pass it over (allowanceOf skips Aside windows;
sameAccount skips them too, so a GLM key's plan still matches the
account by its real windows). It goes last, after the coding plan's and
the gift's own buckets. A preview that fails or lists nothing adds no
line at all, a card that is an error keeps its error and asks nothing,
and an expired sign-in is no request either: the read never changes a
card or a route.

Both fixtures are real responses: an account's preview while the day's
ZCode Trust Build was unclaimed, and one after it had claimed it
(plans: []). usage.test.mjs is new (6 cases; all 72 of the package pass,
bun scripts/check.mjs zcode passes). The preview's shape is also
verified against a real account: the request goes out on the JWT with
the device id, app_version and platform the app sends.
2026-10-06 17:42:31 +08:00
yetone 8d6ae18076 commandcode 0.1.9: a Go key the Provider API refuses ("Your Go plan doesn't include API access. Upgrade to Provider or higher …", yetone/magpie#969) is taken as Go's — kept so for its models and endpoint (in memory and saved with the key, as usage saves the plan it reads) and its chat completion is sent again to /alpha/generate. Before, a Go key whose plan wasn't known yet (billing/subscriptions slow past the wait or failing, nothing saved with the key yet, e.g. just added by API key) went to the Provider API and the refusal reached the agent. Other refusals go on as they came. go-refused.test.mjs is new (4 of its 5 fail on 0.1.8); bun test (all packages) and check.mjs commandcode pass. Not tried with a real Command Code Go account (none here). 2026-10-06 12:37:44 +08:00
yetone 72382fb8a1 qoder 0.2.7: the account's fetch sends Qoder's campaigns pages (the daily credits claim) as the account — GET <openapi>/sash/api/v1/me/campaigns and POST …/{id}/claim, on the device token as usage is read (a refused one rotated once), for qoder (openapi.qoder.sh) and qoder-cn (openapi.qoder.com.cn); any other page there is still refused. For magpie's Qoder check-in (Discord, ARNO, after wallechfox/qoder-checkin). checkin.test.mjs is new (4 of its 5 fail on 0.2.6); bun test (54 pass) and check.mjs qoder pass. Not tried against Qoder itself (no Qoder account here). 2026-10-06 11:25:37 +08:00
yetone 4d6dcca173 factory 0.1.18: pi's opening sentence reaches Factory as its first half (yetone/magpie#952, mxzs123) — pi 1.0.4 got 403 "Factory: Forbidden" on DeepSeek (chat completions) and Claude (Messages) for "hi"; the reporter's replays through magpie found the refused part: "You are an expert coding assistant operating inside pi, a coding agent harness." whole (either half passes, and pi's full request with it cut to "You are an expert coding assistant." is answered on both routes). That sentence, at the start of a line of a system or developer prompt (chat completions' messages, Responses' instructions and input, Messages' system blocks and system messages), is cut so; the rest of pi's prompt, its tools and a user quoting the sentence go on as they are. pi.test.mjs is new (pi's two captured shapes; 3 of its 4 fail on 0.1.17, the 4th checks what is left alone); bun test (85 pass) and check.mjs factory pass. Not tried against Factory itself (no Factory account here). 2026-10-06 08:08:15 +08:00
yetone 697803308a workbuddy 0.1.9: Codex and Claude Code chats pass WorkBuddy's channel check (magpie #182)
WorkBuddy answers "Illegal API invocation from an unapproved channel" to a
few exact phrases anywhere in a chat, case-insensitively: Claude Code's
billing header and identity line, its gitStatus "Main branch (you will
usually use this for PRs)", and Codex 0.159.2's first paragraph as a whole.
The plugin rewrites each to words that say the same and pass (each tried
against both builds), drops the billing header, and leaves every other
message as it was. Tested with real accounts through Cindy's bundled Codex
0.159.2 and Claude Code 2.1.280: workbuddy/glm-5.3-flash and
workbuddy-ai/deepseek-v4.1-flash answer from both; before, Codex got the
refusal. unflag.test.mjs fails 3 of 4 without the change.
2026-10-06 03:09:56 +08:00
如是 be58adc8d3 trae 0.2.4: a model outside the fallback list is served with capabilities, so magpie reads it as one that reasons (#28)
magpie's host builds a provider's models from the plugin's config first
(internal/plugin/host.js: the config's flat fields are spread into
capabilities), then lets the provider.models hook replace the list. The
hook handed back each model without capabilities, and magpie reads
capabilities.reasoning alone for a model a plugin lists, so every model
the site's fallback table doesn't have was listed as one that doesn't
reason. On Trae CN that was every model but the table's six; on Trae
Global every model but its five. A routing group with one of them in it
lost reasoning for the whole group (magpie's groups take a member that
thinks), and the agent turned thinking off for it.

modelOf now gives each model it builds capabilities: the fallback table's
own where it has an entry, else MODEL's flat fields (reasoning,
temperature, tool_call, the input modalities) with an empty variants, as
Trae's request takes no effort or thinking level. The Max twin takes them
through the same path.

packages/trae/models.test.mjs (5 tests) fails without the change:
capabilities.reasoning is undefined for deepseek-v4-flash-0731-max, for
the whole list, and for the Max twin; the fallback table's own entry and
Trae Global's models pass either way. bun test packages/trae: 79 pass.
bun scripts/check.mjs: every package ok. The whole suite has the same 40
failures before and after (Windows-only, other packages).
2026-10-06 02:25:35 +08:00
yetone c78a7a32d4 trae 0.2.3: Trae CN renews the JWT bound to the account's device, so the daily check-in claim isn't answered 9074 (yetone/magpie#808, #821)
mintonight found the cause on #808: a JWT renewed at /cloudide/api/v3/trae/oauth/ExchangeToken carries no device, and Trae CN answers its check-in claim 9074 every time, while the client's own token is let through. Trae CN now renews as its clients do: POST /trae/api/v3/oauth/ExchangeToken with DeviceInfo (the device id, machine id and a per-account ECDSA P-256 public key, PEM) and DeviceProof (the key's ECDSA-SHA256 signature, base64, of POST, the path, ClientID, RefreshToken, Timestamp and Nonce, one to a line), as TRAE SOLO CN (en1oxy7wnw8j9n, SOLO_PC) first, then Trae CN's IDE (ono9krqynydwx5, IDE_PC). That renewal keeps the refresh token. The key pair is made at sign-in, or at the first renewal of an account signed in before, and kept with the sign-in through auth.refresh's fields; a sign-in's token is bound at once. When Trae turns the bound renewal away, the plugin renews at /cloudide/ as before. Since the refresh token can stay the same, a renewal made here is told from the sign-in by its token rather than by the refresh token. Trae Global is unchanged. device.test.mjs is new: 5 of its 6 tests fail on 0.2.2 (the Trae Global one passes on both). No Trae account to test with; mintonight is asked to verify on #808.
2026-10-06 01:08:15 +08:00
TryWorldandTryWorld2026 ebc4a207d3 word-guard 0.1.1: a Gemini reply is masked too, streamed or whole (#27)
onEvent masked an Anthropic delta, a Responses delta and a Chat chunk, but had
no branch for Gemini's own shape (candidates[].content.parts[].text) — while
onResponse right below it did. So with replies: true, a word the user asked to
keep out of replies was masked in every API but a streamed Gemini one, where it
went to the client untouched.

A case covers it in both directions: a streamed Gemini reply in its own place
(and a part that isn't text left alone), and a whole one. It fails on 0.1.0 —
"acme Inc" reaches the client — and passes here.

The reply is what the option promises, so a filter that silently skips one of
the four APIs magpie serves is a hole rather than a missing feature.

Co-authored-by: TryWorld2026 <tryworld@users.noreply.github.com>
2026-10-06 00:23:15 +08:00