Commit Graph
439 Commits
Author SHA1 Message Date
Charan RathoreandCharan Rathore 3212566901 provider: a key that is off is no longer asked for its models - Fetch treated len(allKeys()) > 1 as "ask every saved key", and allKeys() includes the KeyAccount entries marked Off, so a disabled or expired key was called on every refresh and its list merged into the catalog, where a text-only answer could take image input off a model a key that is on serves; the live fetch path now uses KeysOn(), off keys get no requests and add nothing to the catalog, and turning a key back on includes it on the next refresh, covered by TestOffKeyIsNotFetched (#76)
Co-authored-by: Charan Rathore <ra7hore.charan@gmail.com>
2026-09-26 01:06:36 +08:00
yetone 04302b1e63 agent(codex): a Codex taken off magpie behind its back says so, with Apply again — something else rewriting config.toml (another switcher, an installer, a profile of its own) left the row showing a magpie model while Codex asked OpenAI for it, and the user blamed magpie; magpie now remembers what it set on each agent (applied.json) and tells three kinds of drift apart: the wiring gone (the provider table, catalog or base URL, or a profile overriding them), a magpie model replaced by one of Codex's own, and a Codex used since with none of its requests reaching the gateway (history.jsonl against when the gateway last saw it — an old process on an old config). A drifted row carries a coral Apply again pill on its name's line (a badge on the logo in the panel), the reason in its tooltip, Keep current settings in the row menu; the window asks /api/drift every 15s, so it shows without a reload 2026-09-26 01:05:19 +08:00
yetone 5474a977fc gui: magpie's Dock icon is sharp — the app was given the 64px icon, which macOS puts in the Dock in place of the bundle's .icns and scaled up to the Dock's size, so the magpie there was blurred; it is given a 1024px one (30 KB, from the same drawing, made by make icons), and the 64px one stays for the trays of Windows and Linux 2026-09-26 01:03:33 +08:00
yetone 75217233b8 provider: a custom provider can be added with only a Responses URL - the editor's base URL was the OpenAI (chat completions) or the Anthropic one, so a vendor that serves only the Responses API had to be given a chat URL it answers with 404, and Test failed on it; the base URL now takes a third kind, OpenAI Responses, which is saved as the Responses URL alone, tested at /responses only, and served to chat and Anthropic clients through the gateway; switching the kind moves the URL over, and More endpoints lists the other two (#73) 2026-09-26 00:32:13 +08:00
Charan RathoreandCursor Agent 20fe8b4fac provider: a second Codex account's prompts stay cached when two saves share an mtime - the list on disk was merged, but the in-process cache re-read it only when ModTime changed, so a second write in the same tick left the first account's list in memory; a successful save now drops that cache, and a test puts the mtime back with Chtimes so the collision happens every run (#74)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-09-26 00:26:41 +08:00
yetone 0396080cf6 provider: AiHubMix shows the whole account's balance when it has the account's access token — a key is told only what is left on itself, and one with no limit nothing at all, so its card said only "Usage unavailable"; the provider's editor now takes the System Access Token AiHubMix's settings generate (kept like the key, shown only as saved, kept when left blank, with Remove), and with it the card asks /api/user/self and shows its quota in dollars, one card for the account rather than one per key. Without one, the card says the key has no limit and where the token goes, and a token AiHubMix won't take says so; saving a provider has its balance asked again rather than a minute later 2026-09-26 00:22:08 +08:00
yetone afd831980a agent(zcode): the user-agent test knows ZCode's requests 2026-09-25 23:57:00 +08:00
yetone c0cbf90eeb agent(zcode): ZCode is an agent — its provider field puts every magpie model in ZCode's own model picker, as a provider named magpie in ~/.zcode/v2/config.json (kind anthropic, asked at the gateway's /v1/messages), kept in step with the catalog like OpenCode's list, and taken out again when cleared; its requests are known by the ZCode/ User-Agent (#72) 2026-09-25 23:53:59 +08:00
yetone 1dfbc10af8 agent(claude): a Claude account signed in through magpie on a Mac signs Claude Code in again — the sign-in went into the keychain as indented JSON, and security find-generic-password -w prints a password with a newline as hex, so Claude Code (and magpie) read no sign-in and the account never showed (#70); it is written on one line as Claude Code writes it, one magpie wrote before is read and rewritten, and the keychain account falls back to the login name as Claude Code's does 2026-09-25 23:40:50 +08:00
yetone b1c5e739f7 library: switching an agent on or off for an MCP server or a skill no longer makes the row flicker — the page was drawn again, so the chips lost their hover, folded together and spread out again under the pointer; the chip now shows the click at once and what magpie wrote is painted onto the same buttons (#69); and an agent hidden on the Agents page is left out of the Library too — its instructions row, its chips and the defaults for a new server or skill — while what it already has stays with it (#71) 2026-09-25 23:03:53 +08:00
yetone f1fba8d7eb usage: a GLM Coding Plan's allowance and OpenCode Go's show on the Usage page — Zhipu's (open.bigmodel.cn) and Z.ai's 5-hour and weekly windows and the month's MCP calls, with the plan's level, and OpenCode Go's 5-hour, weekly and monthly ones, each asked of the vendor with the provider's key, a card for each key when it has several; a pay-as-you-go GLM key, which has no windows, shows none (#68) 2026-09-25 22:27:18 +08:00
yetone 81342b1b05 provider: a custom provider can list its models from a URL of its own — Xiaomi MiMo's plans are served at their own hosts while the list is at api.xiaomimimo.com/v1/models, so fetching models from the base URL found nothing; More endpoints has a Models URL (模型列表地址), asked with the key and nowhere else, and magpie provider set <id> models.url=… sets it (#67) 2026-09-25 22:16:11 +08:00
herrkaefer daaeee95b2 codex: preserve native compaction for built-in models (#65) 2026-09-25 22:12:30 +08:00
Zhizhen He d36dbe46f5 chore: go mod tidy (#66) 2026-09-25 22:11:19 +08:00
yetone 9e7853906c gateway: a request for a reply of a token or two reaches a provider that answers no less (#64) — an app checking a model is up asks for max_tokens 1, which some providers turn away with 400 "max_tokens must be greater than 2"; the least the provider named is read from that error, and the request is sent once more asking for it (max_tokens, max_completion_tokens, max_output_tokens or Gemini's maxOutputTokens, whichever it set), before any of the reply reaches the app; the routing page says so 2026-09-25 21:40:20 +08:00
yetone d1fe7a32ae library: a skill CC Switch installed can be updated from GitHub — linked from ~/.cc-switch/skills it had no source, so it showed no update button; the repository and branch CC Switch recorded for it are read (read-only) from its database, and updating fetches the skill from there and makes it the library's own copy, leaving CC Switch's folder as it was 2026-09-25 21:34:02 +08:00
yetone 43a30080d0 gateway: an account or key added while an agent works no longer takes over its running conversation (#63) — who answered a conversation was remembered only when there were two or more to route to, so the first request after a second ChatGPT or Claude account (or key) was added went wherever routing put it, and Codex reasoning sealed by the first account came back 400 "The encrypted content … could not be verified" and ended the session; who answered is remembered with one as well, and matched by the key itself, not by an id that changes once a second key is on. A conversation that still reaches another account (the first used up, or magpie restarted) has the other account's sealed reasoning taken out and is asked again, and the routing page says so 2026-09-25 21:29:05 +08:00
yetone 618f529fb5 agent(grok): Grok Build's terminal front end, grok-pager, is known by its User-Agent as Grok Build's shell is — its requests were drawn as an unknown client named grok-pager, with no logo 2026-09-25 21:22:22 +08:00
yetone 70b7b3a058 routing: an account pool's Routing and Stays controls line up — each label sat inline before its segments, so the segments started wherever "Routing" or "Stays" (路由, 会话保持) ended, and at the window's usual width the two wrapped under the name on rows of their own; they are a label column and a control column now, beside the name 2026-09-25 21:19:39 +08:00
yetone 0423553454 gui: magpie can stay in the Mac's Dock — Settings → Dock → Show keeps it there as well as in the menu bar, for a menu bar too full to show its icon; it takes effect at once and at every start, the Dock icon opens the window (only the window: Wails would have shown the panel too), and it stays each computer's own in sync and backups 2026-09-25 21:13:30 +08:00
yetone 3173029853 agent: Grok Build starts on the model picked in magpie again — a signed-in grok takes xAI's remote campaign patches above config.toml, and the grok-4.7-launch campaign sets models.default to grok-4.7, so every new session started there whatever [models] default said (grok -p honoured it only without a sign-in). A default picked in magpie now writes [features] campaigns = false, a sync puts it back for a default already picked, and clearing the model removes it 2026-09-25 21:09:14 +08:00
yetone d89739425e gui: the window opens in the chosen language and theme — they came with the settings request, so with Chinese picked the tabs showed English for a moment first; boot.js in the page's head now carries both, so the first paint is already in them 2026-09-25 21:07:16 +08:00
yetone 081d8369e0 gateway: Claude 4.6 and later are asked to think adaptively — Codex on a relay's claude-opus-5-5 got "requires adaptive thinking; omit thinking or use thinking.type=adaptive", since magpie turned the reasoning effort into thinking.type=enabled with a budget; those models now get thinking.type=adaptive with the effort in output_config (xhigh as max), older Claude and other models keep the budget 2026-09-25 20:59:08 +08:00
yetone 925e4a6ccd provider: a provider can serve only through routing groups — ticked, its models leave the list agents pick from (and /v1/models) while the groups they are in, and a request naming provider/model, still reach them (magpie provider listed <id> no); the routing groups come first in the list; a model list fetched from the vendor can be forgotten; magpie group add under a name in use replaces that group; and the Library gives MCP servers to Claude Desktop, the ones it runs as a command — a remote one is added in its Connectors, which the page says 2026-09-25 20:11:29 +08:00
yetone 9c119f2086 provider: importing from CC Switch or Alma works on Windows — the database was opened as file://C:/…, which SQLite reads as a host and fails with "out of memory"; it is opened as file:///C:/… now, and the import tests keep USERPROFILE and APPDATA in their sandbox so they never read the machine's own apps 2026-09-25 20:11:28 +08:00
yetone 4c67d069d0 sync: magpie's setup kept the same on every computer through WebDAV (坚果云, Nextcloud, a NAS…) — Settings has Sync and backup: the providers with their keys, groups and icons, the settings, the profiles and each agent's models go to the server as one file sealed with a passphrase, so the server never sees them; the magpie serving the gateway looks every three minutes, sends what changed here and brings in what changed elsewhere, a removal too; a part changed on both sides goes to the newer one, and the copy it replaced is kept in the sync folder with a note saying what was replaced; the proxy and the window size stay each computer's own, and a computer set not to send keys never strips them from the server; Export and Import carry the same file by hand (#28) 2026-09-25 19:52:37 +08:00
yetone a1e546d4a1 provider: saved accounts are kept signed in — a Claude or ChatGPT account saved in magpie but not the one the agent is on was refreshed only when used or its usage looked at, and smart routing leaves the ones waiting their turn idle for days; the magpie serving the gateway now renews each such sign-in about once a day (hourly check, so a machine that slept catches up), never the agent's own; a refresh the vendor refuses (400/401) marks the account signed out — the account list says to add it again, magpie accounts too — and one that succeeds clears it; magpie accounts refresh renews them all now, for cron or launchd; a switch waits for a refresh in flight, so the agent is never handed a refresh token being spent (#53) 2026-09-25 19:22:37 +08:00
yetone ba78ea4218 gui: a profile can be updated to the current setup — its chip has ↻ beside ×, which saves the agents as they are now over it; saving under the same name did the same, but nothing said so 2026-09-25 19:00:10 +08:00
yetone 08d1e71aff gui: the window opens at the size it was last given — a resize is kept once it settles, in settings.json, unless the window is maximised, full screen or minimised 2026-09-25 19:00:10 +08:00
yetone 4075ccc188 gui: Windows and Linux draw a thin rounded scrollbar, not the classic one with arrows, and the model picker's logo rail no longer shows a scrollbar of its own — it draws its own thumb, and the native one also pushed its logos sideways into a horizontal scroll 2026-09-25 19:00:10 +08:00
yetone 47f5a0e1ac provider: Zhipu GLM and Z.ai ask which plan the key is for — a GLM Coding Plan is served at its own OpenAI endpoint (/api/coding/paas/v4), and a plan key sent to the pay-as-you-go one is told it has no balance; the editor offers Pay as you go or Coding Plan, and the base URLs follow 2026-09-25 19:00:10 +08:00
yetone 032bcfc8b0 provider: the Grok subscription is called Grok (SuperGrok) — the plan xAI sells, so it reads as the account it signs into; Grok Build stays the name of the agent, the grok CLI the subscription runs through 2026-09-25 18:33:21 +08:00
yetone f7112a9e9d agents: Grok Build — xAI's grok CLI — is an agent: its model is set in ~/.grok/config.toml ($GROK_HOME), and a model through magpie adds the catalog there as [model."magpie/…"] tables pointed at the gateway with magpie's own key, so a request never carries the user's xAI sign-in and the catalog joins Grok's own models in /model; its effort is [models] default_reasoning_effort, its requests are known by grok-shell; the Grok subscription is called Grok Build too 2026-09-25 18:26:50 +08:00
yetone d4160ad4ae agents: an agent nothing is set on goes under Not set up, even one shown by hand before — showing a hidden one pinned it in view, so clearing what was set on it later left it up among the set ones with nothing to say why. Showing one now only unhides it, and it goes where what is set on it puts it; the pins saved before are no longer read, and are dropped the next time the list is arranged; and one under Not set up can be hidden from its logo's menu 2026-09-25 18:12:41 +08:00
yetone 2c7a631221 gui: a Gemini account Google won't serve says why — a personal account, since Gemini Code Assist for individuals ended, or one Google suspended for its terms — instead of "Usage unavailable"; a signed-in account's models are said to be magpie's list until the vendor gives one, not models.dev's; and a new sign-in drops the usage fetched before it 2026-09-25 18:05:37 +08:00
yetone 778cf6234f provider: AiHubMix shows its balance — its /dashboard/billing/remain tells a key what is left on it, in dollars; a key with no limit is told a negative amount, so that says the key has no limit and how to give it one to see it here 2026-09-25 18:05:37 +08:00
yetone a890311767 provider: a Gemini or Antigravity account's usage shows only the models chosen for it — Google reports a quota for every model the account can reach, and the card listed them all; it keeps the windows of the models the provider exposes (the ones picked, else its preset's), and all of them when none of those has one 2026-09-25 18:05:37 +08:00
yetone 41dee15108 provider: the page the browser lands on after a sign-in is signed with magpie's mark — the small magpie from build/icon, drawn in the page's muted colour beside the name at its foot, in light and dark 2026-09-25 18:05:37 +08:00
yetone e4bec57d7d agents: only an agent hidden by hand is greyed and has Show — one nothing is set on isn't hidden, it waits under Not set up as it is, and setting something on it brings it up the list 2026-09-25 17:58:20 +08:00
yetone e0a4c8e5db agents: a folded agent's Show sits at the end of its name's column, so it comes up in the same place on each row as the pointer goes down them, rather than after each name, wherever that ended 2026-09-25 17:55:36 +08:00
yetone 1b309a50f5 agents: a hidden agent says it is hidden, and has its way back beside its name — it was a greyed row among the ones nothing is set on, brought back only from its logo's menu or a right-click, and people took it for broken. The folded agents now sit under a line saying which they are, Hidden or Not set up; hovering one (or tabbing to it) brings up a Show button next to its name; the fold's label counts the hidden ones (Show 6 more (1 hidden)); hiding one says where it went; and the logo's tooltip says a click moves or hides the row 2026-09-25 17:55:04 +08:00
yetone f41bd3ba02 library: a skill is downloaded from codeload.github.com, as github.com's own Download ZIP is, rather than the API's /tarball — the API allows 60 requests an hour to an address without a token, so a few installs, or a network shared with others, got "GitHub is limiting requests from here"; and the GitHub links on a skill open in the system browser, where the app's window, which opens no new windows, did nothing when they were clicked 2026-09-25 17:36:48 +08:00
yetone bbd7e0475d desktop app: opened from the Finder, the Dock or a login item, magpie takes up the PATH a terminal of the user's has — launchd gives it /usr/bin:/bin and nothing a shell profile adds, so a claude installed under a custom npm prefix (~/.npm-global/bin), or through nvm, bun, volta or asdf, wasn't found and its subscription couldn't be used; the folders those tools use are added at once, and the login shell's own PATH in the background 2026-09-25 17:27:34 +08:00
yetone bea2cec91f site: the Routing shot shows four agents — Claude Code, Codex, OpenCode, Crush — sending at once through three routing groups, with Kimi rate-limited and sitting out; in every shot the magpie icon lines up with what's under it, where it had kept the room the Mac window leaves for traffic lights a screenshot doesn't have; and the homepage's Providers shot ends where its list does 2026-09-25 17:21:21 +08:00
yetone 17bf6a15ce routing: in Chinese, a provider row's "one key" is "一个 Key", and the caption under the map is said again in the new language when the language changes — it was set as text, so one said before Chinese was applied stayed English ("DeepSeek goes first.") while everything round it was Chinese 2026-09-25 17:20:35 +08:00
yetone aedf23abc5 provider: a relay given without its /v1 — one that lists its models at base/v1/models but not at the base — has /v1 added to its chat and responses bases when its models are fetched, since the gateway sends chat to the base as written and its requests 404'd while its models showed; and an Antigravity account Google gave no project says so plainly (with Google's reason, when it gives one) instead of "Usage unavailable" alone 2026-09-25 16:51:26 +08:00
yetone 7d0069ab93 site: the import docs come in Chinese too (/docs/zh/import, with its own screenshot of the dialog and the link builder's messages in Chinese), and each page links to its other language; the start docs show what each step looks like — the Add provider sheet, the Agents window, routing groups and Usage — in light and dark, English and Chinese 2026-09-25 16:41:48 +08:00
yetone da27f2f0d7 gateway: a Claude Code request that doesn't ask for thinking goes out with thinking off — Anthropic's API assumes that, but DeepSeek's Anthropic endpoint thinks by default, so the session-title requests Claude Code sends without it spent ~100 tokens thinking before a 10-token title; and output_config's effort becomes reasoning_effort on an OpenAI-style upstream only when thinking was asked for 2026-09-25 16:34:19 +08:00
yetone e072af501d provider: a subscription used through its vendor's CLI — Devin's, Cursor's, Grok's — installs that CLI when its sign-in starts, if this machine lacks it, rather than leaving the sign-in to fail or, as Devin's did, to say "signed in" and show nothing: Devin's sign-in wrote credentials.toml, but magpie sees the account only through devin auth status, so with no devin CLI no provider ever came and nothing said why. The sign-in is now "installing" while the vendor's own installer runs (curl … | bash, or its PowerShell one on Windows, with magpie's proxy), then opens the vendor's page as before; the window says what it is installing and why, can cancel it, and a failed install says the installer's last line and the command to run by hand. What counts is the CLI being there afterwards — Devin's installer ends in devin setup, whose sign-in gives up without a terminal and fails the script after it installed everything — and on Windows the PATH the installer wrote is taken up so the running app finds it. A Devin sign-in the CLI then can't see fails, where it said done with no one; the tests no longer see this machine's own devin 2026-09-25 16:30:00 +08:00
yetone c5a887458f library: Pi is given MCP servers (#58), and the page no longer jumps when it's opened (#59) — Pi has no MCP of its own, and the extensions that give it one (pi-mcp-adapter, pi-mcp-extension) both read the agent folder's mcp.json, so the library writes Pi's servers there, with the transport under both names they read it by (transport, httpTransport) and a lifecycle or anything else the user set there kept; its chips say it reads them through the extension. And the page was drawn anew each time it opened, and on each change, with the fade a tab gets when it's shown, and its text boxes were fitted a frame after they were drawn, so everything under them moved: a tab fades in only when another is picked, and a box is fitted before the page is painted 2026-09-25 16:08:28 +08:00