Commit Graph
12 Commits
Author SHA1 Message Date
yetone 8b52c521fa qoder: daily check-in for Qoder and Qoder CN (ARNO on Discord) — while Settings › Daily check-in › Qoder (or the card's Auto check-in) is on, the gateway claims each plugin account's claimable daily credits (campaigns with actionType CLAIM_BENEFIT on openapi.qoder.sh / openapi.qoder.com.cn, as wallechfox/qoder-checkin claims them) once a Beijing day, through the plugin's fetch on its device token (@magpie-community/opencode-qoder-auth 0.2.7, now the mover's min). One claimed already is done, none listed is no event, an expired sign-in or an old plugin says so. Kept in qoder-checkin.json by site and uid; shown on the usage card, in the TUI's and CLI's check-in. Built-in (unmoved) accounts aren't checked in. Not tried with a real Qoder account. qoder_checkin_test (fake campaigns, both sites; -race -count=3) and usage-checkin (Chromium and WebKit, en and zh, fails without the GUI change) pass; go test provider/gui/tui/settings/gateway, vet, linux/windows/nogui builds pass. 2026-10-06 11:41:11 +08:00
yetone 5f4c3c081f provider: moved Qoder takes qoder-auth 0.2.6, whose request window holds the reply's max_tokens too (#700 follow-up, kyzhouxu: a group's DeepSeek V4.1 Flash refused near 207K until Qoder's DeepSeek-Flash was taken out of it) — 0.2.5 sent a model's default window (200K for one context_config lists 200K/400K/1M for) while the prompt's estimate alone fit it, so a 180K conversation asking 32000 for the reply went out with context_length 200000 while magpie reports 1M. 0.2.6 (magpie-community/plugins a839119) counts the reply's max_tokens in, sending 400K there; the mover's min names it so keepMovedCurrent updates every moved user. go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. Not tried with a real Qoder account. 2026-10-04 12:06:30 +08:00
yetone f980ae31b5 qoder: moved accounts update to the Qoder plugin 0.2.5, whose models' context is the largest window Qoder offers them (#722, Moody-Sin: qoder 的 qwen 3.8 flash 只有180K上下文) — the plugin took a model's context from the listing's max_input_tokens (180000 on Qwen3.8-Flash, Qwen3.8-Max, Kimi-K3, GLM-5.3, MiniMax-M3, Sonus, Cantus), what a request naming no window gets; 0.2.5 reads the windows a model offers from context_config as Qoder's client does (200K default, 400K, 1M on qfmodel in the owner's real listing), reports the largest, and sends context_length = the default window while a request fits it, a larger one only when the conversation needs it. Against the owner's real account through the plugin's fetch: qfmodel, Qwen3.8-Max and performance answered with context_length 200000/200000/272000, and 400000/1000000 when the request was counted larger. The mover's min goes to 0.2.5 so keepMovedCurrent updates every moved user. 2026-10-04 06:56:04 +08:00
yetone b3ab3e42e9 gateway: a request well past the model's window that a vendor turns away without saying why reaches the agent as too long, at once; Qoder's plugin to 0.2.4 for its token usage (found testing real accounts) — Devin answered a conversation of about 300k tokens for swe-1.7-lightning (a 202,752 window) with a 502 "We are currently experiencing capacity issues…", Qoder one of 1.8M for qmodel (1M) with a 400 "Error in upstream response", each answered at a size the model holds; magpie asked Devin's again in place three times and handed the agent a 502 api_error, so Claude Code and Codex never compacted. tooLongUnsaid (fallback.go) takes a 400/413/422/5xx that says nothing of quota, a rate limit, the account, the model or the conversation's length, for a request whose estimate is 1.2 times the model's window or more (the user's context, else the catalog's; estimate counts four bytes a token, which most text runs under: Devin counted 173,954 tokens of one estimated at 151,851), as one too long: "prompt is too long: about N tokens, more than <model>'s context window of M (<vendor> answered <status>: …)", sent the agent's way (context_length_exceeded, Anthropic's "prompt is too long"), not asked again of it or another account, and nobody rests. TestOverflowTheVendorDidntSay fails on the old code (a 502 asked three times, a 400 handed on) and passes; a request near the window, a small one, a 429, a 401 and a used-up balance keep their errors. Qoder's plugin read its stream only up to the finish, and Qoder sends the usage in a chunk of its own after it, so every Qoder request was counted as 0 tokens: @magpie-community/opencode-qoder-auth 0.2.4 reads it, and the mover's min is raised to it. Tried with real accounts in a sandbox magpie: Devin (chat and Anthropic) and Qoder now give 400 context_length_exceeded after one try, a WorkBuddy and Kiro overflow as before, small requests to all three answer, and Qoder reports its tokens (streamed, not, and with a tool call). go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass but a provider timing test that passes rerun. 2026-10-03 16:14:38 +08:00
yetone 3e024957a5 provider: moved Factory, Grok, Kiro, MiMo, Qoder and WorkBuddy take the plugin versions that renew their sign-ins ahead of time through auth.refresh (owner: 把社区插件都迁移到 auth.refresh) — factory 0.1.11, grok 0.1.6, kiro 0.1.6, mimo 0.1.6, qoder 0.2.3, workbuddy 0.1.7 (plugins c64f555..319eee2, published): each gives auth.refresh with a refreshLead above its own check before a request, under the same one-refresh-at-a-time as that check, so magpie renews an account once before its requests, models and usage ask, and a refresh token is never spent twice. Kiro and WorkBuddy throw every failure plainly, as their built-ins never marked an account; the others mark a refusal signIn "expired" as their request paths already did. keepMovedCurrent updates moved users to them. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build pass; go test -tags nogui -count=1 ./... under a temp HOME passes but TestProvidersAnswerWhileListsComeIn, TestUserPath and TestClaudeSignedOut, timing tests that failed under load 11 and pass alone. 2026-10-03 12:13:18 +08:00
yetone e194f97731 plugins: moving a subscription onto its plugin installs the plugin's newest fixes — cursor 0.1.7 (a model Cursor runs only in Max Mode is asked again in Max Mode, glm-5.3 and glm-5.3-flash listed), qoder 0.2.2 and workbuddy 0.1.6 (each model's credit rate, which magpie shows by it since v0.1.667), zcode 0.1.7, factory 0.1.8 (Claude 5's system-role metadata in the form Factory takes) — all on npm now. go test -tags nogui ./internal/provider ./internal/plugin under a temp HOME pass. 2026-10-02 23:21:58 +08:00
yetone f099d07e92 qoder: Qoder CN is moved onto its plugin too, @magpie-community/opencode-qoder-auth 0.2.0, which serves it as "qoder-cn" (the user: 为啥 Qoder CN 没有插件啊) — the plugin had Qoder alone when the move was made (09-30), Qoder CN coming to magpie a day later, so Qoder CN stayed a built-in that wasn't deprecated. 0.2.0 serves both sites (Qoder CN signing in on qoder.cn with its own client id and no redirect_uri, chatting on gateway.qoder.com.cn, and on its device token when qoder.cn refuses the job token), so movers now has "qoder-cn" beside "qoder", both from qoderMover(id): an account's pairs, machine id and, for one chatting on its device token, deviceChat go to the plugin and come back. Both movers' min is 0.2.0. The PLUGIN-SERVED notices in internal/qoder, internal/provider/qoder*.go and internal/gateway/qoder.go and AGENTS.md's table now name both ids rather than saying Qoder CN isn't moved. TestQoderCNMover (a device-chat account and a job-token one, round trip) fails with deviceChat not brought back. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-02 19:59:36 +08:00
yetone 51834ba937 migrate: a move installs the plugin versions that match their built-ins (要保证插件订阅 provider 跟内置的订阅 provider所有逻辑都要一模一样) — Command Code 0.1.6 (a Go account lists Go's models), Grok 0.1.4 (grok-4.7's reasoning levels), Qoder 0.1.4 (a refused refresh marks the sign-in), ZCode 0.1.5 (the MCP quota set aside) and Zed 0.1.6 (a model token refused while listing marks the account), all published and installed from npm in a sandbox before this. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass. 2026-10-01 12:05:06 +08:00
yetone 475a55a702 migrate: built-ins move onto plugins that fail and mark the sign-in as they did — each mover now asks the plugin version that answers with its built-in's status and words and says through X-Magpie-Sign-In when the account's sign-in expired, stayed or renewed, in requests and usage reads alike: Command Code, Cursor, Devin, Kiro, MiMo, WorkBuddy and Zed 0.1.5, Factory and ZCode 0.1.4, Grok and Qoder 0.1.3, each published and installed from npm before this. go vet, go build -tags nogui (GOOS=linux), GOOS=windows go build, go test -tags nogui ./internal/provider ./internal/gateway ./internal/plugin pass. 2026-10-01 06:04:01 +08:00
yetone a170b909c9 plugins: a moved built-in's plugin comes up to date with magpie, as the built-in did — the fixes that bring each plugin in line with its built-in (plans, windows, lapsed sign-ins, refusals, bodies in bytes) are in @magpie-community's new releases, but a plugin was updated only by a click in Plugins, so an account moved before kept the old one. The magpie serving the gateway now updates, a little after it starts and every hour, the plugin of each built-in moved onto one to the version its move needs, and a move needs those versions: mimo 0.1.4, workbuddy 0.1.4, grok and qoder 0.1.2, the rest 0.1.3. One turned off, run from a folder or moved back is left alone. TestKeepMovedCurrent fails without the change. 2026-10-01 03:34:22 +08:00
yetone 566ae09db1 plugins: a moved provider's accounts keep what the built-in's had (你确保插件版的订阅 provider 和内置的一模一样了吗) — each account of a plugin provider has its own plan's models, not the first account's; a move carries each account's plan and a lapsed mark; a usage read that finds the sign-in gone marks the account and a clean one clears it, a network failure shows the last reading; a plugin that fails to load keeps its providers rather than taking them away; Kiro's API key is named and an OAuth account beside it stays off as in the built-in; Command Code Plan keeps its name. TestUnloadedPluginKeepsProviders, TestPluginUsageLapse, TestPluginAccountModels, TestMovedProviderName, TestKiroMover and the move test fail without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./internal/provider ./internal/plugin ./internal/gateway pass. 2026-10-01 03:27:47 +08:00
yetone 3bec6c0e40 providers: a built-in subscription moves onto its community plugin and back, its accounts with it (the user: 慢慢下掉内置的那些 Subscription Provider…不要让用户一升级完之后,突然发现他的所有服务都不可用了) — eleven built-ins (Zed, Qoder, Factory, MiMo, Devin, Grok, Command Code Plan, Cursor, Kiro, WorkBuddy, ZCode) each get a mover to their @magpie-community package. A move installs the plugin (updated when older than the mover needs), hands it every account in the plugin's shape, checks the plugin lists models for them, and only then lets the plugin serve the same provider id, so agents' model ids don't change; any failure rolls back and the built-in keeps serving. The built-in's accounts are kept as a backup, and "Run built-in again" (magpie plugin move-back <id>) takes the plugin's current sign-ins back, never copying a rotating token: they are taken out of the plugin in one step, and an account the built-in renewed meanwhile keeps its newer token. An account only the plugin can hold (Cursor's browser sign-in) stays with it. The provider editor shows "Runs on" with the button, a failed move's reason, and the CLI has magpie plugin move / move-back. Automatic moves (Retiring) are wired in but the list stays empty until the packages are on npm. Checked with real accounts in a sandbox HOME: Command Code Plan and Devin moved, answered a chat through the gateway on the plugin, moved back and answered again on the built-in. TestMove*, TestPutBackKeepsNewer, the movers' round-trip tests and plugin-move.test.cjs (Chromium, WebKit, en/zh) are new. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; click-scroll, old-webkit pass. 2026-09-30 21:21:58 +08:00