yetone
3bc3de79d9
usage: the panel says whether its rings are used or left, and a model named free is marked free ( #184 , #185 ) — the panel's usage groups carry a USED/LEFT (已用/剩余) pill on their header that turns every ring as a click on a ring does, and lights a moment when it turns, so the turn is seen; a model whose id or name has "free" as a word (OpenRouter's foo/bar:free, free-model, Qwen3 Free, not freedom-7b) gets the green FREE badge in the provider's model chips, the model picker, the Gateway's model rows and the import preview, titled "free: so its name says". Checked in a sandbox magpie web, light and dark, English and Chinese
2026-09-29 11:57:06 +08:00
yetone
976ae3f45b
gateway: Claude Code's body reaches a relay as it sent it, but for the model's name ( #179 : packy: 您的请求体疑似被篡改) — swapping the model re-encoded the whole body, so its fields went out sorted and its <, > and & as \u003c escapes, and a Claude model's request without thinking gained thinking off; a relay that only lets Claude Code in (packy) took that for a body tampered with. The model is now replaced where it stands and nothing else is touched, a Claude model's request is not given thinking off (Anthropic's models think only when asked), and a model that thinks by default (DeepSeek) has it added at the end with the rest left as sent; other rewrites no longer escape <, > and &. Tested with two requests captured from Claude Code 2.1.284 in a sandbox (85 KB with its tools and system prompt): through the gateway to a keyed Anthropic provider they arrive byte for byte as Claude Code sent them; not yet against packy
2026-09-29 11:47:43 +08:00
yetone
c348903159
workbuddy: a chat with no system prompt is sent with one (Jerry lee on Discord: 没有 system 消息时报 first message is not system prompt) — WorkBuddy refuses a chat whose first message isn't the system prompt, which scripts and plain chat clients often send; such a chat now starts with a neutral "You are a helpful assistant.", the rest of the body kept as it was, and one that already starts with a system prompt goes as it is. The comment on WorkBuddy AI's client headers no longer says they fixed "unapproved channel": that answer comes from Claude Code's and Codex's own system prompts ( #182 ). Tested on the account's request body, through the provider as signed in
2026-09-29 11:40:00 +08:00
yetone
d287a05161
providers: Amazon Bedrock, with a Bedrock API key ( #176 : 增加 AWS Bedrock 作为 model provider) — Bedrock's runtime serves Claude on Anthropic's messages at /anthropic/v1/messages and the other models on chat completions at /openai/v1, both taking a Bedrock API key (AWS_BEARER_TOKEN_BEDROCK) with no SigV4, so a vendor preset reaches it: pick one of ten regions and paste the key. Claude ids (anthropic.claude…) go on messages only, the rest on chat only, for the preset and for any provider at a bedrock-runtime host; the runtime has no /models, so the preset's list (Claude as global. inference profiles, plus gpt-oss, Qwen3 Coder, DeepSeek, Kimi, GLM and MiniMax) is it, and a profile kept in one geography (apac., us., eu.…) is typed in by hand and takes its context size from the model it names. The region selector scrolls where its regions don't fit. Tested against a fake Bedrock through the gateway (apac.anthropic.claude-opus-5-5 on /anthropic/v1/messages with x-api-key, gpt-oss on /openai/v1/chat/completions with the Bearer key) and in a sandbox magpie web; not yet against real AWS
2026-09-29 11:29:43 +08:00
yetone
6b546aa81d
gemini: 3.8 Flash asked of an account it isn't rolled out to goes as that account's Flash (蒙面人 on Discord: 502 错误 for gemini/gemini-3.8-flash) — the list magpie falls back on has 3.8 Flash and 3.5 Flash Lite, and a model picked from it went to Code Assist under that id whatever the account's experiments said; now, as Gemini CLI would, 3.8 Flash goes as gemini-3-flash and 3.5 Flash Lite as gemini-3.1-flash-lite where they aren't rolled out. Tested against a fake Code Assist
2026-09-29 11:04:46 +08:00
yetone
63b131c1d7
tray: a reset next week shows its date, and the panel keeps one height across its tabs ( #181 : 重置次数那个地方现在是固定显示周一,但实际不是本周一; #124 : 从方案切换到用量,一下子面板就变大了) — a reset time or reset credit's expiry within 7 days showed a bare weekday, so on a Tuesday next Monday read as this week's; now a weekday is shown only for later this week (Monday to Sunday), else the date (10月5日 12:21). The tray panel was as tall as the tab showing; it is now as tall as its tallest tab (capped as before), so switching tabs doesn't resize it, and a short tab leaves room. Checked with Playwright in Chromium and WebKit with the clock on Tuesday 09-29: 10月5日 12:21前有效, and one height on every tab with one account and with five
2026-09-29 11:04:46 +08:00
yetone
6e7546337b
grok: Grok Build is found on Windows where its installer puts it ( #180 : the Grok Build installer finished, but magpie can't find it) — magpie looked for ~/.grok/bin/grok, without .exe, and then only at the first grok on PATH, which on Windows may be another (an npm grok.cmd). Now it looks at GROK_BIN_DIR, the grok home's bin and ~/.grok/bin (grok.exe on Windows), then every folder on PATH and on the registry's PATH, which has what was installed since magpie started, taking a grok there only under a .grok folder; the install-first error gives the PowerShell command on Windows. Tested the order and names of the places looked at, and which grok is taken, in a fake home
2026-09-29 11:04:46 +08:00
yetone
57bcccc980
gateway: Claude Code's own headers reach a key+URL Anthropic provider ( #179 : 403 packy: This API endpoint is only accessible via the official Claude CLI) — magpie sent Claude Code's request on with only anthropic-version and anthropic-beta and its own User-Agent, so a relay that serves only Claude Code, telling it by claude-cli/ and x-app, refused it. Now a request from Claude Code to a provider without an account goes on with its User-Agent, x-app, anthropic-*, X-Stainless-* and x-claude-code-* headers and ?beta=true as it sent them; its key to magpie never does, the provider's own is set. Tested against a fake upstream: the headers and query arrive, the provider's key and not magpie's, another agent still goes as magpie
2026-09-29 11:04:45 +08:00
yetone
207042dd78
claude: the signed-in account is one account, and one out of quota hands over to the next ( #177 ) — the account Claude Code is signed in to was named one way as a provider and another as a saved login, so it was served twice and its limits weren't found under its name; and claude auth status was asked with magpie's own ANTHROPIC_BASE_URL/token in the environment, telling of those rather than the sign-in. Now both go by ~/.claude.json's email (with the org), the CLI's email when that has none, and the status is asked without magpie's wiring. A turn the CLI ends with an error result (out of quota, rate limited) ends the reply there instead of waiting on, and a non-streamed one answers 429 for quota words, so another account takes over as in a stream. Tested: the account named as its login, the quota result ending the reply, another account taking over
2026-09-29 10:50:39 +08:00
yetone
69a14800d9
warmup: a window that hasn't started is started, and started again after a try that didn't take ( #178 ) — the warm-up only acted on a window with a reset time, so a Codex or Claude account whose 5-hour window had never started (no reset time, nothing used) was never warmed. Now a window the usage reads as not started, or one the agent's windows should have but the reading lacks, is due at once when idle; a try that leaves it unstarted is tried again after 15 minutes, doubling to 4 hours; reading the usage and seeing a window not started kicks the warm-up rather than waiting its 10-minute round, and a warm-up forgets the cached usage so the new window shows. Tested with the repro of the issue, the backoff, and the kick
2026-09-29 10:50:39 +08:00
yetone
7047716de6
gemini: a Gemini CLI account lists the models Gemini CLI 0.61 offers it, Gemini 3.8 Flash among them (蒙面人 on Discord: 请问,这个不显示 Gemini 3.8 吗??) — magpie's list was Gemini CLI's of some versions ago, and the models it fetched were the account's quota buckets, which name models by Code Assist's ids (gemini-3-flash) and never 3.8 Flash. Now, as the CLI does, magpie asks Code Assist which experiments the account is in (listExperiments, at most hourly) and offers what the CLI's /model would: 3.1 Pro Preview or 3 Pro Preview, 3 Flash Preview (previews only with quota for one), 3.8 Flash where Google has rolled it out and 3.5 Flash where not, 3.5 or 3.1 Flash Lite likewise, 2.5 Pro and 2.5 Flash Lite; a request goes out under the id the CLI sends (3.5 Flash as gemini-3-flash, or as gemini-3.8-flash once rolled out), and quota buckets are shown under the models listed. The list magpie falls back on has 3.8 Flash, 3.5 Flash and 3.5 Flash Lite, and no longer the retired 3.1 Flash Lite Preview; magpie says it is Gemini CLI 0.61.0. Tested against a fake Code Assist with the experiments off, rolled out, and without Pro or preview access
2026-09-29 10:43:23 +08:00
yetone
2715696138
workbuddy: WorkBuddy AI chats carry the rest of the headers its own client sends (lightyear, Jerry lee on Discord: deepseek flash 提示 API error:400 workbuddy AI : illegal API invocation from an unapproved channel) — on the international build deepseek-v4.1-flash was refused as "from an unapproved channel" while GPT and Claude answered. WorkBuddy AI's desktop app lists what its /v2/chat/completions gateway needs ("x-requested-with 是网关的准入约定"), and its CLI sends the same on every chat: X-Requested-With: XMLHttpRequest, X-Agent-Intent: craft, X-Agent-Type: main, X-IDE-Name and X-IDE-Version, and conversation, message and request ids; magpie sent none of them. WorkBuddy AI chats now carry them; the China build, which serves that model already, is left as it was. Tested against a fake gateway that the headers and ids go out; not yet checked against WorkBuddy AI itself
2026-09-29 10:43:22 +08:00
yetone
c286c218e3
routing: a group's intent classifier can be a routing group, failing over as any request to it does (lantern2077 on Discord: 意图分类模型能否也选择路由组?现在只能选择单个模型,缺乏回退保障) — the classifier was one model, and when it was down no intent matched. It can now be group/<id>, asked through magpie as before, so its first model failing the next is asked. A group can't be its own classifier, one that classifies for another can't be removed until that one chooses another, a rename carries over, and a classifier's own call asks no classifier in turn, so two groups classifying with each other don't loop. The GUI and TUI pickers list the other groups. Tested: the classifier group's first model 500s and the next answers and the rule matches; two groups set to classify with each other finish at once; checked in a sandbox magpie web that the picker lists Cls and not the group being edited, and via the CLI that self-classifying and removing a classifier group are refused
2026-09-29 10:25:41 +08:00
yetone
1963f7f262
providers: a provider's editor lists its image models under its models (Raven on Discord: 同样的 baseurl 和 key,识别不出来里面的 image 生图模型,cc 那边可以) — an image model isn't one an agent chats with, so it was never among a provider's Models chips, and nothing in the editor said magpie had seen gpt-image-1 in the vendor's list. Under Models an Image models row now lists them, as chips that can't be picked, saying the one that draws is chosen in Settings → Images. Tested with a fake vendor listing gpt-5.5, gpt-image-1 and flux-1-schnell; checked in a sandbox magpie web that the editor shows gpt-5.5 under Models and the other two under Image models
2026-09-29 10:17:30 +08:00
yetone
40fc5a8d87
panel: the tray panel stops at 560 points tall, not 720, and the rest scrolls in it ( #124 : 托盘图标这里 体验优化~用量这里 一下子弹出来多大一个框) — with several subscription accounts the Usage tab grew the panel to 720 points, most of a 1080p screen, dropping down from the tray as a big box; the panel now stops at 560 and the accounts scroll under the tabs, the footer staying put, as they already did past 720
2026-09-29 10:15:13 +08:00
yetone
034da2b693
providers: one that only draws images says how many image models it has, not "no models exposed" ( #124 : 供应商里面img模型读不出来,只有在设置里面可以看到) — an image model isn't one an agent picks, so a provider whose list had only image models read "no models exposed" under Providers although Settings → Image generation drew with them. Its row now reads 2 image models. Checked in a sandbox magpie web with a custom provider whose /v1/models lists gpt-image-1 and flux-1-schnell
2026-09-29 10:04:30 +08:00
yetone
93d74d2b81
workbuddy: requests are streamed to it, Test's too ( #124 : 测试 400 · Non-stream chat request is currently not supported, 对话正常的) — WorkBuddy refuses any request that doesn't stream, so its Test, a small non-streaming request, failed with 400 while agents, which stream, answered. A WorkBuddy account is now a backend that only streams: Test sends it stream:true, and the gateway streams it a client's non-streaming request and gives the client one answer, as it does Codex's and Google's. Tested: Test's request to such a backend streams on each endpoint, and a non-streaming chat request through the gateway to a fake upstream that refuses one comes back as one chat.completion
2026-09-29 10:01:21 +08:00
yetone
67480a037b
accounts: WorkBuddy's daily check-in (签到) done for each WorkBuddy (China) account, when Settings says to (zhanglolo on Discord: 能不能加个 WorkBuddy 自动签到) — while WorkBuddy's check-in event runs, an account is given credits a day for pressing 签到 in the app. Settings has Check in to WorkBuddy daily (off by default, shown while a WorkBuddy China account is signed in): the gateway asks the event's status for each account and claims when it runs and today's isn't in, once a Beijing day; an answer holds for the day (claimed, already in, not eligible, the event over), no answer is tried again after 30 minutes. What came of it is kept by site and account id in workbuddy-checkin.json and shown under the setting. magpie accounts checkin [--json] does it now. WorkBuddy AI (international) has no event and is left alone. Tested with a fake WorkBuddy API; checked the row in a sandbox magpie web
2026-09-29 09:56:46 +08:00
yetone
ea20c2db59
providers: Xiaomi MiMo is a preset, its Token Plan in China, Singapore or Europe or pay as you go ( #174 供应商没有小米Mimo的) — MiMo could only be added as a custom provider with its base URL typed in. Now Xiaomi MiMo is under Vendors: a Token Plan's tp- key goes to its region's host (token-plan-cn / -sgp / -ams.xiaomimimo.com), pay as you go to api.xiaomimimo.com, each with chat completions and Responses at /v1 and Anthropic messages at /anthropic, as MiMo's Token Plan page gives them; its models from models.dev's xiaomi-token-plan-cn and xiaomi until Refresh asks MiMo. Checked in a sandbox HOME: the preset added on the Singapore plan lists 9 models, and Test reached all three endpoints of each host, answering 401 Invalid API Key to a made-up key (a wrong path is 404)
2026-09-29 09:46:22 +08:00
yetone
35ced89666
provider: a vendor's refusal is shown in its own words, not a bare 400 Bad Request (Mrhe525 on #124 : WorkBuddy 和 WorkBuddy AI 测试都 400 错误,积分都是有的) — an error body was read only for an OpenAI/Anthropic-style error or message, or shown as it was when under 200 bytes; Tencent's {code, msg} (WorkBuddy's endpoints) and any longer body were dropped, so the provider editor's Test and the error an agent got said only "400 Bad Request", nothing of why. msg is now read too, and a body in no known shape is shown collapsed to one line and cut at 300 characters; an HTML page still says nothing. Tested: {code, msg}, a long JSON body, an HTML page and an empty body
2026-09-29 09:38:33 +08:00
yetone
860292fcc0
routing: a row answering another request says so, not "answering…" under this one's header (yonghe on Discord: 这个调用已经失败/结束,这里还是显示回答中) — the stage shows the rows of every request an agent has in flight, so when Claude Code's Sonnet side request failed while its Opus answer went on, the Opus row stood under the Sonnet route's header saying 回答中, as if that failed request were still answering. A row whose try belongs to a request other than the one the header and log tell of now says "answering another request…" (在回答另一个请求…); with several agents on the stage the wire's colour already tells whose it is. Checked in a sandbox magpie web with a slow and a fast model on one fake upstream: while the slow one streamed and the fast one had answered, the slow row read answering another request… under the fast one's header
2026-09-29 09:27:52 +08:00
yetone
a46a6bb2ec
providers: a custom provider named in Chinese is added under its site's name, and a second one beside it (mamba on Discord: 供应商里面自己添加第三方URL只能加一个吗,第二个会提示id重复) — a provider's id is its name slugged to Latin letters and digits, so a name such as 中转站 slugged to nothing and Add was refused ("provider id must be lowercase letters, digits and dashes, not \"\""). Now such a name takes its id from the host of its URL, api. and www. and the .com left off (api.relay-one.com is relay-one), and one on an IP address or localhost-like address is custom; a taken id moves on to relay-one-2 as before, and a second 中转站 is named 中转站 2. Tested: two 中转站 on one host, one on a host with a port, one on 127.0.0.1 and one on [::1] each added under its own id; checked in a sandbox magpie web that 中转站 is added beside another custom provider
2026-09-29 09:17:47 +08:00
yetone
3c043f7b2b
settings: About's Community row links the GitHub repo beside Discord ( #124 : 这里能不能再加上tg群或者github的仓库链接,dis根本没啥人用感觉) — a GitHub button, next to Join Discord, opens github.com/yetone/magpie, where issues are filed and the code is; the row now says questions, ideas and feedback go on Discord or GitHub. There is no Telegram group, so none is linked. Checked in a sandbox magpie web, light and dark, and hovered
2026-09-29 08:36:10 +08:00
Charan Rathore
ff4f730d0e
gateway: keep one Chat choice when translating, including relay indexes ( #168 )
...
* gateway: keep only first Chat choice when translating
* gateway: test multi-choice stream keeps choice zero
Add test to ensure translation keeps first choice intact.
* gateway: follow the first observed choice index, accept string indexes
Updated the chatDecoder struct to include choice as a string and modified the handling of the index in the decode method to support various formats.
* gateway: test relay index forms and interleaved choices
Refactor comments for clarity and update test cases to ensure proper handling of choice indices in chat translation.
* gateway: follow the first observed choice index, accept string indexes
Refactor chat handling by removing unused types and functions. Introduce new functions for processing chat responses and tool calls.
* gateway: restore chat.go translation content
Refactor chat handling to support new request structure and improve parsing logic.
* gateway: keep the first readable Chat choice index in translation
Updated tool message handling to include images in user messages. Enhanced the tool result message format to include image URLs and additional notes about returned images.
* gateway: test readable, missing and malformed choice indexes
2026-09-29 04:39:52 +08:00
Charan Rathore
0b31315a47
gateway: 400 when a required tool choice leaves nothing callable ( #169 )
...
* gateway: 400 when a required choice has no callable tools
Added validation to ensure required tool choice is callable.
* gateway: force a single Gemini name only when it survives
Added conditions to ensure tool choice is set correctly based on allowed function names and tool availability.
* gateway: test required-choice allowlist rejection
* gateway: reject an allowlist that filters out every tool in shared parse
Refactor request parsing to handle required tool choices and improve error handling.
* gemini: narrow the required-tools guard to Responses allowed_tools and ANY allowedFunctionNames
Updated the logic for function calling modes to include 'VALIDATED' alongside 'ANY'. Adjusted comments for clarity regarding allowed function declarations.
* gateway: cover required-tool and filtered-empty allowlist rejections
2026-09-29 04:39:49 +08:00
Charan Rathore
42a13798bc
gateway: keep Gemini affinity when the first turn omits role ( #171 )
...
* gateway: treat an omitted Gemini role as user for affinity
Add support for Gemini content handling and role omission.
* gateway: test roleless first-turn Gemini affinity
Added tests for role-less content handling and explicit user selection in conversation IDs.
2026-09-29 04:14:50 +08:00
Charan Rathore
42a39fdedf
gateway: filter Gemini VALIDATED allowedFunctionNames on translated routes ( #170 )
...
* gateway: filter Gemini VALIDATED allowedFunctionNames
Updated function calling logic to accommodate both ANY and VALIDATED modes, allowing for named function declarations.
* gateway: test VALIDATED allowed-name filtering
2026-09-29 04:14:46 +08:00
yetone
504b470f12
gateway: images a tool returned reach a Chat model after the tool messages (charan-rathore in #167 : Claude Code's tool_result images were dropped on the way to Chat Completions)
...
A tool result holding images, as Claude Code's screenshot tools and its Read of a .png send it (an Anthropic tool_result with image blocks) or as a Responses function_call_output with input_image parts, lost its images whenever the request was translated: the result was read as its text only, so a Chat model was told "Read shot.png" and never shown it, and a result that was only an image came through empty. #167 turned such a request away with a 400; now the images go through. The shared request keeps a tool result's images beside its text. Chat's tool messages hold text only, so a tool message says "[The tool returned an image; it follows in the next message.]" after its text, and the images go right after the run of tool messages, each result's labelled with the tool and call it came from ("[From the result of Read (tool call toolu_1):]"), as image_url parts (a data: URL for inline ones). When the user's own message comes next, as Claude Code's system reminder beside a result does, the images open that message rather than being a second user message in a row, which some models' chat templates turn away; otherwise they are a user message of their own, before the assistant's next turn. Tool messages still directly follow the assistant's tool_calls. An Anthropic upstream gets the images inside its tool_result, a Responses one in the function_call_output's output list, Code Assist as inlineData after the functionResponse, as Gemini CLI sends a file it read; Kiro, Cursor and Devin take the text as before. A model that can't see still has each image described in its place before translating, so nothing follows its tool message.
Tested end to end against fake upstreams: Claude Code's tool_use then a tool_result of text and a base64 PNG to a Chat model that sees (with and without the user's text after it), two parallel results with three images (base64 and a URL) giving tool, tool, then one user message with all three labelled, a screenshot from an older turn kept before the assistant's answer, Codex's function_call_output with input_image to Chat, Claude Code to a Responses provider, and a text-only model still given the description in the tool message. The four Chat tests fail without the change. go build, vet and the gateway tests pass; windows and linux (CGO off) build.
2026-09-29 03:44:28 +08:00
Charan Rathore
bdf3d11f50
gateway: hash Gemini contents for the session-affinity fallback ID ( #165 )
...
* gateway: hash Gemini contents for the session-affinity fallback
Add Contents field to JSON structure and update item selection logic.
* gateway: test conversationID reads Gemini contents
* gateway: test Gemini session affinity keeps the provider key
Add test for Gemini client session affinity behavior.
2026-09-29 03:40:00 +08:00
Charan Rathore
3b6ea8b589
gateway: clear 400 for Responses images named by file_id on translated routes ( #166 )
...
* gateway: 400 on translated Responses images named by file_id
Add error handling for unportable current image in translate function.
* gateway: keep native file_id passthrough, reject on translation
Added hasUnportableCurrentImage function to check for images without a portable source.
* gateway: test Responses file_id image handling
2026-09-29 03:38:54 +08:00
Charan Rathore
995edc135d
gateway: honor allowed-tool subsets from Gemini ANY and Responses allowed_tools ( #164 )
...
* gateway: honor Gemini ANY allowedFunctionNames subsets
Add support for allowed function names in ANY requests.
* gateway: honor Responses allowed_tools subsets
* gateway: test Gemini allowedFunctionNames filtering
* gateway: test Responses allowed_tools filtering
2026-09-29 03:38:21 +08:00
yetone
e330cb815d
workbuddy: a model the plan serves free says so (这个应该是Workbuddy国际版免费的模型,要不要在模型名字后面加上一个免费标记?) — WorkBuddy's product config gives each model the credits a request costs, as its own picker shows them: WorkBuddy AI's deepseek-v4.1-flash is "x0.00", its -sg twin "x0.03", GPT-5.5 "x1.00". A model at x0.00 (or 0) is now Free in the catalog, and carries it to the provider editor's model chips and every agent's model picker, where it has a green 免费/free badge after its name ("free: it doesn't use the plan's credits" on hover); a rate that can't be read is not free. Both WorkBuddy sites, as they share the config. A list fetched before this has no rates: Refresh in the editor asks again. Checked: the credits parse (x0.00, 0 free; x0.03, x1.00, none not), and the badge on a chip and in the picker in the sandbox, dark
2026-09-29 03:02:34 +08:00
yetone
b2744c417e
gateway: the package's tests no longer write routes to disk behind their backs (修一下CI里routing目录没清理的测试失败) — a done route was saved by a goroutine of its own, which could still be writing $XDG_CONFIG_HOME/magpie/routing when the test that made it had ended, so TempDir's cleanup failed with 'unlinkat …/magpie/routing: directory not empty' (TestCodexOwnModelRefusalPassesThrough, TestFallbackWhenOutOfQuota/overloaded, TestCodexOwnModelTraced on macOS CI). Saving done routes is now behind keepRoutes, on in magpie and off in the gateway's TestMain; the history's own tests call saveRoute themselves. Ran the gateway tests four times and the whole suite
2026-09-29 02:56:17 +08:00
yetone
efed707066
providers: a provider can be switched off, kept with its keys but out of every agent's list (希望服务商可以有一个开关按钮,关闭后不再写入模型) — a provider whose quota ran out could only be removed, losing its key and settings, or left in, its models still written into the agents and requests still sent to it. Now each provider (a signed-in account too) has a switch on its row in Providers and in its editor's header; off, the row is dimmed and says Switched off (已关闭), its models leave the catalog, so the model lists magpie writes into agents' files are rewritten without them as after any provider edit, and it is left out of routing groups, fallbacks, the Automatic image, vision and search picks, the routing pools and balance and usage polling. A request naming one of its models is answered 404 saying the provider is switched off in Magpie, not that the model is unknown. Switched on, all of it comes back. Saving the provider from its editor keeps it off; magpie provider off|on <id> and the TUI's o do the same. Tested: an off provider's models are not in the catalog or served, a group with it routes to the member left, a fallback to it is not tried, a request for it is refused as switched off, and turned on it is listed and answers again; an account's off is kept. Checked the Providers page in a sandbox HOME in light and dark: switching a row off and on, the editor's switch and its note
2026-09-29 02:49:36 +08:00
yetone
cdbd2250f6
providers: AIHubMix's GPT Image 2 and 2.5 can be picked to draw (我记得AI Hub Mix是有GPT Image 2以及GPT Image 2.5模型的,为什么选不到呢?) — AIHubMix's /v1/models, asked with a key, lists only its Gemini image models, though the same key draws with gpt-image-1/2/2.5 and the rest; its public catalog (aihubmix.com/api/v1/models) lists them all. Now when an AIHubMix provider's list is fetched, the image models of that catalog join it as drawing (Settings → Images, never offered to agents to chat with); Ideogram's V_2, DESCRIBE and UPSCALE are left out. Checked in a sandbox HOME against the real AIHubMix: after a refresh the picker has aihubmix/gpt-image-2, gpt-image-2.5-flare and 2.5-sunburst among 46 of its image models, and gpt-image-2 and gpt-image-2.5-flare each drew a 1024² PNG through the gateway
2026-09-29 02:37:58 +08:00
yetone
ad9536af70
gateway: an empty reasoning_content is left out of a relayed Chat stream, so Qoder reads a WorkBuddy reply as one message, not a word to a line (lml on Discord: 在Qoder CN里面使用Workbuddy里面的模型的话,它这个输出不对) — WorkBuddy's endpoint (copilot.tencent.com/v2) goes on sending "reasoning_content": "" in every delta once the model has done thinking. Its own CLI ignores an empty one after the thinking is over (codebuddy.js: !(this.thinkingBlockCompleted&&""===ec.reasoning_content)), and Cline copes, but Qoder CN 1.1.64 takes each for the thinking starting again and each piece of text after it for a new message, so "hi" was answered one word to a line. A Chat stream magpie relays as it is now has an empty reasoning_content taken out of each delta; it says nothing, and any other line goes on byte for byte, split reads put back into whole lines first. Tested with a scripted Chat upstream streaming WorkBuddy's shape: the agent gets the thinking, the text, finish_reason and usage, and no empty reasoning_content (the test fails without the change); lines split every 7 bytes come out whole
2026-09-29 02:35:51 +08:00
yetone
04f82010a4
gui: the image model pickers keep routing groups in one group, as an agent's picker does (重大bug,这里为什么都是重复的icon?) — Settings → Images put each routing group in a group named after itself, so the picker's rail had a button for every one of them, each with its first member's icon: with 31 groups, rows of the same OpenRouter, AIHubMix, Claude Code, Codex and Copilot icons. A model without a provider of its own (a routing group) is now under Routing groups, one rail button with the fan, then one per provider. Automatic and Off, the picker's own choices, stay above the routing groups, which every model picker puts first. Checked with the live Settings' 31 groups and their providers: the rail is All, Favorites, Routing groups, OpenRouter, DeepSeek, 鱼鱼连线, AiHubMix, Claude Code, Codex, Copilot… once each, in light and dark
2026-09-29 02:34:01 +08:00
yetone
d730192cc0
gui: the header's view switch is small again, and in dark mode a faint track with a lighter thumb (深色模式下,这一坨像膏药一样…以前我记得是挺精致的) — dc3f691 made its tabs 30px with 13.5px text, not asked for by anyone but by a loop tick that had just enlarged the profile chips after a Discord request; they are 24px and 12.5px again, as they were. In dark mode its track was --pill (#2d2d33), a solid slab lighter than the window, and the thumb on the view shown --card ( #232327 ), darker than the track, so the switch read as a grey plaster with a dent in it. It now has tokens of its own: light as before (pill track, white thumb with its shadow); dark a track of white at 4.5% and a thumb of white at 10% with a hairline top highlight. Checked in the window in light and dark
2026-09-29 02:29:47 +08:00
yetone
4cc32dbcb0
routing: every request's route is kept on disk, for a day long gone to be looked at and replayed, with retention (历史中的路由记录是不是都应该保存下来,方便用户去回放?…这种历史记录会特别大,应该有自动的retention) — the trace holds only the last 60 routes, and only since the gateway started. Now each route, once done, is appended to ~/.config/magpie/routing/YYYY-MM-DD.jsonl; a day that is over is gzipped, days older than 30 are dropped, then the oldest until all of it fits 200 MB (today is never dropped), checked at most hourly. Route ids start at the time the gateway started, so they don't repeat across runs. /api/gateway/history?day= gives the days kept with their counts and a day's routes (its latest 2000). The Requests list has a chip per day (实时, 今天 3, 昨天, …): a day's requests can be picked, looked at, replayed all, or replayed from one on (从这里重放), with the real-time clock as before. Checked in a sandbox HOME against real DeepSeek: three requests written to the day's file, the gateway restarted, the list showed 今天 3 with them, 从这里重放 played them at 02:19:46 · 第 1/3, stop and 实时 came back to live
2026-09-29 02:22:35 +08:00
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