ff65ebd1425b4bf189cea00a77ef8e9a262d1e23
6028
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ff65ebd142 |
provider: Zed's plugin is 0.1.14 at least: a Gemini model's efforts are keyed lowercase and its thinking level goes to Zed uppercase (plugins#215)
Zed's /models now lists a Gemini model's supported_effort_levels
uppercase (LOW/MEDIUM/HIGH), so the plugin keyed its variants LOW and
magpie's pi profile, which maps efforts by key, marked every thinking
level unsupported for zed/gemini-* (Yezike-yyy on plugins#215). And a
thinking level reached Zed lowercase, which its serde enum refuses:
400 "unknown variant `low`, expected one of `MINIMAL`, `LOW`,
`MEDIUM`, `HIGH`" (iron-water, plugins#215). zed 0.1.14
(magpie-community/plugins 3618bf9, from ump45nose's #587) keys the
variants lowercase whatever case /models uses and uppercases the level
only on the wire. The mover's min is raised to it, so keepMovedCurrent
updates every moved user.
npm view @magpie-community/opencode-zed-auth version --prefer-online:
0.1.14 at landing.
Run on mote at
|
||
|
|
59fdab0af7 |
gateway: a caller's folder the user hasn't trusted runs in magpie's, not a 502 (lwjef on X)
lwjef (X, 2116867007799030000): a cwd Claude Code hasn't trusted hangs the interactive-mode bridge (paseo chat). Cause: in the user's own account the helper leaves the trust question to the user (no MAGPIE_CLAUDE_TUI_TRUST) and ends at once saying so. Up to 11-01 that run became -p; since |
||
|
|
bee3ea6753 |
claudetui: the first message waits for Claude Code to list magpie's tools (MinhuWang on X)
MinhuWang (X, 2116836405548916907): in the interactive mode the first
message can go before MCP has loaded, and then has none of pi's tools.
Cause: the helper's ready() took the drawn "❯ " prompt as ready. Claude
Code connects its MCP servers beside the prompt, so a message pasted at
once was answered with no mcp__magpie__ tools. Reproduced with the real
Claude Code 2.1.309 (sandbox HOME, a copy of the owner's account): an MCP
server held 8s before answering initialize got "NOTOOL" for "what is the
secret word, use your tool".
Fix: startRun gives claude-mcp-helper a third argument, a `listed` file in
the run's temp folder, which RunMCP writes after it has answered
tools/list. The helper finds that path in the run's --mcp-config
(mcpListed) and ready() waits for it as well as the prompt, inside the
same ReadyWait (45s); past it the run ends saying the tools weren't
listed. Runs without that server (warm-up, model test) don't wait.
Run (mote, at this tree):
- go test ./internal/claudetui ./internal/claudebridge: ok
- go test -run 'Claude|MCP|Bridge' ./internal/gateway: ok
- real Claude Code 2.1.309 here, a sandbox HOME with a copy of the
account's credentials, the new helper and the real claude-mcp-helper
behind an 8s sleep: initialize answered at 12.7s, the first turn called
mcp__magpie__pi_secret and answered "The secret word is PELICAN".
Without the sleep: answered at 2.1s, same answer. 2.1.309 sends
server/discover before initialize; the helper's method-not-found answer
is taken and initialize follows.
Broken by hand: toolsListed returning true made
TestShimFirstMessageWaitsForTools red ("echo: hello (without magpie's
tools)"); RunMCP not writing the file made TestToolsListedFileWritten
red.
Not tried: Claude Code in WSL (the path is the gateway's Windows temp
path, handed to magpie.exe as the callback path is); a Claude Code that
lists tools only on its first request (2.1.309 lists them at start),
which would now wait 45s and fail saying so instead of answering
without tools; the full gateway suite (run after the next commits).
|
||
|
|
79f83798fd |
kiro: the mover installs 0.1.25, which shows bonus credits on the Usage card (plugins#602)
kiro 0.1.25 is on registry.npmjs.org (npm view --registry https://registry.npmjs.org: 0.1.25, shasum 00882472feb467e0ecb59da3c364bda423c5f12f). It is plugins#602 (GiantGKL), squash-merged as 6053811 in magpie-community/plugins: bonus credits (a first upgrade's 500 trial credits, a promotion's) show as aside windows of their own, with when they lapse, and a month used up while a bonus has credits left is shown only too, since Kiro spends the plan's credits first. keepMovedCurrent brings every moved Kiro user to it. Run on mote: - at |
||
|
|
8569f39f6c |
agent: Claude Code's /model hides its own lineup while magpie's list is narrowed
yyhhyyyyyy on Discord picked only a routing group's models for Claude Code
on the Agents page, and Claude Code's /model still listed a model they had
not picked. Real Claude Code 2.1.316 in a sandbox HOME, with the settings
magpie writes, lists: Default, the group (as Custom Opus), Claude Code's
built-in "Fable 5.1" row, then the group as Sonnet and Haiku, then
magpie's modelPicker rows. The Fable row is Claude Code's own lineup.
magpie leaves ANTHROPIC_DEFAULT_FABLE_MODEL unset for a main model that
isn't a Fable (#2090), so Claude Code shows its own Fable there. The
gateway's /v1/models already follows the picks (CatalogFor), and Claude
Code's gateway discovery is off unless
CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY is set. Neither of those is
where the row comes from.
Claude Code's documented modelPicker.replaceBuiltInOptions hides the
lineup and leaves Default and magpie's rows. In the same sandbox, the
same settings with the flag set list exactly those rows. magpie already
set the flag while "Show Claude Code's own models" is off (#4548). It now
also sets it while Claude Code's list leaves out some of magpie's
catalog: only the picked models, some taken out one by one, or a
visibility of families (claudeNarrowed, CatalogFor's hidden list). A
change to the picks already rewrites settings.json through
catalog.Touched and Sync.
The user's own values:
- A user's ANTHROPIC_CUSTOM_MODEL_OPTION, in the settings env or the
shell, keeps the lineup. The flag would hide that row too.
- availableModels was not used. It also hid the Fable row in the
sandbox, but it is the user's key, it blocks --model, and it is meant
for enforcement.
Run at this head (rebased on origin/main
|
||
|
|
2f4c088dce |
usage: Warm up on a Codex or Claude account's card whose 5 hours haven't started
01huadalang on Discord looked for a way to start one account's 5-hour
countdown on the Usage page, not in Settings. A Codex or Claude account
card whose 5-hour window isn't running now has a Warm up (预热) button on
its account line. It sends the request Settings › Warm-up's Warm up now
sends (POST /api/warm-now {agent, user}), to that account alone: for a
ChatGPT account the scheduled warm-up's one "hi" with the account's own
sign-in, on its cheapest model at low effort (warmModel); for a Claude
account Claude Code's own run on haiku (WarmClaudeVia), so magpie sends
nothing that imitates Claude Code. No new server code.
When it shows: the account is one magpie is signed in to (codexUsers /
claudeUsers), its read has no error, and its 5-hour window is idle as the
scheduled warm-up tells it (idle in codex_warmup.go): nothing used and the
reset a whole window away (within warmSlack), or the reset gone by. A
Claude account never used has no window read and shows it too, as
claudeWindowsExpected fills in; a Codex account with no 5-hour window
doesn't. While the request is out the button is disabled (busy), so a
second press sends nothing; once it went, the account's button stays away
for warmSlack (10 minutes), the time a just-started window still reads as
idle, and the quotas are read again (the server marks the account stale).
Refused, the vendor's reason goes in the status line and the button
comes back. Words in en, zh, zh-TW, ja, de (the tooltip is new; the
button and status lines reuse Warm up now's).
Run (at the head before the last rebase onto
|
||
|
|
09d5dfb87b |
gateway: aliased and magpieAliasAsked read one alias parser (#4667)
magpieAliasAsked copied aliased's four prefixes; a fifth form added to one would leave the other behind. Both now read aliasDigits. Run: targeted alias/member/desktop/science tests, gofmt, vet x3 (mote). |
||
|
|
3d64d6c52f |
gateway: a reply to one of magpie's own aliases keeps the vendor's model name (#4667)
leizh007: with Claude Code Desktop served through magpie, ccusage counted the model as "magpie-2213244526.anthropic…" from the 11-01 release on; before it said the subscription's own "opus-5-5". The asked-name rule ( |
||
|
|
567b648bd8 |
gateway: test #4445 on the reporter's route, Codex's ChatGPT backend path
The reporter's turn came to magpie's /backend-api/codex/responses, with
the Model Map plugin naming remote-magpie/codex/gpt-6.1-sol; the patch's
test asked on /v1/responses only. TestRemoteMagpieCodexModelKeepsLiteOnCodexPath
asks the same Lite request on CodexPath.
Run (mote, at this tree, -tags nogui):
- go test -run TestRemoteMagpie ./internal/gateway: ok
- with additional_tools.go and gateway.go put back as on origin/main, the
new test is red with the report's 400 ("Office:
X-OpenAI-Internal-Codex-Responses-Lite requires `reasoning.context` to
be `all_turns`."), as is the patch's own /v1 test.
|
||
|
|
1ff928139d |
gateway: a remote magpie's codex model gets Codex's Responses Lite as it was sent (#4445)
What changed: a Codex Desktop turn on one of its own Lite models (gpt-6.1-sol) routed through Model Map to a Remote Magpie provider answered 400 "Remote magpie: Codex: X-OpenAI-Internal-Codex-Responses-Lite requires `reasoning.context` to be `all_turns`". liteKept treats a Remote Magpie like any plain Responses upstream, so passthrough ran fromLite (the additional_tools item lifted into tools, reasoning.context taken off) and forwardOnce dropped the Lite header. The remote serves codex/<model> through its ChatGPT account, which passes on what it got, and the ChatGPT backend refuses a request for one of its Lite models without reasoning context "all_turns" (#534): the request arrived stripped of exactly what that model demands. Had it gone as Codex sent it, the remote's account path keeps the Lite shape (liteKept true there) and its answer is 200, as the reporter's codex=as-sent workaround showed. liteKept now also keeps the shape, with the model it is asked for: a Remote Magpie's codex model, named codex/<model> — the ChatGPT account's namespace in every magpie's catalog, so the remote lists one only when that account is there to serve it. Its other models still get what Codex sends a model that isn't Lite (#350), header and reasoning context included in the lift (#350, TangForX). Run: go test -tags nogui -run 'TestRemoteMagpieCodexModelKeepsLite| TestRemoteMagpieOtherModelLeavesLite' ./internal/gateway/ — the first failed with the 400 above before the change and passes after; the second keeps the old behavior. go test -tags nogui ./internal/gateway/ passes. Fixes #4445 Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
6de04a26e2 |
gateway: a Codex memory call on its own bare name follows the session when a provider serves a model under that name too (#4765)
raphael-y7: with magpie as Codex's model provider, the conversation on orbis/gpt-6.1-sol, Codex's memory consolidation — its own background request on its own default consolidation model, asked by its bare name gpt-5.6-terra — went to workbuddy-ai, the only provider of magpie's with a model under that name, and the account it landed on refused it: 400 "model [gpt-5.6-terra] is not allowed for user type [personal_free_user]", three tries, 8.5s, and the memory was never written. The bare name resolved, so codexMemoryStandIn (#742) left the call where it stood; a model of Codex's own asked by its bare name is not a pick of whichever provider has one under that name. Now a memory call whose bare name resolves still follows the conversation's model, as it does on the ChatGPT backend's path (codexFollowTo), when Codex's config names no model for its memories: codexMemoryStandIn asks codexMemorySession first and only falls through to the name's own resolution when there is none to follow. What keeps going as the name resolves: any other call, a model Codex's config names (the user's own pick, a full id or a bare name), a config magpie can't read, and a conversation magpie has no model of (on Codex's own, or nothing answered yet). What this doesn't change: the three tries on a capability refusal, and the model catalog's exposure of a model an account can't serve — the reporter's other two suggestions, both a bigger cut; the auto-review's codex-auto-review and the app's title, description and summary calls, whose as-Codex-sent default is deliberate (codexTitlesTo, codexSideTo; shruru counts a provider serving a luna-named model picking titles up as a feature, #4590). TestCodexMemoryOnACollidingBareNameFollowsTheSession: a provider with a model under gpt-5.6-terra, the conversation on another provider's — the memory call followed the conversation and the named provider got nothing (red before: it got the memory); the config's pick and a plain turn on the name still go to it. Run (darwin arm64, -tags nogui): - go test -tags nogui -run 'TestCodexMemoryOnACollidingBareNameFollowsTheSession|TestCodexMemoryCallsGoWhereItsTurnsGo|TestCodexMemoryStandInFollowsTheSwitch|TestCodexMemoriesFollowTheSession|TestCodexSideCallsKeepTheConfigsModel|TestCodexSideCallsBeforeTheFirstTurnFollowTheSwitch|TestCodexOwnModelOnMagpieThreadGoesOnSignIn' ./internal/gateway: ok (the new test was red before the fix, with the report's routing) Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
206efc90c8 |
gateway: a Codex side call with no setting still goes on Codex's sign-in (#4590 review)
e99e75dab took every side call on one of Codex's own models (title, description, summary, prediction) off Codex's ChatGPT sign-in. With no setting naming a model, codexTitlesTo and its siblings hand back the bare model Codex asked for, which magpie serves nothing for: a user signed in to ChatGPT whose titles worked through the sign-in got "magpie knows no model \"gpt-6.1-sol\"" 404 for every title, description, summary and prediction. A thread's summary has no setting at all, so it always went that way. Now only a side call whose setting names where it goes (CodexTitles, CodexDescriptions, CodexPredictions: a model or "off") stays off the sign-in (codexSideSet); without one it goes on the sign-in as before. Run (mote, at this tree, -tags nogui): - TestCodexSideCallOnOwnModelUnsetGoesOnSignIn (new: signed in, no setting, each of the four kinds): red on e99e75dab, the 404 above for all four; green now. - go test -run 'TestCodexSideCallOnOwnModel|TestCodexOwnModelOnMagpieThread| TestCodexTitlesSetting|TestCodexTitleOnMagpieProvider| TestCodexDescriptionsSetting|TestCodexDescriptionFallbackOnMagpie| TestCodexPrediction|TestCodexSummar' ./internal/gateway: ok - broken by hand: codexSideSet always false turns gua's TestCodexSideCallOnOwnModelNotPutOnSignIn red (the reporter's 404); always true turns the new test red. |
||
|
|
50e8da4c34 |
gateway: Codex side calls on its own models stay with magpie, not its sign-in (#4590)
shruru: with magpie as Codex's model provider, picking any model in the Codex titles setting never took: the thread's title stayed the first message's truncation, and a request for gpt-5.6-luna, Codex's own title model, to /v1/responses was answered 404 "is one of Codex's own models... open ~/.codex/auth.json: no such file or directory". A thread started while magpie was Codex's provider sends to magpie's /v1 (model_providers.magpie's base_url is magpie's /v1), and since |
||
|
|
37d7913c20 |
claude: the interactive mode is given an earlier conversation as a transcript
A conversation no run has (a run lost to an update, a client's own history) was told to a new Claude Code in its interactive mode as one first message, pasted. #4778's 229 messages and 3 images that way were refused; #4780's 56 messages and 25 images were pasted one by one until the paste timed out, and the request got a 502 or an empty reply. Now, when the conversation has a reply that calls no tool, replaySession writes it as Claude Code's own transcript: a session file in the project folder Claude Code reads, a user line holding the conversation before that reply (as renderClaudePrompt tells it, images as image blocks, client cache marks out) and an assistant line holding the reply's words. The run starts with --resume on it, as a saved session's run does, and is typed only the turns after the reply. If Claude Code can't go on from it, start tries once more told whole (req.told). -p (interactive mode off), WSL (no session folder) and a conversation with no such reply are told whole as before. The file goes in the folder of the work path with its links followed: the first try wrote it beside the unresolved /var/folders path on a Mac, and the replay test was red on mote for it. Real run (this Mac, sandbox HOME and CLAUDE_CONFIG_DIR, one of the owner's real Claude accounts by CLAUDE_CODE_OAUTH_TOKEN, real Claude Code 2.1.316 through magpie claude-tui-helper, -p stream-json in, the interactive mode under it, --model haiku): the transcript was made by replaySession itself (a throwaway test on mote, not committed) from 6 earlier messages with 3 images (red, blue, green 64x64 PNGs) and a 455KB file whose line 004321 names a fruit, 464,798 bytes; the work folder was reached through a symlink. Typed only "Name the colours of images A, B and C, and the secret fruit named in line 004321 of the file. One line." Answer in 8.4s: "A: red, B: blue, C: green; secret fruit in line 004321: PAPAYA." Claude Code appended to the same session file (504,788 bytes after). Run (mote, at this tree, rebased on |
||
|
|
949000a36a |
claude: a request the interactive mode refuses is a 400 no account rests for
A request Claude Code's interactive mode can't take (a JSON schema, a branch of a -p run's session, WSL Claude Code whose home wasn't found) was refused with a 502. The fallback asked every account of the subscription in turn and rested some for it: #4778 saw 15 tries across 3 accounts. The refusal is the same on every account, so it is now a 400 (tuiRefusal), which the fallback neither retries nor rests an account for. The message is reworded so that "Models" no longer stands just before the error's "invalid_request_error": "Settings › Models › Replies runs every request as -p\",\"type\":\"invalid_request_error" matched provider.ModelUnserved, which made the 400 retryable again. Run (mote, at this tree): go vet ./internal/gateway, GOOS=windows and GOOS=linux -tags nogui go vet; go test -run "TUI|Claude|Resume|Interactive|Refusal|Fallback" ./internal/gateway ok. gofmt -l clean. Broken by hand: with the 400 mapping taken out, TestClaudeTUIRefusalIsNoAccountsFault is red (502); with the old wording it was red on WSL (retryable true through ModelUnserved). Not tried: a refusal against real accounts. Not changed: a run that starts and fails (tuiNoStart) is still a 502, retried on the next account. Part of #4778. |
||
|
|
df03aeb351 |
provider: Zed's plugin is 0.1.13 at least: a Gemini request's tool-calling mode goes in lowercase (#4657)
Zed's cloud refused every tool-bearing Gemini turn of the Zed plugin with 400 "unknown variant `AUTO`, expected one of `auto`, `any`, `none`" (atticuskk). magpie-community/plugins f4e2ac3 (zed 0.1.13, co-authored with ggbdpq, who found the cause) lowercases the mode in the plugin, where the request is fitted to Zed's wire; the mover's min makes every moved user's plugin that version. Checked: npm view @magpie-community/opencode-zed-auth@0.1.13 version --prefer-online -> 0.1.13. Plugin run (mote): bun test in packages/zed 54 pass; the lowercase line off -> 3 red. gofmt -l clean. Not tried: a live request to cloud.zed.dev. |
||
|
|
97e66bce26 |
library: an uninstalled Kiro CLI is listed to take back what it was given (#4769)
b4c67477f lists Kiro CLI in apps only while kiro-cli is found. held, which lists an uninstalled agent on the rows of what magpie gave it so that can be unticked and taken out of its folder (TestGoneAgentListedToTakeOut), walks apps and agent.All, so once kiro-cli was uninstalled magpie's entries stayed in ~/.kiro/settings/mcp.json, ~/.kiro/skills and the steering file with no row to take them out. Kiro CLI is now always in apps, with Bin the found path or "kiro-cli": Detected (binAt) still decides whether it is a target, so ~/.kiro alone (Kiro Crew, the Kiro IDE) makes nothing a target, as before. Takes tells an app that isn't installed so, rather than recording it and then giving it nothing (the #2254 shape); before, an uninstalled Kiro CLI got "unknown agent". Run (mote, mote-run -tags nogui): - go test -count=1 -run 'Kiro|Gone|Takes|Held|Target' ./internal/library: ok - go test -count=1 ./internal/library (whole package, before this change, with b4c67477f): ok 156s - Broken by hand: apps() back to listing Kiro only when found -> TestKiroCLIUninstalledHeld red ("isn't listed as gone: <nil>", Takes "unknown agent"); Takes' new check off -> red (Takes returns kiro-cli for an uninstalled one). - gofmt -l: clean. Not tried: a real kiro-cli uninstall (the user's live ~/.kiro untouched). |
||
|
|
eb469c70a9 |
fix(library): Kiro CLI gets the Library's skills, MCP servers and instructions (#4769)
The library's targets are agent.All plus apps, and apps held Claude Desktop alone: Kiro CLI, which magpie wires no model into and the Agents page rightly leaves alone, could be given none of the three, and a user of it copied skills, servers and instructions into ~/.kiro by hand (#4769, ump45nose). Kiro CLI is an app now, found by the kiro-cli program alone — PATH, ~/.local/bin, Kiro CLI.app, where provider.KiroExecutable already looked — never by ~/.kiro, which Kiro Crew and the Kiro IDE keep too. It reads ~/.kiro/skills, ~/.kiro/settings/mcp.json and ~/.kiro/steering/AGENTS.md, its global steering's AGENTS.md being always included (kiro.dev/docs). Its mcp.json has a format of its own: entries of command/args/env or url/headers, no type written, the user's fields (disabled, autoApprove, disabledTools, oauth) kept, no SSE named — a url is streamable HTTP, the docs give no way to say SSE — and a ${NAME} in headers or env passed through, Kiro expanding those its Mcp Approved Env Vars approves. What a kiro-cli in a WSL distro is given, and a project's .kiro, stays out: apps are this machine's, and per-tool off stays the user's. Run: go test -tags nogui ./internal/library (ok; TestKiroCLITarget, TestKiroCLINotByItsFolder and TestKiroMCP new); go vet (darwin, linux, windows; nogui) and gofmt -l clean on the package; builds for all three platforms. Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
a97653bf3e |
routing: LeastUsed sends a key with no share behind subs with room, not first (#4535)
A pay-as-you-go key, a prepaid wallet, or an account whose use wasn't read has Seat.Used read 0, and LeastUsed compared that 0 as if it were a share of 0%: any subscription that had used more than nothing went after every such key, so paid balance burned while subscription quota sat idle. Smart and Pace already keep a seat whose allowance isn't known behind those whose share was told; LeastUsed now does too: the shareless go after subscriptions with room and before those running low or spent, ordered among themselves by what a wallet has left and what magpie sent a key lately. A learning account still goes first, once, as in Smart and Pace. Pools of seats that all tell a share, or all tell none, are ordered as before. What changed: - internal/routes/strategies.go: LeastUsed places seats by whether their share was told (Known with a use past 0 or a renewal known) before the Used comparison; its comment says so. - internal/routes/routes_test.go: TestLeastUsedSeatsWithNoShare locks a key behind subs with room, a wallet behind a told share and before a key, keys past low and spent subs, a learning account first, and told shares ordered by use as before. Run: - go test ./internal/routes/ -count=1 (fails on the parent at TestLeastUsedSeatsWithNoShare: [key sub], passes with the fix) - go vet ./internal/routes/, gofmt clean Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
2503520f82 |
codexcat: each Codex model takes official Codex's own instructions for it (#3759, #4008, #4783)
Every magpie model in Codex's catalog (model_catalog_json) carried
gpt-5.2-codex_prompt.md ("You are Codex, based on GPT-5"), so a magpie
GPT-6 model, the auto group's included, ran on a GPT-5.2-era prompt while
official Codex sends GPT-6's own template. magpie still writes no words of
its own into the prompt and leaves the identity line alone: each entry now
takes the text official Codex sends that model, word for word.
- A model's slug (the id's last segment) is matched as Codex 0.166
matches one (longest prefix of an official slug): first in the entries
the user's ChatGPT account handed this Codex (models_cache.json), whose
base_instructions and model_messages go over as sent; then in Codex
rust-v0.166.0's bundled models.json (instructions_template only, as an
older Codex may not read 0.166's model_messages), embedded as
codex_instructions.json.
- Any other model, and a routing group, takes Codex's prompt for a model
it doesn't know (models-manager/prompt.md, model_info_from_slug), which
replaces codex_prompt.md: that is what official Codex sends it.
- ownEntry with no base_instructions, and internal/provider's
codexInstructions fallback, take the same official text.
- testdata holds Codex's models.json and prompt.md at rust-v0.166.0;
TestBundledIsCodexOwn fails when the embedded copies drift from them.
- GET /v1/codex/models (a remote Codex's model_catalog_url): entries are
now ~21 KB, so Codex before 0.166's 1 MiB cap holds about 48 of them
(was ~125). Codex 0.166 reads the catalog whole (models_endpoint.rs
passes no body limit), and it sends ?client_version=, so the cap now
applies only to a Codex below 0.166 or one that doesn't say
(codexReadsWholeCatalog). docs/reference.md says so.
- docs/subsystems/agent-wiring.md: a "Codex instructions" row. The
Antigravity cloak's comment no longer calls the GPT-5 prompt magpie's.
Run (mote's disk is full, 100% with other sessions' runs, so on WSL
magpie-desktop through wsl-run):
- go test ./internal/codexcat/: ok. go vet -tags nogui ./... and
GOOS=windows go vet ./...: ok. gofmt -l: clean.
- go test -tags nogui -count=1 -timeout 45m codexcat, provider, agent,
gui, gateway (every package that imports codexcat): codexcat, provider,
gui ok. agent: TestGrokInstalled and TestOmpDetectedWithPiDir red, the
same at origin/main
|
||
|
|
546cdbde6b |
gui tests: claude-mode moves the pointer off the page once the editor is opened (#4638)
The "both modes on hover" tests found the hover card up before their
hover in WebKit. The click that opens the editor leaves the pointer on
the provider row, at (450,110) at 900px and (210,110) at 420px, and the
editor draws its TUI / claude -p switch there: a probe printed the
switch at [306,96,515,121] (en 900) and [171,78,378,126] (en 420), and
the card up in those runs. WebKit sends mouseenter for a pointer that
never moved once something is drawn under it. openEditor now moves the
pointer to (0,0) right after the click, before the editor is read.
Run in WSL (magpie-desktop, Playwright 1.62.0) at origin/main
|
||
|
|
b4d1c393c1 |
redact: a Chinese session's words before a missing module are read as cheaply (#4766)
The #4766 fix read the last 64 bytes before the quote, but fell back to lowering the whole text before it when those bytes were not ASCII. A session written in Chinese is not ASCII, so it kept the quadratic cost the fix removed. Lowering is rune by rune with no context, so the last bytes of the lowered window equal the last bytes of the lowered whole text; the fallback is dropped. The spaces before the quote are now trimmed before the window is taken, so more than 64 of them no longer hide the words. Run (mote-run, -tags nogui): - go test ./internal/redact: ok. - With ggbdpq's model.go: the new Chinese case is red (450560 bytes made, 8 KiB at most). With main's: red (401408 bytes). With the window taken before the trim: the many-spaces case is red. |
||
|
|
d3bf8f7394 |
fix(redact): an error's words for a missing module are read before the quote, not the whole body before it (#4766)
What changed missingModuleAt said a quoted name is a module an error could not load by lowering everything before the quote. A session's body holds a place a known value turns up at for each turn it has been in the history, and knownSpans asks packageAt at each of them, so every such place paid the body's whole length again — a 555 KB turn held 1m54s in the masking, past the unrouted budget, and was answered 504 (#4766). The words stand right before the quote; what is read of what is before them is the last 64 bytes of it now, as assignedSecret reads the 64 before the value it judges. A letter a lower case folds wider than in those bytes reads the whole text before the quote, as before. Nothing of what is masked changes. Run - RED (product file reverted, test kept): TestMissingModuleReadsOnlyTheWordsBeforeTheQuote fails with "judging the words made 401440 bytes, 8 KiB at most". - GREEN: the test passes; go test -tags nogui ./internal/redact/ passes. - A session that grows turn by turn, Personal on and config-dense as the report has it: a 925 KB turn went from 3.8s to 0.76s, a 560 KB turn masks in 0.2s; the rest of the cost is the rules' own linear scan. - go vet on darwin, linux/amd64 and windows/amd64; builds on all three; gofmt clean; BenchmarkMaskLongSession unchanged on its shape. Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
7126f7de3e |
gateway: only the user's "it sees" lifts the small models' shape guess, and a group's ID stays out (#4359)
Review of ggbdpq's aa378a4f6 (the commit before). Its comment says a
group's, auto's or a subscription's agent-written ID stays out whatever
the user said of it, but the code put those guards inside the same
"user said nothing" branch, so a group/ or auto/ ID with a modelImages
entry entered the pool. And any answer lifted the guess, a "takes no
images" too: that says nothing of whether the ID is a vendor's model,
yet let a colon or *-embed/-tts/-free ID into the searcher's small
model pool, which has no image keep to hold it back.
Now the structural guards stand for every model, and only a modelImages
true lifts the colon/word guess.
Run (mote, -tags nogui):
- TestSmallCandsLiftOnlyWhatTheUserSaidSees, new: red on aa378a4f6
("pool [cn:text-only cn:sees group/g auto/a], want only cn:sees"),
green here.
- TestAutoVisionPicksANamespacedIDTheUserSaidSees (ggbdpq's): red with
search.go at origin/main
|
||
|
|
4932a8bd1c |
fix(gateway): a model the user said sees is picked though its ID carries a namespace colon (#4359)
What changed AutoVision never picked a model of a relay whose IDs carry a vendor namespace (cn:deepseek-v4.1-flash, gateway key 21/cn:…), though the user had marked every one as taking images in settings.json's modelImages: smallCands dropped every model whose lowercased ID holds a colon or a tilde, and the drop came after keep (seesAt) had read the user's answer, so their word never reached the pick — the pool came out empty and seer() said no model sees, while naming the model in vision worked. smallCands now reads the pool's settings once and leaves a model the user gave an answer about (ImageOverride) in the pool whatever characters its ID carries: their answer names one of the vendor's models in full, which is exactly what the colon, the tilde and the nano/lite/image/… words were guessing at. The shape filters stand for every model they said nothing of, and the structural ones — a group's, a found group's, and, on a subscription, what magpie wrote into its agent — stand even for a model they did name. The searcher's pool reads the same answer: the filters are one judgment, and a model the user proved real can be searched with too; a relay is asked to search only where it was before. Run - TestAutoVisionPicksANamespacedIDTheUserSaidSees (new) fails on the old smallCands with "AutoVision = \"\", want relay/cn:deepseek-v4.1-flash, the model the user said sees" and passes now; it also holds that with no answer of the user's the model stays out, and that their "takes no images" keeps it out. - go test -tags nogui -count=1 ./internal/gateway/ (whole package). Fixes #4359 Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
8d7439a1a0 |
gateway: a translated system turn is folded for a Responses upstream, and a relay's "Upstream request failed" 400 fails a group over (#4632)
Two faults, one turn. Claude Code 2.1.296 and later send their
environment as a message with role "system" inside messages
(Request.envInTurns). The Chat and Anthropic builds fold such a message
into the system prompt (responseInstructions); buildResponses wrote the
role as it came, and a relay whose Responses endpoint fronts the ChatGPT
backend — which takes user, assistant and developer alone — answered
every translated turn 400 "Upstream request failed". That 400 matched
none of the wordings that make a 4xx retryable, so the holdWriter held
it as final and the group's second member never ran: the relay's answer
went to the agent, every turn.
What changed: buildResponses folds a translated request's system and
developer messages the way the Chat and Anthropic builds do, keyed on
the read. A Responses client's own instruction items are kept by the
read (#2532) and go where they stood; so do a codex account's, which
its send says as developer ones in place (codexBody — the fold would
move them out of conversation order, so buildFor marks the account's
requests kept). A translated request's system message is the harness's,
so it is said in the instructions, and one after a reply is told as a
user <system-reminder>, as on every other target. A relay's own word
that the provider behind it turned the request away ("sub2api: Upstream
request failed", type upstream_error — the words the Codex compaction
already reads, #866, #1511) joins the wordings that make a 400 or 422
retryable (retryable) and fail a group over (shapeRefused): the next
member is asked, and nobody rests. A 400 that says nothing of the kind
still ends the route, as a bad request would fail on every member
alike.
Run: TestClaudeSystemTurnSaidInTheInstructionsOnResponses and
TestGroupFailsOverARelaysUpstreamFailed, red at upstream/main
|
||
|
|
65fc2efa44 |
gateway: a Chat legacy function_call carrying nothing is left out (#4659)
jinccc-ctrl on #4659: with tools declared and the model answering in text alone, WorkBuddy's stream ended on a frame whose function_call was an empty object where the contract has null, and OpenMausBot, which checks every frame's shape, read the empty object for a legacy call and refused the whole turn ("legacy function_call is unsupported; use structured tool_calls") — so every text reply a tools-carrying request got was a turn lost, while clients that merge silently never noticed. An empty function_call — a name and arguments both empty — says nothing and runs nowhere, so chatTidy leaves it out, as it leaves out an empty reasoning_content, an empty tool_calls and a nameless call (#1475). A null goes as it came, and a call whose name or arguments hold something is one a client may still be reading: both untouched, as is a name or arguments of another kind than a string. Run (darwin/arm64, go test ./internal/gateway/ -tags nogui): internal/gateway/function_call_null_test.go:32: an empty function_call object went out where the contract has null (#4659) — before the fix; after, TestStreamedEmptyFunctionCallLeftOut and TestStreamedNamedFunctionCallKept pass, the full gateway package passes, and gofmt, go vet, -race on the targeted tests and linux/windows/darwin builds are clean. Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
9da9bfabdc |
gateway: Grok's reasoning goes back to it through a Claude, Chat or Gemini client (jenryai on X)
jenryai uses Grok through Claude Desktop and sees repeats and broken tool calls that Grok Build doesn't make. Diffing Grok Build 1.0.67's captured requests against magpie's: Grok Build asks for include ["reasoning.encrypted_content"] and sends every reasoning item, encrypted_content and all, before the function_call it led to. Through a Messages (or Chat, Gemini) client magpie never asked for that reasoning, and those clients have no place to keep a Responses item. So every step of a tool loop reached Grok without the reasoning behind its earlier calls. Now, for a Grok plugin request from a client that isn't Responses: - the request asks for reasoning.encrypted_content (askSealedReasoning); - the sealed reasoning items before a call are kept on disk by hash, the same store as Gemini's thought signatures, and the call's id carries the key: <id>__rk16__<key> (carryReasoning, on both the whole and the streamed paths); - on the way back afterParse strips the key from the call and its result and puts the items in front of that assistant turn (unreasonCalls). buildResponses already sends such sealed parts back. A key magpie no longer has, or an id cut short, goes as before. A Responses client keeps its own items and is unchanged. The test fixture testdata/grok_reasoning_then_call.sse is a real Grok stream (reasoning, then message, then function_call, interleaved). Run (mote): - at the base |
||
|
|
276c806db2 |
plugins: a plugin's own requests are counted; a provider plugin's options get the editor (plugins#592)
zelong77 asked for two things once Devin 0.1.30's cache keep-alive
worked: its pings were invisible in magpie, and the interval and ping
count could only be edited in plugins.json. The owner decided pings are
shown as counted usage and the two numbers are edited in the GUI.
- host.js gives plugins input.magpie.usage(provider, call) and
input.magpie.account(provider). usage validates the call (kind
[a-z0-9_-]{1,40}, a model id, whole-number tokens from 0, status at
most 999, error clipped to 500) and sends an unasked "usage" event;
host.go hands it to plugin.OnUsage in the background.
- internal/usage/plugin_calls.go writes each one as a row of agent
magpie on the plugin's provider (provider.PluginID) and account
(provider.PluginAccountUser), with its kind. It is counted, priced
and in every total, not a probe. Kind cache_keepalive is in the
purpose catalog as "Cache keep-alive" (five languages), so the
request log names and filters it. The ping itself still goes straight
to Devin, never through the gateway, which would break the cache.
- /api/plugins reads every plugin's package options example, not only a
middleware's or request hook's, and the Installed row offers the same
Options JSON editor for a provider or agent plugin that suggests or
has options (not while it is off). Clear's confirm no longer calls
them a middleware's options.
- The Devin mover's min is 0.1.31, which reports each ping and gives
its two settings' defaults (285 s, 6) to the editor. npm has 0.1.31
(published 10:03Z); the plugins publish run is red only for
think-tags' known E404 (plugins#180).
- docs: provider-plugins.md (the API, the options editor),
gateway-sessions.md (the counted row beside probes).
Run at this tree (rebased on origin/main
|
||
|
|
a63766b071 |
context: Use on Codex's window reads "In use" over 7 and 30 days too (hoobnn)
hoobnn on Discord (#general, after v0.1.2572): on Usage > Context, Use on Codex's Compact at showed "In use" with Undo over Today, but over 7 or 30 days the card never said "In use". Cause: adviceRow checked `same` (Now equals the advice) before `applied` (magpie put the advice in). Over 7 and 30 days the moved models' Now reads the advice after Use, so the chip said "Already the leanest for how you work". Today's calls were Codex's own models, so Now stayed and `applied` won. Now `applied` is read first, in every range; adviceRow is the only place the verdict is drawn (Claude rows and TTL rows go through it too). Test: context-tune's new "Use on Codex's window is In use with Undo over Today, 7 and 30 days" (every language, 360 and 1100 wide), and three existing assertions that wanted "Already the leanest" after Use now want "In use". Run: - Red on the old code (mote, base |
||
|
|
85e37162e9 |
routing: a route group can be held to chosen accounts (duanckham on X)
duanckham has a personal and a company GPT account, one tool and one gateway, and wants a group's GPT models to spend only the company account (or only his own). A second gateway key doesn't fit: his tool talks to one gateway, and a local agent needs no key at all. Group.Accounts holds a group to some accounts or keys of the providers it names, in a gateway key's form and by the key's rule (#905, Identity.AllowsAccount). The asked group narrows the request's identity (access.Identity.HeldToGroup: the strict intersection with the key's own list; "<provider>/\x00" when they share none), so every gate a key's accounts go through holds the group's too: chat, responses, messages, count_tokens, embeddings, images and video, streamed or not. A group reached inside another, as a member or a fallback, is held in planLevel (hold, Member.Via): its candidates on an excluded account are Held rows with Weighed.HeldBy, which the Routing trace tells. Fallback stays within the group's entries; with every allowed account resting or out the group's usual error comes back, and a key and a group that share no account get a 403 naming the group, nothing asked upstream. SaveGroup resolves each entry (ResolveAccount, shared with the key's CleanAccounts); share and import drop them. A group without accounts is as before. GUI: the group editor's Accounts section, a row per member provider with two or more accounts, "Any of its accounts" until some are ticked in the app menu (openPicker multi). Every save sends accounts, since a save replaces the group. Strings in all five languages. Gateway keys stay as they are: Gateway › "Gateway keys are for other computers … added here once Share on local network is on" already says where, and this case needs none. Run (mote, through mote-run), at cafed0067 on origin/main |
||
|
|
049848c5ed |
claude: a branch of a -p run's session goes to the interactive mode, told whole
With the interactive mode on, tool results another request answered
first for a run made as claude -p (before the mode was turned on) were
refused with a 502 (claudePrint's "branch"): the branch would have gone
on as -p. It now starts a new interactive Claude Code told the whole
conversation (startRun): -p's prompt isn't the interactive mode's, so
the cache has nothing of the -p session to read either way, and nothing
runs as -p while the mode is on. This is the second refusal behind
@crosscn's 502 on an old conversation (X, 11-01); the first, words over
400KB, went in v0.1.2614.
- startRun drops such a branch (from and req.branch nil) and logs it;
- the "branch" entry in claudePrint is gone;
- docs/subsystems/claude-subscription-bridge.md says so.
Test: TestClaudeTUIBranchOfPrintRunIsToldWhole (a -p run's saved
session given as the branch: the run is interactive, has no --resume,
and is told the first words too; req.branch is cleared).
Run on mote (go1.26.8), at origin/main
|
||
|
|
900852e1c9 |
gui: an editor's Advanced fold reads as a control (sylvenPR on X)
sylvenPR on X: the 高级 fold at the foot of Codex's editor didn't look like something to click. It was a 5px "▸" text glyph in the muted grey, with a default cursor and nothing on hover, so it read as a disabled hint. An editor's fold (.editor .more: Advanced on every provider, and a custom provider's More endpoints) is now a macOS disclosure: a 10px chevron drawn with a mask (turned down when open, as before), the label in the form labels' colour (--fg-2), a pointer, the label and chevron brighter under it, and a focus ring. The chevron still starts where the fields do (--ed-at); no gradient, accent or layout change beyond the control. The reporter's misalignment is not on main: editor-advanced-align already holds it to the field column (their build predates that). New test: editor-fold-clickable.test.cjs, Chromium and WebKit, dark and light, en/zh/zh-TW/ja/de, Codex's Advanced and a custom provider's More endpoints: pointer cursor, chevron >= ~10px and not a text glyph, label colour equal to the form labels', a hover change, and it still opens. Run (mote, through mote-run / ssh, playwright 1.62.0): - At the pushed head, rebased on origin/main |
||
|
|
da275848b6 |
tray: Windows shows a card's number in its icon (Benjaminliang_1 on X)
Windows' notification area shows no text beside an icon, so with a card in the tray the icon itself is now the first card's figure: the first row of the first card whose first row is a percentage, used or left as Allowance display has it, its digits alone (trayIconFigure). It is drawn in Segoe UI Semibold (Go's bold if the font can't be read) at SM_CXSMICON, white on a dark taskbar, near black on a light one, as tall as fits, centred by its ink, three digits narrowed into the square (trayNumberIcon). It is drawn again when the figure, the icon size or the taskbar theme changes (SystemThemeChanged wakes the loop); the tooltip still lists every card. A balance or magpie's totals are skipped; with no such card, or no cards at all, the icon is the bird as before. Settings > Usage > Tray icon number (settings.TrayNoNumber, Windows only, on by default, kept per computer) keeps the bird when off; Menu bar windows is now shown on Windows too, since it picks the row the number comes from. The number row sits after Menu bar cost, so the bird > pace > cost order the other tests pin holds. Linux and the Mac are unchanged. New words in zh, zh-TW, ja and de. app.js stays in the core budget with one comment shortened, no raise. Run at this commit on origin/main |
||
|
|
2b52302dcb |
claude: the interactive mode takes a first message of any length
@crosscn on X (11-01): after the upgrade made the interactive mode the default, a week-old conversation (a DeepSeek harness on a Claude model) got a 502, and worked again only with -p turned back on. A conversation told whole to a new interactive Claude Code is its first message, and words over 400KB were refused (claudePrint's "big", tuiPromptMost). The bound was never tried: the commit that set it lists "a ~400KB paste" under Not tried. Tried on real Claude Code 2.1.316 in a sandbox HOME, haiku: a 3MB bracketed paste showed "[Pasted text #1 +46154 lines]" after 35s; a 500KB one was sent, its transcript holds every line and the question, and the model answered it (184,168 tokens written to the cache). - tuiPromptMost and the "big" refusal are gone; claudeTUI, claudePrint, claudePrintWhy and claudeNotTUIWhy no longer take the prompt, which only that bound read. - the helper waits for a paste to show a second per 64KB longer than pasteWait (shownWait): 10s alone would press Enter while a 3MB paste was still being taken in. - the editor's tooltip says -p takes what the interactive mode can't "yet": a JSON schema (en, zh, zh-TW, ja, de). - docs/subsystems/claude-subscription-bridge.md says so. Tests: TestClaudeTUIBigFirstMessage (a ~1.1MB first message runs through the helper, 200), TestShownWaitGrowsWithThePaste; TestClaudeTUIOnRefusesPrint refuses a JSON schema now; TestClaudeTUIChosen's long-message row runs interactively. Run on mote (go1.26.8): - full go test ./internal/gateway ./internal/claudetui (-timeout 45m) at |
||
|
|
93b9d385f1 |
gui: the allowance alert's Chinese and Japanese say a share used, not reached (fRoAme)
fRoAme (Discord #feedback): 「用到此比例」 reads as either 80% left or
80% used, and magpie shows windows either way. The alert counts the
share used, so zh and zh-TW now say 已用掉的比例达到此值 and the
session line says 已用掉窗口额度的 {pct}; ja says 使用率 / を使用した.
en and de already say "share used".
Run on mote: node --test usage-alert.test.cjs i18n-keys.test.cjs,
Chromium and WebKit, 14 of 14 ok. usage-alert pins the zh line and
fails on the old one. Not tried: the real app.
|
||
|
|
8f804396fd |
mcp router: the hub says what its servers are for, and Pi's first prompt hears it
Asked "can you drive a browser?", Pi said no until nudged. Two causes:
- The hub's initialize instructions were one generic sentence ("The tools
of the MCP servers ticked for this agent…"), so nothing said that
playwright drives a browser or deepwiki answers about GitHub repos.
They now start with one line, "Tools of context7 (…), deepwiki (…),
playwright (Drive a real browser), …", at most 250 characters (names
first, "and N more" past room, abouts shared out short-first), then a
"- name: about" line per server. An about comes from the market entry
the server was added from (by key, then by name), else none.
- Pi 1.4.0 lists a codemode server in its system prompt by its config
description, else its instructions' first line, but writes the first
prompt without waiting for codemode servers. In -p runs the first
prompt had "- mcp__magpie (codemode)" and nothing after it. The hub
entry in Pi's mcp.json now carries that line as its description,
kept in step with the servers ticked; a description on another entry
is the user's and is left alone. Pi only: other formats are unchanged.
Sync runs under the library lock, so the hub's servers are read from the
library already loaded ((*Library).hubServers), not through hubServers().
Run (mote, at origin/main
|
||
|
|
ec104b8625 |
gateway: a Codex account can spend its credits before magpie moves to another account (jojonas_xyz on X)
jojonas_xyz on X: "我账号额度用完了自动给我切了别的号…找不到怎么关掉设置…你怎么知道 我不是想用 credits 呢". (Roughly: "my account ran out of quota and magpie switched me to another account by itself; I can't find a setting to turn that off; how do you know I didn't want to use the credits?") Cause. At 90% or 98% of a window, smart routing's tier put the account behind every account that still had room, whether or not it had ChatGPT credits. Codex's own sign-in (NextLogin / SwitchWhenSpent) moved at the spent share in the same way. The account's credits were spent only once every other account was used up, and the switch was a log line. The Use credits switches that existed (on, and "Only after other accounts" from |
||
|
|
8826a15ea4 |
gui: a Quit while agents go through magpie asks first, naming them (Aisiverto on X)
Aisiverto on X (Windows, v0.1.2519) wired Codex to magpie and quit magpie. Codex then retried "unexpected status 502 Bad Gateway ... url: http://127.0.0.1:3425/backend-api/codex/responses" five times and gave up, and it took a long search to find magpie's openai_base_url in config.toml. A Quit the user chooses (the tray's Quit, the panel's and window's Quit, Command-Q on the Mac) now asks first when this process serves the gateway and agents are wired to it. The window comes up on a sheet (quitask.js, lazy-loaded) that names each agent cut off, says closing the window keeps magpie running (menu bar on a Mac, system tray elsewhere), and offers Quit (focused), Disconnect and quit, and Cancel. Disconnect and quit puts each agent back as its row's Disconnect does, then quits; a disconnect that fails keeps magpie open, named in the status line. A second Quit within a minute of the question quits, so a window that can't show it traps nobody. With nothing wired, or another magpie serving the gateway, Quit quits at once. Not asked: a restart to update, Uninstall, a browser's page (magpie web), logging out or shutting down, and the Dock's Quit (AppKit terminate:). Found while checking the report: - Closing the window on Windows hides it; magpie stays in the tray and the gateway keeps serving (tried for real, below). Not a bug. - Autostart is off by default on Windows. - The proxy / NO_PROXY in the report isn't magpie's to fix: the 502 is magpie's port with nothing behind it. Strings in en, zh, zh-TW, ja and de (existing terms: Agent, 退出). No native dialog, no <select>. TestCoreScriptBudget met without a raise: app.js gains two lines, the sheet is outside the core, and driftFix's comment block is cut to six lines (453 bytes back; main's core had grown to 258 bytes over with these lines in). Run, at this head (on origin/main |
||
|
|
94f6f60925 |
tray: every window a card reports can be picked alone for the menu bar, Cursor's Grok Bot too (CrazyJal on X)
CrazyJal on X (tweet 2116833523604886006): Settings > Usage > Menu bar
windows, Cursor's pill had no choice for the Grok Bot window alone.
Why: the picker offered only the windows the menu bar shows unpicked
(trayWindows), which leaves out every window set aside. The Cursor
plugin reports Grok Bot aside (so it doesn't stop Cursor's models), so
it was never offered. And kinds were only a span ("7d"): Grok Bot and a
weekly plan's Weekly are both 7 days, as are Antigravity's two pools, so
two windows shared one kind, the GUI showed one of them, and picking it
picked both. The plugin reports the window fine; nothing changes there.
Fix (the class, every provider): trayChoices lists every window of a
card that the menu bar can say as a percent (trayCounted): the usual
ones first, then the rest (money aside, one model's window, Grok Bot),
marked TrayExtra and shown only when picked. Every choice has a kind of
its own: a usual window keeps its span's kind where it is the only one
of that span (so existing picks like claude:["5h"] keep working);
another of that span, and every extra, gets its model or name after it
("7d:grok bot", "7d:gemini · 7 days"). Unpicked, every card shows what
it showed before. The Settings pill offers the extras, and drops a pick
only when it is empty or exactly the usual windows.
Run (mote, at this tree, committed then as 0750aa783, on origin/main
|
||
|
|
c0477aa728 |
providers, settings: a Codex account's resets are used where they are shown, its Providers row and Settings' auto-use rows (roamlog, husky_bobo on X)
roamlog on X (使用重置卡的功能哪去了): the Providers page's Codex editor
showed "↺ 2 张重置卡" on each ChatGPT account, windows at 0% left, and no
way to use one. Nothing was removed: the use (askReset, resetask.js) was
only ever on the Usage card ("Use a reset") and the menu bar panel ("Use
one…"); the Providers row's chip (#813) was words. husky_bobo (X, Windows
10, v0.1.2597, 为什么我没有这个手动用卡按钮呢?) looked for it in Settings ›
Usage, under "Codex: auto-use resets" with both times on, where it never
was either.
- Providers editor: a Codex account's "↺ N resets" is a button (a span
with role=button, the window meters' aq-set look and hover, no colour of
its own; Enter and Space too) opening the same confirmation, its
tooltip saying which reset a use spends. A GLM team's resets, counted
by window and used on the vendor's page, stay words.
- The confirmation asked from the editor goes back to it on Cancel or
once spent (ed.back, as Sign out's does): the editor is the modal, and
closing would have closed it too.
- Settings › Usage › Codex: auto-use resets: each account holding resets
says "↺ N resets · until … · auto-used before it expires" under its
name with "Use a reset" beside it, read as the editor reads them
(loginUsageOf, cached a minute), drawn again once spent. In
autoresetown.js, loaded with those rows.
- No new strings. The core's scripts are 1,533,441 bytes, 305 under
their size before, budget 1,533,802 not raised: a span-as-button helper
(spanBtn) shared with windowCapMeter, and the reset helpers' comments
cut down.
Run, at base
|
||
|
|
15b035eef0 |
claude: the interactive mode takes an image known by its URL
The interactive mode is pasted files, so an image a client names by its
URL alone made the run fall to the refusal list ("image"), which with
the TUI on means a 502. Now serveSubscription downloads each such image
first (fetchURLImages): from public addresses only (publicClient, the
same fetch the other providers use), checked to be an image by its
bytes, and kept by URL (32 of them) so a conversation that hands the
same URLs over each turn downloads each once. One that can't be had
fails the request with a 400 naming the URL and why; nothing of a
non-image's content is echoed. claudePrint's "image" entry stays as a
backstop, unreachable with the mode on.
The provider editor's tooltip for claude -p no longer lists the image
among what the interactive mode can't take (en, zh, zh-TW, ja, de), and
the bridge's subsystem page says how the image is fetched.
Run (mote, at this tree on
|
||
|
|
9d08993c8b |
routing: Cheapest first prices Ollama Cloud's DeepSeek models at double from 12:00 to 18:00 UTC on weekdays (hayden4608)
hayden4608 on Discord asked that time-of-day routing use the gap between peak and off-peak prices, citing https://ollama.com/pricing. That page (read live on 11-01) gives Off-Peak rows for two models only, deepseek-v4.1-flash ($0.30/$1.20 peak, $0.15/$0.60 off-peak) and deepseek-v4-pro ($1.32/$3.96 peak, $0.66/$1.98), and says off-peak is "outside 12:00 and 18:00 UTC on weekdays and all day on weekends". models.dev's ollama-cloud catalog lists the off-peak prices, so magpie priced Ollama Cloud's peak hours at half. - catalog: a new Peak kind, PeakOllama. Its hours are 12:00 to 18:00 UTC, Monday to Friday, with no holidays. PeakFactor (2) matches the page for both models, cache reads included. - provider: a peakBill for ollama.com (preset/catalog ollama-cloud) that names the two models. Dated tags (deepseek-v4-pro:1017) count as their model; the bare name before ':' is compared without allocating. Every other model there (glm-5.3, gpt-oss...) and every other vendor stays flat. A local Ollama, a relay that names itself ollama-cloud, and an ollama.com.evil host are not matched. - GUI: a model's price tooltip names Ollama's hours for peak "ollama". The Cheapest first and rate-window texts no longer say that only DeepSeek's hours count, in en, zh, zh-TW, ja and de. - docs/reference.md, site docs (en, zh, ja) and the gateway-routing and providers-accounts subsystem pages say the same. Run (on mote through mote-run, at this tree rebased on |
||
|
|
7d1f2ecba3 |
claudecode: magpie keeps the Claude Code it downloaded at the newest release
alextjy on Discord runs magpie in Docker with Claude Code from `magpie claude-code install`, and asked whether a magpie update touches it and how it updates. The download lives in <cache>/claude-code (/config/cache, on the volume), so a new image keeps it. But nothing ever updated it: every run magpie starts sets DISABLE_AUTOUPDATER, so it stayed at the version first installed until the user ran install again. claudecode.KeepCurrent now runs while magpie serves (a WhileServing loop): a minute after start and every six hours it asks downloads.claude.ai for the latest release and downloads a newer one, checked against the manifest's SHA-256 and size as install does. The version it replaced is removed on the next look rather than at once, since a run being started may hold its path (Install, the CLI's, still removes it at once; a folder with a .part download in it is left alone). It does nothing when magpie downloaded none, when the machine has its own `claude` (that one is run and updates itself), or when DISABLE_AUTOUPDATER is set for magpie, Claude Code's own way to hold a version. A failed look keeps the download and is logged. It never downgrades. The status line of `magpie claude-code`, the Docker docs (en, zh, ja) and the bridge's subsystem page say so. Run: - wsl-run (Ubuntu 24.04, Go 1.26.8): go vet, then go test -race -v ./internal/claudecode/ -run 'Keep|Install|Find': all pass. - Broken by hand on WSL, each red: no newer() check (UpdatesMagpiesDownload, LeavesWhatIsntMagpiesToUpdate), no own() check (the_machine's_own), pruning at install (UpdatesMagpiesDownload), no prune on the next look (UpdatesMagpiesDownload). - Real use on WSL, sandbox HOME and XDG_CACHE_HOME: a throwaway program with a fake 2.1.1 download ran KeepCurrent against the real downloads.claude.ai. After 1m34s it logged "updated from 2.1.1 to 2.1.316", the kept binary's --version said "2.1.316 (Claude Code)", 2.1.1 was still there for the next look, and the loop ended with its context. - mote, at this tree: GOOS=windows and GOOS=linux go vet -tags nogui of both packages, go vet ./internal/claudecode/, go build ., then go test -tags nogui ./internal/claudecode/ ./internal/cli/ -timeout 45m: VET-OK; claudecode ok 0.680s, cli ok 56.673s. - gofmt -l clean. Not tried: the Docker image itself (no docker on the test boxes), and a Windows run whose replaced binary is still in use (prune leaves what it can't remove for the next look). Full suite not run: the change is the claudecode package, one WhileServing line and one CLI status line. A WSL run of ./internal/cli/ at the default 10m timeout timed out while the box ran other sessions' full suites; the 45m run above replaces it. |
||
|
|
ef3e74a077 |
gateway: the Claude bridge offers a magpie Library tool under its own name, not mcp__magpie__ twice
packinggoods (Discord, 11-01): through the Claude bridge the model saw mcp__magpie__mcp__magpie__magpie-browser__browser_click for each tool the client sent up front, while deferred tools named in the client's text kept one prefix. The client (Claude Code with magpie's Library MCP) already names those tools mcp__magpie__<server>__<tool>, and the bridge's MCP helper is also called "magpie", so bridgeToolName put the prefix on again. bridgeToolName, which the tool list, tool_choice, history and the call's mapping back (bridgeNames/declaredName) all go through, now offers such a tool under the rest of its name, so the run's model sees the client's own name and a call comes back as declared. Siblings: only the Claude bridge wraps a client's tools in an MCP server (grep of mcpServers / mcp__ in internal); Codex and direct Claude Code pass names as written. Other servers' tools (mcp__linear__x) still show as mcp__magpie__mcp__linear__x through the bridge; that is nesting, not a doubled prefix, and is left as it was. A client offering both "mcp__magpie__x" and a bare "x" would have them offered alike (not handled). A resumed bridge session's older turns name the tool with the doubled prefix. Run (on mote, via mote-run, at this tree before a comment-only reword): - TestClaudeBridgeKeepsMagpieMCPNames with the old bridgeToolName put back: FAIL, "mcp__magpie__magpie-browser__browser_click is shown to the run's model as mcp__magpie__mcp__magpie__magpie-browser__browser_click", and the same for history and tool choice. Passes with the fix. - go vet ./internal/gateway, GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./...: ok. - go test -tags nogui -timeout 45m ./internal/gateway: ok (895s). - gofmt -l internal/gateway: nothing. Not run: the full ./... suite, Windows/Linux test runs, and a real Claude Code bridge session with the reporter's Library servers. |
||
|
|
9f17ad4c12 |
claude: the interactive mode takes safeguards and a client's cache marks
With the interactive mode on, nothing runs as -p any more (
|
||
|
|
ee7b8b0723 |
commandcode: a key's Credits window says GOAT/Go/Pro's month in credits, not dollars
jiezhengj on Discord (#feedback): Command Code GOAT says "$100 on
DeepSeek V4.1 Flash", but magpie's bar counts against $70. Command Code
counts Go, GOAT and Pro in usage-value credits
(docs/resources/usage-limits: "full-allowance models like GLM-5.2 get
$1 of usage per credit, and lower-allowance models draw proportionally
more credits per dollar"); GOAT's month is 70 of them, $100 of DeepSeek
V4.1 Flash or $70 of GLM-5.2 (pricing page, read 2026-11-01). The 70 is
right: command-code 1.88.2's getPlanInfo still has individual-goat 70,
and billing/credits' monthlyCredits counts down in the same units. The
signed-in subscription's card, served by the plugin, says "credits"
since 0.1.20 (plugins #556; mover min is 0.1.21). magpie's own card for
a Command Code key (cmdQuotaOf, via cmdKeyWindows) still said
"$28.80 / $70.00" and added bought dollars into the pool.
Now, as the plugin: on Go, GOAT and Pro the window is "28.80 / 70.00
credits", used of the month's credits alone, with bought and free
credits said beside it ("+ $5.00 extra"); Max, Ultra and Teams Pro keep
the CLI's dollar pool; Provider, pay as you go, has no month.
Run (mote): go test ./internal/provider -count=1 ok at this commit on
origin/main d1a94f579; at the same change on
|
||
|
|
d1a94f5792 |
provider: a Codex pick the ChatGPT list dropped is not offered (#4772)
Cause: the owner's codex provider keeps picks (providers.json "models")
made while ChatGPT listed gpt-5.5. ChatGPT has since stopped listing it:
the backend's /codex/models for the Pro account (client_version 0.165.0,
asked 11-01) and the saved Plus account's list both have gpt-6.1-sol,
gpt-6-astra, gpt-6.1-terra, gpt-6-sol, gpt-6-luna, gpt-5.6-sol/terra/luna
and no gpt-5.5, and Codex CLI 0.165.0's models_cache.json has none
either. ExposedOf offers a pick the vendor's list lacks as typed in by
hand, and an account's refetch never drops gone picks (dropGonePicks is
for key providers), so codex/gpt-5.5 stayed first in /v1/models. The
backend refuses any model its list leaves out: a real request for
gpt-5.5 on the Pro account answered 400 model_not_found "The 'gpt-5.5'
model is not supported when using Codex with a ChatGPT account", while
gpt-5.6-luna answered 200. Not plan-specific: Plus and Pro alike.
Fix: a ChatGPT account (listedOnly) is treated as Copilot's already is:
with its list fetched, a pick the list doesn't have is left out of what
agents are offered. The pick itself stays saved and comes back when the
list has it again. The list is the pool's (codexPoolModels), so a model
only a saved account has is still offered and routed to it
(Account.Lists).
Run (mote, at this tree on origin/main
|
||
|
|
cbfbcb383b |
usage: a lead's answers are looked up in the blocks that name its conversation (#4370)
loggedAnswers, which leadFirst falls back to when affinity has lost a Codex subagent's lead, read thirty days of the log into a Record a row and kept the rows of one conversation. usage.VisitSessions reads only those rows: a block whose Session and NativeSession strings don't name the conversation is skipped, a row of another session is passed over by its shape's string ids without becoming a Record, and a matched row's strings are cloned out of the lent decode buffer. Each packed block's sessions are kept once it is decoded (blockSessions, by weak pointer, so no block the log let go is held), so a lookup decodes only the blocks the conversation is in and the open tail. A page's copy with Codex identities (which rewrite Session as a row is read) is read whole and filtered on its records. Run on mote (macOS 27.2), at load ~70: - BenchmarkLeadLookup (40 blocks of 3000 rows, one conversation of 300): visit+filter 39-56ms and 2.9MB an op; VisitSessions 0.38-0.52ms and 12KB. - A copy of the owner's real usage.jsonl (8,853 rows, 1,270 sessions, 18 blocks): every session looked up both ways gives the same records; 6.9ms a lookup before, 3.4ms for the first and 0.39ms after, 14us for a conversation that isn't there. - TestVisitSessionsIsVisitOfThoseSessions, red with the shape filter's session ids taken out; TestVisitSessionsRecordsKeepTheirStrings, red with the clone taken out; TestVisitSessionsSkipsBlocksOfOtherSessions, red with the known-sessions skip taken out. - GOOS=windows go vet; GOOS=linux -tags nogui go vet: ok. gofmt -l: clean. - go test -race of the new tests and the gateway tests of a lead's answers, in internal/usage and internal/gateway: ok (4.4s, 31.3s). - go test ./internal/usage ./internal/gateway (whole packages) was still running on mote at load ~190 when this was pushed; its result goes on #4370. Not tried: a real Codex subagent whose lead lost affinity; the lookup's callers and filters are as they were, and the gateway's loggedAnswers tests cover them. |
||
|
|
9621168c46 |
provider: a plugin's thinking model with no variants borrows its maker's reasoning levels
laomao04_65777 on Discord: in Codex, with SenseTime Raccoon (商汤小浣熊) picked, the reasoning effort couldn't be switched. Cause: Raccoon's plugin lists its models as thinking with no variants. Its sn-* ids (sn-glm-5-3, sn-kimi-k3, sn-glm-5-3-flash, sn-deepseek-v4-1-flash, sn-deepseek-v4-pro) are ones models.dev knows under the maker's spelling (catalog.Knows). So levelsUnknown counted them as known and offered nothing, and pluginCatalog borrowed the maker's levels only for moved built-ins and Cline. Codex's catalog got supported_reasoning_levels [] and hid the picker. A custom provider's same id already borrows them (effortsOf), and an id models.dev doesn't know already got low/medium/high ( |