Commit Graph
3181 Commits
Author SHA1 Message Date
yetone 189c8949ed codex: one of Codex's own models picked while Codex is signed in with an API key OpenAI refuses (one a relay issued, left in ~/.codex/auth.json) failed with OpenAI's bare 401 "Incorrect API key provided" on every turn; the refusal now says it is Codex's own sign-in that was refused and to pick one of magpie's models in Codex or sign Codex in again 2026-09-26 15:14:33 +08:00
yetone c83e03d5c7 provider: how long a request a model takes can be set — magpie provider set <id> context=272k (all its models) or context.<model>=1m, and magpie group set <id> context=… for a group, which otherwise takes its shortest model's; agents are told it (Pi's contextWindow, ZCode, Codex's catalog, Grok, omp, dsh) over what the vendor or models.dev says, and the Providers and Routing views keep it when saved. An empty value clears it 2026-09-26 14:39:55 +08:00
yetone 0f9d60db07 library: the MCP servers an agent's app writes into its config itself (Codex's node_repl and cua_repl, run from inside its install) are told apart — not offered to bring in, shown as the agent's own and left as they are; magpie library lists what agents have that the library doesn't 2026-09-26 14:34:53 +08:00
yetone 5f839eae99 provider: saved Claude or Codex accounts that are not offered say why — under a HOME where the agent is not signed in (a magpie serve with its own HOME, no ~/.codex/auth.json or ~/.claude/.credentials.json there) they went missing without a word; magpie serve, magpie providers and the Providers view now tell 2026-09-26 14:32:48 +08:00
yetone cb609d2cb4 update: after an update on Windows one magpie is left, not two — a magpie running when another updated the binary (it runs on from magpie.exe.old) no longer downloads the update again to magpie.exe.new and swaps it in when it quits; it says a restart is all that is left. A magpie.exe.new that is magpie.exe over again is removed at start. The tray that found the gateway taken serves it once the magpie that had it is gone, checked every 15 s 2026-09-26 14:30:16 +08:00
yetone 6b39a69bf4 provider: a balance field can be a sum — paths into the reply and numbers with + - * / and brackets, "(1 - credits.monthlyCredits / 70) %" for what is left of a plan, a "%" after it showing a percent of 1; "data.total / 500000" and "$data.x" read as before 2026-09-26 14:26:28 +08:00
yetone 6bc43d5dab gui: on Windows, Open folder finds Explorer where Windows keeps it — it was looked for on PATH, and a magpie started without the Windows folder on its PATH said exec: "explorer.exe": executable file not found in %PATH%; now %SystemRoot%\explorer.exe. A PATH taken up from the registry after an install had %SystemRoot%\system32 made C:\Windows$\system32; it is expanded as Windows does 2026-09-26 14:22:47 +08:00
yetone 67c539d5da gateway: secrets can stay on the machine — with Settings › Privacy › Mask secrets on, API keys, private keys, tokens, JWTs and the passwords of connection strings and assignments in what an agent sends go to the vendor as placeholders like {{API_KEY_k3v9x2mq}}, and what the vendor answers has them back, streams included (a placeholder split between two events is put back whole, a tool call's arguments get the value escaped); personal data (emails, phone numbers, ID and bank card numbers, checksum-checked) and the user's own words can be masked too. A placeholder is the same for the same value every time, so a conversation's history and what the vendor cached of it stay the same turn after turn, and the request log shows what the vendor saw. Suggested on X as maskit's idea; written from scratch 2026-09-26 14:21:14 +08:00
yetone cdd1e8e7a4 group: a group's id can change — a group magpie found is group/auto-<model>, and agents could only pick it by that; now its id (any group's) is changed in the editor or with magpie group set auto-gpt-6-astra id=gpt-6-astra: the found one stays removed under the old id, the groups that have it in them and their rules follow, and an agent set to the old id is told it needs setting again (#83). magpie groups no longer says a group in a group is not served 2026-09-26 14:14:26 +08:00
yetone 0849cce8a1 gui: on Linux the window has no system title bar over its own header — GNOME drew one (the name and a ×) stacked on the tabs; the window now keeps GNOME's shadow and resize edges but shows no bar, and the page's header is the title bar: the icon and name, dragged to move, double-clicked to maximise, and a round × that hides the window to the tray. Reproduced and checked on Fedora 44 GNOME 50 (Wayland) 2026-09-26 14:06:45 +08:00
yetone fa9f018a93 gui: on Windows, Open folder starts Explorer and leaves it to open — Wails' way ran it on the thread the windows are drawn on, waited for it and killed it after ten seconds, and the buttons did nothing there; a folder that can't be opened now says why instead of nothing happening 2026-09-26 13:59:02 +08:00
yetone 67056512e0 codex: back on one of Codex's own models after another vendor's, the conversation goes on — another vendor's reasoning (an rs_… id with nothing sealed in it, as Volcengine writes it) went on to OpenAI, which keeps nothing (store is false), looked the id up and answered 404 "Item with id 'rs_…' not found" on every turn and compaction; it now stays out, and an item OpenAI still refuses (sealed content it can't verify, an id it doesn't have) is taken out and the rest asked again instead of the session stuck on it 2026-09-26 13:59:01 +08:00
Zhizhen HeandClaude Code f3d567e07e agent: TOML tables magpie edits end where the parser says — a table no longer swallows the [[skills.config]] blocks that follow it. A write that would leave an invalid config is refused with its file, line and column
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-26 13:46:03 +08:00
yetone d4135b55e1 group: a routing group's models can be another group — group/<id> as a member, routed in its place by its own routing and rules, so Coder can be deepseek-v4-pro then Fast, a Coder rule can send a turn to group/fast and Fast's own rules pick within it; a group can't be in itself directly or through another (refused on save, left out of the picker), groups go at most 8 deep, and one can't be removed while another has it. The Routing tab shows a group in a group as a heading with its models under it, the packet going through it, and the log says what each group's rules and classifier decided 2026-09-26 13:41:17 +08:00
yetone 90ed57f077 docs: intent routing shows a real request in the Routing tab — a message asking for tests, told "writing or fixing tests" by deepseek-flash in 964 ms, goes to glm-5.3 by rule 2; light and dark, English and Chinese 2026-09-26 13:08:47 +08:00
yetone 4aea9a30cc gui: a subscription's quota says it is used — the card showed 47% where Codex shows 53% left of the same window, and it read as the two disagreeing (#81); it is now "47% used" (已用 47%) 2026-09-26 12:43:12 +08:00
yetone 7174df1932 dsh: each magpie model says its context window, longest reply and whether it takes images — dsh otherwise takes a million tokens of context, 256K out and text only for every model, so a 128K model overflowed and a vision model was sent no images (#81); the longest reply comes from the catalog's output limit, a group's is its members' least; older dsh ignores the fields it doesn't know 2026-09-26 12:42:11 +08:00
yetone f64d2fbaf0 intent: a reasoning classifier answered nothing now and then, and the turn after it wasn't classified — tested for real (20 coding messages, real models through magpie), deepseek-flash spent its 512 tokens thinking and answered "", and that 30 s rest skipped the next turn too; the classifier is now asked for its least reasoning (none, else its lowest level) with 2048 tokens, and an answer that isn't a number no longer rests it. DeepSeek V4 Flash, GLM-5.3 Flash and MiMo v2.6 Flash now get 20/20. The site's routing demo opens on By intent: a turn is classified once, goes to its rule's model, and its tool rounds stay there 2026-09-26 12:34:55 +08:00
yetone dc3f69163a gui: the top tabs are the panel's most-used switch and were 24px tall with 12.5px text — now 30px, 13.5px, with more room each side (10px when the header is cramped) 2026-09-26 11:58:26 +08:00
Erick Guan f399af82d1 gateway: /v1/models says whether a model reasons and at which levels (#80)
The OpenAI-compatible model serializer omitted catalog efforts, so endpoint consumers saw reasoning models as incapable. Include reasoning support and effective effort levels for both individual models and routing groups.
2026-09-26 11:54:05 +08:00
yetone d9ff79ae44 docs: Intent routing, in English and Chinese — when the classifier is asked and when not, the exact prompt and what of the message it sees, how its answer is read, what happens when it fails or is slow, the rest of the turn (held, failover, outgrown, waits, subagents), reading the trace, latency/cost/privacy, writing intents, the numbers, and a FAQ; with screenshots of the rules and the trace 2026-09-26 11:30:09 +08:00
yetone 9d092087a1 routing: two of a group's models on one provider are two rows — they go over the same keys, so the diagram told tries apart by key alone and showed the wrong model as answered; a try now carries the model it was for, and the trace names the agent (Claude Code, not claude) when the view opens before the app's state has come 2026-09-26 11:30:08 +08:00
yetone bc720c8d87 group: a rule can be for a kind of message — intent="writing or fixing tests": as a user's turn begins, the group's classifier (any model magpie has, best a small fast one) is asked once which of the intents that may match the message is, and the turn stays with the answer through its tool rounds; it isn't asked when no intent rule could decide, the same message isn't asked about twice, and when it fails or is slow (8s) no intent matches and it rests 30s. The trace says what it was asked and said; Routing's rule editor has "asks for" and the classifier picker, and magpie group rule add … intent=… classifier=… / magpie group rule classifier from the terminal. A sub-millisecond reply no longer shows as NaN s in the trace 2026-09-26 11:09:13 +08:00
yetone b9b412bb0e gateway: a Claude subscription run with no bridge ends without panicking — finish called removeRun on a nil bridge when the idle timer fired for a run made outside one, which crashed the gateway tests under -race 2026-09-26 11:09:05 +08:00
yetone 696c8e70e7 group: rules send a kind of turn to a chosen model — a group's Rules (Routing view, or magpie group rule add|rm|mv) put one of its models first for a turn that is long (tokens ≥ N), carries an image, asks for reasoning (on or at least a level) or comes from certain agents; the first that matches decides as the turn begins and the turn stays there through its tool rounds, moving only if it outgrows its model's context, the others staying behind it for failover; a subagent keeps a place of its own so a rule can send it elsewhere while its agent stays; the trace says which rule sent a turn where. Turn affinity also now sees past the system message Claude Code puts after tool results, which made each of its tool rounds look like a new turn 2026-09-26 03:53:33 +08:00
yetone 31fbf611e7 docs: what an import link's catalog gives — besides names, context sizes and reasoning levels it is the model list when the provider's /models can't be read and the prices behind the Usage page's USD estimate, and several ids may be given 2026-09-26 02:47:19 +08:00
yetone 6da20f50f6 gateway: an agent's run that fails mid-reply ends on the error — Claude Code, Cursor, Grok and Devin runs still wrote message_stop / response.completed / [DONE] after the error event, so a client could take the half reply as complete; the same fix #78 made for translated streams 2026-09-26 02:15:23 +08:00
Charan Rathore fa25a50936 gateway: a reply translated from a dying stream no longer reads complete (#78)
translate ignored readSSE's return, so an upstream that severed mid-reply left a buffered client holding the partial text under finish_reason "stop" and a streaming client with a synthetic stop chunk, final usage and [DONE]; the buffered path now answers 502 and the streamed path emits the client protocol's error event and skips the normal completion, covered by tests that hijack an httptest upstream and close it mid-stream plus a control that a properly finished stream still translates end to end
2026-09-26 02:14:52 +08:00
Charan Rathore f298bb4feb test: keep smart routing reset fixture within one hour (#77) 2026-09-26 01:40:57 +08:00
yetone c25cc6a5fd gui: the profile chips are a target to hit — 25px tall with 12px text under the agents, easy to miss for what the panel is most opened for; now 30px, 13px, with more room between them and bigger ↻ and × 2026-09-26 01:38:38 +08:00
yetone 257b6fa80e group: a removed found group is said to be removed wherever it is — once its model was down to one provider, magpie no longer found it, so magpie group rm said no group "auto-…" and magpie groups didn't list it though its record was still in providers.json; both now know it, restore takes the record out, and group help and groups say that the {"hidden": true} record is what keeps a found group removed 2026-09-26 01:38:38 +08:00
yetone 530734ff46 library: magpie library from the command line, and the app writes the library into the agents when it starts — there was no library command (status, sync, instructions get/set/agents, mcp add/agents/rm, skill agents/rm now), and Sync ran only from the page's button, so an agent installed or a file edited since kept what it had until the Library page was visited 2026-09-26 01:38:37 +08:00
yetone 7c3fa7d19e update: on Windows an update goes in while what the last one moved aside still runs — a magpie serve started before an update runs from magpie.exe.old, which then can't be removed, and moving the running exe onto it failed with "Access is denied"; it now goes beside it (magpie.exe.old-2…), the leftovers are removed once free, the download is kept for another try, and the Update button says Update failed (the error in its tooltip) instead of seeming to do nothing. Reproduced on Windows 11 with a running .old: the old swap fails, the new one passes 2026-09-26 01:38:37 +08:00
yetone 40812f1d2b gateway: a vendor saying the conversation is too long is said the client's way, so the agent compacts and retries — Volcengine's "Input exceeds the context limit (1048568 tokens)" reached Claude Code and Codex as a plain error they stop on; a 4xx that says the input is past the model's context (context_length_exceeded, maximum context length, prompt is too long, exceeds the context limit, 超过上下文…) now answers 400 with Anthropic's "prompt is too long: …" on /v1/messages and code context_length_exceeded on chat and Responses; one about max_tokens is left alone 2026-09-26 01:38:37 +08:00
yetone c330e20231 provider: an account's "only through routing groups" holds, and one removed stays removed — All() merged a signed-in account's picks without Unlisted, so provider listed claude no saved but claude/* stayed in /v1/models; and any save of an account rebuilt its entry without Hidden, so a removed one came back; a save now keeps it removed, and Add it back (and magpie provider add <account>, which made claude-2) goes through ShowAccount, keeping its picks; and magpie provider set <id> k=v… changes a provider with add's pairs (the v0.1.77 notes named it, it didn't exist) 2026-09-26 01:38:37 +08:00
yetone ac352a7755 provider(zcode): a ZCode subscription — Z.ai's GLM Coding Plan, as ZCode uses it: ZCode's own account is read from its credential store (~/.zcode/v2/credentials.json, decrypted as ZCode does, never written), and more are added from magpie with ZCode's own sign-in (zcode.z.ai's polling flow, then the account's zcode-api-key, made if missing), kept in logins.json beside it; requests go to the plan's Anthropic endpoint with the key, the models are ZCode's coding-plan list (GLM-5.3, -Flash, 5.2, 5-Turbo), and usage shows the five-hour and weekly credits. A phone sign-in is named by its number 2026-09-26 01:37:01 +08:00
yetone 1de4bbc715 agent(zcode): magpie's models reach ZCode 3.14 — it moved its providers to ~/.zcode/v2/provider_config.json and reads config.json's only once, to import them, so a magpie provider set up since never showed in its picker; magpie now writes its provider rule (standard-personal, api-key access, anthropic-messages at the gateway) and a model rule per model (context window, images) there too, keeps every other rule and a model the user set by hand in ZCode, and leaves a provider turned off in ZCode off. Checked against ZCode's own schemas 2026-09-26 01:27:54 +08:00
yetone a9aeb4d45f agent(codex): a Codex that couldn't reach magpie says so — the Codex app writes no history.jsonl, so a Codex it started while magpie wasn't running (the gateway refused it, and it built its model list without magpie's) or before magpie set it up (its requests still went to chatgpt.com or an old port) looked fine; magpie now reads the newest model request Codex logged since it was set (logs_*.sqlite, read-only, a day at most) and shows Apply again with the time and why, and to quit and reopen Codex 2026-09-26 01:16:27 +08:00
yetone c8aeff4cea gui: a picker opened upward sits on its button — with no room below, it was placed the most it could be tall (420px for a model picker) above the button, so a short list, like ZCode's two, hung a few rows up over another agent's row; opened upward, its bottom edge is held to the button now 2026-09-26 01:13:06 +08:00
yetone 1b5d1f87db agent: every agent on a magpie model says when it was taken off magpie behind its back, not only Codex — each checks what magpie wired into it to reach the gateway (Claude Code's env base URL and token, and a managed-settings base URL that wins over them; Gemini CLI's .env and its auth type; OpenCode, Pi, Crush, Command Code, Hermes, omp and Grok Build's magpie provider; DeepSeek Harness's llm-deepseek entry and its key in .env), and one pointed elsewhere or gone shows Apply again with what is off in its tooltip; Claude Code, like Codex, is also said to be bypassed when it was used and nothing of it reached the gateway (its history.jsonl), and slash commands no longer count as use. A test takes every such agent off the gateway and back 2026-09-26 01:10:40 +08:00
yetone 31aabbce43 provider: a key added or turned on has its models asked for at once - which models a key sees is known only from its own list, and since #76 an off key's isn't asked, so a key turned back on (or a new one) waited for the next Refresh: a relay that hands out a key per group sent it nothing, or every model; and a Codex reasoning item whose content is null is kept for OpenAI like one without content (#75 dropped it as malformed) 2026-09-26 01:07:47 +08:00
herrkaefer fa38ca4a96 codex: omit incompatible reasoning before OpenAI replay (#75) 2026-09-26 01:06:41 +08:00
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