Commit Graph
3181 Commits
Author SHA1 Message Date
yetone 3a18ec8efc images: every provider's image models and the Codex subscription's GPT Image 2 / 2.5 can draw (为什么生图模型只有这几个?只有OpenRouter这个provider才提供…CodeX Subscription里面也有GPT Image 2和GPT Image 2.5) — Settings → Images → Image generation listed only OpenRouter's, for two reasons: a vendor's model list was cut to the models agents chat with before it was kept, so a relay's gpt-image, flux or Gemini image models were gone by the time the picker looked; and a subscription was never asked. Now the list is kept whole, image models marked as drawing and still never offered to agents to chat with, and the picker has them per provider; a Codex (ChatGPT) account draws with GPT Image 2 and 2.5 on chatgpt.com's own images API (signed as Codex, generations and edits, an edit as JSON with each image a data URL, since the backend turns multipart away), and Automatic prefers it, as a plan's images come with it. AIHubMix answers a Gemini image model's chat with the image in multi_mod_content's inline_data, which is now read. Checked in a sandbox HOME against the real vendors: the picker lists OpenRouter's, AIHubMix's and Codex's, Automatic is GPT Image 2.5 · Codex; codex/gpt-image-2 drew a 1254² PNG and edited it (night-blue background), aihubmix/gemini-2.5-flash-image drew a PNG. The backend takes any model name, so whether 2.5 draws differently from 2 can't be told from outside 2026-09-29 02:20:24 +08:00
yetone beedc17b2a providers: the model filter is a search, and says why an image model isn't there (这个搜索框是不是有问题?没列出来的搜不到) — typing in a provider's model filter left every picked model shown whether or not it matched, so filtering AIHubMix for "image" showed fourteen picked chat models and looked like a search that doesn't work. Now what the filter doesn't match is left out, picked or not (models added by hand too); Select all still picks only those it shows. The list is of models agents chat with — image, embedding and speech models are left out of it when it is fetched — so a filter that matches nothing says so and where an image model is set: Settings → Images. Checked on the page with 30 models, 6 picked: "image" shows the hint alone, "glm" the two glm models, an empty filter all 30 2026-09-29 02:03:54 +08:00
yetone 3ee4ebbf62 images: agents can generate and edit images with a model set in Magpie (让Magpie支持配置图像识别模型以及生图模型, part 2) — the gateway answers /v1/images/generations and /v1/images/edits for any model that draws: an images-API model (gpt-image-1, dall-e, imagen, a relay's) is sent the vendor's own images request (an edit as multipart, image[] per reference); a chat model that answers with images (OpenRouter's Nano Banana and GPT-5 Image, gpt-5-image) is asked with modalities ["image","text"], the size given as an aspect ratio, once per image asked for; Gemini's own image models over generateContent. Either way the answer is the images API's (b64_json with its mime_type, the model's text, usage), recorded in usage like any request. The model is Settings → Images → Image generation: Automatic (a model that draws among the providers set up, from the catalog's image-output models), Off, or any model; a request that names none is drawn by it, and with it Off is refused saying where to set one. Subscriptions draw nothing yet. magpie mcp image is a stdio MCP server with one tool, generate_image (prompt, size, n, path, reference_images): it asks the agent for its roots, saves each image in the project (assets/ by default, a name from the prompt, never over a file, the extension of what came back — a JPEG asked for as hero.png is hero.jpg), and says where; reference images are read from the project and sent as an edit. Its requests carry the agent's own name (claude-code/… magpie-image/1) so usage says which agent drew. Library → MCP servers → Discover has it as Magpie Image, opt-in: no agent is given it until picked, since every image costs what the model charges. Checked in a sandbox HOME against real vendors: OpenRouter's gemini-3.1-flash-lite-image drew a 3:2 magpie over MCP as Claude Code and edited it from the saved file as Codex (usage: claude, codex), AIHubMix's gpt-image-1 answered /v1/images/generations with a 1024² PNG; the Settings row and picker in light and dark, the Library card and its opt-in sheet 2026-09-29 01:52:53 +08:00
yetone 5910bdada5 docs: Get started says agents, not coding agents (把文案里的Coding agents统一改成agents) — magpie chooses the model for any agent, not only coding ones; the English lede said "each of your coding agents" and the Chinese one "编程 Agent"; both now just agents, as the home page already does 2026-09-29 01:45:47 +08:00
yetone 92aef441d4 providers: 添加供应商 scrolls down to the sheet on the first click, and the sheet unrolls with the view going down along with it (第一次点击添加供应商…并不会自动向下滚动,第二次才会;滚动跟展开都没有丝滑的动画) — the view's guard against scrolls nobody asked for (backToReader) put back the smooth scrollIntoView the button started, as it never said scrollOnPurpose; it only got through when something else happened to have. Now the button says so, and the sheet opens from nothing to its height on the rows' spring (ROW_OPEN), its head and tiles easing down into place, while the view's scrollTop is set frame by frame from the sheet's height: from when the sheet reaches the view's foot to when it is whole, into room the sheet has made, so it neither jumps nor stops short, until the sheet's top is 12px under the view's — scrollTop set directly, which WebKit animates where a smooth scrollIntoView may not. Scrolling meanwhile hands the view back to the reader. 关闭 rolls it up the other way before it is hidden. Reduced motion jumps there as before. Checked in a sandbox HOME with six providers in headless Chrome: on the first click scrollTop went 0 → 301 over ~550 ms along with the height (0 → 868), no jump; closed and reopened the same; reduced motion lands at 301 with no animation 2026-09-29 01:38:40 +08:00
yetone 7353323382 routing: Jev is told what each level is for (我用 jev 作为意图判断模型的时候「写个纸牌游戏」为啥会被识别为简单任务) — intents that are levels (简单任务 / 复杂任务) went to Jev as bare names, and a short message left it torn: 写个纸牌游戏 came out 复杂任务 at 0.62 with no turn before, too unsure to hold, and 简单任务 at 0.57 after a 简单任务 turn, so the turn before's level stood. Now the call that asks once per set of intents whether they are levels also asks, per level, how much work a request at it is (a score over four tiers: little, some, much, the most work — a new program, app or game), and each tier goes to the level rated nearest it; the level question then gives each its place (lowest, highest, level k of n) and its tiers, and says to judge the work asked for, not how short the message is. Still one extra call per set of intents, cached. Checked against Jev itself: 简单任务 0.03, 复杂任务 2.32; 写个纸牌游戏 复杂任务 at 1.0, and 0.99 after a 简单任务 turn; 修个错别字 and 解释一下这个函数 简单任务 at 1.0, 继续 at 0.94. Unrated levels keep bare names as before 2026-09-29 01:36:32 +08:00
yetone f39f25032c routing: a replay — the requests the gateway keeps, one or all of them, played again as they happened, from its own trace: each at its time and each try as long as it took, a wait over 1.8 s cut short; the stage as it was then, every agent, account, its use and rest, what it answered, the captions and the story of each request. Over the stage a clock tells the real time it is replaying, running fast (and saying so) through what was cut; under it which requests are in flight then — which of how many, the agent, the model, who answered, when it was sent — and a track with a mark for each request, played along and clicked to go to. It plays at 1×, 2×, 4× or 8× and stops back where it was begun 2026-09-29 01:31:35 +08:00
yetone a8db8872b4 accounts: switch and forget take an account's email alone, and refresh says which one it leaves to the agent (vincentzhang on Discord: magpie accounts switch codex rc826353@gmail.com → no saved codex account) — a ChatGPT seat in a workspace is listed as "email · Team" so it reads apart from a personal plan of the same email, and switch/forget matched only that whole name, so the email the usage line itself asks for (switch <agent> <email>) was refused. Now the name as listed, or the email alone when only one of the agent's accounts has it; an email two accounts share is refused naming both, and an unknown one lists the agent's accounts. refresh renews the saved accounts an agent isn't signed in to, the one it is being renewed by the agent itself; that one is now named ("· codex a@b.com · Team signed in now · codex renews it itself") instead of missing from the count. Checked with a sandbox HOME: a Team seat switched to by email, an email with Team and Business seats refused naming both, an unknown email listing the accounts, and refresh naming the signed-in account 2026-09-29 01:30:02 +08:00
yetone d00d9ffe6f gateway: a model that can't see images is given what a model that can says of them (让Magpie支持配置图像识别模型) — until now an image sent to a model the catalog knows takes text only was turned away in the latest turn and left out of older turns and tool results, so an agent on DeepSeek, GLM or any text-only model couldn't be shown a screenshot at all. Now each image in such a request is described once by the vision model and the description goes in its place, in every protocol (Chat, Responses, Anthropic, Gemini), current turn, older turns and tool results alike: "[Image, as <model> describes it for this model, which can't see images:] … [End of the image's description]". The describer is asked through the gateway itself (User-Agent magpie-vision/1, recorded as agent magpie), with a system prompt to transcribe text, code, errors and UI state exactly and not to answer or guess; images are described four at a time, and a description is kept (256, by model+image) since an agent sends a conversation's images again every turn, a failure not kept. An image of the latest turn that can't be described is a 502 saying why; one in an older turn is left out as before. Settings → Images → Image recognition picks the model: Automatic (a small model that sees — a Claude account's, a Codex account's, the cheapest of an API key's, another account's), Off (images turned away as before), or any model or group that sees; an id that doesn't resolve is refused. In a routing group the description is made only when a text-only member is actually tried, so a rule that routes images to a member that sees costs nothing; a member whose image can't be described is skipped for the next, the last one answers 502. The describer's own request is never described again, so a Vision set to a text-only model is turned away, not looped. Checked in a sandbox HOME against a local vendor: an image sent over Chat and over Anthropic to a text-only model reached it as the description, the describer was asked once per image, and the Settings row and its picker in light and dark. 2026-09-29 01:20:31 +08:00
yetone 4150dfc079 provider: Volcengine Ark (火山方舟) is a preset, its Coding Plan, Agent Plan and pay-as-you-go (tcdw: 提供一个选项能够取消自动给 LLM 提供商地址补全 /v1/ 的默认行为) — volcengine, a first-party vendor with a Plan picker: Coding Plan (default) at https://ark.cn-beijing.volces.com/api/coding/v3 for chat completions and Responses and /api/coding for messages (套餐概览 docs/82379/1925114, 快速开始 1928261; its Codex page 2556056 sets wire_api "responses"); Agent Plan, which tcdw is on, at /api/plan/v3 (chat completions and Responses, its Hermes Agent page 2373743) and /api/plan (其他工具 2373746, Claude Code 2373740), with a key of its own; pay-as-you-go at /api/v3 (兼容 OpenAI SDK 1330626, 创建 Response 1569618), which both plans' pages warn bills apart from the plan — no Anthropic endpoint is documented for it. Its models (ark-code-latest, whichever the console picked, then doubao-seed-evolving, doubao-seed-2.1-pro/-lite, doubao-seed-2.0-mini, minimax-m3, glm-5.3, glm-5.3-flash, deepseek-v4.1-flash, deepseek-v4-flash, deepseek-v4-pro, kimi-k2.7-code, kimi-k2.8-preview, kimi-k3, lowercase as the quick-start page gives them) are shown until a list is fetched; no models.dev catalog is tied to it, as its volcengine one has pay-as-you-go's dated ids and volcengine-coding-plan misses the Agent Plan's. Key from ark.volcengine.com/region:cn-beijing/apikey. Their versioned paths go out as written (previous commit). Icon is lobehub's volcengine-color, as the others are; the import page offers its three plans 2026-09-29 01:19:06 +08:00
yetone 111f5ba8ef provider: a base URL with a version in its path is used as written, never given a /v1 (tcdw: 提供一个选项能够取消自动给 LLM 提供商地址补全 /v1/ 的默认行为) — a custom provider at Volcengine Ark's Agent Plan, https://ark.cn-beijing.volces.com/api/plan/v3 (its 其他工具 page, docs/82379/2373746), was asked for its list at …/v3/models and then …/v3/v1/models, and only the last failure was shown, so the error named a URL the user never gave. Ark answers both 401 without a valid key (checked unauthenticated: auth comes before routing), so which path it serves can't be told from outside; and had …/v3/v1/models answered, fixV1 would have rewritten the chat base to …/v3/v1 for good. Now an OpenAI-style base with a version segment anywhere in its path (v1, v3, v4, v1beta: Ark's /api/plan/v3 and /api/coding/v3, Zhipu's /api/paas/v4, Gemini's /v1beta/openai) is asked only at base/models and fixV1 leaves it alone; a bare host or an unversioned path (a relay's …/api) is still looked around for the /v1 it may lack, and an Anthropic base still has its /v1/models. A failed list names every URL asked with its status and the vendor's own message ("401 Unauthorized (The API key doesn't exist.)") and says the model ids can be typed in by hand or a models URL given — both already work, the base stays as typed; magpie provider add now prints it instead of saying nothing. No "don't touch my URL" toggle: a versioned URL is never touched, and an unversioned one is only fixed when its /v1 alone answered, when requests at the base as written would miss too. Tested against an httptest server shaped like Ark (/api/plan/v3/chat/completions served, /models 404, a lenient /v3/v1/models) in a sandbox HOME: before, …/v3/v1/models: 404 and, lenient, chat moved to …/v3/v1; after, only …/api/plan/v3/models is asked and the base is kept 2026-09-29 01:19:06 +08:00
yetone 2d7a46e4de routing: a rule's intent is typed in its pill, and a group's logos are whole (这里的输入框跟它外面围起来的这个框,感觉好奇怪,好丑。另外下面的Provider的logo也被裁剪了) — the editor's boxed input (its border, radius and focus ring) outranked the pill's own, so the intent field was a box inside the pill; it is bare now and the pill shows the focus. The send-to pill clipped its children, the overlapping logo discs and their rings with them; the stack is not clipped 2026-09-29 01:15:56 +08:00
yetone e08627be61 library: an agent's icon beside a skill or server an agent has of its own shows once again (这里的图标怎么变成这样了?) — since ef247c1 an agent's icon is made once, with a grey copy for a chip whose agent hasn't the item, and copied from there; the copy was hidden only inside a chip (.lib-ag), so in the rows of what the agents have of their own (Agent 中已有) each icon showed its colour and grey pictures squeezed side by side. The grey copy is hidden wherever the icon goes, and shown only in a chip that's off, as before. Checked in a sandbox magpie's Skills tab 2026-09-29 01:10:12 +08:00
yetone 41ff300d9a panel: the Agents list shows it is loading (Agent列表加载出来之前没有加载动画呀) — its skeleton was there but unseen: the light panel's pills are white on white cards, and the skeletons shimmered in those same colours; they have a grey of their own there now (--skel, --skel-hi). The rows take the panel's shape too, the name at the left and what is set as words at the right with its bars, not the window's two setting columns, and the panel is fitted to them as they are drawn 2026-09-29 01:06:32 +08:00
yetone 5b43bdd61c library: RTK's version is kept up to date from magpie, and what it saved is drawn day by day (这里要能够管理RTK的版本,比如给它升级,以及能够看到RTK省token的趋势) — the RTK card shows its latest release beside the installed one (read from where github.com/rtk-ai/rtk/releases/latest redirects, as RTK's install.sh does, the API as fallback; kept six hours) and, when newer, an Upgrade button that brings it up the way it was installed: brew upgrade rtk for Homebrew's (in a Cellar; Homebrew updated first), winget upgrade on Windows, cargo install --git again for cargo's, and RTK's own script again, into the same folder (RTK_INSTALL_DIR), for one it put elsewhere; when Homebrew's formula is still behind the release, that is said. Also magpie library rtk upgrade. Under the totals, a chart of what RTK saved each day (week by week past 92 days) over 30 days, 90 days or all it has recorded: each bar the commands' whole output, the part saved above what still went to the model, the range's own total beside it — from rtk gain --daily --format json (RTK 0.28 on), which carries the summary too. Tested with a fake Homebrew rtk behind its release and a fake script install, and against the real rtk 0.28.2 and its history in a sandbox magpie (GitHub says 0.50.0); the upgrade itself not run on this machine 2026-09-29 01:01:25 +08:00
yetone fb1575730e gateway: Claude Desktop offers its thinking-effort picker for magpie's models that take reasoning levels (ARNO: 接入claude desktop后无法设置思考强度,不确定是哪里的问题) — in a gateway's mode Desktop reads no effort from /v1/models (IIt keeps id, display_name, description, supports_1m, anthropic_family_tier), and its model catalog must be Anthropic's signed file, so a model's levels come only from tIt in index.chunk-D3OyLXgG.js: let t=IC(e),n=HFt[t]??(UFt.test(t)?VFt:void 0). HFt is its own table (claude-sonnet-4-6, claude-sonnet-5, claude-opus-4-6/4-7/4-8, claude-opus-5), UFt /^(?:claude-)?(?:fable|mythos)(?:-|$)/ with VFt low…max, and IC the lowercased id with a "<label>.anthropic." prefix and a date taken off (qS). magpie's ids (provider/model, anthropic/magpie-<n>) were neither, so no model had the picker, not even a real Claude one. A model with reasoning levels is now listed as mythos-magpie-<n> (UFt matches; no haiku/sonnet/opus in it, so Desktop's small_fast pick is unchanged), or, for a real Claude model, as magpie-<n>.anthropic.<claude model> (IC reads it as that model, so HFt gives its own levels). One without levels is listed as before. aliased serves all three forms, with or without [1m]. Checked against Desktop's bundled Claude Code 2.1.280 in a sandbox HOME, pointed at a local logger: mythos-magpie-<n> goes out exactly as anthropic/magpie-<n> did (thinking adaptive, output_config.effort as picked, 32000 tokens); magpie-<n>.anthropic.claude-opus-4-8 goes out exactly as x/claude-opus-4-8 did, known as Opus 4.8 (no unrecognized_model warning, 64000 tokens). The effort then reaches the model fitted to its levels: Anthropic passthrough now fits output_config.effort as Chat's reasoning_effort and Responses' reasoning.effort already were (bodyEffort/withBodyEffort), so Desktop's max goes to a low/high model as high. VFt always thinks: Desktop offers no "off" for a non-Claude model with levels. A session saved on an old id must be moved once to the new entry in the picker; magpie still serves the old id. 2026-09-29 00:53:16 +08:00
yetone 7a1a2b1e63 gateway: a new Claude Desktop session's title goes to the model the session starts on, not Claude's own (ARNO: claude desktop在会话第一次我发消息的时候就先生成标题了,导致还是走了claude自己的模型请求,然后等自定义的模型运行过之后才会正常转发给当前正在用的模型) — Desktop titles a session's first message before sending it: one tool-less request (max_tokens 200, "You write short session titles…", no session id) on its small_fast pick, the first listed id with haiku/sonnet/opus in it (_$n/v$n in index.chunk-D3OyLXgG.js). desktopTurn sent it to the model of the latest turn, but before any turn at all there is none, so it went as asked, to a Claude model the user never picked. It now goes to desktopDefault: the model the agent is set to stand in (StandIn("claude-desktop", …), none today), else the first model shown to Desktop, which is what a new Desktop session starts on (resolveDefaultSessionModel takes the first unrestricted /v1/models row). A title doesn't pick a model; a turn on a real Claude model magpie serves is kept as it was. The title can't be tied to its own session: the request carries no session or conversation id, and rejecting small_fast to make Desktop retry on the session model (Tcr) fails outright when the two are the same model. 2026-09-29 00:53:16 +08:00
yetone 356549710b subscription: Antigravity accounts can be imported from a JSON file (莫: https://github.com/jlcodes99/vscode-antigravity-cockpit 这个开源的里面有 你可以看看) — beside Add account (and as "Import instead…" on the risk note) the Antigravity card takes files or pasted text exported by Antigravity Cockpit (a JSON array of {email, refresh_token}, or refresh tokens one a line), Antigravity Manager (the same array, {accounts:[…]}, or an account file with token{refresh_token, email, project_id}) and CLIProxyAPI (an antigravity auth file, type/email/refresh_token/project_id; another type's is refused). All three sign in with the Antigravity app's own OAuth client, as magpie does, so their refresh tokens are good here. Each account is checked as signing in does: the token refreshed at Google, the email read from userinfo (the file's if that's refused), the project and plan from loadCodeAssist, then kept in logins.json like a signed-in account. A token magpie already has is not sent again (exists); a known email with a new token replaces the old (updated); duplicates in the file, entries with no token and tokens Google refuses are reported per account, Google's bare "Bad Request" explained. POST /api/signin/import; tokens are never logged, shown or returned, and the paste box is masked. Tested against an httptest token/userinfo/Code Assist server in a sandbox HOME 2026-09-29 00:52:09 +08:00
yetone 05094bed3d workbuddy: two models of the same name are told apart (为啥会有两个 Deepseek-V4.1-Flash) — WorkBuddy AI's config gives deepseek-v4.1-flash (x0.00 credits) and deepseek-v4.1-flash-sg (Singapore, x0.03) both the name Deepseek-V4.1-Flash, and both are in its CLI agent's picker; a later model of a name already taken is now named for what its id adds to the first's, "Deepseek-V4.1-Flash (SG)", or else for its id. Both builds' lists go through it. 2026-09-29 00:49:07 +08:00
yetone 42aae751f5 agent: Pi's MCP servers go where pi-mcp-adapter reads them now (xiaozhu1337 on #58: pi-mcp-adapter no longer reads …\.pi\agent\mcp.json) — pi-mcp-adapter 3 (3.0.0 2026-09-26, 3.1.0 now) reads <agent dir>/mcp-adapter.json, same format, after ~/.config/mcp/mcp.json and ~/.agents/mcp.json (.mcp.json and .pi/mcp-adapter.json per project), and no longer <agent dir>/mcp.json; at every session start it warns while that file has any server, settings, imports or claudePlugins, whether or not mcp-adapter.json is there too (config.ts getLegacyMcpMigrationNotices, index.ts session_start). magpie only looked for the adapter in <agent dir>/npm/node_modules, so one Pi installed the older way (npm -g: %APPDATA%\npm\node_modules and the like, which Pi 0.87's package manager still resolves), from git, or from a folder counted as none and mcp.json kept being written; and with mcp-adapter.json already there (the adapter's own setup writes it) mcp.json's servers were left behind. Now which extension Pi has comes from settings.json's packages (a pin like npm:pi-mcp-adapter@2.9.1 counts) and the folders Pi installs them in: adapter 3, or listed with no version found, or mcp-adapter.json there → mcp-adapter.json; mcp.json is renamed to it when there is none, else each server and setting it lacks is merged in (backed up first), one the two have differently left in mcp.json for the user, and mcp.json removed once empty. pi-mcp-extension 1.5 reads only ~/.pi/agent/mcp.json (its home's, not PI_CODING_AGENT_DIR's; transport field, zod schema): with it alone that file, with both each file gets the servers (user fields in each entry kept) and mcp.json isn't moved — the adapter's warning can't be avoided then. Adapter before 3 → mcp.json; nothing found → mcp.json if there, else mcp-adapter.json. Servers in either file are found for bringing into the library. Tested in sandbox homes, and against the real 3.1.0 loader: the reporter's shape (adapter under npm's global folder, mcp.json from magpie, mcp-adapter.json from setup) warned before, and after one magpie write it gives no notice and loads all three servers 2026-09-29 00:44:43 +08:00
yetone e13677fd3a sessions: OpenCode v2's sessions are read (Kumo31: opencode v2的session改写到新表里了) — OpenCode 2 (v2.0.x, checked against v2.0.18's source) keeps sessions in the same opencode.db but in tables of its own (packages/core/src/session/sql.ts): session_v2 (the session row as before — directory, parent_id, a title that may now be null, time_created/updated, model {id, providerID, variant}, session totals) and session_message (id, session_id, type, seq, time_created/updated, data), not "sessionmessage". A message's kind is its type column (user, assistant, synthetic, system, compaction, idle, …); a user message's data is its prompt {text, files, …} with no part rows; an assistant's has model {id, providerID, variant}, content (text/reasoning/tool), cost, tokens {input, output, reasoning, cache {read, write}} and time {created, completed} (packages/schema/src/session-message.ts, token-usage.ts), counted as before: input without the cache, output without the reasoning (core/src/session/usage.ts). A compaction carries its own tokens, counted on its model, else the one last replied with. On first start OpenCode 2 copies every old session over (core/src/database/v1-migration.bun.ts), leaving session/message/part unwritten and recording kv migration.v1-v2 {"phase":"completed"}; so with session_v2 present only it is read once that is recorded (or no old table is left, as for the pre-split v2 databases it renamed in place), and while the copy is under way an old session not yet in session_v2 is read from the old tables — never both, so nothing counts twice and a session deleted in v2 doesn't come back. Resume stays opencode --session <ses…> (cli/src/commands/commands.ts). Tested with a v2 fixture made in the test from SQL beside stale old tables; the old-table and JSON-file tests still pass. 2026-09-29 00:38:10 +08:00
yetone a47e70fb63 usage: Command Code shows its 5-hour and weekly windows, its balance beside them (Command Code为什么没有用量只有余额???) — a quota with a balance was taken for a balance alone: the Usage page showed only the figure, the panel put it among Balances, and the used/left toggle didn't count it, so Command Code's credits hid the windows read with them. A balance is the whole quota now only when there are no windows; with windows, the meters come first and the balance is a row under them (the panel: in the account's note and title) 2026-09-29 00:35:15 +08:00
yetone 44fd12dfe8 subscription: WorkBuddy AI, the international build, is its own subscription (Workbuddy国际版的Subscription是否也要支持呀?… 你应该新加一个Subscription Provider叫做Workbuddy国际版) — workbuddy-ai, "WorkBuddy 国际版 (WorkBuddy AI)" under 订阅. From WorkBuddy AI.app 5.6.2's product config: the same API as the Chinese build at its own endpoint, https://www.workbuddy.ai (isOversea, externalDomain www.codebuddy.ai / www.workbuddy.ai), signed in with platform=workbuddy-ai; its own account is read, never changed, from workbuddy-desktop-ai.info beside workbuddy-desktop.info in CodeBuddyExtension's auth folder, others kept in logins.json apart from the Chinese build's. Its models are its own (the Fast/Balanced/Primary/Deep tiers, GPT-5.5/5.4/5.3-Codex, Gemini 3.1 Pro/3.5 Flash, GLM-5.3/5.2, Hy3, Kimi-K3/K2.6, MiniMax-M3) until /v3/config is read; credits from the same resource summary. workbuddy.go is now parametrised by a wbSite (CN, AI); token cache keyed by site and uid. Checked live: auth/state at www.workbuddy.ai answers and magpie opens https://www.workbuddy.ai/login?platform=workbuddy-ai (200); chat and usage not tried against a real international account. 2026-09-29 00:31:45 +08:00
yetone 841855ca5a provider: Huawei Cloud's MaaS Token Plan is a preset (Lemon: 能否支持华为 codearts 订阅啊) — huaweicloud, Huawei Cloud MaaS: the Token Plan (personal accounts, 西南-贵阳一 only) is spent only at its own endpoints, https://api.modelarts-maas.com/plan/v2 for chat completions (its OpenClaw, Cherry Studio and CodeArts pages, tokenplan-maas-0004/0009/0014) and /plan/anthropic for messages (its Claude Code page, tokenplan-maas-0003); pay-as-you-go MaaS is the other Plan, /openai/v1 (qs-maas-0001, OpenCode page maas-modelarts-0909) and /anthropic (model-call-060). No Responses on either. Its models (glm-5.3, glm-5.1, kimi-k2.6, deepseek-v4.1-flash, deepseek-v4-flash, lowercase as its OpenClaw page has them) are given until a list is fetched; the key is a MaaS API key from console.huaweicloud.com/modelarts/?#/model-studio/authmanage; no usage API is documented (quota is shown in the console's 订阅管理), so none is read. CodeArts (码道) itself isn't a provider: it has no official API, its private endpoints are reverse-engineered, and its own doc has it reach the Token Plan through these same endpoints. Icon is lobehub's huaweicloud-color, as the others are. 2026-09-29 00:22:50 +08:00
yetone b0c42d738e subscription: a Command Code plan's 5-hour and weekly windows show on the Usage page and the panel (ARNO: command code plan的五小时额度,周额度等订阅信息没有显示到用量面板里) — the plan's card was read right (billing/credits as command-code 1.66's /usage reads it: credits.{planId, monthlyCredits, purchasedCredits, freeCredits}, windowLimits.{limited, fiveHour, weekly}.{used, cap, resetAt in ms} beside it) but also carried the dollars left as its Balance, and a card's Balance is shown in place of its windows everywhere (the panel, the Usage page, the TUI): the windows were read and never drawn. The dollars are now a Credits window, used of the CLI's own pool (the plan's month — Go $10, Pro $30 or $80 for pro-v1, Provider $15, GOAT $70, Teams Pro $40, Max $150, Ultra $300 — or what is left of it if more, plus bought and free credits), "$spent / $pool"; only a reply with no windows and no known plan is a Balance still. A plan's key on the keyed commandcode preset gets the same windows as a plan card (api.commandcode.ai is a plan quota source; a pay-as-you-go key has none and no card), and its balance card is the dollars left alone rather than "5h 42% · week 18% · $12.30" squeezed into one amount. billing/credits carries no planId (4b21f62 found it so on a live account), so the pool's month is the plan billing/subscriptions names; an account with no plan and no windows shows what it bought as its Balance 2026-09-29 00:22:50 +08:00
yetone 8a30a938d6 provider: Antigravity's usage shows only the models enabled again (antigravity 为什么又显示了没有启用的模型的用量?) — since #150 (2baad53) magpie offers a family of Antigravity's levels as one model (gemini-3.8-flash), but its quota still names each level's id (gemini-3.8-flash-high), so none of the windows matched what's enabled and chosenWindows, finding none, kept all 27. A window's id is now taken to the model magpie offers for it (AntigravityBase) before it's matched; on this machine, with Gemini 3.8 Flash enabled, 3 of 27 are kept: its high, low and medium 2026-09-29 00:21:18 +08:00
yetone 4b21f62e89 commandcode: a plan's usage says its plan (为什么Command Code Plan没有用量?) — billing/credits has no planId, so the plan (and the account's badge) came up empty; it's read from billing/subscriptions: planId, currentPeriodEnd as when it ends, cancelAtPeriodEnd as whether it renews, and an account with none is "No plan" (无订阅). The plan is said even when billing/credits fails — Command Code answers it 503, "Couldn't verify your credit balance just now", at times — and an account with a balance but no 5-hour or weekly window shows the balance instead of 暂无用量数据. Checked against a live GOAT account: GOAT, $70.00, both windows 2026-09-29 00:19:00 +08:00
yetone 8060650048 agent: Pi starts on the model magpie picks, and asks a Messages-only provider's models on Messages (#160 Aimer779; Cleary on Discord)
While Pi's ~/.pi/agent/settings.json has a non-empty enabledModels (its Ctrl+P / /scoped-models list), a new session starts on defaultProvider/defaultModel only when that list takes the model in, else on the list's first entry, so a model picked in magpie outside the list was written and never used. Setting Pi's model now adds it to enabledModels as provider/model, as Pi's own picker does, when nothing in the list takes it in already: the same reference with or without a :level after it, or a glob (*, ?, [..], without case) that the reference or its model id fits. The user's entries, their order and comments stay; no list is made where there is none, and an empty one is left as it is. Turning the model back to Pi's own takes magpie/… entries out with magpie's provider, removing the key rather than leaving it empty. The model field shows what a new session starts on: the list's first model when the saved default isn't in the list and that entry names one model outright. The list itself isn't editable in magpie yet; Field is single-valued, and an editor needs a multi-value field kind in the API, GUI (a multi-select, reorderable picker), TUI and CLI.

Pi's models.json now gives each magpie model the API its provider speaks natively, so the gateway passes the request through instead of translating Chat: Responses-native models keep openai-responses; a Messages-only provider's (a custom Anthropic-compatible endpoint, as Cleary's) get api anthropic-messages with baseUrl the gateway's root (Anthropic's SDK adds /v1/messages). A Claude from 4.6 on also gets compat.forceAdaptiveThinking, so Pi asks for adaptive thinking and an effort, not the budget such a Claude refuses (why these stayed on Chat before). Magpie's models stay under providers.magpie; other providers are untouched.

Why Chat→Messages could 400 where Pi's direct Messages didn't: with reasoning on, buildAnthropic raised max_tokens to budget+4096 (28096 for high) past the client's own max_completion_tokens, which Pi sets to the model's output limit, so an upstream capped below that refused it. The budget now fits under a cap the client gives (at most the cap less 1024; no thinking when the cap is 2048 or less); with no cap it still raises max_tokens as before.

Tested: go test -tags nogui ./... (new: TestPiTakes, TestPiModelJoinsEnabledModels, TestPiModelOffLeavesEnabledModels, TestThinkingBudgetFitsTheClientsCap; TestPiModelsAskedOnTheirNativeAPI extended), nogui builds for darwin, linux and windows. In a sandbox HOME: settings.json with enabledModels [xai/grok-4.6, openai-codex/gpt-5.6-sol, deepseek/deepseek-flash], magpie pi magpie/cleary/kimi-k3 appended the model and kept the rest, magpie pi default took it out again; models.json listed cleary's models on anthropic-messages, a Chat relay's on the provider's openai-completions, a Responses vendor's on openai-responses. Pi 0.87.1 loaded that models.json (--list-models) and, against a fake Messages endpoint standing in for the gateway (MAGPIE_ADDR on a spare port), posted to /v1/messages with the gateway key: kimi-k3 with a 15360-token budget under max_tokens 16384, claude-sonnet-5 with adaptive thinking and effort high.
2026-09-29 00:09:06 +08:00
yetone 82e778e629 gateway: prompt_cache_test keeps its tests — ac2340d wrote TestAnthropicPromptCache over the file, dropping TestCodexThreadOnChatUpstreamCaches, TestPromptCacheKeyRefused and TestChatUsageCache; they're back, the new test after them 2026-09-29 00:08:17 +08:00
yetone ac2340d580 gateway: a request translated for Claude is cached (Passluo: 用户直接用 magpie 把 claude api 接入到 codex,这样没有申明缓存,用户没有写缓存) — Anthropic caches a prompt only up to a block marked cache_control, and a request from Codex (Responses) or a Chat client, rebuilt as Messages, had none, so every turn paid the whole conversation again. buildAnthropic now marks the system prompt (as a text block; the last tool when there's none) and the conversation's last block that can be (never thinking), so the next turn, which only adds to it, reads it from the cache; two marks, within Anthropic's four with the one Claude's sign-in adds. Anthropic's cache_read tokens already come back as Codex's cached_tokens 2026-09-29 00:05:29 +08:00
yetone 17a3e0b4ea gateway: Claude Desktop's titles go to the model its session is on (ARNO: 给claude desktop配置了自定义模型后偶尔还是会请求到claude自己的模型)
Desktop in its third-party mode asks for a session's title and branch name in one tool-less request whose model is its "small_fast" pick from the gateway's /v1/models: the first id with haiku in it, else sonnet, else opus (_$n in its app.asar, 2.7032), and the session's model only when no id has one. So with any Claude model in magpie's catalog, {"model":"claude-sonnet-5-thinking","max_tokens":200,"system":"You write short session titles. …"} went to that Claude model, whatever the user picked; Claude Code in the Code tab likewise asks for its own claude-haiku-… by name for small tasks, which magpie didn't serve for Desktop. Desktop has no config key for its small model (inferenceModels' anthropicFamilyTier / anthropic_family_tier only tags a listed model as a tier, and magpie doesn't know the user's pick), so the gateway does it: a request on the magpie-claude-desktop key (or Desktop's User-Agent) that carries tools is a session turn and its model is remembered (and kept in claude-desktop.model beside settings.json, for a title asked before the first turn after a restart); a small tool-less request (max_tokens at most 4096: a title asks 200, a turn tens of thousands) for a model whose id reads as Claude's, or any request for a model magpie doesn't serve, goes to that model instead. Requests from other agents, tool-less ones on non-Claude models, a tool-less chat turn on a Claude model the user picked, and a session that is itself on the Claude model are sent as asked. standIn's "magpie serves no such model" check is now unserved(), shared by both.

Tested: a gateway test against a fake Anthropic provider on the claude-desktop key (title before any turn as asked; after a turn on an aliased model the sonnet title and an unserved claude-haiku-4-5-20251001, with and without tools, go to it; a non-Claude tool-less request, Claude Code's key and a sonnet session untouched; the pick read back from disk after a reset), hasTools cases; go test -tags nogui ./... passes, CGO_ENABLED=0 go build -tags nogui for darwin, linux and windows.
2026-09-29 00:00:54 +08:00
yetone 2476cd5c1a gateway: a Codex conversation moved to another Grok account or vendor goes on (waroy: Could not decrypt the provided encrypted_content … 中途换 routing)
Codex hands every earlier turn's reasoning back sealed (encrypted_content) by whoever answered it. When a routing group moved the conversation to another member, a second Grok/SuperGrok account in waroy's case, xAI answered "Could not decrypt the provided encrypted_content. Ensure the value is the unmodified encrypted_content from a previous response." The gateway already asks again without the sealed reasoning when OpenAI refuses it (#63), but it knew only OpenAI's words ("The encrypted content … could not be verified", invalid_encrypted_content) and only as a 400, so xAI's refusal went straight to Codex and ended the session. xAI's words are now known too, as a 400 or as the stream's own error. And what a key or account refused in a conversation is remembered (by its hash, beside who answered it last), so the conversation's later requests there leave that reasoning out up front rather than being refused and asked again each turn; the reasoning the new one sealed itself still goes along, for its cache and train of thought, and a conversation that stays where it was is sent everything as before.

Tested with two fake Grok-like Responses upstreams in a routing group, each reading only its own seal, the second refusing another's with xAI's 400 {"code":"Client specified an invalid argument","error":"Could not decrypt …"} and, in a second run, with a response.failed event: the first member got its own seal back; with it down, the second was asked once with the first's seal, refused, and answered without it; the next turn reached it once, carrying only its own seal. Without the change the switch fails with the reporter's exact error. Not tested against xAI itself, so the status it really answers with isn't confirmed (any 4xx/5xx carrying the words is taken); go test -tags nogui ./... passes and CGO_ENABLED=0 builds for darwin, linux and windows.
2026-09-28 23:55:01 +08:00
Gilbert 9e37a69299 gateway: keep OpenRouter free rate limits model-scoped (#153)
* gateway: rest OpenRouter free models alone on a credit refusal

A free model (preset "openrouter", name ends in ":free") that is
refused for balance or credit reasons rests by itself for a short while,
not together with the whole provider for half an hour.

OpenRouter free models are billed at nothing, so a credit/balance refusal
for one is the free tier's own limit, not an empty account. On a single-key
provider candidate.restKey() equals the provider id, so a free model's
refusal was benching the entire provider — and any group built on it — for
30 minutes, making the very free models that work under a negative balance
look failed.

Other providers keep resting by the provider, as before.

* gateway: keep OpenRouter free rate limits model-scoped

* gateway: scope OpenRouter free rests to shared pools

* gateway: keep OpenRouter pool state off responses
2026-09-28 23:53:05 +08:00
yetone e927f027f3 sessions: Grok Build's and WorkBuddy's sessions are counted too (Aimer779: 用量→会话 增加 Grok Build 和 WorkBuddy 的本地会话统计)
Usage → Sessions and the stats now list Grok Build's and WorkBuddy's local sessions next to the other agents'. The GUI and CLI filters already name them from agent.Clients(), so nothing else needed changing.

Grok Build: the reader looks under $GROK_HOME/sessions (else ~/.grok/sessions), at <url-encoded cwd>/<id>/, reading summary.json and updates.jsonl.
- Tokens come from each turn_completed's usage.modelUsage, per model. Input is counted without the cache it read (inputTokens already includes cachedReadTokens), so the cache isn't counted twice.
- A subagent's session (session_kind "subagent…") counts once, inside the session it ran in.
- A fork's copied updates count only in the session they came from. The fork itself counts from its created_at on.
- The title is the first prompt typed, else Grok's generated_title.
- The hooks that fire on start and end don't count as time at work, so a session closed the next day doesn't run overnight.
- It resumes with `cd <cwd> && grok --resume <id>`.

WorkBuddy: the reader looks at $WORKBUDDY_CONFIG_DIR/projects/**/*.jsonl (else ~/.workbuddy).
- Tokens come from providerData.usage and count once per reply (providerData.messageId), however many of its lines carry it. Cached tokens (inputTokensDetails) are taken out of the input.
- The older snake_case input_tokens/output_tokens are read as well, with the cwd from <id>.meta.json for sessions migrated from its old history.
- The title is custom-title, then ai-title, then the first prompt (without WorkBuddy's <system-reminder> and @scene: blocks).
- There is no resume command, since it is a desktop app.

Tested:
- go test -tags nogui ./... passes. New sanitized fixtures cover both readers: a Grok main session with a subagent, a fork and a hooks-only session, plus a WorkBuddy session with repeated usage lines and a migrated one.
- go build -tags nogui passes for darwin, linux and windows (CGO_ENABLED=0).
- A read-only run against real ~/.grok and ~/.workbuddy: 7 Grok sessions (an 8th, hooks only, left out) and 16 WorkBuddy sessions. Token totals match a raw jq tally of the same files: Grok 293910 in / 4396 out / 610560 cache read, WorkBuddy 13548053 / 621856 / 32321668.
2026-09-28 23:25:18 +08:00
yetone fa3ea3149a subscription: Command Code Plan, signed in from magpie (Yetone 老师,CommandCode 也是有登录订阅额度的,并不是类似中转的那种哇 — @RookieRicardoR) — a Command Code plan (Pro, GOAT, Max, Ultra) is now a subscription under 订阅, not only the keyed relay preset: Add signs in with the CLI's own browser sign-in (commandcode.ai/studio/auth/cli posting the new key to a callback on 127.0.0.1, answered as the CLI does, 303 to its complete page; wrong state 403, access_denied fails), whoami names the account and billing/credits its plan; the CLI's own account is read from ~/.commandcode/auth.json, never changed, others kept in logins.json with switch/on/forget like ZCode's. Its models are served from the Provider API (/provider/v1 Chat and Responses, /provider Messages) with the plan's key, billed against the plan's credits; usage shows the 5-hour and weekly windows with their resets and the credits left. Its id is commandcode-plan, since commandcode is the keyed preset's 2026-09-28 23:24:19 +08:00
yetone 9c44e5b8c0 gateway: Codex on a Chat Completions relay keeps its prompt cache, and is told what it read (Codex 通过 magpie 走 OpenAI 兼容中转站,缓存好像没生效、token 用量很高) — Codex's prompt_cache_key (its thread's id) was dropped when its Responses request was made a Chat Completions one, so OpenAI and the relays that route a conversation by it to where its prompt is cached sent each turn somewhere cold; it now goes along to Chat and Responses upstreams alike, and a vendor that turns the unknown field away (400/422 naming it: Gemini's Unknown name, Mistral's extra_forbidden, Groq's unsupported) is asked again without it and not sent it again; so is one whose 400/422 doesn't name it, remembered only once the request works without it, and a 400 for something else still gets the key next time. What was read from the cache reached Codex, magpie's usage and affinity only as OpenAI's prompt_tokens_details.cached_tokens; DeepSeek's prompt_cache_hit_tokens, Moonshot's cached_tokens, OpenRouter's cache_write_tokens and a Claude relay's cache_read/cache_creation_input_tokens (its prompt_tokens taken as the whole prompt when it is at least those, as Anthropic counts otherwise) are read too — before, a DeepSeek-style relay's hits showed as cached_tokens 0 and affinity saw no cache worth staying for. The converted request was already prefix-stable turn to turn (instructions first, tools in Codex's order and schemas as sent, sorted keys, no ids or times added); tested with two Codex turns against a fake Chat upstream: every message of the first sent again byte for byte, tools the same, the key on both, 2048 cached tokens back to Codex 2026-09-28 23:04:34 +08:00
yetone 4eba5c37a8 sessions: ZCode, DeepSeek Harness, Cline and Qoder's sessions are listed too (lml: 希望会话里也能看到 ZCode、Qoder CN、Cline、DeepSeek Harness 的) — ZCode's are OpenCode's tables in ~/.zcode/cli/db/db.sqlite, read as OpenCode's database is (opened read-only), its tokens the AI SDK's (input less the cache, output as it is), its model modelId, a title_source of default no title, a prompt typed a real_user's; dsh's are ~/.dsh/sessions ($DSH_HOME), a folder a session, the latest format's session[.vN].jsonl[.zstd] read whole, zstd frames and all, a subagent's (parentSession) in its parent's, a fork's seeded events (seedLength, or up to an inherited session/end-seed) counted where they were first written; Cline's are ~/.cline/data/sessions ($CLINE_SESSION_DATA_DIR, $CLINE_DATA_DIR, $CLINE_DIR), <id>.messages.json with its manifest <id>.json for the cwd, the prompt and the title, a subagent's other messages file beside it, a fork's messages before its forkedAt not counted, cline --id <id> to pick it up; Qoder's and Qoder CN's are Claude Code's lines in ~/.qoder/projects and ~/.qoder-cn/projects ($QODER_CONFIG_DIR, $QODERCN_CONFIG_DIR), qodercli --resume / qoderclicn --resume. Each folder is watched when it's there (Dirs). Tests keep HOME in their sandbox now. Tested with made-up fixtures for each (a ZCode database made in the test, dsh plain and zstd, forks of both formats, a Cline fork and subagent, both Qoder builds), and read-only against copies of this machine's ZCode database and dsh sessions: 2 and 13 sessions, their token totals the same as a separate tally of the raw rows 2026-09-28 22:45:50 +08:00
yetone 839c762098 app: Magpie is in the Start menu on Windows (#158: Windows 便携版首次运行后,无法在开始菜单 / 系统搜索中找到 Magpie — @Aimer779) — the Windows build is one portable exe with no installer, so nothing put it anywhere Windows search looks. Each start of the desktop app (not the CLI, TUI or serve) now makes sure %APPDATA%\Microsoft\Windows\Start Menu\Programs\Magpie.lnk (the Programs known folder) opens the exe it runs as, symlinks resolved, in its folder, with its icon and "Magpie" as its description; one that already does is left be, one for where the exe was before it was moved is pointed here again. It is the shell's own link, made through WScript.Shell with go-ole (already in the build through Wails, now a direct require), in the background beside the magpie:// registration, and a failure is only logged. An update replaces the exe in place, so the shortcut stays good; a magpie left running from magpie.exe.old(-N) (or .new) points it at magpie.exe, never at what was moved aside. HKCU App Paths\magpie.exe is set to the exe (and its folder) so Win+R magpie opens it too. No uninstall entry, nothing copied. MAGPIE_NO_SHORTCUT=1 skips it (tests, sandboxes); other systems do nothing. Tested with the Windows test built here and run on Windows 11: a shortcut made, left as it was on a second start, pointed at the moved exe. Run on Windows 11 as the desktop app: the shortcut made with the exe's folder and icon, pointed anew after the exe moved, left as it was on a start with nothing changed; App Paths set 2026-09-28 22:44:36 +08:00
yetone 63f9fa7465 agent: Claude Desktop runs on magpie in its third-party mode (#156: Claude Desktop 不会解锁 Claude Code 面板 — CC Switch 可以,咱这个支持吗?) — signed in with a Free account, Desktop's Code tab is only "Get Claude Code"; in its 3p deployment mode it needs no Anthropic sign-in and Code and Cowork run on the gateway. A Claude Desktop agent whose provider field switches it: on writes deploymentMode "3p" into Claude/ and Claude-3p/claude_desktop_config.json, a magpie profile in Claude-3p/configLibrary/<id>.json (inferenceProvider gateway, inferenceGatewayBaseUrl the gateway's address, inferenceGatewayApiKey magpie-claude-desktop, inferenceGatewayAuthScheme bearer; disableDeploymentModeChooser and coworkEgressAllowedHosts ["*"] only where unset) and its entry in _meta.json, applied — the keys and files CC Switch writes (claude_desktop_config.rs). No inferenceModels: Desktop lists /v1/models, which the gateway already gives it by ids it keeps. Off puts each deploymentMode back as it was (gone where there was none), the profile applied before applied again, magpie's profile and entry removed, and files and folders magpie made gone if nothing else went in; other keys and profiles are never touched. Folders as CC Switch finds them: ~/Library/Application Support, %LOCALAPPDATA% (a Claude… folder there if not Claude itself), $XDG_CONFIG_HOME. Desktop reads them at start-up, which the picker and notice say. The Library keeps giving Desktop's MCP servers to %APPDATA%'s file on Windows, listed once. Tested in a sandbox home: fresh, with the user's settings and 3p profiles (off restores every byte), on twice, on → off → on, drift, odd files refused, each system's folders; and against Claude Desktop 2.9939.2 on Windows 11 (winget): on, it started in 3P mode (provider gateway, apiHost the gateway) with the Code tab and no sign-in, and asked the gateway's /v1/models; off, it went back to claude.ai 2026-09-28 22:37:26 +08:00
yetone 376a02bb80 library: tests keep Windows' LOCALAPPDATA out of the sandbox — Crush's crush.json is %LOCALAPPDATA%\crush's on Windows, and the sandbox left LOCALAPPDATA as it was, so TestTargets looked for Crush in the real one and found it missing (crush not a target), on main as with #157. Now it is blanked with APPDATA, and Crush is found in the sandbox's ~/.config/crush. Run on Windows 11 in a scratch profile 2026-09-28 22:16:33 +08:00
kevinandClaude Opus 5.5 2ff1842257 library: Crush on Windows gets the library's instructions in ~/.config/crush, where it reads CRUSH.md (#157)
Since Crush 0.14 (charmbracelet/crush#1352) its config folder is
~/.config/crush on Windows as well (or XDG_CONFIG_HOME/crush), and the
global CRUSH.md it reads is there. magpie wrote the instructions beside the
crush.json it edits, which on Windows is %LOCALAPPDATA%\crush's: Crush keeps
its own model picks in that file and still reads skills from that folder,
but no CRUSH.md, so instructions given to Crush never reached it. They now
go to the config folder on every system; MCP servers and skills stay where
they were, and on Linux and macOS the path is the same as before.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:16:26 +08:00
yetone bb7ce5ec31 provider: an account signed in from magpie is listed even when the agent's own sign-in of it can't be read (tinysnake: workbuddy 登录以后,对应的 provider 并未出现) — once WorkBuddy's own account had been seen, logins.json remembered it as WorkBuddy's own (no secrets). With WorkBuddy then signed out, or its tokens kept encrypted ({"$wbEncrypted":…}), that entry is hidden, and signing the same account in from magpie was taken for a duplicate of it and dropped (addSideLogin): the sign-in said done, the toast showed, and no WorkBuddy provider appeared. addSideLogin is now told who the agent is signed in to right now; only when that is the same account is the new sign-in a duplicate, otherwise the remembered entry takes the new sign-in, and sideLogins doesn't add the own account twice once it's back. Copilot, Grok, ZCode and Gemini had the same flaw through the same code and are fixed with it. The window no longer says "added" when a finished sign-in isn't in the Providers list: it says so as an error. Tested with a fake WorkBuddy sign-in server in a sandbox HOME (own account remembered, then signed out or encrypted, then signed in from magpie: listed and signing with the new token; WorkBuddy readable again: still one account); not tested against the real WorkBuddy, and whether the reporter's WorkBuddy was signed out or encrypted isn't known 2026-09-28 21:38:02 +08:00
yetone 46454d9801 gateway: a 429 that is a per-minute rate limit rests a minute, not a quarter of an hour (found reviewing #153) — usedUpWords took "Rate limit exceeded" and "Rate limit reached … tokens per min" for a used-up plan, and as magpie words an upstream error ("rate_limit_error" its type) exceeded.*limit matched every such 429 whatever the vendor said, so a provider rate-limited for a minute sat out 15 as out of quota (an OpenRouter free model's free-models-per-min, OpenAI's TPM, Anthropic's per-minute limit). Now a 429 in rate words (rate limit, too many requests, per second/minute, RPM/TPM) is a rate limit unless it also says the plan's allowance is used (quota, usage limit, per day/week/month, daily…), and a 429 saying that is out of quota, as a day's free requests are. Tested: those bodies as vendors and magpie word them, and a group through the gateway whose first member answers OpenRouter's free-models-per-min — it rests rate for 1m where main rested quota for 15m 2026-09-28 21:37:46 +08:00
yetone 2de043dabf provider: Cursor stays listed when cursor-agent can't say who is signed in (cataglyphis: 供应商选型中间歇无法显示 cursor,导致路由里不能正常路由到 cursor 的模型) — who Cursor's account is comes from cursor-agent about --format json, asked again behind the served answer every minute, and any about that failed, ran past its 10s (it asks Cursor's servers), or printed something besides its JSON was taken for nobody signed in: Cursor dropped out of the Providers page and of routing (All() lists the accounts for both), and that was kept on disk, until an ask a minute or more on came back. Now an ask that couldn't tell leaves what was served, on disk too, and is asked again in a minute (cliIdentity's ask returns an error for that); Cursor is taken as signed out only when about says so in its JSON or cursor-agent keeps no token. About's JSON after a line of its own (an update notice) is read too. Devin's ask is as before. Tested with fake cursor-agent scripts in a temp HOME (signed in, update notice, says nobody, fails, no JSON, fails with the token gone) and the cache through a failed ask and a sure sign-out; not tested against a real cursor-agent, and what made reporter's about fail isn't known 2026-09-28 21:02:48 +08:00
yetone e665d70b56 gateway: an Antigravity account Google wants verified says so, and rests (marsxxl: Antigravity 返回「Verify your account to continue」403) — Cloud Code Assist refuses such an account with a 403 whose details say VALIDATION_REQUIRED, a validation_url in their metadata (as pi-ai's google-validation reads it); magpie passed on only the message, and every reconnect went back to the account Google had stopped. Now provider.Verification knows the refusal (the reason, or its words) and APIError adds what to do: open the link, when it's https, in a browser signed in to that account, or else the Antigravity app (or Gemini CLI), then try again. The account rests half an hour as failVerify ("needs verification", 账号需验证) — the last one left too, which rested never — and for a minute the agent's retries get the same error from magpie without asking Google. The Routing page shows the rest with a Verify link and "It's verified — try it again", which lifts it (POST /api/gateway/unrest, Server.Unrest); an answer lifts it as before. Tested with fake upstreams in a sandbox HOME: with a link and without, held retries not sent on, a group falling back past it; the exact body marsxxl got isn't known 2026-09-28 20:56:33 +08:00
yetone b22815be9c tui: the Sessions page lists the sessions (Kumo31: tui sessions里能看到统计信息,但没有列出具体session) — it opens on the sessions active in the range, the latest first, under the model and folder picked, as the app and magpie sessions list them: when, agent, folder, tokens, cost and title, as many as fit around the one picked with how many more above and below. ↑↓ pick one and enter resumes it in this terminal (its resume command, shown under the list, through sh or PowerShell; back on the page when the agent quits), or says its folder is gone rather than a shell's exit status; s (or tab) goes to the stats — totals, chart, top models and folders — and back 2026-09-28 20:40:44 +08:00
yetone ef247c1889 library: a long skill list is drawn near the view first and then filled in while the page is idle (requestIdleCallback, or 20 rows every 24ms in WebKit), every row kept once drawn so a scroll neither builds nor removes rows (a scroll that outruns the filling finishes it at once), each row is contained as a skipped one was and shows its buttons without the fade while its list scrolls (in WebKit each fade under a passing pointer was a long frame), and a chip's grey icon is made once rather than filtered on every paint (a drawing with its colours greyed by grayscale's own sum, a picture greyed pixel by pixel, one in the text's colour through a relative colour) with its cut-out ring an outline instead of a spread shadow, so scrolling 300 skills in WebKit has a median of 0–8 long frames where main had 11–37 and 8767eb6 94–152 2026-09-28 20:28:08 +08:00
yetone 372eb2cc07 library: the Skills tab draws only the rows near the view — each group's list is a window with room kept above and below, rows held to fixed heights so what's kept is exactly what's missing, a few more a frame as a scroll nears the end of what's drawn and those far behind taken away, no content-visibility flips on every scroll — a single big group (215 on this computer) no longer skips folding, a group of more than eight splits into parts by the folder its skills sit in (the path inside a GitHub repository, the folder a local one was linked from) or else by a start of their names three or more share, each part folding on its own and remembered, and the filter redraws only the rows, 120ms after the last key 2026-09-28 20:28:08 +08:00
yetone e91aaab33c library: the MCP page no longer spells out an agent's own servers (ARNO: 这些文字可能更应该出现在代码注释里,而不是ui上) — the line naming Codex's node_repl, a server Codex adds itself each time it starts and magpie leaves alone, told the user nothing they could act on; those servers stay unlisted, and why is now a comment in the code 2026-09-28 20:25:02 +08:00
yetone 761156a816 agent: Pi asks a Responses-native model on Responses (Leo: 同协议优先) — every magpie model in Pi's models.json went out as openai-completions, so a ChatGPT sign-in's models, a Responses-only provider's, and GPT on OpenAI's API or Copilot's were asked on Chat and translated to Responses by the gateway. Now each such model carries "api": "openai-responses" (Pi takes a model's own api over its provider's, and posts it to baseUrl/responses), so the gateway relays what Pi sent as it is: reasoning effort and summary, its encrypted reasoning, images, tools, prompt_cache_key; a ChatGPT sign-in's still made into Codex CLI's request. Which API is a model's is provider.Native — what the provider serves it on itself, Responses first for an OpenAI model where the gateway already put it first (ResponsesFirst, moved from the gateway). Chat providers, groups, Cursor/Devin/Kiro/Claude Code sign-ins and Anthropic-API models stay on openai-completions: Pi's anthropic-messages picks thinking by the Claude ids it knows and asks a newer Claude for a thinking budget it refuses, which magpie's translation doesn't. Tested with Pi 0.73.1 and @earendil-works/pi-coding-agent 0.87.1 against a sandbox gateway and a fake Responses upstream: /v1/responses relayed with effort high, xhigh, none (thinking off); a Chat model still on /v1/chat/completions 2026-09-28 20:18:37 +08:00