Commit Graph
227 Commits
Author SHA1 Message Date
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 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 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 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 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 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 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 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 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 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 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 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 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 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
smallnest 03a01a548d agent: MiMo Code — Xiaomi's fork of OpenCode, sharing its config shape (#98)
* agent: MiMo Code — a terminal coding assistant that is Xiaomi's fork of OpenCode, whose config keeps OpenCode's shape: its own mimocode.json(c) under ~/.config/mimocode, its auth beside it, and a magpie provider block with npm/@ai-sdk/openai-compatible, model and small_model fields. opencode() becomes openCodeLike() for the two to share it, and magpieProviderJSON splits shape from the catalog id (magpieProviderJSONFor), so a visibility narrowed on mimocode (magpie visible mimocode …) narrows its list and leaves OpenCode's alone. The library gives it the same instructions, MCP servers (its mcp key) and skills as OpenCode, except the shared skills go into its own skills/ folder: it reads Claude Code's skills only behind a flag, though it reads its CLAUDE.md like OpenCode, and the page says so. Its requests are told by the mimocode/ User-Agent. Checked against XiaomiMiMo/MiMo-Code

* icon: MiMo Code's own favicon, from packages/ui/src/assets/favicon — its frame with the bottom bar, in the monochrome the app masks to the text colour
2026-09-27 08:42:44 +08:00
yetone e0cc477990 providers: an Anthropic base URL given as .../v1 or .../v1/messages, as StepFun's docs show it, is taken as its root — magpie asks the root's /v1/messages, so the version went twice and every message was a 404 with nothing to say why, while the model list, asked at both, still answered; StepFun and StepFun (China) are presets, Step Plan or pay as you go 2026-09-27 08:39:08 +08:00
yetone cae88f031c agents: Qoder — magpie's models in Qoder's CLI (1.1) as a "magpie" custom provider in ~/.qoder/settings.json ($QODER_CONFIG_DIR): picking magpie/<model> or a routing group writes the provider, with every magpie model, its context, output, images and the efforts it takes, and makes it model.name; the effort is model.reasoningEffort. The comments and entries of the user's settings stay, and stepping out of magpie takes its provider away and puts back the model the user had. Qoder offers custom providers only to a signed-in account whose plan has BYOK. It asks every model for enable_thinking, which OpenAI's API refuses, so that is dropped for openai.com. Tested live: magpie → settings.json → qodercli -p → magpie's gateway → upstream, the reply streamed back 2026-09-27 06:28:14 +08:00
yetone 0f7e90b4f2 agents: Cline — its CLI's model and effort can be one of magpie's. A provider of Cline's own is refused when a session starts (cline/cline#14180), so magpie takes Cline's built-in openai-compatible provider and makes it the one in use: the gateway, magpie's token, the model, a User-Agent that names Cline (its requests say only AI SDK), and the effort under reasoning.effort. What the user had there, and the provider in use, are stashed and put back when magpie steps out. Tested live with Cline 3.0.65 against a sandbox gateway: the turn comes back and the usage is Cline's 2026-09-27 06:08:58 +08:00
yetone a90e9ae4e5 library: every skill from GitHub is updated with one click — the Library's skills page has Update all beside the skills in the library (and magpie library skill update with no name does it from the command line): each repository is fetched once however many of its skills there are, the agents are written once, and a skill that couldn't be fetched is said while the rest are updated all the same. Asked for on Discord 2026-09-27 04:21:14 +08:00
yetone 54e8bc6e1a gui: a provider icon always draws — the page's files are served with their own types, not the ones Windows' registry gives, which another program may have changed (an SVG not served as one draws no mask icon), and a mask icon that fails to load becomes the generic one, as a picture of the user's own does. Issue #97 2026-09-27 03:44:55 +08:00
yetone 6fd85894ea routing: Jev (TypeSafe's System One) as a group's classifier — asked once as a turn begins which of the rules' intents the message is, with how sure it is, and, for a group with effort auto, how hard the turn is to think about; the turn's requests then ask their model for that reasoning, where the agent asked for any. TypeSafe is a decision provider: it serves no conversation and is no group's member 2026-09-27 01:53:04 +08:00
yetone 4f22d103d3 providers: Kiro is served through Kiro's own API, as pi-provider-kiro does, not kiro-cli over ACP — magpie reads the sign-in kiro-cli or the Kiro IDE keeps (Google, GitHub, AWS Builder ID / IAM Identity Center, or an external IdP), or takes a Kiro API key saved on the provider, and calls generateAssistantResponse itself: the caller's system prompt, whole history, tools, tool calls and results and images go to the model as they are, with no agent's own prompt and tools between, and its event stream comes back as text, thinking (asked for with Kiro's thinking mode), tool calls streamed as they are written, and usage. kiro-cli no longer has to be installed. A token near its end is refreshed — by kiro-cli when it is its sign-in, else directly, the new one written back where it came from — and one Kiro turns down is refreshed once and the call tried again. History is made the shape Kiro takes: it opens and ends with the user, every call is answered in the next message (an interrupted one said to be so), orphan results go, tools the conversation used but no longer offers are described, ids Kiro rejects are hashed, only the latest images are sent again. Kiro's usage limit is a 429, a prompt too long the error the rest of magpie takes for it. The models are Kiro's list with their context and image support; the account is its email and plan; the Usage page shows its credits and free trial. Issue #90 2026-09-27 01:25:37 +08:00
yetone cf3da44807 usage: a narrow subscription card puts a window's count under its name — at the default window size ZCode's 5 小时 was squeezed a character a line and its count ran past the card's edge; the name keeps one line, the count takes the next when both don't fit, and one too long even for that ends in … with the whole of it on hover. Issue #90 2026-09-27 00:58:09 +08:00
yetone 050c33b07d providers: Kiro — a Kiro subscription served through the genuine kiro-cli over ACP, as Devin's is: magpie runs kiro-cli-chat acp as an agent of its own written into an empty workspace, whose only tools are the caller's (the magpie MCP helper, trusted; includeMcpJson off), picks the model with session/set_model, streams text and thinking back, and refuses permission for anything but the caller's tools. The account is whoever kiro-cli whoami says is signed in; a Kiro API key saved on the provider goes to the CLI as KIRO_API_KEY, the user's own environment's never. Missing CLI, signed out, MCP turned off by Kiro and ACP errors' data are each said plainly 2026-09-27 00:39:12 +08:00
yetone 45a5041a20 models: a name is given only to a model its provider has — magpie model name deepseek/nope X was kept and never shown; and the level none reads 不思考 in Chinese, as the other levels are named. Issue #92 2026-09-26 23:29:40 +08:00
yetone 47e12df418 models: a provider's model can go by a name of the user's, and offer only some of its reasoning levels — Claude Opus 5.5 · Claude Code can be Opus 5.5, and a model with six levels can offer just low, medium and high. Both are kept in settings.json by provider/model (modelNames, modelEfforts), apart from the vendor's list, so a Refresh, a restart or an upgrade leaves them, and the same model from another provider keeps its own; a provider renamed takes them along. They are applied where the catalog is made, so the gateway's /v1/models, the lists magpie writes into the agents (Codex's model catalog, ZCode, Pi, OpenCode, OMP …) and magpie's own pages all show them, and a change rewrites the agents' lists as any other change of the catalog does. Only what is shown changes: the id, where requests go, and the levels the vendor is asked at stay as they were; a found routing group keeps the model's own name. The provider's editor has Names & levels under its models — a name typed in place, a tick per level, Restore default — and the terminal has magpie model name <provider/model> <name>|--reset and magpie model efforts <provider/model> low,medium,high|--reset. Issue #92 2026-09-26 23:23:45 +08:00
yetone c08231ee25 usage: a window reads as how much is used or, as the vendors' own apps show it, how much is left — Used / Left on the Usage page, or a click on the figure, flips every meter and its bar, kept for next time; the label says which (64% used, 36% left). A window with the vendor's own count shows the percentage too (345 / 28000 · 1% used, issue #90). The terminal's usage page shows the accounts too — subscriptions' and plans' windows as meters, keys' balances — asked of the vendors when it opens and on r, u to flip used / left 2026-09-26 23:03:41 +08:00
yetone cd3222d213 intent: a turn that only carries on from the one before — 继续, 好的就这么做, fix that — is of the kind that one was; the classifier is told what it said of the conversation's turn before, as it only saw the new message and put 继续 after a 复杂任务 among the simple ones. A message that asks for something of its own is still classed by itself (你是谁 after a 复杂任务 is 简单任务), and the Routing view says what it was told 2026-09-26 22:51:17 +08:00
yetone ea5d089b4a gui: the Agents and Providers pages open at once again — the Providers page worked out each agent's model and routing group again for every provider (every provider's models read again each time, Alma asked over HTTP each time), so it took 25s with many providers; now once per page. What is parsed from a file is kept until the file changes (Codex's models cache, the vendors' model lists, ~/.claude.json's account, and an agent's TOML config — Codex's can run to megabytes of trusted projects, and was parsed again for every field); and what Alma answers when magpie only shows what it is on is reused for five seconds, as its providers take most of a second each time, while a change and what it reads first still ask Alma. /api/providers 25s → 0.02s, /api/state 7s → 0.1s 2026-09-26 22:25:28 +08:00
yetone 0218eeb5ca rtk: an agent left with the hook of an rtk that isn't installed (never was, or removed since) is shown with RTK missing — its shell commands fail — and can still be switched off: magpie takes out just what rtk's installer put in (the hook in settings.json / hooks.json, RTK.md and the @RTK.md line, Gemini's hook script, Copilot's instructions block, the OpenCode / Pi / OMP extension, Hermes' plugin) itself, needing no rtk, the files kept aside first; rtk's own uninstaller is no longer used, which deleted Gemini's GEMINI.md whole and took Claude Code, OpenCode and Cursor away together. Gemini is given rtk hook-only, so the user's GEMINI.md isn't written over. Install RTK on the page (and magpie library rtk install) installs rtk with Homebrew, winget on Windows, or rtk's own script into ~/.local/bin, only when clicked 2026-09-26 21:53:05 +08:00
yetone 0f0b8fc87e gateway: Codex on one of its own models moves on to the next ChatGPT account when the one it is signed in to has used its allowance up — with more of Codex's accounts on in magpie, Codex's requests go through magpie even for its own models (openai_base_url kept, and put back or taken out as accounts are switched on or off) and are served as the codex subscription's, which fails over as its other models do; the account out of allowance rests until ChatGPT says it resets (resets_at), up to an hour at a time. Asked on Discord 2026-09-26 21:11:42 +08:00
yetone 04a189b863 update: a version downloaded and waiting for the restart no longer stops magpie looking for newer ones — the check every six hours still runs, and clicking Update asks the feed again first: a newer release out since is downloaded in its place (the badge shows the download, then restarts), so the restart goes straight to the latest instead of one release at a time. Asked on Discord 2026-09-26 21:00:33 +08:00
yetone c4268e524f providers: a provider's id can change — its editor has an ID field (magpie provider set <id> id=<new> in the CLI), and renaming it moves what named it by the old one: the agents on its models (each spelled its own way, recorded as magpie's), the routing groups' members, rules and classifier, other providers' fallbacks, which agents are shown it, and the vendor's fetched list. The old id stays with it, so an agent still running on the old config reaches it, a profile saved before applies to the new id, and its usage so far is counted under the new one. Asked on Discord 2026-09-26 20:22:30 +08:00
yetone 631e4c3096 library: RTK (rtk-ai.app) can be switched on per agent — a Library tab lists the agents RTK has a hook for (Claude Code, Codex, Gemini CLI, OpenCode, Cursor, Copilot, Pi, OMP, Hermes), each with a switch that runs RTK's own installer (rtk init -g …) for it, keeping the files it edits aside first; which have it is read from their files, and the tab says RTK's version and the tokens it saved. RTK's installers for OpenCode and Cursor give it to Claude Code too, and its uninstaller for Claude Code or OpenCode takes all three: magpie keeps each switch to its own agent. magpie library rtk [on|off <agent>] does it from the CLI. Asked on X 2026-09-26 19:25:23 +08:00
yetone 7a3c434610 agents: Alma — magpie wires it through Alma's local API (localhost:23001, while Alma runs): choosing one of magpie's models for Alma adds a provider named magpie there (OpenAI type, the gateway's /v1, key magpie), offers magpie's models in it and makes the model Alma's default chat model, the rest of Alma's settings and its other providers left as they are; the list is kept current as magpie's catalog changes, and going back to Alma's own takes magpie's provider out. Asked on Discord 2026-09-26 19:18:51 +08:00
yetone 0e07ebd1b2 providers: the context window can be set in the app — a provider's editor has a Context window field, 128k for all its models or gpt-6=1m for one, comma separated, which agents are told over what the vendor or models.dev says (as magpie provider set … context= already did); empty leaves it to them again. Asked on X 2026-09-26 19:16:37 +08:00