118cf2edcc60cd63c2bb646b3c7294884dbff8ee
284
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
118cf2edcc |
raccoon 0.1.0: SenseTime Raccoon (商汤小浣熊) provider plugin (#88, yijiemaooo-ux)
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
|
||
|
|
4e64f2680c |
factory 0.1.31: an OpenAI model's request goes without temperature and top_p, not 400 (sweanng424, Nowledge Mem on gpt-6.1-sol, magpie's Discord)
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. |
||
|
|
6a3fe9b49e | calc: the tools are named calc_* from npm too (magpie v0.1.1260) | ||
|
|
b3a3e609ed |
middleware-reserve 0.1.0: routings that fill to a ceiling, or accounts before keys
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. |
||
|
|
8828f7731c |
page-usage 0.1.0: a page with calls, errors, tokens and cost at a glance
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. |
||
|
|
bd6e1ed387 |
tools-calc 0.1.0: exact arithmetic, unit conversion and date math for every agent
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-".
|
||
|
|
ffc06aca49 |
opendesign 0.1.6: each model is asked on the API amr-link thinks on, and reasons at max too (#141, sryimnoob123)
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> |
||
|
|
b549b40b14 |
opendesign 0.1.5: a signed-in account's models reason in magpie, at the low and high levels amr-link took (#137, sryimnoob123)
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 |
||
|
|
b8717aa860 |
factory 0.1.30: requests say droid 0.242.0, the current release (sky杨 on magpie's Discord: every model 403 "Factory: Forbidden" from Claude Code on 0.1.29)
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 |
||
|
|
da27b4ce6b |
zen-free 0.1.9: a free model Zen lists is offered the hour it lists it, before OpenCode's catalog or docs describe it, and a list read with them out of reach isn't said as fallen back (yetone/magpie#2385)
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. |
||
|
|
2b67811af8 |
cursor 0.2.15: calls the bridge answers itself count toward Cursor's tool count, and KV replies wait for a slow link instead of failing the Run (#142, Evopower)
Run at this commit: packages/cursor `bun test` (isolated HOME) 263 pass, 0 fail; `bun scripts/check.mjs` ok. Version bump only. |
||
|
|
1bf9113390 |
cursor: calls the bridge answers itself count toward Cursor's tool count, and KV replies wait for a slow link instead of failing the Run (#142, Evopower)
Cursor's tool_requests_listed (InteractionUpdate 27) counts every call of
the model's step, and is sent after them. That count includes calls the
plugin answers itself: a tool the request doesn't have (0.2.14's native
path refuses those) and Cursor's get_mcp_tools (exec 36). 0.2.14 counted
only the calls it accepted. A step with a refused call then either waited
30s for a call that never came (502 "did not complete its declared native
tool batch") or met the next step's count with the stale one (502
"inconsistent native tool count", the reporter's error). The stateless
decoder had the same miscount and hung. Both paths now count answered
calls toward the step and end a step whose calls were all answered without
one.
503 "native outbound messages limit reached": a long history goes out as
one blob per message, and Cursor asks for every blob at once. The native
transport caps its pending writes at 256 messages / 16 MiB and failed the
Run when a slow link backed them up past that. KV replies now wait for
room (NATIVE_LIMITS.writeWait, 30s) and fail only if the link doesn't
drain for that long. The stateless path writes directly and has no cap.
The fixtures are real Cursor frames captured on 2026-10-15 (model auto,
cursor-agent's agent.v1): get_mcp_tools plus a refused WebSearch in one
step followed by read_file, which gave 0.2.14 the reporter's exact
"inconsistent native tool count"; and read_file, refused WebSearch,
read_file under a count of 3, which gave 0.2.14 the batch timeout.
Run at this commit (on origin/main
|
||
|
|
43d93b0cf9 |
devin 0.1.18: each model carries the price Devin lists for it, and SWE-2 is free again beside its Lightning variants (太陽と向日葵 on Discord)
太陽と向日葵 on magpie's Discord: Usage no longer shows what calls through Devin cost. Two causes, both in what the list gives magpie: - Every model went with a price of 0 (runtimeModel's cost), and magpie falls back to models.dev, which has none of Devin's own models (SWE-2, SWE-1.7 Lightning). Devin lists each paid model's price in GetCliModelConfigs: field 32 of a config, one per "Input", "Cached input" and "Output", a float32 in USD per "1M tokens". parsePrices reads it (fields() now keeps a fixed32's bytes), and listed() gives an entry the price its variants share, none when they differ. Read from Devin's own response on 10-15: Opus 5.5 4/20 (cache 0.2), its fast run 8/40, SWE-1.7 Lightning 2.5/12.5, SWE-2 Lightning 1/5, GLM-5.2 1.4/4.4. The Free tier lists none. - Devin now files swe-2-high-, -medium- and -max-lightning under SWE-2 at the High cost tier. A family was free only when every model under it was, so swe-2 lost free (seen in the owner's plugin-providers.json on 0.1.17), and with it 0.1.16's rule that a used-up day and week don't hold SWE-2. A family is now judged by the variants variantFor sends it as: those at an effort and its default. Run: HOME=<mktemp -d> bun test in packages/devin: 84 pass. prices.test.mjs uses Devin's real GetCliModelConfigs bytes of 10-15, cut to 11 configs (testdata/model-configs-1015.bin, no account data in it). Without the index.mjs change: 3 of its 4 tests red. Broke by hand: the family's free over every model again turns 2 red; cost back at 0 turns 1 red. bun scripts/check.mjs devin: ok. Every price above checked by decoding the full real response with a separate Python reader. Not run: magpie end to end with this version (magpie reads a plugin's price from its next commit on). |
||
|
|
9a4ec8600c |
workbuddy 0.1.24: a refused sign-in on a request over 2 MiB says the 401 and to sign in again, not ECONNRESET (wyp on Discord)
wyp's WorkBuddy AI requests worked for a while, then every turn failed as "502 WorkBuddy AI: ECONNRESET: The socket connection was closed unexpectedly". Measured on www.workbuddy.ai and copilot.tencent.com: the front door answers a token it refuses with 401 only for a body up to 2097152 bytes. At 2097153 bytes and above it resets the connection with no reply. With an accepted token, 20 MB bodies go through, and app errors (400 11128) still come back on big bodies. So once a long Claude Code session is past 2 MiB and the account's sign-in is refused, every turn is a reset, and nothing about it is temporary. Keep-alive reuse was ruled out: the server closes an idle connection with a FIN at 60s, and Bun opens a new connection for requests at 59.99s and 59.995s. When a chat over 2 MiB fails before any reply, the loader now asks the meter (POST /billing/meter/get-user-resource-summary, 401 for a refused token) once. On a 401 it returns that 401 with the reason and the remedy (sign in again, in magpie or in the desktop app), marked kept like the plugin's other 401s. Any other answer, a failed meter read, or an abort leaves the original error. The chat is never sent again. Run: HOME=<temp> bun test in packages/workbuddy: 97 pass (reset.test.mjs is a socket fake of the front door that resets past 2 MiB). Broke it by hand (unanswered rethrows at once): 3 of the 5 new tests go red. bun scripts/check.mjs workbuddy: ok. Against the real endpoint in a sandbox HOME: refused token + 2.2 MB body gives 401 with the message (0.1.23: ECONNRESET); refused short chat gives the front door's HTML 401; good token + 2.2 MB body gives 200. Not run: magpie's gateway end to end with this version. Why wyp's token was refused is not yet confirmed. |
||
|
|
103bb24b65 |
trae: ownclient's tests open one fake at a time, so global.test finds the realm's own hosts (0.2.14's publish run)
checkIn() opened a fake over the one the test had already opened; closing
the second put the first's 127.0.0.1 origin back as trae-cn's hosts, so
global.test.mjs, run after it in one process, read a fake host. The
publish run for
|
||
|
|
2009f49751 |
trae 0.2.14: the account Trae CN's own client is signed in as checks in on the client's device, not one the plugin made up (yetone/magpie#1920)
On one account Trae CN's desktop client's claim went through while the plugin's, on a device id it had made up (digits(19)) with a hard-coded brand and OS, came back 9074 every day (MiFaZhan on yetone/magpie#808; aliceh1 on #1920, where Buddy Switch reads the local client). Now, for a check-in (/trae/api/v2/ug/*) only, the account whose uid matches the userId of this machine's Trae CN client sends the client's own device id, the one Trae's device service registered: the digits in the client's storage.json key iCubeAuthInfo://icube-dc:<id> (seen in real clients' files, #808 and #1705). x-device-type and x-os-version are this machine's (Windows' product name, else its build; elsewhere the kernel release), and no brand is sent, as the client's fb leaves it out with no model. The uid comes from the client's sign-in envelope (iCubeAuthInfo://icube.cloudide), plain JSON or the client's fixed AES-128-CBC codec, read as dingminhua/dsh-connect-trae (MIT) reads it; only userId is looked at, the client's token is never used. The file is only read, never written. Every other account keeps its own device; a missing or unreadable file, one that can't be made out, a failed integrity check, or zero or several icube-dc keys change nothing. No id is made up, changed or rotated (the owner's ruling on #1705 stands). Ran: bun test in packages/trae, 140 pass (11 new in ownclient.test.mjs); bun scripts/check.mjs trae ok. Broken by hand: matching every account instead of the client's uid fails "an account the client isn't signed in as keeps its own device"; not passing the client's device to ugHeaders fails the two matched-account tests. Tests never read this machine's client (fake.mjs points ownClient.paths at nothing). Not tried: a real Trae CN client or account (none here), so whether the claim now goes through for the matched account is unproven; the Linux paths are guesses. |
||
|
|
e543ab1ae8 |
cursor 0.2.14: Run tool calls stay on one native Cursor session, and a tool past Cursor's limit resumes stateless, not as a failed turn (#135, nicegui)
Run at this commit: packages/cursor `bun test` (isolated HOME) 258 pass, 0 fail; `bun scripts/check.mjs` ok. Version bump only. |
||
|
|
33cdf7c1a8 |
cursor: Run tool calls stay on one native Cursor session and resume stateless after a long tool, not a failed turn (#135, nicegui)
Cursor's Run (native) calls stay on one Cursor session across a tool result. With them, a tool that runs longer than Cursor's limit resumes stateless, not as a failed turn. The session pool lives in native-session.mjs. It applies to a conversation's first user turn, and a new user turn goes stateless (see the README). X-Magpie-Cursor-Continuity says which path a request took.
The dashboard-usage ledger counts two distinct events in one response that share a millisecond, as main did. Only timestamps claimed by earlier fetches are left out. A new deferred-usage test covers it.
Run at the reviewed head 398aeddc0186cfc38189b1f05577b181aa2d587d (merge base 5d5d86e; main has no packages/cursor change since):
- packages/cursor `bun test` 3 times: 258 pass, 0 fail each time.
- `bun test latency` 12 times with fresh HOMEs: 12/12 pass.
- Broken by hand: putting back `if (claimed.has(key + "\0" + ev.timestamp) || at >= before()) continue` makes the new test "distinct same-millisecond events in one response are billed together, not again on later fetches" fail (2 pass, 1 fail). The head's line passes.
- `bun scripts/check.mjs`: all packages pass.
- `npm pack`, extracted into a fresh dir: index.mjs, native-session.mjs, package.json, README.md. `import("./index.mjs")` exports CursorAuthPlugin and _internal, and native-session.mjs imports.
- CI: test and on-npm green.
Not tried: a real Cursor account. The owner's stored plugin sign-in has no access token. The author reports a real Claude Code run through an isolated gateway: a child resumed stateless after a 125s tool, and all 6 requests returned 200.
|
||
|
|
c4f7bea372 |
type4me: Type4Me (macOS voice input) as a magpie agent (#136, kchen0x)
Adds @magpie-community/agent-type4me: Type4Me (macOS voice input) as a magpie agent. magpie writes the picked model, its /v1 address and Type4Me's key into ~/Library/Application Support/Type4Me/magpie-agent.json, which Type4Me reads before each dictation (joewongjc/type4me#343, merged). The folder is the one Type4Me and Type4Me Dev share (AppDataLocation.sharedProfileName). Run at the reviewed head dc9d19bd: bun test packages/type4me (4 pass), bun scripts/check.mjs (green). Checked every field against magpie's agentplug.Desc and the file path, keys and folder against Type4Me's MagpieAgentFile and AppDataLocation. Not done: the first npm publish of a new package name is manual (the package has no trusted publisher yet), and registry.json is not updated in this PR. |
||
|
|
ec8ae09cc8 |
workbuddy 0.1.23: credits used up leave the free models counted out, so magpie doesn't put the account last for deepseek-v4.1-flash (#138, hheei)
WorkBuddy serves a model at x0.00 (deepseek-v4.1-flash) with the account's credits used up: hheei's account at 560 / 560 was still served it. The usage read gave one Credits window over every model, so at 100% magpie's routing ranked the account spent for its free models too: put behind every other account, and moved off by conversation affinity. The Credits window (personal and enterprise) now carries notModels: the ids the account's live list (/v3/config) prices at x0.00. A model free only some hours (a night promotion) still counts, as the list never says it is free. A list that can't be read leaves the window as before. magpie reads notModels as it does for Devin's and Cursor's windows (Limit.applies), so For(free model) no longer sees the full window, and a 14018 on a paid model rests only that model (Pooled), as PaidBesideFree already did. Run: HOME=<temp> bun test in packages/workbuddy: 92 pass. Broke it by hand (no notModels set): the two new usage tests go red. bun scripts/check.mjs workbuddy: ok. Not tried against a real account at 100% credits; the behaviour that free models are still served there is the reporter's. |
||
|
|
b015ee515e |
factory 0.1.29: Claude Code on GLM and other /api/llm/o models goes without the phrases Factory refuses, not "403 Factory: Forbidden" (Echoo on magpie's Discord)
Echoo, with Factory moved onto this plugin, got "API Error: 403 Factory:
Forbidden" from Claude Code on GLM-5.3-Flash, while Codex worked on the
same account and model. GLM is a chat model Factory serves on /api/llm/o,
so magpie translates Claude Code's Messages request into chat completions
(or Responses) before the plugin gets it. Only anthropicBody, the
/api/llm/a route, adapted Claude Code's fixed phrases Factory refuses (its
identity line, "You have been invoked in the following environment", "You
are powered by the model", update-config's "not Claude, so memory", tool
output quoting them). droidBody, for /api/llm/o, only added droid's line,
so all of them went to Factory as they were. The headers, the model and
the account are the same for both agents; Codex's prompt has none of the
phrases.
anthropicBody's per-text adapters are now functions of their own
(claudeIdentity, promptText, systemMessageText, userBlockText), and
droidBody applies them to chat completions and Responses:
- chat's first system message and Responses' instructions as a system
prompt; other system and developer messages as system messages;
- user text as a user block; a chat user string, where magpie joins a
turn's blocks with nothing between them, also reminder by reminder;
- chat's tool messages and Responses' function_call_output as tool output.
The Messages route is unchanged: the refactor kept every earlier test
green before the new code went in.
testdata/claude-code-2.1.300-glm-{chat,responses}.json are magpie's
translations of a real Claude Code 2.1.300 request, captured in a sandbox
HOME (paths changed to /Users/me, tools left out).
Run: bun test in packages/factory, 143 pass. With index.mjs at 0.1.28 the
new claude-chat.test.mjs fails 4 of 5 (the Codex one passes on both).
bun scripts/check.mjs factory: ok. Routed the captured request through the
plugin: each refused phrase is 0 in the chat and Responses bodies now, as
on /api/llm/a (1 each with 0.1.28).
Not tried against Factory itself: there is no Factory account to try with.
|
||
|
|
cbff94eb43 |
zen-free 0.1.8: the free models Zen lists are offered again when OpenCode's docs or catalog can't be read, and the docs are read from where they moved (yetone/magpie#2305, MiniFullC)
The reporter, on 0.1.7 with the public key, saw only Big Pickle, Space Bunny Free and Muse Spark 1.3 Free: the three models the plugin knows offline. Two causes: - DOCS pointed at packages/web/src/content/docs/zen.mdx, which OpenCode removed on 2026-10-12 (anomalyco/opencode#54761, "replace old Zen and Go pages with V2 console docs"). It answers 404, so every discovery since was partial. The endpoint table now lives in services/www/src/docs/content/console/models.mdx; parseProtocolDocs reads its rows as they are. - A listed model the catalog (models.opencode.ai) didn't describe and the docs didn't name was left out. When the catalog can't be read, that is every listed model but the three in bootstrapProvider, which is the reporter's list exactly. bootstrapProtocols is now a snapshot of the console docs' free rows (2026-10-15), used under whatever the docs say, and bootstrapProvider gains the catalog's metadata for Cat Jam, Step 5 Preview, LongCat 2.5 Preview, MiMo-V2.6-Flash and Nemotron 3.5 Lightning Free. Not changed, on purpose: jev-1.13-free is a SystemOne decision model (docs: endpoint /v1/systemone, no AI SDK package), which can't answer a chat, so it stays out as SystemOne models always have. exo-free is "deprecated" in the catalog and not in Zen's /models list now. Tests (no network; the fixture server): "listed free models are offered when the catalog and the docs can't be read" (catalog 503, docs 404, listing big-pickle, step-5-preview-free, cat-jam-free, jev-1.13-free, paid -> the three free chat models only) and "reads the console docs' endpoint table, and Jev stays out as SystemOne" (literal rows from the new page). Both fail on 0.1.7's models.mjs/provider.mjs (2 fail, 170 pass) and pass with the change; bun test: 172 pass. bun scripts/check.mjs ok. Real use (live Zen, public key, this checkout): discovery now lists big-pickle cat-jam-free longcat-2.5-preview-free mimo-v2.6-flash-free muse-spark-1.3-contributor-free nemotron-3.5-lightning-free space-bunny-free step-5-preview-free, not fallen back (0.1.7: the same eight with the docs 404 marking it partial). A request to cat-jam-free through the plugin's fetch streamed 200; step-5-preview-free answered Zen's own 429 "Upstream request failed: Endpoint is unavailable." twice. The reporter's catalog failure itself wasn't reproduced from here. |
||
|
|
157c7c0f88 |
devin 0.1.17: a tool whose schema has a list type, an array with no items, or properties or an enum with no type goes to Gemini models in a shape they take, not "There is an issue with this request" (7eleven on Discord)
7eleven, in ZCode on devin/gemini-4-argon, got every turn refused:
"Devin: There is an issue with this request, please try a different
model." (invalid_argument). It is the request content, on Gemini models
only. On a real account, gemini-4-argon, gemini-3-1-pro and
gemini-3-8-flash refuse a request offering a tool whose schema has, at
any depth:
- a list type: ["string","null"], ["string"], ["string","number"];
- type "array" with no items, items true, or items that are a list;
- properties with no type;
- an enum with no type.
claude-sonnet-4-6 and swe-2 take all of them. Nullable written as anyOf,
items {}, nullable:true, const, $ref/$defs, additionalProperties and
format all go through on Gemini.
geminiSchema rewrites them, for a Gemini uid only:
- a list type becomes its one type, nullable when it had "null", or
anyOf of each type;
- such an array's items become {} (a one-schema list becomes that
schema);
- a schema with properties gets type object;
- an enum gets its values' type, and an enum of mixed values is dropped.
The caller's schema is not changed. Claude and swe-2 requests are byte
for byte what they were.
What was run:
- HOME=$(mktemp -d) bun test packages/devin: 80 pass.
- gemini-schema.test.mjs, with the gemini line in build() turned off by
hand: 10 red, one per refused shape.
- bun scripts/check.mjs: ok.
- Real account: each refused schema, sent as built here, went through on
gemini-4-argon-medium and gemini-3-1-pro-high.
- build() end to end with a search tool holding a list type, an array
with no items and an untyped enum: gemini-4-argon called the tool, where
0.1.16 got invalid_argument. claude-sonnet-4-6 called it on both.
Not tried: ZCode itself against the plugin. The reporter's exact tool is
not known; ZCode's own zod 4 tools write anyOf, so it is likely one of
their MCP or plugin tools.
|
||
|
|
5d5d86e225 |
qoder 0.2.16: a tool call written into the text that can't be read, or that the stream ends inside, ends the turn as an error, never as the answer (#132)
A <tool_call> block whose JSON wasn't whole ({"path":}) was reprinted as
text, and one the stream ended inside was flushed as text; either way the
turn finished "stop" with a 200, the call lost and nothing to fail over on.
Mirrors trae since 0.2.5 (#38): a block on its way to being a call (its
content starts with "{" or holds "<function=") that can't be read, or is
cut short at the end, ends the turn as an error: the stream with the error
frame and no finish, a request not streamed (or one with nothing before the
block) a 502. A block whose JSON (or XML function) is whole when the stream
ends without its close is still the call. A tag in a code fence or inline
code, or one that isn't call-shaped (<tool_call>incomplete), stays text.
Siblings: only trae (already fixed) and qoder parse calls out of the text;
grep for tool_call/function=/invoke/DSML across packages/*/index.mjs finds
no other parser.
Run at this head:
- textcall.test.mjs (new, the issue's literal frames: closed with bad JSON,
stream ends inside, readable control, whole JSON without its close, XML
form, look-alike text; streamed whole and 3 chars per frame, and not
streamed): 7 of 9 red on the 0.2.15 code (the control and look-alike
tests passed there), all green after.
- packages/qoder: 118 pass, 0 fail.
- Whole repo as CI runs it: HOME/TMPDIR in a scratch dir, bun test:
1320 pass, 0 fail; bun scripts/check.mjs: ok.
Not tried against a real Qoder account; the frames are the reporter's.
|
||
|
|
8a28086bf1 |
opendesign tests: the real fetch is put back after each test, so every package's tests after it pass again (publish red since #84)
bun test runs every package's files in one process. opendesign's tests
set globalThis.fetch directly, and mock.restore() doesn't undo that, so
every file after it (minimax, trae, zcode, zen-free: 148 tests) got
opendesign's stub and failed. The publish run at
|
||
|
|
3db704a677 |
opendesign 0.1.4: Open Design Cloud (Design Plan) as a provider (#84, dbydd)
New package @magpie-community/opencode-opendesign-auth 0.1.4, provider id `opendesign`: an Open Design Cloud account's Design Plan as a magpie provider (dbydd, #84). Reviewed at this head (37ef688), as in the PR's last review: `HOME=<temp> bun test` for packages/opendesign, 19 pass; `bun scripts/check.mjs opendesign` ✓; the package loads under Node and Bun; `npm pack --dry-run` packs 5 files; a stubbed usage call sent its User-Agent to amr-api.open-design.ai only. The only hosts in it are amr-api.open-design.ai and amr-link.open-design.ai, with no install script, child process, or write outside OpenCode's auth store. It no longer waits on its first npm publish: the publish workflow packs it onto the dist branch, and magpie 0.1.1243 and later install it from there until npm has it. |
||
|
|
3351e47715 |
cursor 0.2.13: a Run cancelled while it opens is closed upstream (#130), and dashboard usage is counted per account (#131)
#130: a cancel that landed between the HTTP/2 head and runOnce's abort listener left the Run streaming upstream with its heartbeat, for nobody. #131: claimed/owed/flights are keyed by account and conversation, so one account's Run no longer collects another's debt from its own dashboard. Run at this commit: full `bun test` (isolated HOME) 1292 pass, 0 fail; `bun scripts/check.mjs` ok. Version bump only. |
||
|
|
7c49260ac1 |
cursor: isolate dashboard usage accounting by account (#131)
Cursor's dashboard usage accounting is kept per account, not per conversation.
claimed, owed and flights were keyed by conversation_id alone. When one
conversation's steps ran on two accounts (magpie moving a session between
Cursor accounts), account B's Run collected A's debt from B's own dashboard:
B's own event was counted as A's earlier Run's usage (magpie_deferred) and
B's turn-ending step polled for a debt its dashboard can't have. The keys
are now sha256(token) + conversation_id (usageKey), used by collect, owe,
ledger and the flights cleanup alike. A token change starts a new identity,
as misses/unreadable already were keyed.
Reviewed at 19bbdf8d7162735d7ddafd015d8dfadbb233c3bd, then merged main
(
|
||
|
|
ca6415f959 |
cursor: cancel and clean up stateless Run transports (#130)
A Chat cancelled while its Run opens is closed upstream, not left running.
Before, a cancel that landed after the HTTP/2 head arrived but before runOnce
subscribed to the signal was never seen ({once:true} listener added to an
already-aborted signal): the Run kept streaming upstream for nobody with its
5s heartbeat interval, and the session was never closed. open/openH2/openH1
now check the signal at each hand-off, close what arrived, and remove their
abort listeners; runOnce checks again before starting the heartbeat. HTTP/1's
write callback now waits for its BidiAppend, so backpressure and close see
the pending upload. A cancelled open answers 410 instead of 502.
Reviewed at a4e1db1b0d734c1a1b15c1fe0cafb0f9cb5313c0 (on main
|
||
|
|
5fc0a75292 |
zen-free 0.1.7: free models answer again, asked at opencode.ai/inference/v1 with stand-in tools that take a parameter (c9cu on Discord)
c9cu on magpie v0.1.1239: "opencode muse 1.3 又不行了". Every free model answered 403 FreeTierError "OpenCode's free tier can only be used from within OpenCode" through 0.1.6 and magpie's built-in alike. Found against the real upstream on 2026-10-15, with OpenCode 1.19.0's own requests captured through a local proxy under a sandbox HOME: - OpenCode now asks https://opencode.ai/inference/v1 (models.dev gives it this URL). Its own captured request, replayed word for word, is 200 there and 403 at /zen/v1. - Zen also refuses bash or read offered with no parameters, as the stand-ins here were ({"properties":{}}); one property is enough. Now: - DEFAULT_BASE is the inference API. A request still sent to a model listed at /zen/v1 is accepted and asked at the inference API. - Each stand-in takes OpenCode's own first parameter (bash command, read/edit filePath, glob/grep pattern), still "Never call this tool". Run: - bun test in packages/zen-free: 170 pass. With 0.1.6's provider.mjs put back by hand: 13 fail (the 12 tool-guard tests on the stand-ins' parameters, and the new inference-API test). - bun tools-smoke.mjs against the real Zen: big-pickle, mimo-v2.6-flash-free and muse-spark-1.3-contributor-free, streamed and not, all 200 with a Bash call. - npm shows 0.1.1 as latest: publish runs refused this package (no Trusted Publisher), so 0.1.2 to 0.1.6 never reached users; 4ef68fb's NPM_TOKEN path is what publishes this one. |
||
|
|
9cfc18ae52 |
grok 0.1.15: a sign-in without Grok Build says GROK_BIN_DIR takes one put in a folder of your own, not only the curl installer (yetone/magpie#2223, evier12345)
In magpie's Docker image there is no curl to run xAI's installer, and a grok binary dropped on PATH outside a .grok folder isn't taken (isGrokBuild keeps another program named grok out). GROK_BIN_DIR already took one as it is; the error now says so, and the README says where the CLI is looked for. Run: TMPDIR=<scratch> HOME=<scratch home> bun test in packages/grok (41 pass, 0 fail); bun scripts/check.mjs grok (✓). With index.mjs put back to 0.1.14, import.test's "no Grok Build … is refused first" fails on the new GROK_BIN_DIR assertion. Not tried in a real container from this commit; magpie's own fix (installing Grok Build before `magpie plugin login grok`) is in yetone/magpie. |
||
|
|
f2f4ff4014 |
cursor 0.2.12: Grok Bot is among magpie's three panel rings ahead of an On-demand with no limit (yetone/magpie#2213, Morganwan90)
The usage windows went Cursor Models, Other Models, On-demand, Grok Bot, Total. magpie's tray panel draws an account's first three, so on an account that may spend on-demand without a limit, the On-demand ring (always 0%, only a dollar figure) pushed Grok Bot out, while an account with no on-demand showed Bot third. An On-demand with no limit (aside) now goes after Bot, beside Total. One with a limit keeps its third place ahead of Bot: it is the window that can stop the account's requests, with the pools aside. Run: bun test in packages/cursor (89 pass), bun scripts/check.mjs (all packages ok). The new test fails on 0.2.11's index.mjs (Bot fourth, On-demand third). Not tried with a real Cursor account that has Grok Bot and on-demand. |
||
|
|
e8fdbdb616 |
cline 0.1.8: a model takes images where Cline's catalog says it does, not "text only" for every model (silent on Discord)
runtimeModel said input.image false for every model, so magpie, which takes a plugin's said capability over models.dev's, treated ClinePass's DeepSeek V4.1 Flash and GLM 5.3 Flash as text-only: the image tick stayed off and images went to a describer model. /ai/cline/models already carries architecture.input_modalities (Cline's own client reads images from it). fetchCloudModels now keeps it; a feed model gets its own entry's, else the entry of the model after its prefix (cline-pass/deepseek-v4.1-flash is deepseek/deepseek-v4.1-flash; :batch variants count as the model) when every such entry agrees. Where the catalog says nothing, image is left unsaid, so magpie asks models.dev instead of being told no. attachment follows image. Run: bun test packages/cline (80 pass); the new hook test fails with the old hardcoded input (79 pass, 1 fail); bun scripts/check.mjs cline passes. The models hook against Cline's live public catalog (no sign-in) gives cline-pass/deepseek-v4.1-flash and glm-5.3-flash image true, glm-5.3 and deepseek-v4-pro false, qwen3.8-max unsaid. Not tried with a signed-in ClinePass account sending a real image. |
||
|
|
9803210691 |
trae tests: a stream that breaks off breaks after the caller has its first event, not 30 ms after it was sent (#124)
The test's fake server sent one event, waited 30 ms and errored the body. The plugin reads its first part before it answers. Under the whole repo's `bun test` that read sometimes started after the reset, and Bun then drops the event it had already received. The read threw ECONNRESET out of the plugin's fetch instead of reaching the mid-stream path the test covers (1259 pass, 1 fail at |
||
|
|
95af6cf375 |
factory 0.1.28: the Fast Mode models are listed last, so a provider with nothing picked shows GPT-5.3-Codex, Grok and GLM again (#119, psylch)
magpie shows a provider with no models picked only the first 24 of its
list. 0.1.27 placed each Fast Mode model beside its base model, which
pushed GPT-5.3-Codex, Grok 4.7, Grok 4.6, GLM-5.3 and GLM-5.3-Flash past
24 ("not exposed"). The six Fast Mode models now come after every other
model, so the first 24 are 0.1.26's again. Asking a base model for fast
still reaches its Fast Mode model (fastBody), and a Fast Mode model can
be picked by name.
Run: bun test packages/factory (138 pass), bun scripts/check.mjs (all
plugins pass). The new fast.test.mjs case fails on 0.1.27's order (put
back by hand: 3 pass, 1 fail) and passes with this one.
Not tried: a real Factory account; magpie's exposure was not run against
the published package, only the list order checked.
|
||
|
|
a6bed5ec54 |
workbuddy 0.1.22: an MCP server's tool schemas reach Kimi and DeepSeek, not 400 11133 "Invalid request parameters" (#122, clearmann)
Cause: Kimi's tool-schema check (kimi-k3-1, also kimi-k2.7) turns away
schemas that MCP servers and plugins commonly send, with 400 11133
"the request parameters were rejected by the model provider". It is
the request's content, not the account: on the owner's China account
each shape alone in an otherwise plain chat failed every time, and the
same chat with it mended passed. Shapes refused: an enum with no type
(all strings too, under items, anyOf, an unused $defs), an empty enum,
an enum whose type lists two types besides null, true/false where a
schema goes (properties.x, items), a required that isn't a list, and an
unknown type ("any", "String"). Claude Code's own 24 tools have none of
these, which is why tool-less side requests passed for the reporter.
fitShape walks schema positions only (a property named enum or type is a
name) and gives each the shape Kimi takes, meaning the same: an untyped
enum takes its values' type, or [T, "null"]; several types become an
anyOf of typed enums; true is {}, false is {"not": {}};
additionalProperties booleans are left. An empty enum (which nothing
fits) is left out. It runs for every model, as fitTools already does.
WorkBuddy 5.5.6's own CLI (codebuddy.js, read-only) only cleans schemas
for Gemini and only drops temperature for kimi-k3, so it would hit the
same 400 with such an MCP tool.
Ran, real account (China build, plugin loader fetch, old vs new):
- 14 refused shapes on kimi-k3-1: each 400 11133 before, 200 after.
- one MCP-like tool holding all of them: kimi-k3-1 and kimi-k2.7 400
11133 -> 200; deepseek-v4.1-flash and deepseek-v4-pro 400 11129 ->
200; glm-5.3 400 11133 -> 200; minimax-m3 and hy3 200 both.
- HOME=$(mktemp -d) bun test in packages/workbuddy: 89 pass; the new
tests go red (4 fail) with the fitShape call taken out.
- bun scripts/check.mjs: ok.
Not tried: WorkBuddy AI (international) models, and a real MCP server
through Claude Code end to end. glm-5.1 answers 11150 to every chat on
this account (unrelated, also before).
|
||
|
|
a810ee7e88 |
zen-free 0.1.6: a free-model request carries exactly the headers OpenCode 1.19.0 sends to Zen, and none of the caller's (xiaoxiaofeixz on magpie's Discord, #100, #108)
Since 10-13 Zen answers 403 FreeTierError ("OpenCode's free tier can only
be used from within OpenCode") to a free-model request that isn't
OpenCode's. npm still serves 0.1.1, which gets that 403 on every model;
0.1.5's OpenCode-form session id (
|
||
|
|
98911ae4d4 |
trae 0.2.13: publish #106 (the call a service left mid-wrapper in a native call's name)
#106 merged as 0.2.12, which main had already published for the cache
fix (
|
||
|
|
b32b510c9d |
trae 0.2.12: the call a service left mid-wrapper in a native call's name is read as the call (#106)
trae-cn/glm-5.3 under DSH (2026-10-13): over three turns, 28 of 54 native calls
arrived with the model's call in `function.name` instead of `function.arguments`
— the JSON wrapper the tool prompt asks for, with GLM's own
<arg_key>/<arg_value> tags where Trae's service stopped reading it, and a value
whose close left off:
{"name":"bash","arguments":{"command</arg_key><arg_value>ls -la</arg_value>
{"name":"bash","arguments":{"command":"grep -n x a.ts | head -3</arg_value>
{"name":"bash","arguments":{"command":"grep -n "x" a.ts","description":"…"}}
bash_abstract_command_0>{"name":"bash","arguments":{"command":"…scan.mjs</description>Re-run scan</arg_value>
Each went out under a name no request declares, so the agent answered "unknown
tool" and the call was lost — twelve steps in a row before the model recovered.
All 28 sit in the context the session compacted at the end of turn 8: turn 9's
input went from ~5k to 94.5k tokens. Whether the compaction is what makes the
service hand a call back this way is not established — only that the two line
up, and that the session's earlier turns on workbuddy-ai/hy4-preview-f and
group/auto-hy4-preview-f sent 270 whole calls and none of this shape. No
workbuddy/glm-5.3 call was routed that day, so nothing is claimed about it.
- A name holding the wrapper is read as the call: the tool, then the fields the
text between the tags still spells out. The tags are the service's own
handoff, so what stands between them is the model's text as the model wrote
it: a quote left unescaped is read as the quote it is, a value the service
cut at its tag keeps the text it got, a comma inside a value is the model's
own (`sed -n 1,9p` reads whole), and a closing tag that is a field's own
(`</description>`) ends the value before it — what follows such a tag is the
service's text, not the model's.
- A field the tool's schema says is no string is its JSON where the text is
one, and its text where it isn't.
- The native call's own arguments are kept, and the name's fields are filled in
beside them: the service moves the arguments it read into the call and leaves
the rest in the name, so the two halves are one call (command in the name,
description/workdir in the call).
- A name whose tool the request doesn't have, or one no field can be read from,
goes on as written, as any other unknown tool does — including one the
service cut before it wrote a value (at a key, at a colon, at an open quote),
where an empty call read out of it would be a call the model never wrote.
Calls already written into a session's history under a mangled name still go
back on as that name; the plugin reads what it is handed and cannot rewrite
what was already sent.
- What main already read of a whole name keeps reading the same (`input`,
`parameters`, arguments given as a string, the flat fields, a wrapper written
with a space), and a call's own arguments that are not a set of fields — text
the service cut, a value that isn't a call's fields — go on as they stand, as
main passed them, for the agent to answer.
The wrapper and the tags are upstream's; the plugin reads what it was handed.
The same shapes are already handled by the DSH-ecosystem relays (trae2api's
_ARG_KEY_VALUE_RE takes a key whose opening <arg_key> was dropped) and by
@ai-sdk-tool/parser's GLM-5 name resolution (a declared name followed by a
structural tag is that tool), which is where the fail-closed reading of an
unknown name comes from.
Run: namecall.test.mjs (16 tests; the real payloads, a name in front of the
wrapper, a field's closing tag cut into a value, a comma inside a value, the
whole-name shapes main reads, the shapes the reader must leave alone, and the
streamed path) — 11 of 16 fail on main's index.mjs, the five that pass being
the ones that pin what main reads.
HOME=<tmp> bun test, 125 pass 0 fail; bun scripts/check.mjs trae green. The 28
payloads this was drawn from were replayed through NativeCalls.take: 28
recovered into calls to tools the request declares, and the 270 calls that
arrived whole in the same session unchanged, byte for byte. Against the same
names and calls main can take (187 pairs) the only differences are the fields
the name's side fills in beside the call's own, and the names main could not
read at all.
Co-authored-by: yu <wowyuarm@users.noreply.github.com>
|
||
|
|
a6f09a0e9a |
qoder: add PAT (Personal Access Token) sign-in method (#103)
* qoder: add PAT (Personal Access Token) sign-in method
Add a new auth method that exchanges a PAT for a job token via
/api/v1/jobToken/exchange, bypassing the OAuth device flow. PATs are
long-lived (up to 1 year), avoiding the ~3-day re-authentication cycle
of OAuth refresh tokens.
Changes:
- Add patSignIn function for PAT → job token exchange
- Add "Sign in with Qoder PAT" method with password prompt
- Handle PAT accounts in usage (no device token available)
- Add pat.test.mjs with 10 tests covering both sites
- Update vpc.test.mjs for new method count
* qoder: use text prompt type for PAT (magpie has no password type)
magpie's prompt system only supports "text" and "select" types.
Change the PAT prompt from "password" to "text" to match.
* qoder: use password prompt type for PAT input
Now that magpie supports "password" prompt type, use it for PAT input
so the token is masked when typed in both GUI and TUI.
* qoder: address PR review — PAT kept, fields read as Qoder's client does
1. Store the PAT on the credential; when the job refresh lapses
(SignInGone from refreshJob), re-exchange the PAT instead of
marking the account signed out. The PAT lasts a year, the refresh
two days.
2. Read the exchange response as Qoder's client does:
- token from token, device_token or access_token
- refresh from refresh_token or refreshToken
- expiry from expire_time or expires_at (date) first, then
expires_in in seconds (not milliseconds)
3. Use the openapi() helper for the exchange (no custom User-Agent);
400/401/403 say "refused the PAT" rather than passing through the
raw body.
4. Try the usage endpoint with the job token for PAT accounts; fall
back to the "PAT" plan label if it won't accept it.
5. Exclude the PAT method from Qoder CN: its CLI uses device chat
directly and never makes a job token, so a PAT exchange may not
produce one the chat endpoint accepts.
* qoder: fix expires_in unit — milliseconds, not seconds
The real exchange response shows expires_in: 86400000 (24h in ms),
not 86400 (seconds). The expires_at date field takes precedence in
exchangeExpiry, so the fallback was not hit in practice, but correct
it for completeness.
* qoder: drive the renew test through the real refresh path, usage through fetchUsage
The renew test called the PAT sign-in directly, so it never met the
fallback it was named for. It now loads a stored expired credential
whose job refresh is refused, and checks the exchange is asked with the
stored PAT, the request goes on with the new token, and the saved
credential still carries the PAT — and fails when the fallback is
taken out. A second case keeps no PAT on the credential and expects
the sign-in gone to come out.
The PAT branch of usage built fetchUsage's request by hand and turned
every error into a plan of its own; it calls fetchUsage now, its
errors surfacing as the device path's do. A live PAT account answered
the usage endpoint 200 with a qoder envelope on the job token from the
exchange, said so in the comment there.
* qoder: a refused PAT re-exchange ends the sign-in
The renew fallback let a refused PAT through as a plain error, which
magpie read as a server fault and kept the account on. A PAT lapses
like a device sign-in does — expired, or revoked — so renew turns the
exchange's refusal into a lapsed sign-in: usage says "expired" and the
request answers 401, asking for a new PAT. Interactive sign-in keeps
the plain error.
|
||
|
|
e87ea310c3 |
zen-free tests: the other 32+ MiB guard tests get the CRLF test's 60 s timeout
"cumulative pending chat tools are limited across choices and calls" and
"chat: completed tool buffers release their cumulative budget" push 33-34
MiB through guardToolResponse and timed out at bun's 5 s default on a
machine at load ~200-280 (5104 ms, 5299 ms, 5525 ms). The CRLF test had
the same cause and already carries { timeout: 60_000 }; its two siblings
that also move 32+ MiB ("single SSE event limit is 32 MiB...", "text
streams larger than 32 MiB...") get it too. The work itself is the
point of the tests (the 32 MiB limit), so it isn't shrunk.
Run: bun test in packages/zen-free 3x at load ~200: 166 pass each time.
Before the change the same file failed at this load. Tests only, no
version bump, nothing published.
|
||
|
|
2170a3781e |
factory 0.1.27: droid's Fast Mode models, and fast asked of their base model goes to them (#119)
psylch on #119 (plugin 0.1.26): claude-opus-5-5-fast answered "Factory: Not found.", and Opus 5.5 asked with speed "fast" was recorded as tier_asked fast, tier_served standard, with nothing said. The plugin now offers droid 0.240.0's Fast Mode models: Opus 5.5/5/4.8 Fast on Anthropic's API, GPT-5.5/5.4/5.3-Codex Fast on Responses, each at its base model's limits and efforts. They go out as droid 0.240.0 sends them (read from its binary, saved in testdata/droid-0.240.0-fast.txt): the Fast Mode id itself as the model, with speed "fast" and the fast-mode-2026-02-01 beta for anthropicFastMode models, at service_tier "priority" for the GPT ones (their apiRequest Ee). A request asking a base model for fast (speed "fast" on Messages, service_tier "priority" on Responses) is sent to its Fast Mode model, as droid's fast toggle switches to it. A model with no Fast Mode model is sent as asked. Left out: Opus 4.6/4.7 Fast and GPT-5.4 Mini Fast (base not offered), GPT-5.6 Sol Fast (unreleased:!0), GLM-5.2 Fast (feature flag, a Baseten id). Run: the full bun test (1222 pass, 0 fail) with a sandbox HOME; the new fast.test.mjs and the picker test fail on the old index.mjs (4 fail). Not tried: a real Factory account (none signed in here), so whether Factory serves the Fast Mode ids at fast speed to a plan, and what its usage says about speed, is unverified. A non-stream request magpie translates for a plugin account drops speed before the plugin sees it, so there only the -fast ids reach fast. |
||
|
|
779e9b2368 |
kiro 0.1.11: a thinking model offers xhigh as its own level, so Claude Code's xhigh isn't routed as max (#120)
The variants came from BUDGETS (low, medium, high, max), while thinking() already read xhigh. magpie fits an effort the model doesn't offer to the nearest it does, so Claude Code's xhigh on a moved Kiro was recorded and sent as max: 166 of the reporter's requests on 10-14, after the built-in, which takes xhigh, had served it as xhigh the day before. BUDGETS now has xhigh at 50k, the budget thinking() and the built-in's kiroThinkingBudget give it, so what Kiro is asked is unchanged; only the level magpie records and passes is. Both configModel and runtimeModel read BUDGETS. Run: bun test across the repo (TMPDIR+HOME in the scratchpad), all pass; the new effort.test.mjs fails on the old BUDGETS. Not tried with a real Kiro account (none signed in on this machine). |
||
|
|
15d16f5ff0 |
workbuddy 0.1.21: a model free only at night is never said free; a whole-day discount shows the price before it (#121)
WorkBuddy's /v3/config prices a model by its "credits" and by a modelPromotions list the picker reads for its badges: Hy3 限时免费 (whole days to 10-31), Step-5-Preview 独家限免 (10-12..10-25), Hy4 preview 夜间免费 (free 23:00–8:00 only), GLM-5.2 and DeepSeek 夜间折扣. The plugin read only "credits", and magpie keeps a plugin's model list until it next asks, so a list read at night said Hy4 preview was free all day (#121's screenshot: 免费 in magpie, 0.29x and 夜间免费 in WorkBuddy). priceOf now reads both. A model under a promotion with daily hours is given at its full price and never as free (unpriced when the credits read 0 under a night discount). A running whole-day discount is the price now, with the credits before it as rateWas, which magpie already shows struck through. Run: - bun test across the repo (TMPDIR+HOME in the scratchpad): 1219 pass. The new price.test.mjs, built from the promotions copilot.tencent.com gave on 2026-10-14, fails 3 on the old code. - The owner's real WorkBuddy and WorkBuddy AI accounts through liveModels (17:10 CST): Hy4 preview 0.29, Hy3 and Step-5-Preview free, the rest at their credits, matching WorkBuddy's picker. Not tried: the config as served at night (whether "credits" itself reads x0.00 then); the unpriced branch covers that case. |
||
|
|
4df82ce1b5 |
trae 0.2.12: what Trae's token_usage says the prompt cache read and wrote reaches magpie (01huadalang on magpie's Discord: K3, 53 calls, every one 0 cache hits)
tokensOf kept only prompt_tokens, completion_tokens and total_tokens of Trae's token_usage, so every request reached magpie with no cache count and Usage/Routing showed 0 hits. Trae's event carries more: TRAE SOLO CN 3.5.20's ai-agent (libai_agent.dylib, the serde field list of infrastructure/adapter/llm/event.rs's TokenUsageEvent, read from the binary's __DATA_CONST) is name, prompt_tokens, completion_tokens, total_tokens, reasoning_tokens, cache_creation_input_tokens, cache_read_input_tokens, prompt_tokens_total, completion_tokens_total. cache_read_input_tokens and cache_creation_input_tokens now go on in the OpenAI usage under those names; magpie's gateway (chat.go cUsage) reads them beside prompt_tokens as it reads a relay's in front of Claude, and judges there whether prompt_tokens counts them too. An OpenAI prompt_tokens_details.cached_tokens, if Trae sends one, is kept as it came, and reasoning_tokens goes as completion_tokens_details. No cache count adds no field. cache.test.mjs (stream and single answer with the TokenUsageEvent's fields, OpenAI's details, none) fails 3 of 4 on 0.2.11 and passes; bun test (113 pass) and bun scripts/check.mjs trae under a temp HOME pass. Not tried with a real Trae account (none here): that Trae fills the cache fields for K3 in particular is not known. |
||
|
|
cff78b3424 |
devin 0.1.16: SWE-2 is free, so a used-up day and week don't hold it
太陽と向日葵 on magpie's Discord: SWE-2 costs nothing, but with the account's quota used up magpie said so and didn't send SWE-2 to the account, while a test of the model worked. Devin's GetCliModelConfigs gives each model a model_cost_tier (field 24; the CLI labels 1-4 "Low cost", "Med cost", "High cost", "Free"). On the owner's account on 2026-10-14, of 262 configs only swe-2-high, -medium and -max were 4. The plugin now reads that (parseFree), lists those models and the entries standing only for them (swe-2) with free: true, and gives the "1 day" and "7 days" windows notModels with their ids, so magpie's allowance no longer counts them. ACUs are unchanged. When Devin's configs can't be read, nothing is marked free and the windows count every model, as before. Run: bun test in packages/devin (58 pass) with HOME and TMPDIR in a scratchpad dir; bun scripts/check.mjs. Broke it by hand: FREE_TIER=5 fails 3 of free.test.mjs's tests; dropping notModels fails the usage one. Not tried: an account whose quota is really used up (the owner's had 100% of the day and week left), so that Devin itself serves SWE-2 then is the reporter's word, not checked here. |
||
|
|
95f7b51737 |
devin 0.1.15: every account's model list is Devin's own for its token, so Gemini 4 Argon is listed on Windows and without the CLI (#115)
On Windows the devin CLI reads %APPDATA%\devin\ whatever folder it is given (#17), so cliAnswersFor turned it away for every account before looking at whose sign-in it reads, and an account without the CLI never asked at all. Both kept the 2026-09-30 SNAPSHOT, which has no Gemini 4 Argon; moving a built-in Devin with it ticked then failed with "the plugin doesn't serve Gemini 4 Argon" (NieiR). The list now comes from GetCliModelConfigs, asked with the account's token (the call the plugin already made for images): its configs carry each model's label, context (18), output (model_info 13), family uid (model_info 23) and family label (30.1). Read over Devin's real response for the owner's account, parseConfigFamilies gives exactly the 52 families and 262 variants `devin models list --format json` prints, in its order, less Adaptive and Fusion. When Devin can't be asked, the CLI's list is used if the CLI names the account Devin names the token's, even when it reads its own folder (the Windows case); else SNAPSHOT, now refreshed from the CLI (Gemini 4 Argon and Claude Haiku 5.5 added, Inkling and Claude Sonnet 4.5 kept for the accounts still offered them). Run: - TMPDIR/HOME in a scratch dir, bun test packages/devin: 54 pass, 0 fail. With index.mjs put back to 0.1.14, the 4 new identity tests fail (parseConfigFamilies missing; familiesFor without gemini-4-argon; "models list" never run for a same-account CLI reading its own folder; provider.models without gemini-4-argon). - bun scripts/check.mjs devin passes. - Real account (owner's Devin, sandbox HOME, no devin CLI on PATH): provider.models gave 85 models with gemini-4-argon (1048576/1000000) and claude-haiku-5-5; 0.1.14 gave the declared list only. Not tried: the Windows box itself; the new path doesn't run the CLI. |
||
|
|
5c0aebce8f |
zcode 0.1.18: ZCode app's sign-in reads ZCode 3.15's plan key from config.json, so a valid GLM Coding Plan no longer reads as "no plan" (yetone/magpie#2130)
What changed: ZCode 3.15 keeps no coding plan key in credentials.json any
more. The key it uses is in config.json, at provider["builtin:bigmodel-
coding-plan" / "builtin:zai-coding-plan"].options.apiKey; ZCode 3.15.3's
host reads that value as it is. ownSignIn found no key, so a signed-in
GLM Coding Plan account fell to the Start Plan and read as having no plan.
ownSignIn now falls back to config.json (configKey) when credentials.json
has no key: Z.ai's first, then BigModel. It also takes the provider ids
3.15 normalizes to (account:*-individual-coding-plan) and a value written
encrypted. A value that isn't a key, such as "{env:...}", is skipped. A key
in credentials.json and a team switch still come first. This matches
magpie's built-in (magpie 1d8e83a79, zcodeOwn/zcodeConfigKey).
What was run:
- The new own.test.mjs case uses the reporter's layout (BigModel sign-in,
no key in credentials.json, key in config.json). It fails without the
fallback ("j1" in place of "bm.secret").
- Every packages/zcode test file passes under a scratch HOME/TMPDIR:
dual 25, gift 20, models 1, moved 1, own 6, signin 3, start 10, usage 15.
- bun scripts/check.mjs passes.
Not tried: a real ZCode 3.15 account.
|
||
|
|
e7d37b0801 | factory 0.1.26: Gemini 4 Argon and Gemini 3.x on Factory's Gemini route (yetone/magpie#2080), a 413 retried with older images left out and said as Factory's byte limit (yetone/magpie#2082) | ||
|
|
1bd6d172c1 |
factory: a 413 is asked once more with older images left out, then said as Factory's byte limit (yetone/magpie#2082)
Ziqi-Cui's Codex session on Opus 5.5 gathered nine screenshots, ~4.5 MB of data URLs, and Factory answered every request after with 413 "Request Entity Too Large". The plugin passed the 413 on as it came, which reads as the context window; it is Factory's limit on a body's bytes. On a 413 from Factory the plugin now sends the request once more with every image and file but the newest replaced, in place, by a line saying it was left out (droid 0.239.0 removes older images/PDFs from large requests the same way). Anthropic image/document blocks, Responses input_image/input_file, chat image_url/file and Gemini inlineData/fileData are found wherever they are, tool results included, so every tool call keeps its result; a Gemini function response's parts, which take inline data alone, drop the image instead. One retry, never more; none when there is nothing older to leave out. If the 413 stands, or nothing could be left out, the error (Anthropic's request_too_large, else invalid_request_error) gives Factory's words, says the limit is on the body's bytes and what was left out, and carries magpie's gateway 413 hint word for word (compact, or start a new session), so the gateway, finding it, doesn't add it twice and OpenCode users get it too. The words avoid what the gateway reads as a context overflow, so it stays a 413. The caller's own session and files are untouched: only the body sent to Factory changes, and only on the retry. Run: bun test in packages/factory (134 pass), bun scripts/check.mjs. Broken by hand: without the 413 branch, three of size.test.mjs's four tests fail. Not tried: a real Factory account (none here) or Factory's real limit, which neither droid's binary nor its changelog states; the fake upstream refuses over a chosen size. |