Commit Graph
402 Commits
Author SHA1 Message Date
yetone 261f0594de web: magpie web's usage tells of MAGPIE_WEB_KEY, which keeps one key across runs and browsers signed in for 400 days (#113) 2026-09-27 20:28:39 +08:00
yetone 73b650b281 routing: a request a group's rule sent to a member that can't take it fails over to the members the rules after it that match too name, in their order, before the group's others (#112) — two rules for images, the first's model out of quota, now go on to the second's vision model rather than the group's text-only first; and while the first's rests, the second's goes first. The trace names who comes next, and says a turn stays with whoever took it, not the model the rule named 2026-09-27 20:28:38 +08:00
yetone aa08863d12 grok: Codex works on a Grok subscription — the tools Grok's backend turns a request away for (Codex's custom apply_patch, its namespace of agent tools) are left out, and so are web_search's external_web_access and a null content on reasoning handed back, which the backend couldn't decode the encrypted reasoning beside. Tested live: the Codex CLI through magpie counts a file's lines, writes the number and reads it back over several rounds 2026-09-27 20:10:08 +08:00
yetone 1d0c9ccf27 settings: a choice's buttons keep their names on one line in a narrow window — the row's description gives way instead, so the Dock's 跟随窗口 and Codex warm-up's 每周和 5 小时 no longer broke a character to a line 2026-09-27 19:50:43 +08:00
yetone 2bb10bca6f providers: Command Code's balance is asked for with its key, as DeepSeek's and OpenRouter's are — how much of the plan's 5-hour and weekly windows is used, then the dollars left on it; and a model list's context_length (Command Code, OpenRouter) is kept as the model's context window, so the agents are told each one's real size 2026-09-27 19:45:18 +08:00
yetone 90fd780eef grok: served straight through the Responses API the grok CLI talks to, not the CLI run behind the gateway — each request goes to cli-chat-proxy.grok.com with the CLI's sign-in and version, as the CLI's own do: the conversation as it is, the caller's tools, images and all, relayed to a Responses client and translated for the rest. The models are the backend's own list, with each one's context window and efforts, and Grok searches the web by itself. A further account signs with its own home. Tested live from a sandbox: Claude Code and OpenCode on grok-4.7 list, read and write files through several tool rounds; an image and a web search answered 2026-09-27 19:41:12 +08:00
yetone 4e83dc6be8 web: magpie web knows its version and updates itself as the app does — the badge's restart puts the new version in and runs it in the old one's place with the same arguments and key, so the open page reloads onto it (#111); routing: a gateway served by magpie serve, which has no window, is told apart from another magpie's window, and the routing view says to stop it so this magpie serves the gateway and shows routing live (#110) 2026-09-27 19:39:45 +08:00
yetone a7dd920e8a tray: the terminal-only build builds again — the menu bar's usage watcher, which needs the tray, is in a file of its own left out of nogui builds; 9cbcb68 had it beside the card's text, which every build has 2026-09-27 19:33:03 +08:00
yetone 9cbcb681dd tray: a subscription's use can sit beside the icon in the menu bar — Settings → Usage in the menu bar picks one of the Usage page's cards, and its windows' use shows there ("42% · 18%", the shortest window first; a key's balance as it reads), with each window and when it starts again in the tooltip, brought up to date every few minutes from the page's own caches, so the vendors are asked no more often. Windows' tray has no room for text and shows the tooltip only. Asked for on Discord 2026-09-27 19:10:27 +08:00
yetone 86a0b90580 providers: Command Code's Provider API is a preset — one key reaches its Claude models on /messages and the rest on chat and Responses at api.commandcode.ai/provider, each request sent where the model list's supported_endpoints say it is served (#93); asked for on Discord 2026-09-27 19:04:04 +08:00
Zhizhen HeandClaude Code 41de0d87eb gateway: count_tokens counts the masked prompt, and a count that cannot be had is told apart — the count Claude Code asks for before every turn went to the vendor as the conversation was written, so Mask secrets was defeated on every one; it now goes masked, the same prompt the turn it counts sends. An endpoint that doesn't implement counting (404/405/501, or a 400 that says so, in English or Chinese) falls back to the local estimate as before; a limited key or a broken connection yields to the next checked key and rests the one that failed, as a generation would, while a client's own cancellation rests nothing; and a real error — a wrong key, a prompt past the model's context, an image it won't take — reaches the agent. The gateway tests are isolated from the machine now (a temp HOME, inert stubs for the sign-in CLIs and the keychain) so a cache that outlives a test can't reach a real login, and the redaction tests' cold starts run in parallel. (#103)
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-09-27 18:58:23 +08:00
yetone ebdf44821f sessions: Terminal is opened through proc.Command, as every command magpie runs is — os/exec there failed TestNoCommandBypassesProc and kept main's CI red since 78fe45d (spotted by @hezhizhen in #103) 2026-09-27 18:54:09 +08:00
yetone ab76cce91b providers: a custom provider's icon can come from its website (#12) — From the website, beside Choose a picture, finds the site behind the base URL (its host, then the domains it sits under: api.deepseek.com, then deepseek.com) and keeps the icon its home page names (an SVG first, then the apple-touch-icon, data: URIs too) or its /favicon.ico, like a picture picked by hand; only public https hosts are reached. Icons are fetched as magpie, since deepseek.com turns Go's own User-Agent away 2026-09-27 18:52:49 +08:00
yetone ab7dd01506 codex: /fast works on a routing group too — a group with a ChatGPT account's GPT model in it is listed to Codex with the Fast tier, and the service_tier Codex then sends is kept through the group's routing and passed on to OpenAI's own backends (a ChatGPT account, api.openai.com) only; before, the request was rebuilt without it and Fast did nothing 2026-09-27 17:51:38 +08:00
yetone 78fe45dbc3 usage: Sessions — Claude Code's and Codex's own session files read into a list beside the overview: each session's folder, first prompt, models, tokens and estimated cost at list price, filtered by agent and searched; Resume copies the cd and claude --resume / codex resume that picks it up, and the Mac app can open it in Terminal. Only the latest 200 are read, cached by size and time, nothing written to the agents' folders 2026-09-27 17:47:14 +08:00
yetone 0ce1888a32 codex: Fast mode through a ChatGPT account — a GPT model Codex's own catalog doesn't list carries the Fast tier Codex gives its GPT models, and the priority service_tier Codex sends for /fast reaches the backend instead of being dropped; other providers' models don't offer it, and other tiers are still left out 2026-09-27 17:42:43 +08:00
yetone b5340c7033 grok, cursor: a run ends with its caller — one whose client left mid-reply (Esc, /clear, Claude Code quit) is stopped at once instead of answering no one, one waiting on tool results that never come is let go after 5 minutes, not 30, and a stop kills what the CLI started too (its own session on Mac and Linux, a job on Windows). A tool that runs longer still gets its answer, from a run told the whole conversation. Runs are stopped with the gateway 2026-09-27 17:42:01 +08:00
yetone c96cfa0ba0 codex: warm-up — a ChatGPT account's next window can be started as soon as the last one resets, by a one-word request to the mini model at low effort, so the 5-hour (or weekly) clock is already running when work begins; Settings → Codex 预热: off, weekly, or weekly and 5-hour. Checked every 5 minutes, only a window seen idle (nothing used, its reset a full span away) is warmed, three tries per reset 2026-09-27 17:36:20 +08:00
yetone 8f915a5a23 web: MAGPIE_WEB_KEY takes letters, digits and - . _ ~ only — a cookie can't hold a space, ; or a quote, so the browser was sent a cookie that wasn't the key and turned away with no word why 2026-09-27 17:26:21 +08:00
Arvak 84ef25805e web: MAGPIE_WEB_KEY keeps the page's key across runs — for magpie web kept running as a service, where a new key each start signs every browser out; with it the cookie outlives the browser session too (400 days, Chrome's most). Unset, each run makes its own key in a session cookie, as before. A key under 16 characters is refused. (#109) 2026-09-27 17:26:32 +08:00
yetone e173710982 backup: the library goes with a backup and a WebDAV sync — the instructions, MCP servers and skills with their files, a fifth part, ticked by default (magpie backup/restore --no-library). A backup without keys leaves the servers' secret env and headers empty and a restore fills them from the servers kept here; a skill's file over 2 MB, or past 32 MB in all, stays behind; a path that climbs out of its skill is refused. What it replaces is kept with the library's backups. Tested from a sandbox: exported without keys, changed and removed things, imported — the server back with the local key kept, the skill back as files, run.sh still executable 2026-09-27 17:24:53 +08:00
yetone c025a927d7 library: DeepSeek Harness (dsh) gets the library — its MCP servers as marked inserts of the dsh-mcp-client plugin in every profile's cordis.patch.yml (id magpie-mcp-<name>), a row the user inserted read like any other agent's and one holding a !!js value left alone; AGENTS.md and skills in its folder. SSE servers and names dsh can't take are refused with a reason (#107) 2026-09-27 17:22:03 +08:00
yetone c7b4f9a6db usage: the page counts on while it is looked at — every few seconds it asks for the counts again and redraws only when they changed, so a request through the gateway shows without a refresh, and the subscriptions' windows are asked again each minute (the vendors' answers are cached behind them). A window in the background or an open menu is left alone. Tested from a sandbox: requests sent with the page open appeared within five seconds, and nothing redrew while nothing changed 2026-09-27 17:16:05 +08:00
yetone 3c5f60b1f3 library: Pi's MCP servers go in mcp-adapter.json when pi-mcp-adapter 3 is installed — it reads that file and no longer mcp.json, which it leaves to the MCP Pi is to have itself (nicobailon/pi-mcp-adapter#680); an mcp.json found then is moved over, as the adapter asks, and once mcp-adapter.json is there it is the file. Before 3, mcp.json as before 2026-09-27 17:10:49 +08:00
yetone 3597cbbcc3 library: instructions come in sets — Default and any others named, each its own text, one of them the one the agents read; a set is added, renamed, switched to and removed (after a confirm, never the one in use or Default) in Library → Instructions, and a setup snapshot keeps which was in use. Providers: each protocol keeps its own URL, so a saved chat URL no longer shows as the Anthropic one; a URL typed and not saved yet moves to the protocol picked after it, spelled as that one wants it (/v1 dropped for Anthropic, added for OpenAI). Settings: an open WebDAV, export or import form is no longer emptied when the window regains focus. Tested in the browser from a sandbox. Issues #104 #105 #106 2026-09-27 17:05:59 +08:00
yetone 59e4f417b2 web: magpie web serves the app's window to a browser, with the gateway beside it — for a computer that can't show the app: no desktop, WSL, a server over SSH, or the CLI-only build, which now carries the page too (what of the app needs Wails is left out of nogui builds). Every request needs this run's key, which the printed link carries and trades for a cookie other sites' pages can't send with a POST; --lan serves it on the network too, with a warning, --addr elsewhere, --no-open leaves the browser shut. In the browser the page opens links and sign-ins itself, names a folder instead of opening it, and leaves out the tray, the Dock and open at login. Tested from a nogui build in a sandbox: no key, a wrong key and a cookieless POST are refused; with the link Agents, Providers and Settings load and a setting saves. Issue #102 2026-09-27 16:21:26 +08:00
yetone dad2787f55 settings: the Dock can follow the window — Hide, With window, Show. With window, magpie is in the Dock (and Cmd-Tab) while its window is open and leaves it when the window is closed, so it can be switched to without an icon kept there the rest of the time. Tested on a sandboxed bundle: shown at start, gone on close, back on reopen; Show and Hide behave as before. Issue #101 2026-09-27 16:14:54 +08:00
yetone 154d071699 routing: a group's effort can be picked per turn by any classifier, not only TypeSafe's Jev — a model that isn't a decision API (Jev Router on OpenRouter, Jev on OpenCode Zen, or any small fast model) is asked in words which of low, medium, high or xhigh the turn needs, in a call of its own beside the intent's, and told what the turn before needed; the routing editor offers every model for it 2026-09-27 16:11:23 +08:00
yetone 5bed05f5fb providers: CherryIN (open.cherryin.ai) is a preset — a New API relay serving chat, Responses and Anthropic's messages at one host, so its models reach every agent with just a key 2026-09-27 15:59:59 +08:00
yetone 16c2588432 cli: magpie <agent> <model> says what the config reads after it — the model under the provider it is named by (OpenCode's magpie-relay/… rather than a magpie/… the config has no provider for) — and (unchanged) when it read that already, where it printed the id asked for under magpie/ as if written. Asked on Discord 2026-09-27 15:33:49 +08:00
yetone ce8d0e065c devin: served straight through Devin's API, not the CLI over ACP — each request goes to the GetChatMessage RPC the devin CLI itself uses, with its sign-in: the conversation as it is, the caller's tools, images and all, and the reply streamed back text, thinking and tool calls as they come. A family's name is sent as its variant at the effort asked for; Adaptive and Fusion, which the API doesn't serve, are no longer listed. The instructions go at the head of the first message, as Kiro's do, since Devin turns away Claude Code's own in its system field. Tested live from a sandbox: Claude Code and OpenCode on Opus 5.5, SWE-2 and GPT-6 Sol list, read and write files through several tool rounds; images and a tool round trip answered on Claude, SWE, GPT and Gemini models 2026-09-27 15:30:24 +08:00
yetone 1d4930dd8e agents: Alma is known as Alma, not ai-sdk — its requests go out with the AI SDK's User-Agent and nothing of Alma's, so magpie's provider in Alma now carries the key magpie-alma and the gateway knows an agent by a magpie-<agent> key before its User-Agent (usage, the routing view, the models it is shown). An Alma wired before gets the key on the next sync, the key alone sent, as a baseURL would have Alma drop its models 2026-09-27 15:28:33 +08:00
yetone bc33064c14 usage: a subscription's windows side by side keep their bars on one line when one window's count wraps under its name — each window takes two rows of the grid (a subgrid), its names and its bar, so ZCode's 5 小时 bar no longer sat a line above Weekly's 2026-09-27 15:28:33 +08:00
yetone 6d80295d00 codex: a routing group whose first model is a ChatGPT account's is listed to a signed-in Codex — it was taken for that account's model, which the backend lists already, and left out, so the group was missing from the Codex app's picker and from /model. Issue #100 2026-09-27 15:26:50 +08:00
yetone 372bf7331b providers: a model id typed in the add box and not yet Entered is kept by Save, as if Enter had been pressed on it — Save dropped it, so a hand-typed id looked saved ("TRelay saved") but never was 2026-09-27 15:22:48 +08:00
yetone f7e38d0d2e agents: a magpie on a port of its own (magpie-dev, a sandbox) takes an agent wired to the installed magpie's gateway (127.0.0.1:3425) for that one's, not drift — the two took turns flagging Codex with Apply again, each rewiring it to itself 2026-09-27 14:54:35 +08:00
herrkaefer c46840a0b0 gateway: validate requests before routing Codex models (#99) 2026-09-27 14:46:22 +08:00
yetone 6cd76567aa devin: a turn Devin ends because one of its own tools was refused goes on — it sometimes lists the magpie tools, finds the list long and reaches for its own grep or read to look through it, which are off, and Devin then ends the turn (agent_stopped, tool_rejected) as if it were done, so Claude Code showed half an answer and no error. magpie now tells it to carry on with the magpie tools, up to three times, and the prompt says they are already there to call. Reproduced in interactive Claude Code on devin/swe-2 and checked there: the refused read is followed by the rest of the task, files written and tests run 2026-09-27 14:42:54 +08:00
yetone 18af9889fb usage: a subscription window's count on a line of its own starts at the left, under the name — it kept to the right, as it is beside the name, so a short one looked indented by spaces (ZCode's 5 小时 under Weekly's). Issue #90 2026-09-27 14:29:01 +08:00
yetone 17f289dd4a gateway: shared on the local network from Settings — Share on local network puts the gateway on every interface at its port, at once and without a restart, so agents on other computers use magpie's models; a request from another machine must carry the API key magpie makes for it (shown with the addresses, copied, renewed in place), and goes on as this computer's own, which need none as before. Off puts it back on loopback. Tested live from a Windows machine on the LAN: no key or a wrong one is turned away (401), the key lists the models and a chat completion goes through to the vendor with the provider's own key. Saving the Settings page no longer drops what other pages keep in settings.json (models' names and levels, who sees which, the network sharing) 2026-09-27 13:48:57 +08:00
yetone 532325f7a6 autostart: on Windows, Open at login switched off in Task Manager's Startup apps reads as off, and switching it on in magpie switches it on there again 2026-09-27 12:53:16 +08:00
yetone 7c4a5d114c providers: an OpenCode model is sent on the API models.dev says it's served on — Grok and GPT on /responses, Claude and MiniMax on /messages — so Claude Code asking OpenCode Go for Grok goes straight to /responses; OpenCode's "Model does not support this protocol" is also taken as the model being served elsewhere 2026-09-27 12:51:43 +08:00
yetone 0669c450e3 settings: Open at login starts magpie in the tray when you log in, so agents find the gateway from the start — a launch agent on the Mac, the user's Run value on Windows, an autostart entry on Linux, which is where whether it's on is read from too (magpie autostart [on|off] in the terminal) 2026-09-27 12:44:39 +08:00
yetone 6cd4344a58 gateway: OpenCode's "Model … is not supported for format anthropic" (and oa-compat) is taken as the model being served on another endpoint, so Claude Code asking OpenCode Go for a Grok model — served on /responses only — goes on to it rather than stopping at the first refusal, and later requests go straight there 2026-09-27 12:34:36 +08:00
yetone 08309e8c04 providers: Test models sends each model agents see a tiny request of its own, on the endpoint it's served on and with a key that sees it, and marks its chip with a dot — green with how long it took, red with what the vendor said — so a relay whose other models answer can't hide one that doesn't (magpie provider test <id> <model>… does it in the terminal). Usage has Hide emails too, one setting with Routing's, to screenshot the subscription cards 2026-09-27 12:26:00 +08:00
yetone c3052fe43c test: magpie model efforts gives a model whose reasoning levels aren't known the ones typed — TestModelNameCmd still expected it refused, as before c1d38cc 2026-09-27 11:51:36 +08:00
yetone 097f399fc1 usage: Kimi Code's plan windows (its /usages, the 5-hour and weekly allowances) show on the Usage page like the GLM Coding Plan's; the Used / Left toggle sits under an Allowances heading above the subscription cards, away from the period's list-price total it never changed, and a balance says why it is only what is left 2026-09-27 11:45:47 +08:00
yetone 6f792a3739 library: RTK's card shows RTK's own mark (the helmet from rtk-ai.app), drawn in the text's colour, in place of a generic terminal glyph 2026-09-27 11:40:03 +08:00
yetone c1d38cc50f effort: Claude Code can start at max — settings.json's effortLevel keeps up to xhigh (/effort max lasts a session), so magpie keeps max as CLAUDE_CODE_EFFORT_LEVEL in its env, which every session asks for (tested: Claude Code then sends output_config.effort max), and another level takes it away. A model whose reasoning levels aren't known (one models.dev doesn't list, a custom provider's) can be given some of none…max on the Providers page or with magpie model efforts, which the lists agents get and the gateway then take it to have: a request's effort is fitted to them, max sent as max 2026-09-27 11:05:47 +08:00
yetone 035dd5b5e3 panel: the tray panel shows every subscription's allowance under the agents — a line per account with its two rolling windows (how much used, or left, as the Usage page is set), its balance, or why it can't be read; the rest stays on the Usage page, and the Usage heading folds it away, remembered 2026-09-27 09:55:40 +08:00