c9e8422fa8c2b8eb96dfb7ff0c91c2caef1306bd
8544
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c9e8422fa8 |
agent: a field label with no TUI Chinese fails internal/agent's tests
A new agent field's label with no entry in internal/tui's zh map left TestEveryWordHasZh red on main twice ( |
||
|
|
6fbc24a05c |
tui: "subagent pool" has its Chinese
|
||
|
|
3b4983710a |
gateway: a usage cap holds with sessions in parallel (yalifesign on X)
yalifesign runs 4 or 5 sessions on one ChatGPT Plus account with a 90% cap and capStop/capCareful off, and the five-hour window went to 100% and Codex's own 429. Caps from 99 down to 90 all overshot. Cause: a Codex reply reports usage (codex.rate_limits, x-codex-*) as its turn begins, without that turn's own spend. The near-cap gate ( |
||
|
|
618bfc1a95 |
kimi: pick Kimi Code's subagent pool and its effort (XiaoLing_Arisa on X)
XiaoLing_Arisa asked on X for Kimi Code's subagent pool (子代理池) on the
Agents page: which models its subagents may run on, and how hard they
think. Kimi Code 2.x keeps them in config.toml's [secondary_model]:
default_model (the legacy `model` stands for it), the pool
[secondary_model.models] ("alias" = "when to use it") and default_effort.
- internal/agent/kimi_secondary.go: three fields, subagent_model,
subagent_pool and subagent_effort, written the way Kimi Code takes
them. Its validator refuses a pool that lacks the default, a name with
no [models."…"] table, and an effort a pool model can't take, so a
default goes into the pool, a pool without the default gets its first,
and only the levels every pool model takes are offered
(kimiPoolLevels). A magpie model goes in only while [providers.magpie]
is there. Keys are set in place; hints, other keys and comments stay.
Before Sync or Unwire drops a magpie model table, its name leaves the
section (kimiPruneSecondary). The default goes back to the user's own
(stashed at kimi:<path>:secondary) or to the pool's first, and an empty
section goes. The user's own pool of their own models is never touched.
kimi-cli (legacy) has no such section. A stopped WSL distro shows none
of the three, since each reads the config (#3896).
- GUI: the three fields form one Subagents line in the opened row: the
model, then the effort (disabled until a model is set), then a
multi-pick pool menu that stays open between ticks. The model's tick
can't be removed. The picker's note says an unset model runs each
subagent on the lead's model. The line is drawn by kimisub.js, which
Details imports before its first slide so the sheet measures it.
- Size budgets +457 (reason in core_budget_test.go). Translations in
zh, zh-TW, ja and de. kimisub.js is added to old-webkit's list of
scripts loaded on demand. The Kimi bullet in agent-wiring.md is
updated.
Run at this tree on mica (mica-run):
- go test -tags nogui -count=1 ./internal/agent ./internal/gui: ok,
including TestKimiSubagentPool*, TestWSLColdPlaceOpensNothing and
TestCoreScriptBudget. An earlier run of these packages found the cold
read and the budget overrun; both are fixed here.
- go vet ./... on darwin, GOOS=linux go vet -tags nogui ./... and
GOOS=windows go vet ./...: ok. go build: ok. gofmt -l .: empty.
- GUI: kimi-subagent-pool passes 20 of 20 (Chromium and WebKit, 5
languages, 1100 and 560px). kimi-thinking passes. agent-details-ready,
old-webkit and i18n-keys have 35 reds, and origin/main
|
||
|
|
ff88ec264a |
sync: subscriptions whose sign-ins stay on this computer (Ethereal499 on X)
Sync's sign-ins can now leave chosen subscriptions out on one computer
(`signInsExcept`, provider ids; Ethereal499 on X keeps Claude's accounts
off other computers). On that computer:
- its accounts of those subscriptions never go up;
- the server's accounts of them are never merged in, so a removal or a
new account on another computer changes nothing here;
- the server keeps them as they are for the computers that do sync them
(syncOnce splits the remote set with SignIns.Except and puts the held
part back with With after the merge, so the hash doesn't change);
- the preview and Restore count and restore none of them.
An id names both the built-in and its -plugin id. An old config has no
field and syncs everything as before. The setup text doesn't carry the
choice, since it belongs to one computer.
GUI: Settings > Sync > edit > Advanced, under "Sign-ins", a "Not synced"
row with a multi-select openProtoMenu of the subscriptions with an
account. The row shows only while the sign-ins tick is on. The strings
already existed in en, zh, zh-TW, ja and de. CLI: `sign-ins-except=`
on the WebDAV, S3 and GitHub setups ("none" clears it), and status
shows the excluded ids. docs/subsystems/sync-backup.md says it.
Tests:
- TestSignInsExcept (provider) and TestSyncSignInsExcept (davsync, two
computers on a fake DAV).
- sync-signins-except.test.cjs: both engines, 1100 and 420px, all 5
languages.
Broken by hand, each red and then restored:
- the Except in collect;
- the Except on the remote set before the merge;
- the Except in the preview;
- the With after the merge;
- the GUI form's post of signInsExcept.
Run:
- At
|
||
|
|
873b1f7d5e |
classify: 15 seconds unset for a classifier that reasons, and its cut call is magpie's wait (ESern29751 on X)
ESern29751 on X (v0.1.4341): in a routing group with intent recognition, magpie often 499-cancels the intent classifier's request, with MiniMax, GPT-6 Luna and Grok 4.6 as the classifier. Cause: those models reason before they answer. The classifier asks for reasoning_effort none, but MiniMax thinks anyway and Grok 4.6 and Luna go no lower than low. Through the live gateway with the classify prompt over a real routing prompt (~5k tokens of context): grok-4.6 took 4.7-8.1s (288-462 reasoning tokens), minimax-m2.5 3.7-10.3s (439-1012 output tokens), gpt-6-luna 1.2-7.2s; cold calls reached 12-29s. The unset classifier timeout was 8 seconds, so most turns were cut off, fell back to the group's order and lost their intent routing. Each cut call was then logged 499 "the agent canceled the request", which usage counts as no failure, though no agent had canceled anything: askChat's own context.WithTimeout had no cause, the mislabel #2318 fixed for an image's description but never for the classifier. Fix: - settings.ClassifyTimeoutDefault 8 -> 15 (an existing Settings segment). A user who saved 8 keeps 8; only the unset value moves. The GUI's fallback segment follows (app.js), and the docs (en/zh/ja intent and start, gateway-routing.md) say 15. - askChat's wait is context.WithTimeoutCause(..., sideTimedOut{"decision model", wait}): the usage row says "magpie stopped waiting: its decision model had no answer in Ns", a failure. - Siblings checked: the advisor and Codex titles use the client's context, compaction and vision already carry sideTimedOut; askJev (decision providers) logs no 499 row of its own. - Tests that assumed the 8-second unset wait now use 15 (classify, decide, decide_group, nested_classify_wait, settings). - app.js grows by the one byte of the fallback's second digit: both core budgets +1 with the reason (TestCoreScriptBudget was red at exactly 1 over without it). A shorter `|| 15` would show a hand-edited negative value as its own segment, so it wasn't taken. - site: llms-full.txt and the search indexes regenerated for the docs pages (node llms-full.mjs, node search-index.mjs). Test: TestReasoningClassifierAnswersInTheWaitUnset - a classifier answering in 10 units routes the turn with the timeout unset, and one slower than 60 units gives no answer with one 499 usage row that says magpie stopped waiting for its decision model and counts as a failure. Broken by hand (mica-run): with askChat back on a plain WithTimeout the test is red ("the classifier's cut call: 499 "the agent canceled the request""); with the default back at 8 it is red ("gave no answer in 400ms"). Run at 0479372b8, this commit's tree (mica, through ~/suite.lock; mote was over its cores): - gofmt -l: clean. go vet (darwin), GOOS=linux go vet -tags nogui, GOOS=windows go vet: rc 0 (darwin vet rc 0 at the first try on mote). - go test -tags nogui -count=1 -timeout 45m ./...: rc 0, 103 ok. (The first run, on mote before the budget raise and the rebase onto |
||
|
|
adfa196db0 |
lessons: a docs page change regenerates the site's indexes (seen a fifth time)
|
||
|
|
f7e0c27636 |
site: search indexes and llms-full.txt carry 00b2c11a6's Open Code Review row
|
||
|
|
255ccdd7ca |
omp: a Protocol row picks the API magpie's models are asked on (imty42 on X)
omp's models.yml had magpie's provider on openai-completions with no way
to change it: ompKept treated the provider's api as magpie's, so an api
typed there was written back on the next sync, and omp's row had no
protocol as Pi's has. An auto/* group whose members don't all take
Responses (provider.GroupAPI) could only be asked on Chat.
- omp's row gets the Protocol row Pi has (protocolField, now shared with
Pi's piProtocolField): each model's own (unpicked, as before),
openai-completions, openai-responses or anthropic-messages. omp takes
each for the provider and a model (KnownApi in pi-catalog types.ts and
the api enum of models-config-schema-bundle.ts, omp 18.9.1). The pick
is kept per place and agent folder, so each profile has its own.
`magpie omp protocol openai-responses` sets it from the CLI.
- ompOn puts the provider and every chat model on the pick: Chat and
Responses with no api of their own and thinking mode effort; Messages
at the gateway's root with budget, or anthropic-adaptive for a Claude
that thinks only adaptively. Image models stay on openai-images.
- The provider's api typed into models.yml by hand now stays and shows
as picked (ompAPIKept, the same api:<path>:wanted record as Pi's); a
pick made after it replaces it.
Unchanged: unpicked, Responses-native models and groups whose members
all take Responses already went on openai-responses per model.
Run at this head (3d0cadfce, the same tree; only this message differs),
on mote:
- gofmt -l internal/agent: nothing. go vet ./..., GOOS=linux go vet
-tags nogui ./..., GOOS=windows go vet ./...: rc 0. go build, linux
nogui and windows builds: rc 0.
- go test -tags nogui -count=1 -timeout 45m ./... in a sandbox HOME
under suite.lock: rc 0, 103 packages ok, no FAIL.
- Broken by hand: without ompAPIKept, TestOmpProtocolPicked is red
("an api typed by hand: file openai-completions, field \"\"").
- Real omp 18.9.1 in a sandbox HOME against a stand-in server: with the
provider on openai-responses a group model posted to /v1/responses;
a model on anthropic-messages at the root posted to /v1/messages.
Not tried: the GUI suite (no GUI file changed; the Protocol row is the
generic one Pi's uses, shown for any agent with a protocol field), and
omp against the real gateway with a real auto group.
Not changed: a model's api typed by hand in omp's models.yml is still
magpie's (the model list is magpie's whole); site docs for omp.
|
||
|
|
ad585ccd6c |
claude: settings.json holding a setup-token is readable by its owner alone
|
||
|
|
90d7ea9331 |
agent: a new agent named nowhere in the Library fails internal/agent's tests
TestEveryAgentInLibrary (internal/library) went red on main for a new agent four times: |
||
|
|
2f25728ddf |
claude: Use switches Claude Code itself to a setup-token account (liukaybee on X)
liukaybee adds Claude accounts with `claude setup-token` and wants magpie
to switch only which one Claude Code itself uses, without connecting it
to magpie. Such an account has no sign-in to put in Claude Code's
keychain or .credentials.json, so Use was refused ("magpie only").
Claude Code takes CLAUDE_CODE_OAUTH_TOKEN from the env of its user
settings.json ahead of its stored sign-in. Use on a setup-token account
now writes the token there (claude_token_env.go). Claude Code's stored
sign-in stays as it is and stays Active; the token account is listed
with Uses. A switch to a signed-in account, Use on the signed-in row,
or removing the token's account takes the token out again.
- A value the user set is theirs: magpie keeps only the sha256 of what
it wrote (claude-token-env.json), never writes over another value and
never removes one whose hash differs, even if it once wrote it.
- An unreadable settings.json is "unknown": nothing is written, the
record is kept, and the switch fails without moving the sign-in.
- NextLogin (Switch accounts only) leaves Claude Code on a token in use,
as its allowance can't be read.
- magpie's own runs pass --setting-sources "" and are unaffected.
- GUI: the token row's Use and In use; the signed-in row says Signed in
with a Use back. Every new string in zh, zh-TW, ja and de.
- app.js +864 bytes over its budget, raised with the reason in
core_budget_test.go: one swUse helper shared by both buttons, packed;
renderAccounts draws every account row, so no page to move it to.
Real use: real Claude Code 2.1.316 in a sandbox HOME/CLAUDE_CONFIG_DIR
(never the live ~/.claude) with a deliberately broken .credentials.json
access token. The settings.json magpie's switch writes (dumped from a
test) gave a PONG with a real account's token; the file after switching
back gave "401 OAuth access token is invalid", i.e. Claude Code was on
its stored sign-in again. Sandbox homes holding real tokens deleted.
Run (mote/mica, at f00e2059d rebased on
|
||
|
|
effdd1beb9 |
library: Open Code Review has no Library place, with its reason (00b2c11a6)
|
||
|
|
00b2c11a6b |
agent: Open Code Review (ocr) is an agent magpie sets up (@AlanWang1027713 on X)
Open Code Review (github.com/alibaba/open-code-review, npm @alibaba-group/open-code-review) is a Go CLI, `ocr`, that reviews a diff with a model. Its Claude Code, Codex, Cursor, Kimi Code and OpenCode plugins and its skills all run that command, which reads ~/.opencodereview/config.json on every run. Picking one of magpie's models on its row writes a custom provider "magpie" there (protocol openai, the gateway's /v1, a key naming Open Code Review, the model) and points provider at it. The user's own provider and model are stashed and come back on Disconnect, which also drops a custom_providers left empty. A model of the user's own can be picked too (written the way `ocr config model` writes it). Check reports a hand-edited url or key, or a removed entry. The `ocr` command counts only under a folder named for Open Code Review, since other programs share the name. WSL distros get the row too (cold distros not opened). Its User-Agent, open-code-review/<version>, already counts as this agent. CLI update via npm. Docs, READMEs, site and icon (OCR's own logo, Apache-2.0). Run (mica, at 593517bf0; origin/main has one unrelated usage commit since): - go test ./internal/agent -run 'TestOCR|WSL|Wsl|TestOwnProviderNamedAsMagpies|TestHandWiredMagpieProviderSiblings|TestAgentOf|TestEveryAgentNamedByItsKey|TestMarkedLinesEveryAgent': ok - gofmt -l: clean; GOOS=linux go vet -tags nogui ./... and GOOS=windows go vet ./...: ok - Broken by hand: url dropped from Check -> TestOCRWiring red; stash turned off -> red at the Disconnect restore. TestWSLColdPlaceOpensNothing went red before the row's options were given an asleep path. - Real e2e in a sandbox HOME: npm-installed ocr v1.13.10 (7e5ce06c) darwin/arm64, magpie built from this tree, a fake OpenAI upstream that calls tools. `magpie agents` lists the row with the user's deepseek/deepseek-chat; `magpie open-code-review magpie/fake/m1` wrote the entry and kept the user's keys and settings; `ocr llm test`: connection ok, tool-call round trip verified; `ocr review` on a repo with a nil dereference: 2 findings "[bug · high]" through magpie (8 /v1/chat/completions calls, UA open-code-review/v1.13.10, model m1, its six review tools); `magpie usage` counts them under Open Code Review; `magpie open-code-review default` put deepseek/deepseek-chat back and removed custom_providers. - Full suite: not run before this push (ship at once; mote was running another session's suite). It runs on mica right after, at this head. Not tried: a real vendor model behind magpie; WSL and Windows/Linux machines for real; the Claude Code / OpenCode plugin path itself (it runs the same `ocr`); an ocr installed by the curl script outside a folder named for it is found by ~/.opencodereview only. |
||
|
|
2071195ff4 |
usage: a plugin window named by one of its models counts that model (Google AI Studio)
WangYeruo on X: with the Google AI Studio plugin (@dorokuma/magpie-gemini-web's
ai-studio), one model's 429 for its quota held the account from every model
until the reset, while AI Studio limits each model's day on its own and argon
still answered after hydrogen was out.
The 429 itself already rested only the model: AIStudio2API's AllCoolingError
("模型 gemini-4-hydrogen 的可用账户均在冷却…;每日限额: … model:
gemini-4-hydrogen …") names it (TestAIStudioModelDayRestsTheModel, a guard;
it passes on the old code too). What held the account was the usage read
after it: the plugin's accountUsage (lib/studio.mjs, 0.15.3) tells a cooldown
as a window named after the model's id, used 100 until it ends, with no
model or models said. magpie read it as the whole account's window, so
Allowance.Full held every model and Pooled said the account was out.
namedModelWindows (pluginLoginQuota) now scopes a plugin window that says no
models, no family and no pool, and isn't text or aside, to the model whose id
its name is, when the provider serves that id. "所有模型" (a cooldown with no
model_id) and any other name stay the whole account's, as before.
Old data: such a reading has a matches, so keepLast doesn't write it down,
as with models/notModels. A reading kept on disk before this, still within
its cooldown, can hold the account from every model after a restart until
the first read (seconds); one past its reset holds nothing.
The plugin can't be fixed upstream: its repo has issues off, and it needs no
change now.
Run (mica-run, at this commit on origin/main
|
||
|
|
593517bf00 |
codex: T3 Code's threads on magpie stay on magpie (xxxxpouqqs on X)
xxxxpouqqs on X: "t3code 每次重新会话都出现类似于 The 'codex-2/gpt-6.1-sol'
model is not supported when using Codex with a ChatGPT account".
Cause: T3 Code's magpie · Codex instance runs Codex in ~/.codex on
magpie with `-c model_provider="magpie"` alone, so config.toml names no
magpie. At the next Sync, bringBack took every thread on magpie for a
leftover and moved it to the provider config.toml names (openai), in
state_5.sqlite and in the rollout. Codex resumes a thread on the
provider it was started on, so reopening a T3 thread sent magpie's
model id to ChatGPT. codexRetagOpenThreads (the Codex app's app-server
restart) moved locked or loaded ones the same way.
Fix:
- t3CodexRunsIn(home, dir): T3's magpie-codex instance runs Codex in
this home (no homePath, or one naming it; $T3CODE_HOME honoured; an
unreadable settings file counts as yes).
- bringBack then moves only threads another client started; a thread
whose originator is T3's stays on magpie (sessions.CodexThreadsBy
reads originator and model; a failed read moves nothing).
- codexRetagOpenThreads keeps T3's threads the same way
(RetagLoadedCodexThreadsBut).
Old threads: a T3-started thread an earlier magpie moved to the
current provider with a magpie model id (one with "/") is moved back to
magpie at the next Sync, for every user; a T3 thread started on OpenAI
with OpenAI's own model stays. Nothing to do but update.
Run (worktree at
|
||
|
|
acc358f071 |
gui tests: codex-async-compact's zh and zh-TW notes say Codex CLI as translated (#6658)
|
||
|
|
ce16633367 |
tune: a Codex card locked by config.toml's own compact limit hands it to magpie on a click (sufeng1894 on X)
sufeng1894 asked why Codex's compaction threshold can no longer be set by hand. The card said config.toml's model_auto_compact_token_limit wins, and the background row said features.async_compaction's model_async_compact_threshold_percent wins: both locked, and nothing on the card did anything about it. Cause. Only the old tune card ( |
||
|
|
ca87ae9c59 |
update: an x64 magpie emulated on Windows on Arm updates to the arm64 build (EV_John_Liu on X)
EV_John_Liu on X: "能不能出个windows on arm的版本啊…看到magpie是转译的".
magpie ships magpie-windows-arm64.exe and magpie-cli-windows-arm64.exe,
and the site's Windows button offers it on Arm, but an x64 install on an
Arm64 computer fetched the x64 build on every update and stayed emulated.
update's arch() swapped only an Intel Mac under Rosetta.
- internal/winarm: Emulated() asks IsWow64Process2 (x/sys/windows) once;
an amd64 build whose nativeMachine is IMAGE_FILE_MACHINE_ARM64 runs
emulated. A failed call (no IsWow64Process2 before Windows 10 1709)
means not emulated. false off Windows.
- update: arch() gives arm64 for windows/amd64 when emulated, so
BinaryAsset picks magpie-windows-arm64.exe (GUI) and
magpie-cli-windows-arm64.exe (CLI). The swap is the x64 one: canStart
starts the downloaded exe (it runs natively there), the running exe is
moved aside, the arm64 one renamed in under the same name, and
magpie.com is rewritten from the new app's own launcher.
- pii (sibling found on the way): pf-serve has no windows-arm64 build.
After the switch an arm64 magpie looked for a windows-arm64 pf-serve,
found none, and left Privacy Filter / AstrLink Guard "not downloaded"
while on. target() now maps windows-arm64 to the x64 pf-serve Windows 11
runs emulated; candidates() runs it on the CPU (the x64
pf-serve-vulkan has no x64 Vulkan driver there), then pf-serve-base
for an emulation without AVX2. The guard's status says emulated
(Status.Emulated), and its row reads "On, slowly under x64 emulation:
the next update installs magpie for Arm" in all five languages, like
the Rosetta line. app.js's and the core's script budgets grow by its
66 bytes.
- gui feedback: the diagnostics block's Arch line says
"amd64 (emulated on arm64)" / "amd64 (under Rosetta on arm64)".
Checked, not changed:
- site/public/index.html: the Windows main button already turns to
/download/windows-arm64 when userAgentData's architecture is "arm".
Run in Playwright Chromium and WebKit with a Windows Edge UA and
injected userAgentData: arm -> windows-arm64; x86 and no
userAgentData -> windows-amd64.
- telemetry (stats "arch") sends the build's GOARCH; left so, since what
is sent and the privacy text stay as they are. After the update it is
arm64 by itself.
- rtk: an arm64 magpie no longer upgrades a standalone x64 rtk.exe
(rtkArch == "amd64" only), filed as #6896.
- claudecode (win32-arm64) and Bun (windows-aarch64) downloads already
have arm64 builds.
Run (worktree at origin/main
|
||
|
|
2ba62f7f76 |
gateway: agy's "Individual quota reached … Resets in" rests the account until then
@Airan_FS on X (11-17): an Antigravity account served through agy-cli answered "⚠ Individual quota reached. Please upgrade your subscription to increase your limits. Resets in …" as the model's reply, and routing never asked the next account. The agy-cli plugin 0.1.87 (magpie-community/plugins afe4c086, on the dist branch) now ends such a turn with a rate_limit_error in agy's words, before or after reply text, so the gateway fails over and rests the account as for any plugin quota error. Here, quotaResetAfter also reads the notice's "Resets in 1h18m40s" (Go's duration form, which resetsInWords can't read since no word ends after its "h"), scoped to the "individual quota reached" line, so the account rests until Google's reset instead of quotaRest's 15 minutes and isn't asked again every quarter hour. gateway-routing.md says so. Tests from the literal notice (discuss.ai.google.dev report, the tweet): TestAgyCLIQuotaNoticeRestsUntilItsResetAndFallsOver (group falls over to the next member, rest "resets" ~1h18m40s, next turn skips it), TestAgyCLIQuotaNoticeMidReplyStillRests (partial text kept, still rests), TestAgyQuotaNoticeResetIsRead. Run (mica, at f33278541 = this change less the doc line): go test ./... -timeout 45m: 102 ok, no FAIL. mote: GOOS=windows go vet ./... ok, GOOS=linux go vet -tags nogui ./... ok; gofmt -l clean. Broken by hand: the old quotaResetAfter with these tests: the account rests 14m59s by "quota" and resetsAfter reads 0, so all three fail. Not tried: a real agy account with its quota used up. |
||
|
|
17da22414d |
LESSONS: what a started process's reader goes by is set before it starts
#6887 ( |
||
|
|
43d9aae09f |
claude bridge: a run's tools are set before its Claude Code starts
TestClaudeBridgeHandsOverAnUnloadedMagpieTool was red on ubuntu CI at |
||
|
|
ead91a9a50 |
gui: a browser tab's title names this magpie: MAGPIE_NAME or Settings › Network and sharing › Advanced › Name (starballl on X)
starballl on X (tweet 2122376116220633444) runs several magpie web pages
and every tab is titled "magpie", so they can't be told apart. A magpie
now has a name, and a browser tab's title is "<name> · magpie" (plain
"magpie" with none).
- settings.Name, set in Settings › Network and sharing › Advanced › Name
(instancename.js, imported when Settings is drawn, so nothing is added
to app.js's core). Advanced is closed until a name is set.
- MAGPIE_NAME (Docker, magpie web) names it while the field is empty and
is the field's placeholder. It is read, never written, so a name typed
in Settings always wins and clearing the field goes back to it.
- One line, at most 60 characters (settings.CleanName).
- This computer's own (KeepOwn): sync and a restored backup never bring
another magpie's name. A Settings save that leaves `name` out keeps it
(settingsapi.Merge).
- boot.js titles a browser tab itself for the first paint, so app.js's
core gains only the line in applyPrefs, which sets the title again from
every settings read (TestCoreScriptBudget was 74 bytes over with a
title function in app.js). Only a browser page (web) is retitled: the
app's windows and tray keep "magpie".
- Docker docs (en, zh, ja) list MAGPIE_NAME; docs/reference.md and
docs/subsystems/gui-shell.md say how it works.
Tests:
- TestInstanceName (internal/gui): the variable alone names it at boot;
a saved name wins over it, trimmed; a save without `name` keeps it;
KeepOwn keeps it; cleared goes back to the variable; no name, none at
boot. Broken by hand, each red: KeepOwn without Name ("KeepOwn took
\"other\""), Merge without the keep ("a save without the name changed
it to \"\""), boot.js with s.Name in place of InstanceName ("named by
the variable alone: boot <nil>"), boot.js not setting the title ("a
browser tab's boot.js sets no title"). The app window's boot.js sets
none.
- TestSettingsSaveKeepsWhatItDoesNotSend now sets Name: the page's other
saves leave it out, and it is kept.
- instance-name.test.cjs: title from the first paint, the field under a
closed Advanced, save and clear retitle the tab, Advanced open after a
reload, 360px, the app's window keeps "magpie"; en, zh, zh-TW, ja, de,
Chromium and WebKit, 16/16. 14 of 16 red with applyPrefs not setting
the title.
Run, at this commit on
|
||
|
|
9d5d8baf21 |
site: search indexes and llms-full.txt carry dbbb2f26b's free: line
|
||
|
|
dbbb2f26b1 |
groups: free: takes the models a catalog marks free (#5903)
A routing group's pattern may now start with free: (provider.FreePrefix): free:workbuddy/* is, of the models workbuddy/* matches, those whose catalog entry says free (Entry.Free, the vendor's or plugin's own flag as the catalog was last read). The rest after free: is a glob, a re: pattern or an id, matched as on its own, so free:re:workbuddy/hy.* works too. It is expanded where every pattern is (matchesIn, PatternHits) each time the groups are read, from the catalog magpie already keeps: no request to a vendor, and a model the next list marks free joins without a save. Only the flag decides. A $0 price (PricedFree), a rate of 0, an account named Free or "free" in an id never counts; the test holds a deepseek-v4-free id with no flag, a rate-0 model and an or/y priced at $0 out. Existing patterns read as before: openrouter/*:free still means ids ending in :free (that is why the rule is a prefix, not a :free suffix), and a provider's AutoInclude takes no free: (isIDPattern). GUI: the Routing editor's pattern box counts and lists a free: rule live as it does any pattern (patternTest in plugins/routing/client.js, from groups.models' free), refuses "free:" alone, and one hint line says the flag is the last catalog's, not a promise of no charge, in en, zh, zh-TW, ja and de. CLI help, docs/subsystems/providers-accounts.md and the site's routing-groups page (en, zh, ja) say the same. routing-levels.test.cjs: the Advanced hint line made the editor taller, so the second group's Levels row opened under the editor's sticky foot and the click landed on the foot (webkit en). The test already wheels to that row for its first group; it now does for the second too. Run: - TestGroupFreeRule, TestFreeRuleSyntax and the existing pattern tests pass. Broken by hand: with groupmatch.go and autolist.go from origin/main both are red (no members for free:workbuddy/*, IsPattern); with takes() ignoring the flag, TestGroupFreeRule is red (all six WorkBuddy models matched). - group-free-rule.test.cjs (new): chromium and webkit, en and zh, green; red with origin/main's client.js. - go vet ./... (darwin, mica), GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./...: clean. gofmt -l: nothing. - Full suite go test -tags nogui -timeout 45m ./... on Linux (WSL magpie-desktop) at 1e180c630 (this change on |
||
|
|
8a017b5837 |
agent: a connect-only plugin whose connect returns only merged objects is connected (plugins#1230)
A connect-only agent plugin is refused with "connect returned no keys to
write" when connect returns nothing. The check counted connect's result
after merged() had taken the plugin's merge keys out of it, so a plugin
whose only keys are objects it lists under `merge` was refused although
those objects' members are exactly what gets written. Lorca's plugin
(plugins#1230) hit it once it dropped its one plain key, changed_at,
which it dropped because unwire left `{"changed_at": {}}` in the user's
credentials.json. Now the merged members count as keys to write.
Run (mote):
- go test -count=1 ./internal/agent ./internal/agentplug: ok.
- go vet ./internal/agent, with GOOS=windows and GOOS=linux: ok. gofmt -l:
clean.
- A scratch test (not committed) loading plugins#1230's lorca.agent.js at
883ea48: connect and unwire with no credentials.json leave "{}"; with
{"anthropic":"k"} and with a file that has custom:gemini and a
changed_at map, unwire gives the file back as it was.
Broken by hand: origin/main's plugged.go with the new
TestPluggedConnectOnlyMergedOnly: "connect returned no keys to write".
Not tried: the real Lorca app reading the file.
|
||
|
|
cb4ad12bd1 |
zcode: the mover's min is 0.1.68, whose every account takes requests (mathfournity on X)
mathfournity on X: several ZCode accounts in magpie, and requests went to two of them only. The plugin (0.1.40 to 0.1.67) declared maxAccounts 2, so keepAtOnce held every account past the first two in reserve until one rested. magpie's own handling of a plugin's accounts was right: on a throwaway gateway test with the real plugin under bun and four accounts on a fake Z.ai, 0.1.67 sent 12 requests at once 6/6 to two accounts and none to the others, and 1302, 1308, 3008 and 500 on one account each went to the next and rested the first. plugins 36dc4007 (zcode 0.1.68) declares no maxAccounts and holds what zcode.z.ai's firewall refuses an address for instead: six Start Plan requests in flight from this computer over all accounts, besides each account's three. On the same throwaway test, 0.1.68 sent the burst 3/3/3/3 over the four accounts, failover unchanged. Raising the min updates moved users (keepMovedCurrent). gateway-routing.md's Accounts at once row says the plugin no longer declares two. npm: registry.npmjs.org has 0.1.68 as latest (npm view --prefer-online --registry https://registry.npmjs.org). The plugins publish run is red only for middleware-system-prompt and middleware-think-tags (trusted publisher); its log shows "+ @magpie-community/opencode-zcode-auth@0.1.68". Run: - go test ./... -count=1 -timeout 45m on mica at |
||
|
|
4c6c3a453e |
claudetui: a reply is held from its message's row on, not from when send sees it (#6887)
TestShimCutMessageIsUnpastable (new in |
||
|
|
1c59acd36d |
plugin: a fetch whose head never comes is given up on; Devin min 0.1.45 (wu_chong4136 on X)
wu_chong4136 on X: with the Devin plugin a session sometimes hung for
10 to 20 minutes with no reply, until the effort or the context was
changed. The Devin plugin returns its fetch's head only once Devin sends
the reply's first content, and the host's headRead waited for that head
with no bound, while the gateway kept the agent alive on keepalives. A
request Devin took and never answered therefore hung silently. The body
already had bodyIdleWait (30m between bytes, #4934); the head had none.
- host.go headRead: the same bodyIdleWait bounds the wait for the head.
On it the fetch ends with "the plugin sent no reply in 30m0s; that
fetch was given up on", Fetch settles the call, and the host writes
"abort", so the plugin's fetch signal ends its vendor request too. The
gateway answers the agent its retryable 502 (an SSE error event on a
stream). This holds for every plugin fetch, not only Devin's.
- ReplyWaitForTest lets the gateway test shorten the wait.
- Devin mover min 0.1.45 (on npm, `npm view --prefer-online`): the
plugin itself gives up after 5 minutes of quiet from Devin (no head,
or no frame between reads) with a retryable 504. A real probe saw
Devin's first frame at 2.5s and at most 13s between frames.
(magpie-community/plugins e30f8ed0)
- provider-plugins.md says so.
Tests:
- TestHostHeadWaitEndsAFetchNeverAnswered: a head that never comes ends
in "sent no reply", the host is sent "abort", and the call is
released; TestHostHeadWaitSparesAHeadInTime: a head in time is kept.
- TestPluginHeadNeverSentEndsInAnError (gateway, through the fake
plugin in Bun): a vendor that reads the request and never answers
gives the agent the error on a stream and on a whole reply, and every
vendor request the plugin made is closed afterwards (asked 30, open 0).
Run:
- mote: the three tests above, ok.
- Broken by hand (headRead without the timer case): the host test fails
("held its reader for ever") and the gateway test hangs to its 60s
timeout in io.ReadAll.
- mica: gofmt -l clean; go vet for darwin, GOOS=linux and GOOS=windows
on internal/plugin, internal/gateway, internal/provider: ok.
- mica: go test -tags nogui -timeout 45m ./... at this tree (rebased on
|
||
|
|
ac4a4cf849 |
sessions: opening Sessions waits on no WSL listing it already has (shangyuan0818 on X)
shangyuan0818 (X, third round, after v0.1.4091 and v0.1.4255): on Windows, Usage -> Sessions opened only after a fixed ~20s when sessions were long. The long sessions were not the cause. Goroutine dumps of the reporter's case on the Windows box showed four waits on WSL on the page's first asks: - agent.Looks -> Clients -> All -> wslDistros: a blocking wslRefresh, `wsl -l -q` (10s timeout) once its list is a minute old, then `wsl -l --running -q` (10s) every time. A WSL that answers slowly but answers is never marked hung, so each open after a minute idle waited for both: about 18s, every time. ClientsIn drops WSL's agents anyway, so Clients now reads only this machine's (local()). - gui agentsHere (the web-mode own-sessions gate) called agent.All the same way. It now calls agent.AllKnown: this machine's agents and WSL's as last listed (wslDistrosWithin(0)), never waiting on wsl.exe. - sessions.wslFilesAs waited wslFirstWait (3s) afresh on each read while the first listing was pending, so list, stats and overview each waited 3s in turn. The 3s is now counted once, from when the first listing started. - provider.copilotCLILogin waited copilotWSLWait (2s) on every re-read of a distro's Copilot sign-in, every copilotWSLAge (20s), though it had an answer. A re-read now answers the last read at once; only the first read waits. Timed on Windows 11 (xiaomi-gpu), sandbox HOME with a 90 MB Claude JSONL and a 32 MB Codex rollout, a fake wsl.exe whose -l -q answers "Ubuntu" after 8s and whose --running hangs; /api/sessions list+stats+overview together, opened 20s after start, then 70s apart: |
||
|
|
2ec8e6ad0c |
readme: 零词元's README seat ended 11-16 and is taken down
零词元 (zerotoken) held a README logo from 10-16 to 11-16. A renewal
reminder went out on 11-13 and no renewal came, so the owner's OK of
11-15 applies: the logo leaves both READMEs, as
|
||
|
|
b0674b9ec4 |
providers: a key's balance shows on its row, as Usage last read it
lyj1115 on X: magpie found the relay's balance (the probe), but the Providers row showed only the API key; the figure was on Usage alone. The row's quiet facts line (host · models) now ends in " · $10472.14", in the line's own colour and size, with "Balance $…" as its tooltip. Several keys' balances are added up as the Usage card's head adds them (shared balances counted once), else the key in use's. A failed read, a signed-in account (its windows are on Usage) and Usage turned off show none. Opening Providers asks for Usage's own read (never ?asked=1, so "read only when asked" holds) when it is over a minute old, as Routing does (#1833); rows are marked after the list is drawn and after a read. rowBalance, markBalances and keysSum/keysSumTip live in plugins/usage/page.js (keysSum moved out of app.js) so app.js stays under its code budget without a raise; app.js calls markBalances?.(). No new words, no CSS. Run (mote, at this tree rebased on origin/main |
||
|
|
6cc7402bd3 |
gateway: agy-cli's verification refusal rests the account as verify, with its link
A contract test for plugins' agy-cli 0.1.81 (83a67717), which turns agy's bare "Verification Required" ending (kidgpt on X, 11-16) into a 403 permission_error in the words provider.Verification reads. The test posts that exact message, with a link and without, and checks the client gets it once (no advice added again), the try fails as failVerify and the account rests as "verify" with the link when there is one. Test only: the plugin's update reaches users through the hourly plugin update. Run (mote): go test ./internal/gateway -run 'TestAgyCLIVerifyWords|TestVerify' ok; go vet ./internal/gateway clean; gofmt clean. Broken by hand: the plugin's wording changed to "this account needs verifying" goes red (the advice is added a second time). |
||
|
|
50a38371df |
plugin: a page with its own service module is a page on the GitHub list (plugins#1226)
xiaopeng66/magpie-model-lab is a page plugin whose page talks to a local service it ships as its main (magpie.page.service). readTagged called any package with a main or exports a provider, so the GitHub list showed it under Providers. Dropping the !runs check alone would make every provider that ships a settings page (atomcode's diagnostics page, for one) a page, so the rule is narrower: a package with magpie.page.file and a module of its own is a page when its keywords say "magpie-page", as every page with a main in the plugins repository does (agent-console, amp-usage, chat, fingerprint, free-tokens, page-model-quota, page-usage-board, page-usage-tree, window-warmup). No provider or middleware there says it. The file looked for in the repository is still its main. Kind only decides the card's chip and filter; what an install loads is unchanged. The fixture is model-lab's package.json as it is, without its 900KB icon; a provider with a page and no keyword stays a provider. Run (mote): - go test -count=1 ./internal/plugin: ok (157.9s). - go vet ./internal/plugin: ok. gofmt -l: clean. Broken by hand: the old !runs rule with the new test: "a page with a main: kind """, red. Not tried: installing model-lab from the GitHub list in the real app. |
||
|
|
a24a5f6af4 |
gui: a model test its vendor queued shows queued, not green (sufeng1894 on X)
sufeng1894 (v0.1.4248) added Qoder China and QwenWork providers (both served by the Qoder plugin): their models were green in the provider's Test, and every request through Routing failed with 503. A Qoder/QwenWork plan queues a model (code 10605, e.g. "this plan's queue: p4"). The test sends x-magpie-fallback, the plugin answers the queue's 503 at once, and probe counts it OK with Result.Queued ( |
||
|
|
07f7e0b45d |
claudetui: Windows 10 gets Microsoft's ConPTY with the release, no folder to place (#5205)
|
||
|
|
efb62fe901 |
claudetui: a message Claude Code didn't get whole is asked again as claude -p (#5205)
The helper took a message as sent once a row of it reached the transcript (rows > before), whatever the row held. A console that loses part of a paste, as Windows 10's own ConPTY does (#5205), gave Claude Code the rest, and the model answered that as the message. Now the words the transcript records of it (a user row's text, or a queued message's) are compared with those pasted, white space, paste tags, image marks and format characters aside, read in place with no copy (whole.go). The paths of images Claude Code says it took ([Image: source: <path>] meta rows) are left out and the images counted. What Claude Code answers meanwhile is held for up to 2s. A message that isn't whole ends the turn as Unpastable before any of its reply, so the bridge asks it again as claude -p, as it does an image the interactive mode didn't take. This is 3leg0ocat's patch (github.com/3leg0ocat/magpie-lite, branch claudetui-whole-message, b800c0cb3b), applied as written, with TestShimCutMessageIsUnpastable added: the fake Claude Code gets a FAKE_CUT knob that keeps only a long paste's tail past its 1024-byte blocks, as Windows 10's conhost lost them. Run: - go test ./internal/claudetui ./internal/conptypair on mote (macOS): ok. TestShimCutMessageIsUnpastable broken by hand (send returning nil in place of checkWhole): red, the cut tail answered as "echo: ...". - go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./... on mote: ok (with the next commit). - win-run go test ./internal/claudetui on xiaomi-gpu (Windows 11 26200, whose own ConPTY keeps the marks): every test ok but TestShimFirstMessageWaitsForTools, red on Windows at main (#4810). 3leg0ocat's own record: Windows 10 19044, Claude Code 2.1.319, Windows' own ConPTY at 64 KB caught 4 of 4 before any reply; with ConPTY 1.25.260930003, none caught across 8/64 KB, a leading /, two images, a queued message and two turns. Not tried by me: Windows 10 itself (no Windows 10 box here). |
||
|
|
5ba53b2392 |
agent: dsh and Pi ask a Gemini 3+ on Messages adaptively, so Xhigh reaches it as xhigh (#6778)
larryhaonlp: DSH's Xhigh on agy-cli/gemini-4-hydrogen through
magpie-anthropic reached agy-cli as high, and a compat
forceAdaptiveThinking: true added by hand in dsh went on restart.
Cause, from the installed sources (dsh 0.2.1-rc.2's and Pi 1.4.0's
pi-ai, anthropic-messages.js and simple-options.js): without
compat.forceAdaptiveThinking pi-ai asks a budget through
adjustMaxTokensForThinking, whose clampReasoning turns xhigh and max into
high (16384), and agy-cli's requestedEffort reads a budget of 16384 as
high. With the switch it sends thinking adaptive plus output_config.effort
from thinkingLevelMap, which agy-cli reads first. magpie wrote the switch
only for Claude that thinks only adaptively and GLM-5.2/5.3.
- gateway.AsksAdaptively is the one rule: adaptiveOnly, AdaptiveWithEffort
or a Gemini 3 or later (geminiGeneration, the rule geminiLevelBody
already turns a budget into adaptive + effort by). dsh's dshKindConfig
and Pi's piModelOn (both cases) use it. Pi now also gets the switch for
GLM-5.2/5.3, which it lacked (same clamp).
- omp is left on AdaptiveThinking, said in omp.go: its budget isn't
clamped (ANTHROPIC_THINKING xhigh and max are 32768, read as xhigh), and
its anthropic-adaptive mode turns thinking off by leaving thinking out at
the lowest effort, which a model that can stop thinking takes as on.
- The user's own values: dshKeepCompat kept a hand-set switch magpie
doesn't write, but magpie's own switch won over the user's. magpie
writes its switches only as true (omitempty), so a false in the file is
the user's, and now stays.
- The restart: dsh-settings' importLegacyDocument imports
~/.dsh/settings.yaml into the profile dsh starts on and renames it
.imported; magpie writes settings.yaml again with routes that had no
hand-set compat, so each start of dsh took it out of the profile.
dshProfilesCompat carries the profiles' hand-set compat into
settings.yaml's routes, by the same dshKeepCompat.
Existing users: KeepDshWired's sync (30s) and Pi's sync rewrite magpie's
routes, so forceAdaptiveThinking: true lands on a Gemini 3+ there with no
action; a false the user set stays. Pi's models.json provider block is
magpie's own and is written whole, as before.
Run (mote; sandbox HOME):
- go test -tags nogui ./internal/agent -run the new tests and the dsh,
Pi and omp compat tests (TestDshMaxReachesOutputEffortModels,
TestDshRefreshKeepsHandSetCompat, TestDshKeepCompatNotAcrossProtocols,
Pi.*API, Omp): ok
- gofmt -l: clean
- Shipped before the whole ./internal/agent and ./internal/gateway run and
vet (darwin, linux, windows) finished: it was still going on mote, over
its cores, and mica's disk was full. A red there gets its own fix or
issue.
Broken by hand:
- the new tests at origin/main
|
||
|
|
f97997e6ed |
LESSONS: a GUI suite with hundreds of known reds is not a baseline
|
||
|
|
8608ce0243 |
gui: the sticky tab strips are drawn only under scrolled rows, rounded and evenly inset (CHENGJIAHEGOXIS on X)
Over a background picture the Library tab bar showed a square frosted box
around the rounded tabs, 16px out at the sides, 8 at the top and 4 at the
foot. The strip behind the tabs (Library, Plugins, Settings, the Add
sheet) is now drawn only once rows scroll under it (.stuck), fading in
with opacity, so at the top only the track shows: radius 7, an even 2px
around its 5px pills. When drawn, it sits 4px out from the tabs with
radius 11 at its foot (Library, Plugins), and 6px out with radius 13 in
Settings and the Add sheet.
Run: shots in Chromium and WebKit, light and dark, with and without a
wallpaper, at 1280 and 640, at rest and scrolled, before and after
(strip opacity 0 at rest, insets 4/4/4 when stuck). Full GUI suite at
18ec1674a on mote: 1041 fails across ~118 files; those files at
|
||
|
|
9b376de163 |
gateway: a Gemini model's levels above high come from its provider too (#6871, hhh2210)
withGeminiEffort (decide.go) and geminiLevelFor (gemini_level_body.go)
let a level above high through only where models.dev's catalog lists
it (catalog.EffortsOf). A model a plugin or relay lists that models.dev
doesn't have, such as ai-studio's gemini-4-hydrogen-search with
low/medium/high/xhigh, had agy's xhigh or max sent as high, after the
candidate step had already fitted it to xhigh from p.Efforts.
withGeminiEffortFor and geminiLevelForEfforts now take the provider's
levels (p.Efforts(model)) first and fall back to the catalog's; the four
withModelEffort sites in serve and passthrough's onEffort retry, and
geminiLevelBody, pass them. A model whose levels stop at high is still
asked high. Left as they were: aiStudioThinking and withFixedEffort
(no provider in scope there). Ported from hhh2210's
hhh2210/magpie#3 (8dd4c5f6e), the doc line reapplied by hand on
today's gateway-routing.md.
Broken by hand: with the tests alone on origin/main, both new tests
are red (gemini-4-hydrogen-search sent "high" for xhigh and max on
Gemini and Chat upstreams, output_config {"effort":"high"} on an
Anthropic relay); the high-only gemini-4-carbon-search case stays high
either way.
Run on mote at b394095c7 (origin/main
|
||
|
|
34606000da |
gui: the tray panel's Usage tab ends in a heatmap of recent weeks (eiyuuzaki2333 on X)
Asked for "a heatmap like GitHub's / Codex's, also in the tray". The window already has one (Usage › Requests, 53 weeks, #1369), so no second copy goes on the Overview, which counts gateway calls only while the heatmap counts session-file calls too. The tray panel had none. The panel's Usage tab now ends in a card of the recent weeks, one cell a day, Monday on top, as many weeks as the card fits (8 to 53: about 25 at the panel's 440, 17 at 320). It goes after the chart and ranking, so nothing above it moves. Its shades are the existing monochrome accent ramp (.l0 to .l4) and follow the tab's own Tokens / Cost / Requests switch, with no new read; a provider or computer picked above narrows it. A tooltip says the day and its tokens, requests and cost. Weeks with no call show no card. No animation. It reads the existing cached /api/usage/heatmap, at most once a minute and again when a pick changes; the tab's own 10 s reads don't wait for it, and no endpoint was added. The card, its reads and tooltip live in plugins/usage/page.js, which shares its grid (heatGridOf, taken out of drawLedHeat as it was) and tooltip (ledHeatTip, now told the metric and provider) with the Requests tab. app.js keeps one guarded call in renderPanelUse: the ledger read can come back before page.js has run, so page.js draws the tab again when it loads. Both script budgets hold it at this base with no raise. The card is .pu-heat, not .pu-card, so the chart's card stays the tab's one .pu-card. The panel's light pills are its card's white, so a quiet day there is a 7% shade of the text over the card. Run (rebased on origin/main |
||
|
|
2896e82ccb |
claude: a turn with a new image after a reply split by thinking goes on in its run
Yqihotaru on X (omp 18.20.3, magpie 0.1.4314, DEBUG on): a user turn with an image, after a reply with no tool calls, logged "no run here has had this conversation" and was told to a new Claude Code from a transcript (81 messages, 4 images; the turn before had 5), all of it written to the prompt cache again. The same turn after a reply with tool calls, and a text-only turn after it, went on in the run. omp keeps 5 images in a request to a provider it has no image budget for (clampProviderContextImages, providerImageBudget's default), so each new image takes the oldest out: the conversation's earlier images moved, and only looseTurn.rewrote's mediaMoved could match it. mediaMoved compared the conversation part by part (heardRuns), and the run keeps its reply as the one text it said while the client sends it back as the text blocks Anthropic's stream told it, one between each thinking block (#5705). #5705 made the turn keys read a reply's words without whitespace; the part-by-part compare still read two blocks against one text, so the first such turn found no run. heardRuns now reads an assistant run's texts in a row as one part, their words with no whitespace, as messageWords does. A user's texts stay apart: the text an image left between them is what lostFromRun reads. TestClaudeOmpImageBudgetGoesOnInItsRun sends omp's clamped history (the budget of 5, "[image omitted: provider image limit]" in a message left empty) eight turns, with the reply in one block and split by thinking, and an image with words, alone, before words, and two at once. The subsystem page says what heardRuns reads. Run (on mote, through mote-run, at |
||
|
|
ccae8e8211 |
claude-desktop: a 1M model runs at 1M in the Code tab again (fwxkogaia on X)
Claude Desktop 5.11492 (released 11-13) starts its Code tab's Claude Code
with CLAUDE_CODE_MAX_CONTEXT_TOKENS=200000 in its --settings file whenever
the provider routes models itself, the gateway included (Fcn=2e5 and Lcn in
index.chunk-xV3fJhc7.js; 4.16336 had no such value). Flag settings come
before ~/.claude/settings.json, so the window magpie writes there no longer
reached the Code tab, and every model picked by its plain entry ran at 200K,
a 1M one too. No magpie change caused it: nothing in v0.1.4300..v0.1.4322
touched what Desktop is told about 1M.
Claude Code takes a "[1m]" id for 1M whatever that variable says (pT in
2.1.322). magpie's profile now gets Desktop's own "Use 1M wherever it's
available" (modelPrefer1mContext: true, 3p only, Desktop 1.28929+) once, on
a switch on and from Sync, as toolSearchEnabled is (desktopSeedPrefer1M):
Desktop then shows a model it offers a 1M entry for by that entry alone
(D5n: prefer1m on every supports1m entry) and hands Claude Code its [1m] id.
Desktop offers that entry only for a row whose max_input_tokens is 1M or
more, so nothing smaller changes. The user's own value, false too, or their
taking it away, stays theirs. Compaction is as before: the working window,
or the whole window under Full window.
Not fixable this way: a model between 200K and 1M (a 272K or 400K GPT)
still runs at Desktop's 200K; only a managed policy setting comes before
flag settings, and magpie writes none.
Run (mote, at this tree):
- go test ./internal/agent -run TestClaudeDesktop: ok
- TestClaudeDesktopPrefers1M red with desktopSeedPrefer1M returning nil
("switch on: modelPrefer1mContext <nil>"), green with it
- go vet ./internal/agent for darwin, linux, windows: ok; gofmt -l: clean
- go test -timeout 45m ./... at base
|
||
|
|
98955300a7 |
claude: no request-sized value on a run's command line or in its environment (#6848)
recih (on X) ran a long Claude Code session through the Claude subscription's interactive mode on a Linux server: every start, the resume and the replay alike, failed "fork/exec <magpie>: argument list too long", 8 502s, and every request after. Linux starts nothing with one argument or variable over 128KiB (MAX_ARG_STRLEN), and startRun put the conversation's safeguards in CLAUDE_CODE_EXTRA_BODY whole and the JSON schema in --json-schema whole. Now no value of a request's goes on the command line or in the environment over claudetui.StartValueMax (16KiB, under Windows' 32K variable too): - interactive mode: CLAUDE_CODE_EXTRA_BODY is a stand-in (startSafeguards: all when they fit, else without the parts Claude Code itself sheds, else []); guard.json keeps them whole and tap.js puts them in each request, as before. tap.js no longer sets the variable to a file over the bound, since Claude Code's MCP servers and tools inherit it. It is given no --json-schema (it never used it; the answer tool has the schema). - -p: a schema over the bound goes with the initialize request (jsonSchema, as the Agent SDK sends it). Claude Code passes over an initialize schema it can't use silently, so such a schema is compiled first and refused with a 400, as the flag's exit was (#3036). Other per-request starts checked (warmups, usage, sign-ins, other agents' bridges): nothing request-sized on argv or env. Run: - TestClaudeTUIStartBounded, TestClaudePrintStartBounded, TestClaudePrintSchemaPlaces (gateway) and TestTapPutsSafeguardsTooLargeForTheEnvironment (claudetui, bun and node): red on the old code on mote (152KB env, 277KB arg, 502 for a bad large schema, 204KB variable left by tap.js), and on Linux (wsl-run, magpie-desktop) the old code failed with the real "fork/exec .../magpie: argument list too long" and the tap's child start with E2BIG. All green on the new code on mote and Linux. - Real claude 2.1.316: an initialize jsonSchema answered structured_output {"city":"Paris"} (haiku); CLAUDE_CODE_EXTRA_BODY {"safeguards":[]} is sent as "safeguards":[] in every request (local listener, sandbox config). - gofmt; go vet (darwin, GOOS=linux, GOOS=windows) on the two packages; go test -tags nogui ./internal/claudetui ./internal/gateway on mote: ok claudetui 182.5s, ok gateway 1066.8s (at base |
||
|
|
aa33075852 |
provider: Qoder's mover min is 0.2.71 (plugins#1220, #1204)
Qoder 0.2.71 (the npm registry lists it as latest, checked at registry.npmjs.org) ends a streamed wait in a queue with nothing ahead whose state hasn't changed for 5 minutes with the queue's 503, where a frozen Qoder CN RESOURCE_LIMIT queue held the agent on keepalives for an hour (plugins#1220, nsyan). 0.2.68 to 0.2.70 come with it: the 120s silent-call 504 (plugins#1204), the Kimi call-only turn (#1213) and bare tool_calls replies (#1113). Plugin change and its tests: magpie-community/plugins bf47b85b. Run: mote-run go test -count=1 -run 'Mover|Moved|Migrate|Qoder' ./internal/provider: ok. gofmt -l: clean. Not run: the full suite; a real Qoder account. |
||
|
|
8707ea7757 |
gateway: Codex's prompt suggestions go on a model set for them (@0xcb198609 on X)
The Codex app's home-page prompt suggestions (thread_source ambient_suggestions, and their safety check, ambient_suggestion_safety; the Routing page's 提示词建议) are a background agentic turn that reads the project and connected apps. The app asks for the model its server config names (codex-app-model-routing's codex_ambient_suggestions_model_slug, gpt-6-luna) with provider model fallback on, so with magpie as Codex's provider they ran on the provider's default model, often auto: @0xcb198609 saw 76.9k tokens in 113s on deepseek-v4-pro. Codex has no config.toml key for that model, only an on/off switch in the app (store key ambient-suggestions-enabled, Settings › Configuration › Homepage suggestions; read from the 26.1106 bundle). magpie now has a setting for it, "Codex prompt suggestions" in Codex's row on the Agents page (Settings, beside Codex composer predictions): - Empty, the default, is Codex's own pick: nothing moves. A value the user set is never overridden. - A model or group of magpie's puts both calls there: in serve as the codex-suggestions move (the Routing page says why), and on the ChatGPT backend's route before the split, carrying the asked model to serve so the trace and ledger keep it. codexOwnOffMagpie leaves a bare gpt-6-luna to magpie while the setting is on (codexSideSet). - A target that is disabled, unserved or not allowed to the gateway key leaves the call as asked, with a log line (compactRefused). - To fit app.js's script budget without raising it, the suggestions and auto-review pickers share codexPick with codexSidePick, and every Codex row's button comes from condButton. The new route is named for the CLI (settings_parity_test.go). agent-prefs and settings-general list the new row. - The row's tooltip and the Routing page's Suggestions story say where Codex turns them off. magpie's old story said "Suggested prompts", which the current app no longer shows; corrected in all five languages from the app's own locale files. Run (mote, at this head rebased on |
||
|
|
90d54a2675 |
usage: Factory Droid's own sessions count under Not through magpie (_meouwu on X)
Droid's sessions were on the Sessions page, but Usage's "Not through
magpie" read no Droid calls, so what Droid spent straight at Factory or
a BYOK provider never added up.
Droid writes no tokens into a transcript: a message line has its time,
the message and a reply's modelId. Read from droid 0.231.0's binary
(its session schema) and the real runs in testdata/droid-skills, what a
session spent is only in <id>.settings.json: tokenUsage, its own running
total (input less the cache, output with thinking, cache read and
written), and lastCallTokenUsage, the latest call alone. So each session
is one call of its total, at its last message (the day Sessions already
counts the same total on), under its settings' model; a subagent's is
under the session that called it, a fork's starts at none.
- sessions: calls_droid.go reads a session with its settings whole
(wholeCallReaders "droid"); droidFiles joins callSources, behind
Reads("droid") and allowed() like the rest. WSL is not read: the
Sessions page doesn't list Droid in a distro either.
- No double count: a session whose settings or any reply names magpie's
own entry (custom:magpie/...) or a custom model whose baseUrl is the
gateway's port on loopback is left out whole; the gateway counted those
calls, and a total can't be split by model. A session is judged when
read, again once it or its settings change.
Tests: TestDroidCalls (the 4 real droid 0.231.0 sessions: tokens, time,
model; custom:mh on localhost:11434 counted, on the gateway's port left
out; Reads off counts none), TestDroidCallsOfSessions (subagent, fork,
no settings, magpie's entry, Factory's own model), and
TestDirectDroidSessionTotals in usage. Both sessions tests are red on
origin/main (0 calls); with the gateway check broken by hand both go red
on the gateway cases.
Run (mote): go test ./internal/sessions
./internal/usage ok; go vet + GOOS=linux/windows go vet of both ok;
gofmt clean; go test ./internal/gui ./internal/agent ok.
Not tried: a real Droid session against Factory's own models (no Factory
account here); no GUI change.
|
||
|
|
e25210b6e4 |
providers: an Alibaba Token Plan's AccessKey says the grants it needs, in the reader's language (MetalHqa on X)
MetalHqa on X: "阿里云百炼 Token Plan 的额度查询需要的权限不明确,希望能够在里面备注出来". Since |
||
|
|
1bfc6378c9 |
providers: Antigravity CLI's own Gemini API key is found and imported (shenggxhz on X)
shenggxhz set agy up on an AI Studio key: "modelProvider": "gemini" in ~/.gemini/antigravity-cli/settings.json, GEMINI_API_KEY exported in the shell. `agy models` then listed Gemini 4 Carbon and Hydrogen. magpie's model refresh didn't, because the agy-cli subscription runs agy on its Google sign-in, whose models are the account's in Antigravity, and the key was used nowhere in magpie. The Providers page now finds that key on its own. A new import source, "Antigravity CLI" (readAgySettings), reads agy's settings.json and offers the key as the Google Gemini preset, which lists the key's models from the Gemini API. With GOOGLE_GEMINI_BASE_URL set, it uses that endpoint's Gemini API instead. The variables are taken from magpie's environment, else from the login shell's: a key exported only in .zshrc is found when magpie is opened from the Dock. proc.GeminiKeyVars are only read (LoginEnv), never set in magpie's environment. agy on its sign-in offers nothing. With no key the entry shows as not importable, and a key that points at magpie itself is refused. Not changed: the agy-cli plugin's own `agy models` reads the same setting and, with no key in magpie's environment, fails and keeps the old list silently. Filed as magpie-community/plugins#1218. Run: - red on the old code: with the appReaders entry removed, all four TestAgyGeminiKey* tests fail (no "agy" source); green with it. - a real login shell on mica, in a sandbox HOME (key exported only in .zshrc, MAGPIE env without it): DiscoverSources gives status new, preset google, the key read. - real agy 1.5.9 in a sandbox HOME: API-key mode lists the Gemini 4 models from a list built into agy; without the key it exits 1 with the modelProvider error. - go vet (darwin, GOOS=linux, GOOS=windows) for proc and provider, plus darwin internal/gui; gofmt -l clean. - full `go test -timeout 45m ./...` on Linux (magpie-desktop): every package ok except internal/usage's TestRequestStateKeptAcrossACatalogFetchedAgain (#6572, filed, untouched here) and the root, internal/cli and internal/gui, which don't build there (no gtk4/webkitgtk-6.0 dev packages). Those three, plus provider and proc, ran on mote (darwin): ok. A first full run on mica died of a full disk (117G of shared Go build cache), so it tested nothing. - GUI on Linux, Chromium + WebKit: icon-tile, import-collision, import-opencode, provider-discovery, import-row and i18n-keys pass, 92 of 93. The one red is icon-tile's dim-color (#6759, red on main). - appIcon became a table so the agy icon fits app.js's code budget without raising it (TestCoreScriptBudget ok). Not tried: a real AI Studio key or a real Gemini request; the GUI import sheet in a browser (the source shows through the existing discovery and import sheets, with Antigravity's icon); Windows (LoginEnv is "" there, so only magpie's own environment is read). |