yetone
87a8330115
ui: Hide emails, once on, is a shade darker and no more — the purple fill and ring made a page tool the loudest thing on Routing and Usage; its struck eye and its words already say it is on
2026-09-28 13:29:54 +08:00
yetone
4cbd96a3e4
gateway: a model Claude Code names that magpie doesn't serve goes to the one it is set to use for that tier — claude-haiku-4-5-… for a title or a small task goes to its haiku tier's model, opus and sonnet to theirs, a name of no tier to its main model, rather than to some provider that happens to list the name and wasn't picked for it. Other agents, and ids magpie shows, are sent as asked
2026-09-28 13:25:25 +08:00
yetone
41cbe54a14
library: which skills from GitHub have changed there can be checked — Check for updates asks GitHub for the last commit to each skill's folder (one request per folder, a repository's skills together; once GitHub limits requests the rest are left unknown, each skill's trouble its own) and a changed one carries an Update available pill whose tooltip has the commit's summary and date, a click opening the changes on GitHub; Update N fetches just those. The library keeps a hash of a skill's files as fetched and, once a check finds GitHub's files to be the same, the commit they're at, so a later check needs only the API; a skill installed before this is compared by its files, the repository fetched once
2026-09-28 13:11:25 +08:00
yetone
c5e7955937
i18n: tokens reads token in Chinese on the usage tiles as well — a second entry for it, the routing rules', said tokens and won
2026-09-28 13:06:24 +08:00
yetone
e3984b2442
sessions: history by day — the Sessions view gets a range (today, 7, 30, 90 days or all), model and folder pickers, tiles for the range's cost, tokens, cache read and active time, and a daily bar chart of tokens or cost (weekly past 92 days). Each session file's cached reading now keeps its usage per local date and model, a message counted on the day of its timestamp, so a session that runs past midnight splits across both days and a file read on from where it stopped adds only what's new; Claude Code's repeated usage for one message moves with it to its last block's day. Totals come from every session file in the range, not the latest 200 the list shows: GET /api/sessions/stats?days=N returns each day's rows by agent, folder and model with their cost, so the view filters without asking again, and files last written before the range aren't read at all. Active time is the sum of gaps under five minutes between one line and the next in a session's main file (subagents run alongside it, so theirs aren't added), credited to the later line's day. The cache is version 2 and records the time zone, a change of which reads the files again; the list no longer drops the cached readings of files it doesn't show, only of files that are gone, and changed files are parsed in parallel. On 4000 synthetic files (880MB, 180 days) a cold read takes 0.74s, a warm one 22ms, a reload from the 4.7MB cache 49ms
2026-09-28 13:05:56 +08:00
yetone
c4596cf615
library: an agent's chip on a skill or MCP server row can be clicked again and again without waiting — each click lights or dims it at once, a row writes one list at a time and sends the clicks made meanwhile together, so the agents end up as last clicked; a chip clicked a second time no longer drew the whole page again (its handler, carried over from the redrawn chips, looked at a row no longer on the page), which made the window blink and the chips fold and spread under the pointer. A write magpie refuses takes back that row's clicks and says why, and coming back to the window redraws the page only when the library changed meanwhile
2026-09-28 12:54:23 +08:00
Jeremy Levartovsky
33d72cef30
gateway: ids made in one clock tick are still unique ( #128 )
...
newID was the wall clock in hex. Windows' clock moves in steps of up to
15.6ms and macOS's in microseconds, so ids made together came out the
same: the parallel function calls of one Gemini / Code Assist chunk,
which carry no id of their own, all got one call id, and the client
could not tell their results apart. A counter now follows the time.
2026-09-28 12:42:58 +08:00
yetone
112471fb2d
cursor: a model is put in Cursor's pool by its family — the server lists grok-4.8, the CLI asks for grok-4.8-high-fast, and the exact match put that one in Other Models; case and cursor- no longer matter, and a bare composer is Cursor's too. The pools read Cursor 模型 / 其他模型 in Chinese
2026-09-28 12:04:43 +08:00
SadWood
4425be9262
fix(gateway): 按模型匹配 Cursor 路由额度 ( #125 )
...
Cursor 的两个额度池和汇总值原先同时参与每个模型的路由计算,导致 Other Models 用尽时仍有额度的 Grok、Composer 和 Auto 也被判为用尽。按服务端名单及官方已确认的模型归属分别匹配额度池,汇总值仅用于展示,并统一额度名称。
路由用量按账号和模型分别保存,避免同一账号的不同模型覆盖用量及重置时间。补充额度池独立耗尽、模型别名、重置和路由排序的回归测试。
2026-09-28 12:03:58 +08:00
elonnzhang and yetone
dd1d68f6a6
provider: deduplicate saved login reads ( #126 )
...
* provider: deduplicate saved login reads
* provider: fold duplicate saved logins for Claude and Codex only — a Grok (or other side agent's) account magpie signed in and the CLI's own sign-in to the same one are two records, and folding them by name lost the first's sign-in at the next write
---------
Co-authored-by: yetone <yetoneful@gmail.com >
2026-09-28 12:01:17 +08:00
yetone
8ad73e8bfc
accounts: a slow or hanging agent CLI no longer holds the providers page ( #123 ) — its timeout now ends the call (a CLI that is a script running node left node holding the output, and the call waited for it however long, the 10s timeouts notwithstanding: a CLI's pipes are closed 2s after); a CLI never answered before is waited for 3s, once, then served as nobody signed in until its answer comes behind; and a CLI saying nobody is signed in is kept like any answer, where before it wasn't and every start waited for it again. Tried with cursor-agent and devin hanging 20s and the network black-holed: the first providers call went from 40.6s to 6s on a first start, and to 13ms on the next
2026-09-28 11:20:14 +08:00
yetone
31169a17f6
agent: fx (fx.sh, Vercel Labs' coding agent) — its model picked in magpie like any agent's; a model through magpie adds magpie to ~/.fx/settings.json as a keyless provider of fx's own (openai-chat-completions at the gateway, auth none) with the catalog as its model_metadata, the model in use first so fx's 256-model limit never cuts it, and sets provider magpie and models.magpie; its own models stay as they are, and default takes magpie's entry out. fx sends no effort to such a provider, so there is none to pick. Tested live from a sandbox: fx 0.0.11 listed magpie's models and read and wrote files through several tool rounds on DeepSeek
2026-09-28 11:17:20 +08:00
yetone
2b2a7bf83f
sync: a WebDAV server that answers 403 for what isn't there (a Synology, PROPFIND too) no longer fails the first sync as if the account couldn't write in the folder — magpie's own folder in it is looked for, and when it isn't there a 403 to reading the backup is no backup yet and one to writing it is made as a 404 is
2026-09-28 10:51:05 +08:00
yetone
880c755a2a
gateway page: opened from a page that already had the providers, it is drawn from them at once rather than left as empty cards until the new list is in ( #123 ) — the skeletons were only for a first load, so coming from Providers showed blank cards for as long as /api/providers took. And Claude Code's sign-in, asked of claude auth status (up to 5s) every 30s under a lock on that path, is served from the last answer while it is asked again behind it
2026-09-28 10:47:42 +08:00
yetone
01ffafadec
providers: ClinePass is a preset — Cline's $9.99 plan for open coding models (GLM, Kimi, DeepSeek, MiMo, MiniMax, Qwen), served at the Cline API with a Cline key; the API lists its pay-as-you-go models and not the plan's, so a preset can say what its plan's ids start with (only those of the list are kept) and which they are (given when the list has none)
2026-09-28 10:28:20 +08:00
yetone
b1fa0c5dfa
gateway: to the key magpie-claude-desktop, /v1/models lists every model by an id Claude Desktop takes — anthropic/<id> for one that doesn't say claude, sonnet, opus, haiku or anthropic — so its Test connection passes and its models can be picked from the list
2026-09-28 10:24:56 +08:00
yetone
c887c041f9
devin: a pinned variant has its family's window — claude-opus-5-5-high and the rest were listed with none, so Claude Code, not seeing 1M, took them for 200K and magpie gave them no [1m] mark; a list fetched before is read with the windows too
2026-09-28 10:24:55 +08:00
yetone
e1f784430b
gateway: Claude Desktop's third-party gateway reaches any of magpie's models — it takes only ids that say claude, sonnet, opus, haiku or anthropic, so a model asked for as anthropic/<its id> is served as <its id> when nothing answers to the id as it stands; count_tokens and /v1/models/<id> read it the same, an id with a slash in it is found at /v1/models/<id>, and GET/HEAD /api/hello answers the gateway's probe
2026-09-28 10:17:05 +08:00
yetone
ddf2ef83f5
panel: a meter in the tray's panel turns used or left when clicked, as the Usage page's do, and says so when pointed at — the one setting for every meter and the menu bar ( #124 )
2026-09-28 10:11:42 +08:00
yetone
c6dc08e105
sync: an address at OpenList's or Alist's /dav/ says to go into one of its storages, naming them — the list of storages there takes no folder (MKCOL 405, as if it were there) and no file (PUT 404), so a first sync failed with a bare HTTP 404; a folder in the address that isn't there says so. Tried on OpenList 4.2.6
2026-09-28 10:10:03 +08:00
yetone
920bc04d48
sync: a WebDAV 403 says why rather than blaming the password — a folder in the address the server hasn't got (a Synology answers 403 for a shared folder not made), one the account may only read, or one it may not use, told apart by looking at that folder; only a 401 is the user name or password
2026-09-28 09:31:10 +08:00
yetone
e31a6a15b0
usage: the menu bar's usage is refreshed as often as asked — every 1, 3, 5, 10 or 30 minutes, 3 as before — and reads as used or left as the Usage page does; that choice is a setting now rather than the browser's, so the page, the panel and the menu bar agree, and Settings has it too; a browser's choice from before is carried over once ( #122 )
2026-09-28 09:27:49 +08:00
yetone
0686bdffa7
accounts: a magpie just started no longer holds every page and request for cursor-agent and devin — who their CLIs say is signed in is kept on disk (cli-identity.json), served at once on the next start and asked again behind it; only a first look ever, or one after a sign-in or out, waits for the CLI. The window's first read went from ~4s to ~0.15s here with both signed in, and the gateway page shows its skeleton, not blank cards, while the state loads ( #123 )
2026-09-28 09:21:24 +08:00
yetone
316803e260
warm-up: Claude accounts too — a Claude window, the 5-hour one and the weekly one, starts at the account's first request after it resets, so with Claude Code warm-up on (Settings: off, weekly, or weekly and 5-hour) the magpie serving the gateway sends each account one "hi" as its window starts over, through Claude Code itself (Haiku, none of its tools, settings or MCP servers, nothing kept on disk), a saved account with its own sign-in; once per reset, kept in claude-warmup.json, as Codex's is
2026-09-28 06:31:40 +08:00
yetone
1324b61fac
quota: a relay's balance can be told by a sub2api panel, and one that tells none says so — a balance token that is a JWT (a sub2api panel's login token, for GET /api/v1/user/profile) is sent as a Bearer, a new-api access token still as it is, and the editor says which goes there; magpie quota <provider> on one with no balance endpoint gives a line saying it isn't configured and how, --json included, rather than an empty list, and an unknown name is an error
2026-09-28 03:28:17 +08:00
yetone
c547e29fae
accounts: a Claude or Codex account removed from magpie is left alone — its sign-ins are no longer saved from the agent nor kept renewed in the background, until it's brought back; before, removing it only kept it out of the providers while magpie went on copying and refreshing the sign-in ( #121 )
2026-09-28 02:27:36 +08:00
yetone
4778cd021c
claude subscription: the bridge's runs keep no sessions on disk — Claude Code is started with --no-session-persistence, as each run's conversation lives in its process and is never resumed from a file, so its throwaway magpie-claude- folders no longer pile up among the user's projects (or get imported from there by other agents); the ones left before are swept once from Claude Code's projects folder, only those named after a magpie-claude-<digits> folder in the temp directory ( #121 )
2026-09-28 02:25:19 +08:00
yetone
2d0058b9b9
providers: the context window field offers its usual sizes under it, one click each — 128K, 200K, 256K, 1M — and, where models take more than they are said to, each one's own most: Codex's GPT-6 and GPT-5.6 are said to hold 272K and take 872K when asked, a size nobody remembers, so one chip sets it for every such model ( #120 ). The most is read from max_context_window in the list ChatGPT gives and in Codex CLI's cache
2026-09-28 01:53:08 +08:00
yetone
de59782fba
providers: Jev through Vercel's AI Gateway and Cloudflare's Workers AI — two presets, Jev · Vercel AI Gateway and Jev · Cloudflare Workers AI, route groups and pick their effort as TypeSafe's own does, each asked its own way: Vercel's evaluation-model with the model in a header, a noul asked as a boolean and a confidence taken from the probabilities; Workers AI's run of typesafe/jev at the account its API token works in, found once, out of Cloudflare's envelope. A key is checked by the gateway's free call (Vercel's credits, Cloudflare's accounts)
2026-09-28 01:43:09 +08:00
yetone
74cbac06ec
gateway: the page is left as it is when nothing on it changed — coming back to the window no longer wipes it to placeholders and redraws, which put the reader back at the top; a reload draws again only what changed (the calls alone when only they did) and keeps where the reader was. The model list folds away under its heading, with its count, so Recent calls sits under Connect; the fold is remembered. Asked on Discord
2026-09-28 01:21:26 +08:00
yetone
6c9a0aa4d7
agents: OpenHanako — magpie is a provider there, chat completions at the gateway's /v1 under the key magpie-hanako with every model it serves, their windows, output, images and reasoning said; picking one makes it the primary agent's chat model, and default puts back the one it had and removes the provider, marked deleted as OpenHanako marks one it removes. While OpenHanako runs it goes through its local API (server-info.json's port and token), which reloads at once; otherwise into provider-catalog.json and agents/<id>/config.yaml for its next start. Asked on Discord; checked with OpenHanako's own provider registry and model manager, which list magpie's models and resolve the chat model to the gateway
2026-09-28 01:12:46 +08:00
yetone
24a57f8c69
providers: a subscription's editor has the Context window field too ( #120 ) — only an API provider's editor had it, so the 872K a Codex account's models take couldn't be set where the account is edited; it saves with the account, and the agents are told it over the 272K Codex's backend reports
2026-09-28 00:47:18 +08:00
yetone
8b8a9e5a7a
gateway: a passed-through request's reasoning effort is fitted to the model's levels, and one asking "none" that the upstream refuses with the levels it takes is asked again at low — Qoder's permission check asks "none", which Command Code turned away
2026-09-28 00:39:22 +08:00
yetone
aee0d1c221
claude subscription: a parked Claude Code run is let go once its conversation moves on — a turn answered by another provider, or on another model, changes the conversation, so the run it left idle never matched again and sat for twenty minutes, one more with every switch back; now a turn that finds no run to resume retires the owner's idle runs whose conversation it has carried past
2026-09-28 00:39:21 +08:00
yetone
315a19b6e2
providers: test that a subscription's context window set in its editor reaches the models agents are told of ( #120 ) — Codex's 272K from the ChatGPT backend gives way to the 872K a user sets on the Codex account, through the account's save
2026-09-28 00:28:53 +08:00
yetone
98efe400b5
gateway: Add to Cindy — Cindy (makecindy/cindy) takes a provider only through its import link, confirmed in Cindy, so the Gateway view's connect card has a button that opens cindy://provider/import with magpie as a custom provider: the gateway for Claude Code on Messages, Codex on Responses and Pi on Chat Completions, each listing the gateway's models, under the key magpie-cindy so Cindy's calls are known as Cindy's. Checked against Cindy's own parser (all three engines in its preview) and its model fetcher (the sandbox gateway's 30 models on each endpoint)
2026-09-28 00:26:04 +08:00
yetone
eb0d4418fe
claude subscription: a one-off ask — a lone message and no tools, as an agent's title or topic or the router's classifier sends — lets its Claude Code go once answered, rather than keeping it 20 minutes for a next turn that doesn't come; up to six such ~150 MB processes sat idle beside an agent that only used another provider for its own turns
2026-09-28 00:13:24 +08:00
yetone
521747465a
usage: every window says when it starts again, on the clock — "resets 14:30 · in 3h", "tomorrow 09:00", "Fri 00:06" or "Oct 13 00:06" — under its bar on the Usage page, under its meter in the panel, and in the TUI whatever its use (not only once nearly spent) and magpie quota, rather than only in a tooltip
2026-09-28 00:07:47 +08:00
Zhizhen He and Claude Code
3fe606e4b3
providers: account usage no longer writes its map from two goroutines at once — an account fetched less than a minute ago went into the map the other accounts' fetches were still writing to, which Go answers with a fatal concurrent map writes, not a panic anything recovers from; LoginUsage and Grok's copy of it now write that hit under the lock their fetches use ( #119 )
...
Co-authored-by: Claude Code <noreply@anthropic.com >
2026-09-27 23:32:15 +08:00
yetone
d8200dfe54
usage: a plan says when its paid time ends — a ChatGPT account the date its sign-in names (only while it is ahead: a token not refreshed since says nothing of now), a GLM Coding plan (ZCode, or a Zhipu or Z.ai key) its renewal or end from the account's subscriptions as ZCode reads them — beside the plan on the Usage page, under the account in the panel, and in the TUI and magpie quota
2026-09-27 23:23:56 +08:00
herrkaefer
fb21a7fbc5
gateway: read complete request bodies ( #118 )
2026-09-27 23:11:32 +08:00
yetone
8dae6aa25b
usage: each call is kept with the session it was part of — the X-Magpie-Session header when the caller sends one, else the session its agent names itself (Claude Code's x-claude-code-session-id, Codex's session_id, OpenCode's) — as "session" in usage.jsonl, and magpie usage lists the sessions that used the most, so several sessions on one model can be told apart
2026-09-27 23:02:36 +08:00
yetone
8f34b6d37e
icon: macOS 26 draws magpie's icon light or dark — AppIcon.icon (the bird on a pale tile, or in white on a dark one) compiled into Assets.car beside the .icns, where the .icns alone was darkened whole in dark mode, the black bird lost on a black tile ( #117 ); the app no longer sets a light picture over it in the Dock
2026-09-27 22:55:20 +08:00
yetone
36a93974b3
ui: a subscription's window count stays inside its card at every width — each window's one column is its own width rather than its count's, so a long count like ZCode's 74217 / 140000 · 已用 53% no longer runs past the card's right edge, and a count too long for its window breaks at its · with the share on a second line; widening the window puts the counts back beside their names, as the check now measures a count's own parts, not the stacked box that spans the row ( #90 )
2026-09-27 22:18:37 +08:00
yetone
926362db4a
providers: a removed account's Add it back line can be dismissed for good — Don't remind me beside it hides the line across restarts, and the Add sheet offers the account back under Removed from magpie, one click, for when it's wanted again; removing it again brings the line back ( #116 )
2026-09-27 22:16:15 +08:00
yetone
c76af6822f
ui: a subscription's windows side by side put every count under its name once one's doesn't fit beside it, not one up by its name and the next a line below ( #90 ); a provider's models can be picked all at once (those the filter shows) or none, and their list scrolls on its own, not the editor with it ( #115 ); DeepSeek Harness's own models are listed under its name, apart from magpie's DeepSeek provider, which read as DeepSeek twice ( #115 ); Hide emails says when it is on — a struck eye, 邮箱已打码 and the accent, an open eye while emails show
2026-09-27 21:38:25 +08:00
yetone
115f0cbd9d
sync: 坚果云 (Nutstore) syncs from the first time — it answers a read in a folder not made yet with a 409 where other WebDAV servers say 404, which magpie took for a failure ( #114 ); a 409 is now no backup yet, and the first sync makes the folder and puts it
2026-09-27 21:01:18 +08:00
yetone
b87a3ce360
agents: Qoder is known as Qoder, not Bun — Qoder CLI is a Bun single-file build whose requests carry Bun's User-Agent and nothing of Qoder's, so magpie's provider in Qoder (and Qoder CN) now carries the key magpie-qoder (magpie-qoder-cn), which the gateway knows an agent by before its User-Agent: usage, the routing view and the models it is shown say Qoder. A Qoder wired before with the key magpie is still magpie's and gets the new key on the next sync, as magpie starts
2026-09-27 20:59:38 +08:00
yetone
6c89759239
ui: an outcome told while a dialog is open (Test models in a provider's editor) floats over the dialog's scrim at the bottom of the window — in the footer it sat under the scrim, dimmed and blurred out of sight
2026-09-27 20:50:06 +08:00
yetone
3d4ae0db47
routing: a Claude account is known once it answers — Claude Code's rate_limit_event (Anthropic's anthropic-ratelimit-unified-* headers: the five hours and the week, used and when they renew) is kept as the account's allowance, standing an hour for a usage endpoint that turns magpie away; and one not known yet goes before those known in smart routing, not after them, where it never answered and so was never known
2026-09-27 20:46:39 +08:00