yetone
b3f613acb4
gateway: Claude Code with ENABLE_TOOL_SEARCH can search the web — it defers WebSearch and loads it with ToolSearch, whose result is a tool_reference magpie read as nothing, and a Claude subscription's run, told its tools as it began, went on without the tool the client had just loaded, so the model said WebSearch would not load. A tool_reference is now told as the tool being loaded, DeferredToolPlaceholder is left out, and a subscription run whose client now offers a tool it lacks is replaced by one told the conversation with it. Tested with Claude Code on Opus (Claude subscription), Grok and Codex models
2026-09-27 02:53:39 +08:00
yetone
d7999aefc7
providers: a balance endpoint named on a provider can be asked with an access token of its own (balance.token), with the provider's headers — a new-api relay's /api/user/self tells the whole account's quota to its access token and New-Api-User, not to a key: magpie provider set my-relay balance=…/api/user/self balance.path='$data.quota / 500000' balance.token=… header.New-Api-User=…
2026-09-27 02:30:55 +08:00
yetone
9b1641a493
opencode: a model chosen for OpenCode that a provider of the config's own already sends to magpie's gateway is named under that provider — a layout of one provider per family (magpie-relay, magpie-claude, …) is no longer doubled by magpie's flat provider with the same models, nor the default model moved onto it, by magpie opencode <model>
2026-09-27 02:26:12 +08:00
yetone
0f59ca2fc0
routing: a turn a rule sent to one of a group's models stays on it for its tool rounds when another member is on the same account — the conversation was kept to the account that answered, so its next request went to that account's first member: Claude Code's turn Jev sent to codex/gpt-5.5 had its tool results answered by claude/claude-sonnet-5, both served by one provider (as Opus and Sonnet on one Claude sign-in are). And a group whose intents are levels has every turn at one of them however torn Jev is: 继续,再加一个基准测试 after a 复杂任务 came out 0.54 to 0.46, below the confidence counted, and went to the group's first member; a torn turn now stays at the level of the one before, or takes the likelier. Tested with Claude Code through Jev and the real Claude and ChatGPT subscriptions
2026-09-27 02:25:24 +08:00
yetone
68408d2d00
gateway: a web search a client offers — Claude Code's WebSearch, Codex's web_search, a Chat client's web_search_options, Gemini's googleSearch — is done for every provider, not only the Claude subscription. A provider that searches by itself is asked to (a Codex account and OpenAI/xAI with Responses' web_search, Anthropic's API with web_search_20250305, OpenRouter with its web plugin); any other model — DeepSeek, Kiro, Grok, Cursor, Devin, a relay — is given a web_search tool of magpie's, which the first provider set up that can search answers with a small model of its (the Claude subscription's Haiku, then Codex, Anthropic, OpenAI, OpenRouter), and the model is asked again with what was found: the client sees one reply and no tool call. A request offering search is no longer relayed as is to a provider that would ignore the tool. Tested live: Claude Code → DeepSeek with WebSearch (2 turns), Responses and Chat clients → DeepSeek, Kiro and Grok, with the Claude subscription, Codex and OpenRouter each doing the search
2026-09-27 02:21:49 +08:00
yetone
f2b88ad5b4
jev: a group whose intents are levels has every message in one of them — Jev is asked once per set whether the kinds are levels (a noul, kept), and for such a set each turn is read from a choice among the kinds alone, as with a "none of these" option it put 你好 in none; Jev is also told the kind and the reasoning of the turn before, so 继续 after a 复杂任务 stays complex at its effort. Tested live against System One and OpenRouter: 你好 → nano/low, a deadlock analysis → mini/high (xhigh capped), 继续 → mini, 你是谁 after it → nano/low, Claude Code and Responses requests → the effort picked is what is sent
2026-09-27 01:53:04 +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
c576153dd7
gateway: a web search asked of a Claude subscription is done — Claude Code's own WebSearch tool asks for Anthropic's web_search, which magpie dropped as a server tool while running claude -p with no tools of its own, so the model answered unsearched. The run now has Claude Code's WebSearch when the client offers web_search; its call and result stay inside the turn, the client hearing one reply whose usage counts both requests
2026-09-27 01:39:22 +08:00
yetone
a5a8d29ba4
providers: a model list that says which endpoints each model is served on (supported_endpoints, as Command Code's does) is heeded for every provider, not Copilot's alone — a live-fetched list left it out, so Claude Code's request for Command Code's deepseek went to its /messages, which serves only its Claude models, and was turned away; it now goes to /chat/completions, translated, and a Claude model asked for over Chat goes to /messages. /messages and /v1/messages both name Anthropic's. Issue #93
2026-09-27 01:29:33 +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
4f0b889ec1
usage: TestSummarizeTellsPlacesApart holds at any hour — its calls of hours before were yesterday's when it ran after midnight, and Today left them out; it now runs at noon
2026-09-27 01:25:17 +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
f12a75899d
providers: a subscription whose models come from its own CLI (Kiro, Devin, Cursor …) has no host, so magpie provider models said its models were fetched "from" nothing; it names the provider. Kiro signed in with Google or GitHub says so, not SocialGoogle. Checked against a real Kiro account: plain and streamed text, a tool call and its result, OpenAI chat with another model, and Claude Code reading a file through Kiro
2026-09-27 00:51:17 +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
69b295e28a
providers: Kimi Code — a Kimi Code membership's own endpoints (k3, kimi-for-coding …), which Kimi lets members use from other tools with a key from its console, as presets for its global site and its Chinese one, their models from models.dev's kimi-code-plan catalogs
2026-09-26 23:38:46 +08:00
yetone
6694108bf2
agent: an agent whose own config keeps the reasoning effort its sessions start with gets an effort field, as Codex, Grok and Pi have — Claude Code's effortLevel (low to xhigh; max lasts a session only), Hermes's agent.reasoning_effort, omp's defaultThinkingLevel, Goose's GOOSE_THINKING_EFFORT, Copilot's effortLevel (the model's levels when its list says), Crush's large model reasoning_effort, Command Code's reasoningEffort for the current model (it keeps one per model) and dsh's llm-deepseek reasoningEffort (off, high or max, kept when the model changes or the catalog syncs); OpenCode, Gemini CLI, Cursor, ZCode, Devin and Alma keep none of their own in a file, so they get none. Asked on Discord
2026-09-26 23:29:40 +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
8630e4c62a
tui: the routing page (3, was groups) does what the app's Routing view does — an open group lists its rules under its models, one list: n adds a rule typed as magpie group rule add takes it (use=<model> tokens=200k images effort=… agents=… intent="…" classifier=<model> at=<n>), ↵ types one again in place, J/K moves it, d twice removes it; c picks the classifier, s how long a conversation stays, x the context agents are told, R renames the group (the page follows it); a found group that was removed is listed last and u brings it back; smart routing is shown as smart, not in order, and o goes round all four. The library page adds too: a adds an MCP server (a URL, or a command) or skills from a GitHub repository or a folder, e changes a server (its env, headers and agents kept), u fetches a skill from GitHub again, s syncs the library into the agents. The rule parsing moves to provider (ParseRule, RuleWords, Rule.Line) and a typed server to library (ServerOf), for the CLI and the TUI alike. Asked on Discord
2026-09-26 23:08:58 +08:00
yetone
c0b296b300
agent(zcode): a magpie model tells ZCode how long a reply may be and how hard it can think — ZCode's model dialog showed 32000 max output tokens and thinking only on or off for every magpie model. config.json's models now carry limit.output and reasoning {enabled, variants, defaultVariant} (medium where the model has it, else its middle level; none is ZCode's disabled), and provider_config.json's rules, which ZCode 3.14 reads, carry optionSpecs {maxOutputTokens.max, reasoningLevel.values}, as ZCode's own rules do. An output over 128000 is capped: some vendors report their window there (grok's 500000). Asked on Discord
2026-09-26 23:04:38 +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
1d064efe4d
provider: TestContextSetByUser gives the config dir a place, so the Devin CLI a saved group asks writes its config there, not into internal/provider/devin
2026-09-26 23:02:05 +08:00
yetone
97d4b3154e
gateway: a model's id without a provider in it that names a routing group is served by the group — gpt-6-sol goes where group/gpt-6-sol goes, its cheapest member first and the next when one fails, where it went to the first provider that serves it with no failover; and a found group is named however a vendor spells its model, so grok-4-7 (the group of grok-4.7) is served rather than unknown. With no group it is one provider's as before, a provider/model id is always that provider's, and the Routing view shows the group it went to. Asked on Discord
2026-09-26 23:01:53 +08:00
796dac8de9
agent(pi): a magpie model tells Pi how long a reply may be — maxTokens from the model's output limit, where Pi otherwise capped every reply at 16384 tokens ( #91 )
...
* agent(pi): a model through magpie tells Pi how long a reply may be — Pi's models.json got contextWindow but no maxTokens, so Pi capped every reply at its default 16384 tokens, Claude Opus and GPT groups that can write 128K included; each model now carries maxTokens when its output is known (a group's is the smallest of its members'), as DSH and OpenCode's limit.output already do
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
* drop internal/provider/devin/config.json, a file a provider test leaves behind
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com >
Co-authored-by: yetone <kumw95ya25@gmail.com >
2026-09-26 22:57:15 +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
13aa2049a4
intent: a group whose intents are levels — 简单任务 and 复杂任务, how hard a request is — has every message in one of them; the classifier was asked which kind of request a message is, with 0 for none, and put 你是谁 and 你好 in neither, so those turns matched no rule and went to the group's usual route (Claude Opus) rather than the simple one. It now picks the kind that fits best, answering 0 only when a message is plainly none of them: groups by topic still get 0 for a greeting or a poem
2026-09-26 22:39:30 +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
dc10604f8e
usage: gofmt the #90 test
2026-09-26 22:22:30 +08:00
yetone
6584fdd132
usage: the plans left out as ZCode's own are left out of a copy, not of PlanQuotas' cache, which a later ask within the minute would have found shifted and emptied. Issue #90
2026-09-26 22:22:18 +08:00
yetone
f02d37bba9
usage: a GLM Coding plan read with a Zhipu or Z.ai key is shown once when ZCode is signed in to the same account — the plan's card is left out when ZCode's card has its windows resetting at the same moments (the account's own), ZCode's card, which counts the calls, kept; another account's plan still has its card. Issue #90
2026-09-26 22:21:31 +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
2eb5015df3
accounts: Codex is signed in to its next ChatGPT account when the one it is on has used its allowance up — the Codex app, knowing its account is out, may not send at all, so magpie's failover never saw the turn: now the magpie serving the gateway looks every five minutes and, with another of Codex's accounts on in magpie that has room, switches Codex to the first of those as the Accounts page would (the one out stays on, next in line); a Codex started after that is on it. An account rests by its user, so the one Codex is switched to doesn't take over the rest of the one it left. Asked on Discord
2026-09-26 21:32:42 +08:00
Zhizhen He and Claude Code
f2a30647d0
edit: a table's name is the parser's own key path, so [ a . b ] is the table a.b — space or tab around the dots of a header (both valid TOML) is not part of the name; a provider table a user wrote that way is reused in place, edited and taken away again as if magpie had written it, where before it was invisible and magpie appended a duplicate, refused as invalid TOML
...
Co-Authored-By: Claude Code <noreply@anthropic.com >
2026-09-26 21:12:32 +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
06dddf7f68
update: magpie update in a Homebrew install (brew install magpie, from the new tap in magpie-releases) says to brew upgrade magpie instead of replacing the binary in brew's Cellar, which would leave brew thinking the old version is there
2026-09-26 20:50:26 +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
87fb06d2f9
tui: a library page (5) — the shared instructions, MCP servers and skills magpie gives the agents, and RTK: ↵ lists the agents that can have one, each switched on or off in place; e edits the instructions in $EDITOR; the servers and skills found in the agents are listed too, i brings one into the library; d twice takes one out. The same data as the app's Library. Asked on Discord
2026-09-26 19:40:58 +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
yetone
4790c06b02
usage: each call keeps where it went — the provider's host, or the account it was — so a provider id later pointed somewhere else no longer puts the earlier place's tokens and cost under the new one: a model's usage is told apart by host (provider/model @ host) when its provider went to more than one place in the period, or to somewhere other than where it goes now. Asked on Discord
2026-09-26 19:03:14 +08:00
Jeremy Levartovsky
48071e9ab9
gateway: a Claude reply cut off by the context window says it was cut off ( #88 )
...
Claude 4.5 and later stop with model_context_window_exceeded when the
reply runs into the context window before max_tokens. It was read as a
normal end, so a Chat Completions client got finish_reason "stop" and a
Responses client status "completed" for a truncated reply; it now
reads as length, as max_tokens does.
2026-09-26 18:59:26 +08:00
yetone
d05763a5dc
opencode: each model of magpie's carries its window (limit.context), a group's context= with it, so OpenCode compacts when the model needs it and not at its own guess; and magpie sync puts magpie's provider back into opencode.json when a model of magpie's is chosen there but the provider is gone. /v1/models says each model's window too (context_window, context_length, max_input_tokens, max_output_tokens). Asked on Discord
2026-09-26 18:50:04 +08:00
yetone
5dbd28c39e
zcode: what you choose in ZCode for magpie stays — the provider turned off stays off, its rule stays where you moved it, and a rule you removed isn't put back on the next sync. gateway: a model that always thinks (GLM-5.3 answers 1210 to thinking turned off) is asked again with thinking left to it, rather than failing. Asked on Discord
2026-09-26 18:45:49 +08:00
yetone
9b06c30790
balance: a custom provider's balance field can name several amounts, each with a label, apart by ";" — Command Code's credits reply is 5h: windowLimits.fiveHour.used / windowLimits.fiveHour.cap %; week: windowLimits.weekly.used / windowLimits.weekly.cap %; $credits.monthlyCredits, shown as "5h 0% · week 3.4% · $70.00" wherever the balance is (Usage, magpie provider, magpie quota). Asked on Discord
2026-09-26 18:41:01 +08:00
yetone
a1dd2b1222
routing: a turn on one of Codex's own models (gpt-5.5 and the rest, which go to ChatGPT with Codex's own sign-in) shows in the Routing view's live trace as those on magpie's models do — before, only magpie's were traced, so Codex on its own models showed nothing going on. Asked on Discord
2026-09-26 18:31:46 +08:00
yetone
a77f7c1fcc
gateway: a test that when a rule's vision model fails, the text-only member that answers is sent the conversation without its older images ( #87 )
2026-09-26 18:25:16 +08:00
Charan Rathore and Charan Rathore
d583acaf46
fix: avoid sending group images to text-only fallbacks ( #87 )
...
Co-authored-by: Charan Rathore <charan-rathore@users.noreply.github.com >
2026-09-26 18:25:34 +08:00
yetone
d2da93ef11
group: an unlisted text-only model still keeps images out of its group — whether a group takes images was asked of the listed models only, so an image went to a member kept out of the pickers that can't see it; now every member counts, as for the context since #86
2026-09-26 17:52:54 +08:00