Skip to content

Tags

Tags

v0.1.3846

Toggle v0.1.3846's commit message
usage: a call recorded under magpie's alias id is the gateway's, not …

…a direct one (CrazyJal on X)

Claude Desktop's Code tab, and Claude Code under it, write the id the gateway
listed the model by (magpie-<number>.anthropic.<Claude model>,
mythos-magpie-<n>, anthropic/magpie-<n>, claude-magpie-<n>) as each turn's
model. The gateway's log counts the turn under the model that served it, and
the agent's file counted it again under the alias: a row for a model that is
none, its cost on top of the real one.

Only the gateway knows those ids, so a call that names one went through it.
Such calls are now left out of what Direct, the ledger and the Requests
page's chunks take from session files, for every agent that records one.
Calls under a model of the agent's own are unchanged. usage.MagpieAlias
mirrors the gateway's alias forms; a gateway test fails when the two differ.

Run (mote, at the pushed head): TestAliasCallsAreTheGatewaysNotDirect, TestMagpieAliasForms and
the gateway's TestUsageKnowsEveryAliasForm pass; with ownCalls returning its
input the first fails (7 rows, four under aliases). go test internal/usage,
internal/gui, internal/sessions ok; vet darwin, linux nogui and windows of
usage and gateway clean; gofmt clean. Go-only change, so no GUI file was run.
Not tried: a real Claude Desktop 3p session (none on this machine; the model
forms come from the gateway's own alias code and its tests, not JSONL bytes).
Existing persisted request chunks rebuild with the new binary.

v0.1.3845

Toggle v0.1.3845's commit message
gateway: a Claude Desktop turn's run keeps Claude Code's hour of cach…

…e, not the 5 minutes its marks name (DIYgod on X)

Claude Desktop reaches magpie with a gateway key, which Claude Code takes
for an API key (docs: automatic is 1 hour on a subscription, 5 minutes on
an API key) and marks with no ttl. runTTLFor read that as the client's
word, since claudeTTLOf gave Desktop no pick, and the bridge's run wrote
5-minute caches. Desktop with no pick now gets "default" (this computer's
Claude Code pick, else an hour); a 1h mark and a magpie's header stay as
they are.

Run: TestClaudeCacheTTLOf and TestClaudeDesktopRunKeepsAnHour (both red on
the old code, checked by reverting remote_magpie.go), go test -run
'Cache|TTL|Claude' ./internal/gateway ok on mote, gofmt, go vet darwin,
linux, windows.
Not tried: a real Claude Desktop turn and a usage row's ephemeral_1h in a
sandbox (needs Desktop signed in to a gateway and a live account). A
Desktop user who picked 5m in its own config is now given an hour: its
marks can't tell that from the API-key default.

v0.1.3844

Toggle v0.1.3844's commit message
gateway: an app update asks its own background service to restart, an…

…d the page no longer calls it another program (Norethcy on X)

After an app update the service (`magpie daemon`, ~/.local/bin/magpie)
ran on as the old version until its own look at the disk found the gateway
idle, and `magpie daemon restart` by hand showed the app "Port 3425 is in
use by ~/.local/bin/magpie (pid N): quit it" while the new service came up.

- PortHeld.Own: a holder that is a magpie running this install's program
  (same file, symlinks followed) is marked; the Gateway card then says
  "Starting the gateway…" instead of the port-in-use error.
- The app asks an older service of its own install (the pid the service
  manager reports, program from the unit/plist: daemon.Program) to restart,
  once per process, through gateway.RestartPath, as `magpie update` does:
  it restarts into the new version once idle, bounded by its drain, under
  the same service manager.

Run on mote: go test of the new tests in internal/gui, internal/daemon,
internal/gateway; go vet darwin, linux nogui, windows; gofmt; gateway-*
and i18n GUI files in chromium and webkit. Broken by hand: dropping the
Older check makes TestNudgeAsksOwnOlderDaemonOnce red.
Not tried: a real app update over a real launchd service. The restart is
an in-place re-exec of the service, not a socket handover, so the port is
closed for the service's start-up.

GUI (mote, chromium+webkit): gateway-port-holder, older, skew, takeover, port, i18n-keys, i18n-en-no-cjk 36 of 36 ok. All gateway-* files: 30 reds, all in gateway-card (shares on the network, yetone#6267) and gateway-key-arrange (420px, yetone#6268); the same 30 with client.js reverted to origin/main, so not from this change.
Not tried: a real app update over a real launchd service; the daemon re-execs in place, it is not a socket handover.

v0.1.3843

Toggle v0.1.3843's commit message
provider: a Gemini base typed without a version is kept as typed (JND…

…liuliuM on X)

GeminiBase gave every bare host /v1beta on Save (normalize), so a relay's
root typed in the editor came back as …/v1beta when reopened. Only Google's
own bare host (generativelanguage.googleapis.com) is given /v1beta now; any
other URL stays as typed. The detection (DetectBase), which proposes a base
rather than keeping one, still adds it (geminiVersioned). Siblings checked:
OpenAI/Responses bases are only trimmed on save (no /v1 added; fixV1 is the
5ba92aa probe); the editor's respellURL runs only when the protocol is
switched or a URL pasted. Not changed: the Anthropic base still loses a
typed /v1 or /v1/messages, because requests add /v1/messages themselves and
the version would be sent twice.

Run (mote): TestGeminiBase and the new TestGeminiBaseSavedAsTyped red on the
old gemini_api.go/detect.go (relay root saved as …/v1beta), green after;
go test ./internal/provider ok; new GUI test provider-base-as-typed (save,
reload, reopen for gemini/openai/responses/anthropic) ok in chromium and
webkit, with provider-add-gemini, provider-base-api and provider-detect-draft
(46 tests; one failure seen on the first run was this file's own Escape
dialog, fixed by reloading). go vet darwin, linux, windows; gofmt clean.
Not tried: a real relay; the full suite runs after the tag.

v0.1.3842

Toggle v0.1.3842's commit message
gateway: a Claude Code run shows its thinking, and a turn's own effor…

…t beats the budget beside it (DIYgod on X, yetone#5379)

Interactive mode dropped --thinking-display, so no summary reached the client, and -p set it only when an effort was known: both runs now get showThinkingSummaries in --settings. A High carried in the turn's own message (output_config on a {role:system} message) lost to a 31999 budget read as xhigh; the turn's level now wins in parse and in routing's requestEffort.
Red on the old code: TestClaudeBridgeTakesTheEffortOfEveryRoute (3 new rows), TestTurnEffortBeatsBudget.

v0.1.3841

Toggle v0.1.3841's commit message
gateway: Antigravity gets DeepSeek Harness's @-path paragraph reworde…

…d (plugins#1028)

DeepSeek Harness's desktop app puts one paragraph on @ paths in every
system prompt. With it word for word, gemini-4-argon on Antigravity
answered most requests in about 3s, with no thinking, and stopped after
one shallow step. The reporter found that removing just that paragraph
fixed it, and a recorded DSH request with the paragraph reworded was
answered normally 20 of 20 times. The antigravity plugin 0.1.7 now sends
it reworded; this is the same for magpie's built-in Antigravity.

codeAssistBody, for an Antigravity account and unless the prompt is set
to go as written, now sends antigravityReword(antigravityCloak(system)).
antigravityReword replaces each exact paragraph in agReworded with a
rewording that says the same, and leaves the rest alone. The caller's
request keeps the system prompt as written, as it does for the cloak.

Run (mica, at origin/main d31988c):
- go test ./internal/gateway -run "Antigravity|Cloak|CodeAssist": ok
- GOOS=linux and GOOS=windows go vet ./internal/gateway: ok; gofmt -l clean
- Broken by hand: dropping antigravityReword at the call site turns
  TestAntigravityDSHAtPathsGoReworded red with the paragraph sent as
  written; restored, green.

The test also checks Gemini CLI and prompt=as-written get the paragraph
as written, and that a prompt merely mentioning @ paths is untouched.

Not tried: a real Antigravity account through the built-in path (the
plugin's rewording was what the reporter's recorded request measured).

Reported-by: xueyinmei-dot

v0.1.3840

Toggle v0.1.3840's commit message
gui: the Mac's plain title bar is done as the main window is first sh…

…own, not at start (eating_dream on X)

On macOS 26 an update's silent relaunch (open -n -g) deadlocked the new
process's main thread: ApplicationStarted ran plainTitlebar -> insetLights ->
toolbarRounder, which allocates a temporary NSWindow and releases it while the
hidden background launch is still inside FBSWorkspaceScenesClient
createSceneWithIdentity. Every InvokeSync waiter (tray usage, lighten, the
resize/move timers) then blocked behind it, so the old tray left and the new
one never came up.

The Mac's title bar is now done in reveal, just before the window is first
shown (a user action, never inside the launch); Linux keeps it at start.
Their other two suggestions need no change: keepAt already returns while
h.placed isn't the window, and with the main thread free the ready waiters
no longer pile up.

Run: gofmt; go vet darwin, linux nogui, windows; go test ./internal/gui on
mote (ok, 136s). New TestMacTitleBarNotDoneAtStart, red with the call put
back in ApplicationStarted and red with it removed from reveal.
Not tried: the real deadlock. It needs macOS 26's hidden relaunch through
LaunchServices from an updated bundle; mote (macOS 27) was not driven that
way, so it is not shown not to reproduce there either. The full suite was
not run before the tag.

v0.1.3839

Toggle v0.1.3839's commit message
gateway: Mistral's key is written ahead of the body's members, not th…

…rough a re-encode (daoche_wuzui on X)

withFields re-sorted the client's message keys, which the Mistral reasoning tests (byte-for-byte) caught. The fake Mistral's known fields now list prompt_cache_key, as Mistral's chat docs do. Run: Mistral, CacheKey, Hermes and the five full-run reds alone (all ok); gofmt.

v0.1.3838

Toggle v0.1.3838's commit message
gateway: Codex's image call goes over the pool, not to the account it…

… is signed in to (Richyisaflower on X)

Codex sends its image tool's calls to the ChatGPT backend path magpie serves
(/backend-api/codex/images/generations and /images/edits). codexBackend
relayed them as they came, signed with Codex's own sign-in. With Codex kept
signed in to account A (KeepLoginAs) and the pool ordered to put B first,
text turns went to B, but every image call still spent A's image allowance,
so once A's was used up no image could be drawn while B had room.

Now, when magpie has more accounts than the sign-in (and the call carries
no API key, names no account, and is signed by the sign-in), the call is
served by the images handler on codex/<model>: drawOnAccounts goes over the
accounts in the pool's order, past one whose image allowance is spent
(restDrawer), signed with that account's own token and chatgpt-account-id.
A sign-in alone, an API key, a request signed by an account magpie lacks
and a model with a namespace are relayed as before.

Run on mote: TestDrawingFollowsThePoolNotTheKeptLogin (two fake accounts,
acct-1 answering usage_limit_reached, pool order spare first, Codex kept on
acct-1) red on the old code for the /backend-api/codex path (asked acct-1,
429), green now for it and for /v1/images/generations; TestCodexImagesRelayedWithTheSignInAlone
green. go vet darwin, windows, linux nogui ok; gofmt clean. internal/gateway
-run "Codex|Draw|Image|Keep|Relay" ran: two reds, TestAffinityKeepsAnHourCachePastFiveMinutes and
TestClaudeConversationKeepsItsAccountsCache, both ok alone and neither near this change (see issue).
Not tried: a real Codex account; Codex's real image request body (edits shape taken
from the images API's); the full suite (started after the tag).

v0.1.3837

Toggle v0.1.3837's commit message
agents: a model of no known window is told the default under the long…

…est context too (ul3140773077392 on X, yetone#6259)

settings.ContextCap held every window magpie knew, but fourteen agents
write a default of their own (128000 or 200000) for a model whose window
magpie doesn't know, and that default went out past the cap: Crush, ZCode,
VS Code and its forks (Copilot, Zoo Code, Air), Copilot for JetBrains, Zed,
jcode, Pencil, AtomCode, Kimi, OpenClaw, Snow, WorkBuddy and CodeBuddy.
unknownWindow holds each default to the cap. AtomCode's output clamp used
the constant and now uses the window it is told.

BaoCode (a Claude Code front end) keeps its own context per model and
reads no window from magpie; Claude Code gets the cap through
CLAUDE_CODE_MAX_CONTEXT_TOKENS, which it does follow. Not changed.

Guard: TestEveryAgentFollowsContextCap connects every agent that can be
here to a provider with a 987654 model and a model of no window, under a
cap of 99999, and fails on any agent file holding either window or a
default. Red on the old code in 14 agents' files (checked on mote), green
after.

Run on mote: go test ./internal/agent ./internal/provider ok; go vet
darwin, GOOS=windows, GOOS=linux -tags nogui ok; gofmt clean.
Not tried: a live BaoCode, the full suite (started after the tag), GUI.