Commit Graph
439 Commits
Author SHA1 Message Date
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
yetone 06e173670e usage: Claude's allowance is read at most every three minutes per account, and a 429 from Anthropic's usage endpoint keeps what was known — the Usage page, the switch list and routing each asked it every minute for every account, and Anthropic turns an account asked that often away, which left Claude's usage blank or erroring. A turned-away account waits as long as Retry-After says (five minutes when it doesn't), a window that has reset since it was read shows as fresh, and one never read says it is rate limited and when magpie asks again 2026-09-27 09:50:54 +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 55afcdd4bb agents: Qoder CN — qoderclicn, the China site's build of Qoder's CLI, is the same CLI with its own accounts and its settings in $QODERCN_CONFIG_DIR, ~/.qoder-cn by default; magpie wires it as it does Qoder, a magpie custom provider with every magpie model and model.name/model.reasoningEffort, as its own agent 2026-09-27 08:05:12 +08:00
yetone 84f001da08 agents: Cline lists every magpie model — its built-in openai-compatible provider knows only gpt-4o, so /model offered that alone and the rest had to be typed in one by one. magpie now puts its models in models.json beside providers.json, as the entry Cline's own migration writes for openai-compatible (provider name, baseUrl, defaultModelId, and the models with their context, output, images and reasoning), which takes the place of the built-in list; the user's entry there is stashed and put back when magpie steps out, and Sync keeps the list current. Tested live with Cline 3.0.65's TUI against a sandbox gateway: /model shows provider magpie with every magpie model, picking one runs the turn on it, and magpie reads the pick back 2026-09-27 07:30:59 +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 3651b45e00 library: the skills.sh test counts its fetches atomically — the market asks for the skills' pages at once, so the test server's handler runs on several goroutines and go test -race called the plain counter a race 2026-09-27 04:55:15 +08:00
e136cf9a27 gateway: Gemini PDF and audio files kept on text-only routes (#95)
* gateway: keep Gemini document and audio file data on text-only routes

* fix(gateway): avoid translating Gemini files as images

* fix(gateway): preserve Gemini files for Code Assist while translating safely

* fix(gateway): retain Gemini file placeholder for Claude subscriptions

---------

Co-authored-by: Instinct Agent <agent@instinct.com>
Co-authored-by: Charan Rathore <charan-rathore@users.noreply.github.com>
2026-09-27 04:24:03 +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 cf60231465 gateway: a web search magpie runs for Claude Code is told as Anthropic's own — a server_tool_use block with its query and a web_search_tool_result block with the pages found — so Claude Code's WebSearch counts it and lists its links, where it said "Did 0 searches" with the answer alone. This holds for magpie's search tool on any provider, the Claude subscription's WebSearch and magpie's search tool run inside it (no longer passed to the client as a call), and a Responses provider's own web_search_call, whose sources are asked for. Tested live with Claude Code against a Claude subscription, Grok and Codex: each search comes back with its links 2026-09-27 03:41:53 +08:00
5bad1d117f gateway: count usage from multiline and final SSE events (#94)
* gateway: count usage from multiline and final SSE events

* fix(gateway): count single-newline SSE events alongside multiline data

---------

Co-authored-by: Instinct Agent <agent@instinct.com>
Co-authored-by: Charan Rathore <charan-rathore@users.noreply.github.com>
2026-09-27 03:29:23 +08:00