README sections for WorkBuddy and Qoder on why a request can be refused
while the account still shows credits. They cover:
- the exact model id versus the display name;
- WorkBuddy 5.6+'s encrypted desktop sign-in and the browser route around it;
- 11140, the restricted account (magpie#1849);
- Qoder's 10605, a queue answer, not a lapsed sign-in (#185, 0.2.18);
- a CLAIMED check-in that is not a new grant (magpie#2696).
This is docs only. Reviewed at 76cfb6d: two README files, +66 lines,
no code. Checked each claim against the source:
- packages/qoder/busy.test.mjs exists;
- workbuddy usage.test.mjs covers sign-in, usage and chat against a sealed
desktop file, and asserts the file is unchanged;
- magpie's `plugin use` and `plugin list` exist (internal/cli/plugins_cli.go);
- magpie#2696 is the open native-check-in cache issue.
bun scripts/check.mjs qoder and workbuddy both pass. No version bump.
#178's README called 9095 done and 9074 failed. The code answers both as
ineligible, the same as magpie's built-in check-in, so that 9074 isn't
asked again that day. The test asserting ineligible was named "is failed".
Docs and a test name only, so no version bump. bun test
packages/trae/native-checkin.test.mjs gives 9 pass, and check.mjs trae is ok.
Trae CN's daily check-in moves into the plugin as auth.checkin. It asks
/trae/api/v2/ug/checkin_credits/status and then /claim through ownRequest,
so it carries the same JWT renewal, IDE headers, {req_source: 1} body and
16-digit ugDevice (#194) as every other ug page. Trae Global answers
inactive. 9095 on the claim is ineligible, the same as magpie's built-in
traeRefused. 9074 on the claim is an answer for the day: ineligible, with a
hint to check in in the Trae CN app. The built-in calls that own-app, which
the plugin protocol doesn't have. trae 0.2.17.
Run at the reviewed head 4e9bb87 (on top of origin/main 63a3d2a..c397e96):
- bun test packages/trae: 160 pass, 0 fail. The global.test.mjs and
stream.test.mjs failures the author saw did not reproduce.
- bun scripts/check.mjs trae: ok.
- Broken by hand, one at a time, and each turned native-checkin.test.mjs red:
9074 mapped to failed; the ugDevice line in ownRequest removed; the
unreadable-claim guard removed.
- magpie's plugin host (yetone/magpie 85eef5d87 build, sandbox HOME, a copy
of the package pointed at a fake Trae on 127.0.0.1:18764), via
`magpie accounts checkin --json`. The results were claimed 100, 9074
ineligible with the app hint, 9095 ineligible, and checked_in done 100
with no claim sent. Status and claim both went out with
x-device-id 2866487253502651 and {"req_source":1}.
#185 trims a chunk's body before parsing it in events(), and nothing tested it. The envelope carries the BOM JSON-escaped, so the response's own decoding doesn't strip it.
Run: bun test packages/qoder: 138 pass, 0 fail. With JSON.parse(inner) back, the new test goes red (1 pass, 1 fail in stream.test.mjs).
`failure` parses the trimmed body, so a BOM-prefixed 10605 (the SSE envelope carries it as a JSON-escaped U+FEFF that `res.text()` doesn't strip) keeps its 503/Retry-After instead of reading as a lapsed sign-in. An outer body with no code, or code 401/403, whose message is a 10605 body is unwrapped to it; explicit 105/110/406 codes stay authoritative, and malformed or array messages are not unwrapped. Refs #167, #181.
What was run at c9e39e0 (reviewer, bun 1.4.2, macOS):
- bun test packages/qoder: 137 pass, 0 fail. bun scripts/check.mjs qoder: ok.
- Broken by hand: without the unwrap, the 8 wrapper tests go red; parsing `text` instead of the trimmed `msg`, the BOM test goes red; unwrapping regardless of the outer code, the explicit-code test goes red. The `inner.trim()` in events() had no test; a follow-up commit adds one.
- magpie (yetone/magpie main 85eef5d87) in a sandbox HOME, a copy of this package with api3/openapi pointed at a local fake, a planted plugin-auth.json, `magpie provider test qoder`: a 403 `{"code":403,"message":<10605 body>}`, the SSE `{"message":<10605 body>}` envelope and a BOM-prefixed 403 each gave 503 "Qoder is busy for efficient (this plan's queue: p3); try again in 30s"; a 105 still gave 401 lapsed. main's package gave 401 lapsed for the first two.
- Not tried: real Qoder accounts.
Historical native `web_search_call` items become a labeled assistant text message (recorded status, action, queries and sources; no item id, no internal turn metadata) once the filter has removed the reasoning they depend on. Other native tools keep their ids; tool call/result pairs, unsafe-reference rejection and passthrough for providers without the rule are unchanged. Split out of #168 as asked in its review. codex-history 0.1.0 -> 0.1.1.
What was run at 61b6f0b (reviewer, bun 1.4.2, macOS):
- bun test packages/codex-history: 29 pass, 0 fail. node --test packages/codex-history/web-search.test.mjs: 6 pass. bun scripts/check.mjs codex-history: exit 0.
- Broken by hand: with the web_search_call branch disabled, 5 bun tests and 4 node tests go red.
- magpie (built from yetone/magpie main 85eef5d87) in a sandbox HOME, middleware added from the PR's package, a custom Responses provider `demo` pointing at a local fake, options {"providers":{"magpie:demo":{"historyFilter":true}}}, gateway on 127.0.0.1:18763 (moejs). A Codex-shaped request with reasoning + web_search_call + function_call pair: the fake received the search as the labeled assistant text, no rs_/ws_ ids, no PRIVATE_TURN, the call pair intact, store false. With main's 0.1.0 file swapped in, the fake received the bare web_search_call.
- Not tried: a real Codex session or real vendors.
Brings together #191 (CN managed gateway), #196 (request shaping and identity lines) and the #183 sign-in fix.
- autoclaw-cn chat goes to AutoClaw 2.1.0's managed gateway (autoglm-acceleration-api.zhipuai.cn/autoclaw-proxy/proxy/autoclaw/chat/completions, on Zhipu's domain) with 2.1.0's headers and its four-model catalog. A 401/403 there marks the sign-in expired.
- Both providers get the same request shaping:
- the official one-sentence system prefix, merged into the caller's system message (string or array);
- max_tokens and max_completion_tokens dropped;
- other agents' identity lines in system/developer messages rewritten (FLAGGED/unflag, from #196);
- no X-Harness-Type.
- On the overseas path, a 406 explains itself and keeps the sign-in. Overseas chat now sends AutoClaw's own User-Agent instead of the host's. Its catalog drops zai_glm-5-turbo and the tdpsk models (400 upstream) and keeps the old limits.
- Overseas OAuth: authorize returns the loopback guide URL once the listener is up, and the host opens it, so there is no shell spawn any more. Navigating to the authorization page no longer aborts the session.
- autoclaw 0.2.0 -> 0.2.1.
What was run at 1fe91be (reviewer):
- bun test packages/autoclaw: 21 pass, 0 fail. bun scripts/check.mjs autoclaw: ok. git diff --check: clean. Merges cleanly onto main.
- magpie plugin host (magpie main cb05dc2d1), sandbox HOME, with a copy whose three hosts point at a local fake:
- overseas: authorize gave http://127.0.0.1:18432/, the guide returned 200, and /open-auth plus /auth/callback-google finished the sign-in;
- CN: SMS sign-in worked;
- streamed chat on both providers returned 200;
- the fake received the prefix with "You are Claude Code" rewritten and no max_tokens on both paths; User-Agent AutoClaw/2.1.0 on CN and AutoClaw/1.18.1 overseas; no X-Harness-Type.
- Not tried: real accounts or the live gateways (no credentials used).
Co-authored-by: HuHong_Tao <3596843010@qq.com>
Factory refuses one sentence in Claude Code's built-in update-config skill description. The plugin reworded it only when the entry was a whole line in the skill-list reminders, and only without a slash. claude-code-guide's own system prompt renders the entry as `- /update-config: …` under "# User's Current Configuration", so its first request was 403.
This change matches the entry by name, with or without the slash. It rewords only "not Claude" to "not the assistant" inside that entry. The rewording now also runs on system prompt blocks (promptText) and at the existing call sites (bareSkills, announcedSkills, announcedContext, generatedContext, userBlockText). factory 0.1.32 -> 0.1.33.
What was run at af6422e (reviewer):
- bun test packages/factory: 153 pass, 0 fail. bun scripts/check.mjs factory: ok. git diff --check: clean.
- Broken by hand: with promptText's configSkillText call removed, 2 of the new tests fail.
- magpie plugin host (magpie main cb05dc2d1), with a copy whose API/WorkOS hosts point at a local fake:
- API-key sign-in worked.
- /v1/messages with a claude-code-guide-shaped system prompt went out with block 0 as the Droid identity and the update-config entry reworded. A user's "/custom: Keep not Claude" entry was left unchanged, and the stream came back 200.
- No new hosts, telemetry or dependencies.
XcodeFish's A/B on one account (#194): with the same Cloud-IDE-JWT,
headers and body, Trae CN answered a claim 9074 on the plugin's
19-digit x-device-id and took it (code 0, +100) on a 16-digit one.
The IDE's own id is server-issued: Trae's main process registers at
log.snssdk.com/service/2/desktop/device_register (read in Trae.app's
out/main.js, iCubeDeviceRegisterMainService). Real clients keep it as
iCubeAuthInfo://icube-dc:<id>, and the ids seen in #808 and #1705 are
15 or 16 digits.
- A new Trae CN sign-in names a 16-digit device_id. Trae Global keeps
19 digits, since nothing says its ids are shaped otherwise.
- ugDevice: a check-in from an account the local client isn't signed
in as goes on the account's own id when that is 15 or 16 digits.
Otherwise (19 digits, signed in before 0.2.16) it goes on a 16-digit
id hashed from that account's device id and uid. The id is the same
on every check-in, never rotated and never another account's. A 9095
is still the day's answer. Chat pages and the renewal keep the
device the account signed in with.
- README: the Sign-in and Daily check-in sections say this.
Run:
- bun test packages/trae: 151 pass, 0 fail. Breaking it by hand: with
the ugDevice line removed, 7 tests fail; with newDevice back to
digits(19), 4 fail.
- bun scripts/check.mjs: ok.
- magpie's plugin host (origin/main 7660399a1, sandbox HOME), with the
plugin's web/auth hosts pointed at a local fake:
- signed in on 0.2.15 (device 9375744633732288271), claim on 19 digits;
- added 0.2.16 over it: status/claim/claim all went on 2849759837088686,
and the pay page kept 9375744633732288271;
- a new 0.2.16 sign-in named 2348824360597085 (16 digits) and used it
for check-in and chat.
- Not tried against the real api.trae.cn; there are no real accounts
here. The 16-digit claim being taken is the reporter's measurement.
#190 dropped the old guard assertion with the error-body test it lived in.
The guard (index.mjs:106-109) is unchanged; this puts its test back and
widens it: another host, another path, a query, credentials in the URL and
GET are all refused before any fetch.
Run: bun test packages/kimi-work (18 pass); bun scripts/check.mjs kimi-work
(ok). Removing url.search from the guard turns this test red.
Kimi Work 0.1.4: a 401 marks the sign-in expired. A 429 or 5xx passes through unchanged (status, headers including Retry-After, and body), so magpie classes rate vs quota from Kimi's own words. A network error keeps its cause code or message.
Reviewed head de33725f5a4cca882852ea69d0d828d5e1f4e605. Every changed line was read. What was run:
- `bun test packages/kimi-work`: 17 pass, 0 fail.
- `bun scripts/check.mjs kimi-work`: ok.
- Run in magpie's plugin host (main 7660399a1, a throwaway internal/gateway test with a sandbox HOME). The plugin was a copy with its BASE, MEMBER and desktop-file path pointed at an httptest fake, and the sign-in went through `plugin.Authorize` then `plugin.Finish` on a synthetic config.json.
- The stream returned 200.
- A 429 "Too many requests" returned 429 with Retry-After 7 and type rate_limit_error. A 429 "exceeded your current quota" returned 429 with Kimi's words. A 502 returned 502.
- A 401 surfaced the expired message.
- Each upstream request carried only the Work token and the plugin's own User-Agent.
- The endpoint guard (index.mjs:106-109) is unchanged. Its test was removed with the old error-body test, so a follow-up commit adds it back.
Ordinary Kimi (agent-kimi-desktop) becomes a Library target: agent.library
names ~/.config/magpie-kimi/AGENTS.md, library-native/mcp.json (format kimi)
and library-skills. bootstrap() links library-native to Kimi's
daimon/runtime/kimi-code/home and library-skills to daimon/skills (junction on
Windows, dir symlink elsewhere); a different object at either path stops with
library_path_conflict. The adapter reads AGENTS.md on every inference request
and inserts one separate system message after the leading system/developer
ones; an unreadable or non-UTF-8 file answers 503 instructions_unavailable.
Run at the reviewed head 5b9f445 (by the reviewer, sandbox HOME, no real
credentials):
- bun test packages/kimi-desktop: 14 pass, 0 fail (95 expects), bun 1.4.2.
- bun scripts/check.mjs: every package ok (agent packages are skipped there).
- Against magpie's own Library code (origin/main e085d6e92): a throwaway Go
test in internal/library loaded this kimi-desktop.agent.js through
agentplug, ran prepareLibrary on a fake Kimi tree, then SaveInstructions,
SaveServer and InstallSkills to the kimi-desktop target. The MCP server
landed in the native runtime mcp.json beside the existing entry, the skill
in daimon/skills, library-native stayed a symlink; applyInstructions put
the written block in as a second system message. RemoveServer,
RemoveSkill and clearing the instructions left the existing MCP entry and
skill, and applyInstructions then added nothing.
- CI on the PR: test and on-npm green.
Not tried: a real Kimi desktop (the author's COMPATIBILITY.md records it on
Windows 11 and macOS). agent-kimi-desktop is not on npm yet; it is served
from the dist branch until the owner's first publish.
Adds auth.checkin to Qoder and Qoder CN. It lists the account's campaigns and claims a CLAIMABLE CLAIM_BENEFIT campaign, and the list and the claim go through the plugin's own campaigns path: device token, one rotation on 401/403, VPC host and native machine identity. The outcomes match magpie's built-in qoder_checkin.go:
- a CLAIMED campaign is done only while its startAt/endAt window is open;
- a daily campaign that is neither claimable nor active-claimed is failed, so it is asked again later;
- no daily campaign at all is inactive;
- a list or claim reply that can't be read is failed, never inactive or claimed.
The credit is the claim's own benefit.amount, else the campaign's. Bumps the package to 0.2.17.
Reviewed head 128ed2a. Ran at that head:
- bun test in packages/qoder, sandbox HOME/TMPDIR: 127 pass, 0 fail
- git merge-tree onto origin/main: clean
- PR CI: test and on-npm pass
- read every line of the checkin hook against magpie's internal/provider/qoder_checkin.go. The campaign shape and its seconds-based startAt/endAt match the real campaign JSON in qoder_checkin_test.go.
With "strip" on, a reply that opened with <think> was cut at the first
literal </think>, even one the thinking wrote out as an example in
inline code or a fenced block. Kane-Kuroneko's reply ("使用
`<think>...</think>` 标签") then began mid-sentence, as the gateway's own
Chat decoder did before yetone/magpie d4a1b9baa (#2634).
- findClose ports magpie's mdCode (internal/gateway/chat.go): </think> is
looked for only outside Markdown code. An inline span ends with its
line, so a stray backtick can't swallow the answer, and a fence is a
block. A run of backticks or a close split across chunks is held back.
- Streamed (strip) and whole (stripWhole) replies both use it, for Chat,
Anthropic and Responses.
- A Chat stream that ends inside the block no longer gives held-back
text to the answer: inside, that is thinking (a held "``" would have
leaked; before, so would a held "</th").
Run at fc9cf6a + this change:
- packages/think-tags `bun test`: 18 pass, 0 fail. New: the reporter's
bytes (think_code_test.go's exampleClose) whole (Chat/Anthropic stream,
Chat/Anthropic/Responses whole), one character a delta, one UTF-8 byte
a delta; mdCode's other cases (double-backtick span, fence, span ends
with its line, split close, held backticks); two cases.json cases so
moejs checks it too.
- Against fc9cf6a's middleware: 6 of the new tests fail. With code state
ignored (any "<" checked): the same 6 fail. With held text given back
inside the block: "backticks held at the end stay thinking" fails.
- Whole repo, HOME=$(mktemp -d) bun test: 1698 pass, 0 fail on two runs.
A first run had 1 fail whose name I didn't capture; two reruns were
green, so it is unidentified, not fixed.
- bun scripts/check.mjs: exit 0.
Not run: a real model through magpie with the plugin installed.
minimax 0.1.2 adds an `auth.checkin` hook for MiniMax Code's daily check-in (每日签到).
- It reads the panel at `/minimax-cloud/api/v1/signin/status` and claims the day at `/signin/claim`.
- Both requests are signed by the package's own `accountCall()`: the same headers, query and x-signature as the rest of the account API, and a `{}` body on the claim.
- On the China site they go to `agent.minimax.cn` (`site.llm`), the host magpie's built-in check-in uses.
- Failed reads come back as `failed`: a non-2xx reply, no panel, or a malformed panel (not 7 days numbered 1-7, or more than one today or claimable day).
- With no day marked today it returns `inactive`, and nothing is claimed.
- The streak counts back from today's index. 401 and 403 are `failed` with the HTTP status.
- The README says the check-in is opt-in. OpenCode ignores the hook.
Run at d21543b76cf0fa19b6e345e6b2d2f0d29976ee93, merged locally onto origin/main 6467760:
- packages/minimax `bun test` (isolated HOME): 50 pass, 0 fail.
- `bun scripts/check.mjs` (all packages): exit 0.
- The new host test, run against 5fb2143's index.mjs: 17 pass, 1 fail (the host test). So it guards the fix.
- A scratch probe at 5fb2143 with separate llm/agent fakes reproduced the wrong host; d21543b's test covers that case.
Not run: a real MiniMax account. No test reaches the network.
Adds agent-kimi-desktop 0.1.0 (kupakupar): Kimi desktop Work on magpie's
Agents page. It moves the runtime's daimon-kimi-code baseUrl to a
loopback bridge and back, through Kimi's local control API.
Re-reviewed at dd8ed2c against the last review at 6c584bb:
1. menu-hook.cjs and selection.mjs are removed; no injected code ships.
2. No full config backup is written. Only before-menu-models.json (the
model list and current choice) is kept, and it is removed on a clean
disconnect.
3. providers.json and settings.json are never opened. The catalog comes
from the gateway's /v1/models with the agent's key and its registered
UA "Desktop Kimi Work".
4. No signal handlers and no process.exit. Restore runs on the 'exit'
event, which fires when magpie closes the host's stdin (host.js
rl.on("close") -> process.exit(0)). The README gives manual recovery
after a SIGKILL.
5. macOS record: COMPATIBILITY.md (macOS 26.6.2 arm64, Kimi 3.2.17
build 3.2.17.4, magpie 0.1.1276, Bun 1.4.3). All four control methods
succeeded, a streamed request returned 200, and a restore followed.
The README says what happens when a private method fails.
6. Search and fetch pass Kimi's own request, with its own key, to Kimi's
own origin, unchanged. This is the user's own account used by that
user, the same rule as #171, so it is accepted.
Run at dd8ed2c, and merged onto origin/main 2ea25b9 together with #171:
- HOME=$(mktemp -d) bun test: 1660 pass, 0 fail (merged: 1668 pass, 0 fail).
- bun test packages/kimi-desktop: 12 pass.
- bun scripts/check.mjs: ok (it skips agent packages).
- git diff --check, npm pack --dry-run (8 files), node scripts/dist.mjs
(packs agent-kimi-desktop@0.1.0).
- Broken by hand: re-adding a SIGTERM handler and a full config backup
turns 3 tests red.
- No CI ran on the PR. No real Kimi or credential was used.
Adds kimi-work 0.1.3 (kupakupar): a provider for the Kimi desktop's Work
subscription, using the desktop app's own local sign-in. It stores only
a hashed account reference, rereads the desktop's tokens on each call,
writes nothing to disk and logs nothing.
Re-reviewed at d9fe48d against the last review at fc3e395:
- (1) the desktop credential: decided acceptable (same as WorkBuddy,
Qoder, ZCode: each user's own allowance).
- (2) macOS record: COMPATIBILITY.md, macOS 26.6.2 arm64, Kimi 3.2.17
(3.2.17.4), magpie 0.1.1276 (released 2026-10-16 17:11Z, before the
20:09Z run), Bun 1.4.3. The path and four field names match readDesktop.
- expireTime: resetsAt dropped, window renamed 会员共享额度.
- efforts: every advertised level is kept (redacted real catalog fixture).
- kimi-work-opencode overlap: the README credits it and says not to
enable both.
- Request input: handled; body, headers and signal are kept, and the
desktop credential replaces any caller Authorization or Cookie.
- Icon is shipped once (package.json); the UA reads the package version.
Run at d9fe48d, and merged onto origin/main 2ea25b9 together with #169:
- HOME=$(mktemp -d) bun test: 1656 pass, 0 fail (merged: 1668 pass, 0 fail).
- bun test packages/kimi-work: 8 pass.
- bun scripts/check.mjs: ok (kimi-work checked).
- git diff --check, npm pack --dry-run (4 files), node scripts/dist.mjs
(packs opencode-kimi-work-auth@0.1.3), scripts/new-to-npm.sh (new).
- Broken by hand: String(input) for Request and the old effort allow-list
each turn their new test red.
- No CI ran on the PR. No real Kimi account or credential was used.
#159 and #162: the "far from Cursor" fake showed a Run's usage event
SHOWS (225 ms scaled) after the Run's stream closed. The step's wait
takes its last look about 180 ms after that close, so only ~45 ms stood
between "the event is not there yet" (what the test means) and "the
event is already there" (the step owns it and the sum moves). A loaded
machine eats 45 ms. #162's title guessed an earlier test's cached
usage; it was the step's own event showing inside its wait.
The fake now holds a far Run's event until the step whose Run it is has
answered, and shows it at once if that step already has: the state the
test is about, not a duration.
#165: test 1 bounded each step's wait in milliseconds, which load
stretches. Each wait asks once and the round trip is most of it, so the
bound is now at most 2 asks per step (its own event, plus what earlier
steps owe).
Run (bun 1.4.2, load average 280-295 throughout):
- Old test, cause injected by showing the event earlier (SHOWS - 50 ms):
#159's failure; SHOWS - 80 ms: #162's. New test with the same
injections: green.
- packages/cursor/latency.test.mjs: 9 of 9 green.
- packages/cursor whole package (HOME=$(mktemp -d) bun test): 3 of 3,
272 pass, 0 fail.
- Broken by hand in index.mjs, each turned the new test red: the step
waiting for its own event removed; owed() not gathering at the end;
the ask bound raised (a step asking 3+ times).
Not run: the whole-repo suite (test-only change in one file).
"refreshTokens orders hosts by the token's source_id and falls back on
400002" compared the expiry refreshTokens computed (Date.now() + 3600s -
10min) with Date.now() read again after it returned. On a millisecond
boundary between the two reads it is off by one: publish run 38885546686
(devin 0.1.20's push, 29adee2) went red on ubuntu with expires
1792148517446 against 1792148517447, and no package published. The test
now takes the clock before and after the call and checks the expiry lies
between them.
Run: with a 3ms busy-wait injected after refreshTokens returns, the old
test is red (0 pass, 1 fail) and the new one green. bun test in
packages/autoclaw under a mktemp HOME: 9 pass. bun scripts/check.mjs
autoclaw: ok. Test only; the package's version is unchanged.
magpie.page.titles names the page in zh, zh-TW, ja and de; a magpie that
doesn't know titles still reads title. The tiles were auto-fill, which left
a hole in their row at most widths; now four across, two by two under 640px.
Run: bun test in packages/usage (6 pass). Tried in the magpie sandbox app's
dev UI with the real usage.jsonl, WebKit, dark and light, zh and en, at
900 and 560px.
magpie's built-in Devin (internal/gateway/devin.go buildDevin) sends the
images a tool returned on the tool message that answers the call
(inlineImages(p.Images), field 10). A chat's tool message holds text
alone, so magpie's gateway hands the plugin those images in the user
message after the results (buildChat's seeLater: "[From the result of
<tool> (tool call <id>):]" then the images, and the result's text ends
"[The tool returned an image; it follows in the next message.]"). The
plugin sent them to Devin as a user message of their own, and a tool
message's own image_url parts were dropped.
build() now puts each result's images back on its tool message: the
images under a heading naming a result just sent, up to the number its
note says (so the user's own images after them stay the user's), and a
tool message's own data: image_url parts. The note is taken off the
result's text when every image it names went back with it; an empty
result is "(no output)", as the built-in words it. Images without bytes
(URLs) are left out, as inlineImages leaves them. A heading that names no
result just sent is left as the user's text.
Run:
- bun test in packages/devin under a mktemp HOME: 93 pass, 0 fail.
- bun scripts/check.mjs devin: ok.
- tool-images.test.mjs against the old index.mjs: 3 of its 4 tests red
(the fourth guards a heading naming no result, which held before too).
With the count limit broken by hand (images past the note's number taken
as the tool's), the two-results test goes red.
- The fixtures in testdata/ are magpie's literal buildChat output at
origin/main b03031738, captured with a throwaway test in a separate
magpie worktree (codexViewImage, and an Anthropic request with two Read
results and the user's own image).
Not tried: a real Devin account (whether Devin's model reads a tool
message's images better than a user message's was not measured); OpenCode
itself, outside magpie, whose own shape for a tool's images was not read.
Three things magpie's built-in Command Code did that the plugin didn't,
ahead of retiring the built-in:
- The Credits window had no reset, though the month's credits come back
when the plan's period ends, which billing/subscriptions' currentPeriodEnd
says (sub.until, already the card's "until"). allowanceOf now puts it on
the window as resetsAt (yetone/magpie#2454). No period end, no reset.
- The models the CLI marks FREE (magpie's cmdFree, all 11: Space Bunny
Alpha, Pixel Canary, Laguna S 2.1, the Ling 3.0/3.1 Flash ones, the
MiniMax M3/M2.7 free ids, LongCat 2.0 free, Tencent Hy3) now say
free: true on every list: the Provider API's, Go's, and Go's table when
the list can't be had.
- A Go chat's max_tokens sent to /alpha/generate is kept within 200,000,
the most Command Code takes ("Too big: expected number to be <=200000
at params.max_tokens"; magpie's CommandCodeMaxOutput in cmdRequest).
Before, a 384,000 ask failed the whole request.
Run: bun test in packages/commandcode: 49 pass, 0 fail. parity.test.mjs
is new; usage.test.mjs's two plan-with-period cases now expect the reset.
Broke each by hand and watched red: no resetsAt, 3 fail; no free flag,
3 fail; no cap, 1 fail. bun scripts/check.mjs commandcode: ok.
Live, with the owner's GOAT key: the card's Credits window says resetsAt
2026-10-28T16:16:42Z, the subscription's until; its list (71 models) has
poolside/laguna-s-2.1-free free, the only one of the 11 Command Code lists
today. Not tried live: a Go request over 200,000 (no Go key here).
Two things magpie's built-in Cursor did that the plugin didn't, ahead of
the built-in's retirement:
- The stateless path (conversation) sent every tool result with
isError false. A chat tool message with is_error: true (what magpie now
sends for a failed tool, as the built-in's cursorResult told Cursor
isError) is marked isError, as the native path already did.
- cliToken ran `security` on every call. It now reads the Keychain as the
built-in's cursorKeychainToken (internal/provider/cursor.go; magpie
#746, #2408): a read is kept 10s; a read that failed with anything but
exit 44 (no such item) may have been a dialog the user said no to, and
is not asked again for 10 minutes; reads go one at a time, so callers
at once share one run. A sign-in and the read after `cursor-agent
status` read afresh, as forgetCursorStatus / cursorTokenOf(true) did.
README's "read on every request" says so now.
What was run (bun 1.4.2, macOS, load average ~280-300):
- parity.test.mjs (new, 5 tests): green. Broken by hand, each watched
red, then restored: is_error ignored (1 red), cache check removed
(3 red), denied backoff at 10s (1 red), exit 44 treated as refusal
(1 red), no read serialisation (1 red).
- `security find-generic-password` for a missing item gives execFile
err.code 44 (number) on this Mac, as the mapping assumes.
- Full `bun test` in packages/cursor, 7 runs: 272/272 green in 4; the
other 3 red only in latency.test.mjs ("events never show in time",
#159; "nothing naming the session", #162), which the change doesn't
touch. On clean origin/main aec06bd, latency.test.mjs alone is red
too, including "far from Cursor ... cache and all" (filed as #165).
- Not tried: a real Keychain dialog denial; the backoff is checked with
a fake `security`.
What changed:
- usage: magpie's built-in zedLoginQuota showed a free account's card
(plan_v3 zed_free, or none) as "No plan", unless an overdue invoice was
its error, while the account row kept zed.PlanName's "Free". magpie's
card knows "No plan" (app.js noPlan) and translates it. The plugin's card
said "Free". It now says "No plan" in the same case; the sign-in still
saves planName "Free", and an overdue free card keeps "Free" with its
error, as the built-in's switch did.
- README: "Not included" listed the plan display, which the usage hook has
shown since 0.1.x, and several accounts and the web-search stand-in,
which magpie gives a plugin provider itself (plugin_accounts.go, the
gateway's generic searchReply path). It is now a "Usage" section and an
"In magpie, not the plugin" section.
What was run:
- usage.test.mjs: the free-account test (zed_free, "" and an overdue free
account) fails on 0.1.7's index.mjs ("Free" for "No plan"), passes now.
- packages/zed under a scratch HOME: 31 pass, 0 fail (4 files).
- bun scripts/check.mjs zed passes.
Not tried: a real free Zed account.
What changed, for parity with magpie's built-in ZCode before it retires:
- Personal resets. The built-in's zcodeQuota read
/api/biz/customer-package-reset/list?targetType=PERSONAL with the plan's
key (zhipuPersonalResets, yetone/magpie#1191) and showed the count, by
window, and each reset's end. The plugin read only the team's list.
codingUsage now reads the personal list alongside the subscription list,
so a Coding Plan card (and a dual gift + Coding Plan card, built on it)
carries resets: {count, byWindow, fiveHour, weekly, until, each}.
- Team resets now carry team: true and each, as zhipuTeamResets set Team.
Both lists are read by one resetsOf: only available ones count, each
{until?, window} sorted soonest first with an endless one last
(sortResetCards), nothing on a failed read or none left.
- Start Plan refusal. A Start Plan answer that is a 405, the block page
("request has been blocked" / errors.aliyun.com) or code 3012 / "unusual
activity" now comes back, same status, as {type:"error", error:{message:
"<vendor's words, or the status for a block page> — <hint>"}}, the hint
word for word magpie's provider.ZCodeStartBlockedHint, as the built-in's
zcodeStartExplain / Provider.Explain put it. The block page's own words
are left out, so magpie's APIError no longer reads it as a network
firewall's (BlockedHint). Coding Plan and team answers are untouched.
- README: the resets and the Start Plan's hint.
What was run:
- usage.test.mjs: a new test with #1191's literal reset list (the
built-in's zhipuResetList) fails on 0.1.18 (no resets); the team test,
now expecting team and each, fails on 0.1.18 too.
- start.test.mjs: the new refusal test fails with the startBlocked line
disabled by hand (block page passed through), passes with it.
- Every packages/zcode test file under a scratch HOME: dual 25, gift 20,
models 1, moved 1, own 6, signin 3, start 11, usage 16 (83 pass).
- bun scripts/check.mjs zcode passes.
Not tried: a real account's reset list or a real Start Plan refusal.
`team` and `each` reach magpie's card from its next release; older magpie
ignores them.
Every model in MODELS carries the tokenMultiplier droid 0.241.1's registry
has for it (testdata/droid-0.241.1-costs.txt, byte for byte). A promotion
running takes its discount off it, with the multiplier before it as rateWas;
one that has ended or not begun is no discount. The rate reaches magpie
through a provider hook (host.js reads rate/rateWas from its models; a
config hook's models carry no rate there). Fast Mode entries stay last.
Reviewed at 498b8723e5350657aa26f8f0e2bb1d859f59803b:
- each multiplier and promotion checked against the testdata excerpt;
gpt-5.6-sol's expired M promotion is skipped and Pt (20%) applies, as
droid's first-running-promotion rule gives
- host.js info(): the provider hook's list replaces the config list, and
the request path strips temperature for OpenAI models in droidBody, so
capabilities.temperature=true in providerModel changes nothing sent
- factory unchanged on main between the PR's base 7687314 and fe5631c
Run (HOME=$(mktemp -d), PR head merged with main fe5631c):
- bun test: 1620 pass, 2 fail; the two are cursor latency.test reds under
the full run at load ~260, already filed as #159 and #162; packages/cursor
alone: 267 pass, 0 fail
- bun test packages/factory: 149 pass, 0 fail
- packages/factory/rate.test.mjs against main's index.mjs: 5 fail
- bun scripts/check.mjs: passes
Not tried with a real Factory account here (the author did, 46 models).
Devin's GetChatMessage has no field for the answer's format, so magpie's
built-in Devin (internal/gateway/devin.go, req.inSystem()) told the model
in the instructions: the json_schema's schema, or any JSON object for
json_object. The plugin dropped response_format, and magpie's generic
plugin path falls back to inSystem only when an upstream answers 400
naming the format, so a moved user asking for JSON got prose. build()
now adds the built-in's words (format.go's instruction) after the
system messages, ahead of the tool descriptions, at the head of the
first user message. A json_schema with no schema asks for any JSON
object, as the built-in's openAIFormat reads it.
Checked against the built-in, no change needed:
- Lightning variants (swe-2-high-lightning, swe-1-7-lightning-medium):
the built-in's tiers are fast and priority only (devinTiers), so a
-lightning id is no effort and no tier and is listed as its own model,
as the plugin lists it.
- A failed tool's result: magpie sends its content as "Error: …", and
build() passes a tool message's text to Devin as it came; a test now
holds that.
Run: HOME=$(mktemp -d) bun test in packages/devin: 89 pass, 0 fail.
structured-output.test.mjs: 3 of its 5 tests red with the index.mjs
change taken out (the other two: no format unchanged, and the
"Error: " pass-through). bun scripts/check.mjs devin: ok.
Not run: a real Devin account, nor magpie end to end.
Kiro's generateAssistantResponse has no field for the answer's format, so
magpie's built-in Kiro (internal/gateway/kiro.go, req.inSystem()) told
the model the schema at the end of the system prompt: "Respond with a
single JSON value and nothing else, matching this JSON schema:\n<schema>."
The plugin dropped output_config.format, and magpie's generic plugin path
falls back to inSystem only when an upstream answers 400 naming the
format, which the plugin never did, so a moved user asking for JSON got
prose. buildKiro now says the schema the same way, after the caller's
system prompt and before the thinking budget prefix. The AI SDK's
output_format is read too. A JSON object with no schema needs nothing
here: magpie's Anthropic body already tells it in the system prompt.
Run: HOME=$(mktemp -d) bun test in packages/kiro: 46 pass, 0 fail.
structured-output.test.mjs: 3 of its 4 tests red with the index.mjs
change taken out (the fourth checks a request with no format is
unchanged). bun scripts/check.mjs kiro: ok.
Not run: a real Kiro account, nor magpie end to end.
A user typed keys made under several OpenCode accounts into Zen Free's key
field and expected several accounts. The method's authorize() always
returns key "public", and magpie's host stores result.key over the typed
key (host.js save), so every such sign-in is the same shared credential
and the typed key is dropped. The label and README now say so and point
own keys to magpie's built-in OpenCode Zen provider (several keys,
rotation and failover).
Run: bun test in packages/zen-free, 174 pass 0 fail. Read host.js
apiKey/save on magpie 63be47717 to confirm the stored key is "public".
Not tried: a sign-in through magpie's GUI with the new label.
Reported on magpie's Discord (#help): through magpie, Trae CN's doubao
model said it couldn't read images, while in Trae it reads them.
Every model was listed as text-only (MODEL's modalities), and partText
put "[an image, which this model can't see]" in every image's place, so
no image ever reached Trae.
What changed:
- Trae's lists mark each entry `multimodal` true or false
(config_info_list). A listed model's flag now decides
capabilities.input.image, attachment and modalities, over a fallback
entry's word. Doubao-Seed, Kimi K3/K2.6, Qwen 3.7 Plus and MiniMax M3
are true; GLM-5.x and DeepSeek V4 are false.
- An image sent to a model that takes images goes to llm_utils_chat as
an OpenAI image_url part ({url}) after the text part. That is the
shape TRAE's ai-agent carries (LLMRawMultiContent/LLMRawChatImageURL,
in the ai-agent binary's strings) and what autumnsentiment/Trae2api-cn
passes llm_utils_chat unchanged.
- A model marked false still gets the placeholder.
- The fallback list marks kimi-k2.6 and qwen-3.7-plus as taking images,
as Trae's SOLO list does.
The list fixture is two entries of a relay's capture of the SOLO list
(wangqi233/trae2api scripts/_solo-models-clean.json).
Run:
- images.test.mjs: 6 pass on this change; 5 of 6 fail on 0.2.14's
index.mjs (only the text-only case passes there).
- packages/trae: 146 tests, 0 fail.
- HOME=$(mktemp -d) bun test across the repo: 1616 pass, 0 fail.
- bun scripts/check.mjs: ok.
Not tried: a real Trae account. Magpie's owner has none signed in, so no
real image request was sent to Trae.
The 15-minute absolute lifetime spans all of a retained Run's tool
roundtrips. A tool-result continuation that arrives with no more than
min(60s, lifetime/10) left now retires the owner (410 "retired before
lifetime deadline") and rebuilds from the supplied history before writing
any result, instead of resuming and failing mid-segment with "native Run
lifetime expired". Replays of an already submitted batch keep their path.
Merging main resolved a conflict with a7614aa (#143): expireIn sets
expiresAt as well as the timer.
Reviewed at 75e481a (nicegui's 6f03753 plus the merge of main):
- packages/cursor `bun test` (isolated HOME) 267 pass, 0 fail, three
times; `bun scripts/check.mjs` ok; PR CI run 38868447170 green, attempt 1.
- The near-expiry test fails on the source without the reserve check.
- Near-deadline injected by shifting Date.now() from the owner's
expiresAt, not by waiting: 62s left resumes on the same Run (1 Run, 1
result written); 59s and 0.5s left rebuild (2 Runs, no result written).
With the check removed by hand, 59s and 0.5s go red.
The native retention test set NATIVE_LIMITS.lifetime = 65 before the
first ask. The lifetime counts from the Run's start, so on a loaded
machine the first Run expired before it answered: 410 where the test
wants 200. NativeSession now sets its deadline through expireIn(ms), the
constructor giving it the whole lifetime as before, and the lifetime case
calls owner.expireIn(65) after the first answer. The resultWait case
still sets its limit up front, since that wait counts from the answer.
The plugin's behaviour is unchanged, so there is no version bump.
Run:
- Injected: on the old test, a lifetime of 0–10 ms is red ("Expected: 200
Received: 410"); 15 ms and up is green. The new test is green.
- HOME=$(mktemp -d) bun test, whole repo: 10 runs in a row, 0 fail
each. On current main 2dd4328 plus this change: 1609 pass, 0 fail.
- bun test packages/cursor/latency.test.mjs 8 runs: green with this
change. On main without it, 1 red in 8 runs. That red is
"events never show in time" at load ~120, filed as #159. It is not
this test. grok's login flake from an earlier run is #160.
An opt-in gateway middleware for Codex Responses history after a provider
or account switch. For a provider whose rule turns historyFilter on, it
drops old reasoning items and items typed encrypted_content, removes the
optional server id from message and tool items, and sets store false. It
keeps text, tool arguments, results and call_id pairing. It rejects
previous_response_id, conversation, item_reference, encrypted compaction
and /responses/compact with a message, instead of dropping them silently.
Every provider passes through unless configured. No network, file, env or
child-process access.
Run at the reviewed head 96881ead, merged with origin/main:
- bun test packages/codex-history: 22 pass, 0 fail.
- The same 22 cases.json cases through magpie's own engine (moejs, via
internal/middleware Begin/Request in a throwaway test): 22 ran, all equal.
- Broke it by hand (reasoning items kept): bun 4 fail, moejs 4 BAD; restored.
- Whole repo: bun test 1606 pass, 0 fail; bun scripts/check.mjs exit 0.
#156: a native Run of N tool steps ended with TurnEndedUpdate's totals as
the final step's prompt_tokens (1,105,934 on erzay's ~21-step turn, where
the real context was ~61K), and Codex compacted at once. The final step
now keeps its last model call's share, max(that call's chars/4 prompt
estimate, turn total / model calls), split proportionally across input,
cache read and cache write; the rest goes into usage.magpie_deferred
(merged with any settled stateless debt), so magpie still bills the whole
turn. On erzay's numbers that is ~52.7K reported, ~1.05M deferred.
#155: waitForBatch armed once, at a step's first call, so a step whose
calls arrive one by one as the model writes them (13 calls, 9 long-arg)
failed 502 "did not complete its declared native tool batch" ~30s after
the first call even though it never paused that long. The deadline now
restarts on every call, answered call, count and text/reasoning frame.
Run at this commit: packages/cursor `bun test` (isolated HOME) 266 pass,
0 fail, three times; `bun scripts/check.mjs` ok. The three new tests fail
on 4e64f26's source (prompt 1105934; sealed step failed at 300ms; stall
failed 303ms after the first call instead of after the latest).
Adds packages/autoclaw, @magpie-community/opencode-autoclaw-auth, for AutoClaw (Zhipu OpenClaw).
- Providers autoclaw (oversea, web sign-in through Google or z.ai) and autoclaw-cn (CN, phone SMS).
- Reads the credit balance and runs the daily check-in through auth.checkin.
Since the 10-08 review, this fixes:
- The OAuth callback takes a code only with the state the authorize page handed out (login CSRF). The legacy /callback is gone.
- The local server closes after 10 minutes even if magpie never calls callback, so port 18432 isn't held.
- The registry entry no longer uses ZCode's icon.
- The User-Agent names the real arch.
- The check-in row's used is 0.
- A 401 or 403 the upstream answers without an envelope marks the sign-in expired.
- New tests with a fake fetch cover loader().fetch, refreshTokens and the callback's state check.
What was run, at 356fb53 (8a0fd3a plus a merge of origin/main 118cf2e; the merge resolved registry.json, raccoon's entry beside autoclaw's):
- HOME=$(mktemp -d) bun test packages/autoclaw: 9 pass, 0 fail.
- Whole repo, HOME=$(mktemp -d) bun test: 1584 pass, 0 fail.
- bun scripts/check.mjs: all ✓.
- Broken by hand, each turning a test red:
- Dropping the callback's state comparison: 1 fail.
- Dropping the expired mark on a non-envelope 401: 1 fail.
- The package isn't on npm yet. magpie serves it from the dist branch until an owner publishes its first version.
Not verified: a real AutoClaw account, and the 10-minute server close (read, not tested).
Adds packages/raccoon, @magpie-community/opencode-raccoon-auth, for SenseTime Raccoon (商汤小浣熊, xiaohuanxiong.com).
- Sign-in: through the browser, or reusing Raccoon desktop's live sign-in.
- Lists the models and makes chat requests.
- Reads account credits (balance and bills).
- Runs the daily check-in through auth.checkin, plus the desktop's first-login grant. The grant is marked settled only when the vendor gives a definite answer.
What was run, at the reviewed head 6078f92 merged onto origin/main 4e64f26:
- HOME=$(mktemp -d) bun test packages/raccoon: 21 pass, 0 fail.
- bun scripts/check.mjs: every package ✓, raccoon included.
- Whole repo, HOME=$(mktemp -d) bun test: 1575 pass, 1 fail.
- The failure was grok's "a login's link is still handed on", a 5s timeout. Another full suite was running on the machine at the same time.
- The test passed 5 of 5 when run alone.
- It is filed separately.
- The raccoon code is byte-identical to c068cc5. That head was reviewed line by line on the PR, and every fix was broken by hand to check that its test goes red. 6078f92 only merges main.
- The package isn't on npm yet. magpie serves it from the dist branch until an owner publishes 0.1.0 (scripts/new-to-npm.sh).
Not verified: a real Raccoon account. Only the reply bytes the author captured were used.
OpenAI's reasoning models turn temperature and top_p away with a 400, and
droid sends neither. droidBody now takes both out of a Responses request
for a model whose upstream is openai, also when the body already opens
with droid's line. configModels says temperature: false for those models,
so OpenCode doesn't send it either. Grok and the chat-completions models
keep theirs.
Run: bun test in packages/factory, 144 pass. The new test fails on 0.1.30's
index.mjs (temperature still in the body). Not tried against Factory's API
with a real account.
registry.json lists tools-calc (kind "tools"), page-usage (kind "page")
and middleware-reserve (kind "middleware"), community, with en/zh
summaries and no icon (magpie has none that fits).
README: sections "Routing strategies" (under Gateway middleware), "Tools
for every agent" and "Pages", each with a table and what a package of
that kind is a folder with; "Write your own" pointing to
usemagpie.ai/docs/plugins (#tools, #pages, #gateway-points, #middleware,
#agents, #quick) and to a template package of each kind. The market
section names the kinds.
Run: registry.json parses (26 entries); HOME=$(mktemp -d) bun test 1554
pass, 0 fail; bun scripts/check.mjs ok.
Known: magpie main's Plugins > Discover (plugins.js kindOf) treats any
kind but middleware and agent as a provider, so the tools and page
entries show with the provider chip until magpie learns those kinds.
A routing-strategy gateway plugin (magpie.gateway, exports strategies):
reserve/ceiling fills accounts in listed order up to `ceiling` percent of
their allowance (80 by default), then the next; past it everywhere, the
least used first. reserve/accounts-first puts subscriptions before API
keys, accounts least used first, keys by weight then recent tokens.
Resting seats go last in both. One file, no imports, for moejs.
Run:
- bun test packages/reserve: 12 tests (10 strategies.json cases through
checkStrategies, exactly two strategies and no hooks, every answer a
permutation for 2-8 seats). Breaking the resting rule by hand turned
its case red.
- Sandbox magpie from yetone/magpie origin/main b03031738: `magpie plugin`
lists "routings reserve/accounts-first, reserve/ceiling". A stub
OpenAI-compatible provider on 127.0.0.1:3593 recorded the key of each
request; the provider had key-a, key-b, key-c (weight 5), listed in that
order. routing=reserve/accounts-first: 3 of 3 went to key-c. With key-c
answering 429: key-c 429 once, then key-a, key-b, key-a (key-c resting,
last; equal weights by fewer tokens). routing=reserve/ceiling: 4 of 4
to key-a (keys' allowance unknown, so listed order).
Not tried: the over-ceiling tier with real subscription accounts; it is
covered by strategies.json only.
A new kind of package: a page in magpie's window (magpie.page), with
magpie.permissions ["usage:summary"] and nothing else. Today, 7 or 30
days; models by tokens, calls or cost; the picks are saved through
magpie.options.set (debounced past the bridge's once-a-second limit).
Theme from --magpie-* variables; en and zh text.
Run:
- bun test packages/usage: 6 tests (permissions are exactly what the
scripts read; no fetch/XHR/WebSocket; no inline scripts; every local
reference exists; what tiles and rows say).
- Sandbox magpie from yetone/magpie origin/main b03031738: `magpie plugin`
lists "page Usage glance (reads usage:summary)". `magpie web` on
127.0.0.1:3595 serves every page file under the sandbox CSP
(connect-src 'none'); /api/plugin-pages/read usage:summary answers the
sandbox's 10 calls; providers:list is refused 403. Headless Chromium and
WebKit (playwright 1.62.0) opened the sidebar tab: tiles "Calls 10,
Errors 0, Tokens 70, Cost $0", row "stub-1 70 · 10 calls", no console
errors; picking 7 days wrote "period": "7d" to plugins.json.
A new kind of package: an OpenCode plugin whose only hook is `tool`,
which magpie serves to every agent on /mcp/magpie/tools. Three tools:
eval (exact rational arithmetic in BigInt fractions), convert (data,
time, length, CSS, mass, angle, temperature) and date (calendar-aware
add, between, weekday/ISO week, IANA zones through Intl, DST included).
No network, no key, no dependency.
Run:
- bun test packages/calc: 8 tests, 73 expects, pass with TZ=UTC and
TZ=Pacific/Kiritimati.
- A sandbox magpie built from yetone/magpie origin/main b03031738
(nogui, HOME in a scratch dir, gateway on 127.0.0.1:3591):
`magpie plugin add <folder>`; `magpie plugin` lists
"tools calc_convert, calc_date, calc_eval". Over /mcp/magpie/tools:
initialize, tools/list (3 tools with their schemas), tools/call
calc_eval 0.1+0.2 -> {"exact":"3/10","decimal":"0.3"}, 1/0 -> isError
"division by zero", calc_convert 1 GiB->MB -> 16777216/15625
(1073.741824), calc_date across New York's DST with `to` -> between.
Not tried: an npm install. From npm the tools are named tools-calc_*,
since magpie's ShortName doesn't strip "tools-".
check.mjs now checks a plugin whose only hook is `tool`: each tool's name
is one an MCP client takes, and it has a description, args and execute.
It skips packages with magpie.gateway (routing strategies) and page-only
packages (magpie.page with no main), whose own tests check them.
middleware.mjs gains order() and checkStrategies(): a gateway plugin's
strategy is asked for an order the way magpie's gateway asks it
(internal/routes.Apply), falling back to the listed order on a throw or
an answer that isn't a permutation, and strategies.json cases are run
against it.
Run: HOME=$(mktemp -d) bun test (1554 pass, 0 fail) and
bun scripts/check.mjs (every package ok) at this tree with the three
packages that follow.
sryimnoob123 measured a streaming request to every model on each of
amr-link's three APIs: chat completions carries the thinking of most,
claude-haiku-5.5 and deepseek-v4-pro think longer on Responses, and
glm-5.3-flash thinks only on Anthropic's messages. The vendor also names
max beside low and high. #141 was written against 0.1.4 and conflicted
with 0.1.5 (#137's levels), so it is ported onto main here:
- WIRE/MODEL_WIRE/wireOf as the PR had them; the provider default is
chat completions, and a live list's and the seed's models each carry
api.npm/provider.npm, which magpie's host reads per model.
- The config hook sets every model's wire again over a kept copy, so a
model 0.1.5 left on the Responses API moves to its own.
- max joins every measured level list.
Run: bun test in packages/opendesign, 22 pass (a new test holds a kept
0.1.5 model moving to its wire; the old Responses-only expectations were
changed to the measured ones). Not tried against a real amr-link account.
Co-authored-by: sryimnoob <314134180+sryimnoob123@users.noreply.github.com>
sryimnoob123 measured amr-link with reasoning_effort high and low on all
11 models (magpie 0.1.1254, Windows): every one answered 200, and all but
gpt-6-luna streamed reasoning, four the catalog calls "standard" too.
Their install showed all 11 with reasoning false and no levels. Two
causes:
- provider.models gave the live list in the config's shape
(reasoning: true, modalities: [...]). magpie's plugin host reads a
listed model's thinking from capabilities.reasoning and its kinds from
capabilities.input, so for a signed-in account every model read as not
reasoning, with no image input. It now gives OpenCode's model shape
(servedOf: api, capabilities, variants), as minimax/workbuddy do.
- No model had levels: nothing declared variants, and magpie shows a
model's levels only from them. models.mjs now records the measured
levels (efforts): ["low", "high"] on the 10 that thought, [] on
gpt-6-luna (took it, never thought). Only the two levels the table
shows were given. A model with levels reasons whatever its capability
word; one the seed doesn't know keeps the old rule (advanced reasons)
with no levels. refresh-models.mjs keeps efforts like names.
Run:
- bun test packages/opendesign: 21 pass, 0 fail. New: "a signed-in
account's models reason at the levels amr-link took (#137)", "the
seed's models carry the measured levels as the config's variants";
the live-list test now pins the OpenCode shape.
- Broken by hand: modelsOf back on modelOf (config shape) -> 2 fail;
efforts not passed from the seed to the live list -> 1 fail.
- magpie origin/main internal/plugin/host.js run under bun with a
preloaded fetch stub serving a 3-model catalog (init + providers, a
stored oauth account): with 0.1.4 gpt-6-luna, deepseek-v4-pro and
claude-haiku-5.5 all list reasoning=false variants=[] image=false;
with this change luna false/[]/image true, v4-pro true/[low high],
haiku true/[low high]/image true, url the amr-link base.
- refresh-models.mjs against the same stub: efforts kept per model.
- bun scripts/check.mjs: every package ok.
- TMPDIR/HOME isolated bun test (whole repo): 1526 pass, 0 fail. A first
run had 1 fail, packages/grok/login.test.mjs "a login's link is still
handed on" timing out at 5s with load average ~100; alone 3/3 pass and
the rerun of the whole repo passed. Untouched package; not filed.
Not tried: a real Open Design account (none here) or magpie's
`model efforts` command end to end; the levels rest on the reporter's
table.
Full suite: bun test (whole repo, with factory 0.1.30 below it): 1527 pass, 0 fail
sky杨, on magpie 0.1.1254 with this plugin at 0.1.29, got 403 "Factory:
Forbidden" from Claude Code on every model, GPT, Claude and Gemini alike.
Factory's body was a bare "Forbidden", not a phrase-specific refusal.
Header diff against droid 0.242.0 (npm droid and @factory/cli-darwin-arm64
0.242.0, unpacked with --ignore-scripts into an empty directory and read
with strings, never run). Its model requests carry: Authorization,
X-Factory-Client: cli, X-Client-Version, X-Factory-Org-Id, User-Agent
factory-cli/<ver>, x-session-id, x-assistant-message-id, x-api-provider,
x-provider-routing-source (registry_default without a routing claim),
OpenAI-Platform: org-bHuLtG1fGmYk5YaOihAAXFBw for openai/azure_openai,
and X-Api-Key "placeholder" from its Anthropic client. The plugin sends
each of these with the same value, apart from the release: 0.233.0, nine
releases behind. The WorkOS client id is unchanged. droid's binary still
reads a server-side min_cli_version flag and runs a forced auto-update.
0.1.16 was the same case (JL: every model 403 "Forbidden" from pi and
Claude Code while droid worked; the plugin said 0.231.0, two behind), and
JL's later reports (0.1.25) were about models, not refusals. Whether
Factory refuses an old release with a 403 is still not confirmed: there is
no Factory account to try with. This is the one header difference found.
Run: bun test in packages/factory, 143 pass. With VERSION put back to
0.233.0, droid.test.mjs goes red (Expected "0.242.0", Received
"0.233.0"). bun scripts/check.mjs factory: ok.
Not tried against Factory itself.
Full suite: bun test (packages/factory) 143 pass
Zen made deepseek-v4.1-flash-free free (in its /models as the public key
reads it, 2026-10-15) and the plugin never offered it. Two causes:
- buildModels left out a listed model that neither the catalog
(models.opencode.ai) nor the docs' endpoint table described: a free
model Zen lists before they catch up, or every model but the snapshot's
when either can't be read. A listed id ending in -free with no word from
either is now asked through the provider's own package
(openai-compatible, chat), as OpenCode asks a model with no package of
its own. A paid or unknown id that doesn't say -free still needs the
catalog; the docs saying SystemOne still keep one out.
- A discovery with the catalog or the docs unread was marked
magpie.fellBack, though Zen's own list was read. magpie answers a
fallen-back list by keeping the last list read in full
(plugin.keepListed), so a user who can't reach GitHub's raw host or the
catalog kept that old list, and every model Zen made free since stayed
out. Only a failed read of Zen's /models is fallen back now; models
verified before are still kept while Zen lists them.
Tests (no network; the fixture server serves
fixtures/zen-models-2026-10-15.json, Zen's /models byte for byte):
- "a free model Zen lists that the catalog and the docs don't describe is
offered, on chat (#2385)": catalog 503, docs 404 -> the ten free models
Zen lists (Jev, "test" and the paid ones out), deepseek-v4.1-flash-free
on chat, muse-spark-1.3 on Responses, not fallen back; a request for it
goes to /chat/completions
- "... before the catalog has it is offered with the catalog read (#2385)"
- models.test: an unknown -free id is offered on the provider's package,
"unknown-paid", "freebie" and "free-model" aren't, SystemOne stays out
(replaces "unknown models require a known protocol rather than a
guessed chat endpoint")
- two partial-discovery tests now expect no fellBack
Broken by hand: models.mjs back to 0.1.8's -> 3 fail; provider.mjs back
to 0.1.8's -> 3 fail; both fixed: bun test 174 pass, 0 fail (bun 1.4.2).
bun scripts/check.mjs zen-free: ok.
Not tried: a live request to deepseek-v4.1-flash-free through the plugin
(one GET of Zen's /models was the only network used). A future free
model Zen serves on Responses or Messages that the catalog doesn't
describe yet would be offered on chat and refused by Zen until the
catalog has it.
No magpie mover to raise: zen-free isn't a moved built-in, and magpie
updates @magpie-community plugins by itself within the hour.