aca0f0d8a1630923bf4e8a18b3a5a8ef508fc7bc
1372
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6aa04f6e6a |
provider: a keyless relay on the user's own network imports and saves, as one on 127.0.0.1 does
iSnow_999 on X: their company's internal Codex relay is at
http://<LAN IP>:8080; imported from CC Switch, Codex couldn't reach it
through magpie. A CC Switch Codex entry with no key (requires_openai_auth
= false, auth {}) at a LAN address was listed as "it has no API key"
and left out, and the same provider couldn't be saved by hand ("needs an
API key"), while the same server at 127.0.0.1 was taken keyless.
keyOptional now also takes a host on the user's own network, read from
the URL alone (ownNetwork, no lookup since Ready asks often): a private,
link-local, loopback or carrier-grade NAT (Tailscale) address, or a
.local name, as netproxy's onLAN sends around a proxy. A keyless address
on the internet still needs its key. Every importer (CC Switch, Alma,
Codex, OpenCode) goes through imported(), and the editor, CLI and TUI
through Save, so the one rule covers them.
Ruled out against the code and on mote, sandbox HOME, fake relay on
mote's LAN address 10.0.0.116 at a free port, `magpie serve --web` built
from this tree, import through POST /api/importapps:
- a CC Switch Codex entry at http://10.0.0.116:<port>/v1 with a key
imports with port, path, key and Responses kept, and /v1/responses
through the gateway reaches the relay (Bearer sk-corp); with
HTTP_PROXY/HTTPS_PROXY/ALL_PROXY at a dead 127.0.0.1:9 too (onLAN);
- a request with Codex's User-Agent, originator and
x-codex-turn-metadata reaches the relay with them (sub2api's
codex_cli_only gate reads these; port 8080 is sub2api's default).
After the fix, the same run with a keyless entry: imported, served, the
relay sees no Authorization header.
Tests: TestKeylessRelayOnOwnNetwork (import of a keyless LAN entry,
Save + Ready at 192.168/10/172.16/100.64/.local/[fd00::] addresses, a
keyless internet address still refused) is red on the old provider.go
and green now.
Run on mote at
|
||
|
|
b01193ef97 |
provider: Cursor's plugin min is 0.2.29, whose HTTP/1.1 Run sends blobs 16 at once
ysm119 on Discord: Cursor 30 s+ to first token, 1-4 min a turn. 0.2.28's 16-at-once BidiAppends reached only the plugin's stateless fallback; every real request goes through its native session, which still sent each history message's blob one round trip at a time when the Run fell back to HTTP/1.1 (a proxy or network that blocks h2). 0.2.29 (plugins 8f81a8a) sends them 16 at a time there too. Real Cursor account, sandbox HOME, plugin driven directly, h2 forced to fail: a 30-step agent history went from 37-39 s to first token to 4.4-9.1 s; 100 steps from 117-130 s to 9.0-13.2 s, answers correct. Over HTTP/2 nothing changed and nothing was slow (2.9-7.3 s). Run: gofmt -l clean; go test -tags nogui ./internal/provider/ on mote, ok. npm view --prefer-online shows 0.2.29 as latest. Not tried: a sandbox magpie installing 0.2.29 through the mover; the reporter's network, so whether he is on HTTP/1.1 is not confirmed. |
||
|
|
3b2794cadd |
provider: a relay's 403 in markup says its words, not a bare "403 Forbidden"
maralica (Discord #help) sent WorkBuddy through a custom Chat relay,
"magpie-grok", that serves only some agents' clients, and WorkBuddy was
told only "magpie-grok: 403 Forbidden". apiError dropped any body that
starts with "<" and isn't a whole web page (a page's fragment such as
"<h1>Forbidden</h1><p>…</p>", an XML error), and WebPage said a page
with no <title> as "a web page, not an API reply" alone, so a relay's
reason in either never reached the agent.
Now such markup is said by its words (provider.MarkupText: scripts,
styles, comments and declarations out, tags out, entities read,
whitespace folded, 300 runes), and a page with no title by its words
(120 runes, as a title). Markup with no words still says the status
alone. JSON, plain text and empty bodies read as before. Every APIError
caller and WebPage's (Unsaid, errorSaid, vendorMessage, vendorSaid) get
it.
Checked on the way, unchanged: the relay is asked for "grok-4.7" by
model "magpie-grok/grok-4.7" and by a group of it, never a magpie-named
id; with "Send the agent's own User-Agent" on, it gets WorkBuddy's
User-Agent as sent, and none of the agent's X-Agent-*, Acp-Connection-Id
or Traceparent headers (only Codex's and Claude Code's own identity
headers are passed on to a relay).
Tests: TestChatRelayRefusalSaysWhy (custom Chat provider, WorkBuddy's
User-Agent, by provider/model and by group, streaming: the model and
User-Agent the relay got, and the message for plain text, JSON, an
untitled page, a fragment, XML and an empty body); TestAPIErrorShapes
updated (untitled page, script-only page, XML, a bare XML tag).
Broken by hand: MarkupText made to return "": TestAPIErrorShapes red,
and TestChatRelayRefusalSaysWhy red in untitled page, fragment and xml
(said "magpie-grok: 403 Forbidden", the reporter's words). Restored,
green.
Run (mote, go1.26.8, tree at origin/main
|
||
|
|
a57ec01683 |
provider: Cursor's plugin min is 0.2.28, which doesn't wait on a failed model list or send HTTP/1.1 appends one at a time
ysm119 on Discord: claude-opus-5-5 through the Cursor plugin takes 33-36 s to its first token and 83-253 s in all. Two waits on our side, both fixed in the plugin (magpie-community/plugins fc14571, d9c858c, 944610f): - A chat request picked its variant from AvailableModels (up to 30 s) before its Run, and a list Cursor couldn't give was asked again, and waited for, by every request. Now a stale list is used while a new one is asked for, requests at once share one ask, and after a failed ask requests go without it for 5 minutes. - Over HTTP/1.1 each history message's BidiAppend waited for the one before it. Now up to 16 go at once, as cursor-agent 2026.10.01 sends them; a native session's Run stays one at a time. 0.2.28 is on npm (npm view --prefer-online). 0.2.27 never reached npm on its own: its publish run went red on a test token collision, fixed in 944610f. Run: gofmt -l (clean); on mote go build -tags nogui ./... and go test -tags nogui ./internal/provider/ (ok). Plugin side: bun test packages/cursor 314 pass on mote and on Linux; the whole plugins suite 2997 pass; the publish run's test job green. Broken by hand (plugin): the old index.mjs turns all three listwait.test.mjs tests red; openH1 back to one at a time turns the new http1 test red. Not tried: a real Cursor account (its token is in the Keychain), so whether these are the time ysm119 sees, or Cursor's own, is not measured; not the full go suite (a one-string min change). |
||
|
|
a3ee00c05c |
codex: its own GPT models stay in Codex's list when kept for routing groups
士奇 (Discord, 10-28): with a routing group on, the Agents page's Codex list lost its Codex provider section and models, the model dropdown still offered GPT, but the Codex app had none; with the group off they came back. Cause: the codex provider's "Only through routing groups" (Provider.Unlisted, 只通过路由分组使用), or a group that lists itself alone (Group.Unlists), took the ChatGPT account's own models out of Catalog(), so out of Codex's own list too. With no Codex section, the own options were not magpie's, so the own-models switch showed and the picker kept offering GPT; meanwhile #1602 ( |
||
|
|
e9dd8e83ac |
provider: Devin's mover min is 0.1.25, a typed anyOf goes to its Gemini models in a shape they take (plugins#458)
Kimi Code's Read (line_offset: anyOf of two integers) made every
devin/gemini-4-argon request 400. The gateway's geminiToolTypes writes
the type the branches agree on beside an untyped anyOf, and Devin's
Gemini models refuse {type, anyOf} below a tool's root. The plugin's
geminiSchema now merges such an anyOf or sends it as a oneOf
(magpie-community/plugins 2c30818). npm view --prefer-online shows
0.1.25.
Run (mote): go build -tags nogui ./..., go vet ./internal/provider,
go test -run "Mover|Moved|Migrat|Min" ./internal/provider: ok. gofmt -l
clean. The plugin change was checked against a real Devin account
(gemini-4-argon: the typed shapes 400 on 0.1.24, all 17 probe shapes 200
on 0.1.25).
Not run: full suite.
Not changed: geminiToolTypes itself still writes a type beside an anyOf;
Devin's plugin is the only server seen refusing it.
|
||
|
|
71de6914af |
provider: the Qoder mover's min is 0.2.45, a free account with no credits shows none left
Qoder plugin 0.2.45 (magpie-community/plugins@c0a0fd1): an international free Qoder account (personal_standard) with no credits in any pool showed no credits at all (Ariel on Discord), since every 0-total pool was dropped. It now shows one "Credits" window, "0 credits left", as Qoder's client shows the account 0/0 and out of credits. Raising min updates every moved user's plugin (keepMovedCurrent). npm view --prefer-online --registry=https://registry.npmjs.org/ @magpie-community/opencode-qoder-auth version: 0.2.45 before this commit. Run: gofmt -l internal/provider (clean); go test -tags nogui ./internal/provider/ on mote via mote-run at this tree (ok, 124s). The plugin's own suite (bun test, 299 pass) ran on mote, with its new test red on the old index.mjs. Not run before the push: the full Go suite, as another session's ./... run held mote; it runs after, one suite at a time. |
||
|
|
a68f3ee45d |
provider: a signed-in account keeps its price rate (PaulT, Codex)
PaulT on Discord (#help): "v0.1.1805版本codex价格倍率有bug 无法保存". Save rebuilt a signed-in account (Codex, Copilot, Claude, a plugin's subscription, Kiro) from a fixed list of fields, and PriceRate wasn't on it; withPicks didn't read it back either. The editor's Save answered ok, nothing was written, and the field came back empty. Not a v0.1.1805 regression: it has been so since the rate was added ( |
||
|
|
5ed6669cec |
sync: the account an agent is kept signed in to stays each computer's own
YsiCing on X: with only the library and usage ticked, the default account of a subscription with several followed the other computer: a personal one at home, a work one at the office, set again every day. The providers part always syncs, and provider.Mirror took the other computer's Provider whole, KeepLogin, KeepLoginAs and SwitchOnly with it. Mirror now keeps this computer's three for a provider it has, and a new one comes without KeepLoginAs (an account signed in over there). davsync's hashes blank the three, so changing which account is kept uploads nothing and two computers that differ only in it don't trade the part. The sign-ins themselves (logins.json) were never synced. A backup Restore is left as it is: it is asked for, and brings the backup's choice. Run on mote at this tree: go test -count=1 ./internal/provider ./internal/davsync ./internal/backup ok; go vet for darwin, linux and windows on both packages ok. Broken by hand: with backup.go and davsync.go reverted, TestMirrorKeepsKeepLogin and TestKeepLoginIsNoChange both fail. Not tried: two real computers syncing through a real WebDAV folder. |
||
|
|
396e0e4638 |
usage: a deleted provider's requests merged into another, or named, from the Requests filter
CyberCaius on Discord: a deleted provider's requests sat under its old id
("<date> 已删除"), and the only way to put them under a provider they
have was renaming that provider onto the old id. Now, with a deleted
provider picked in Usage › Requests' Provider filter, a "…" beside it
offers Merge into… (an app menu of the providers there are now) and
Rename… (the filter's button turns into a name field; Enter or leaving
it saves, Escape keeps it). With the merged-into provider picked, the
same "…" lists Separate <name> for each, the undo.
Nothing in the log is rewritten. Both live on the deletion's own record
in providers.json (Deleted.Into/MergedAt, Deleted.Label), so a provider
added later under the old id inherits neither: it is a different
provider, and its record of its own is what it has. Renaming the target
carries the merge (Rename rewrites Into); deleting the target ends it.
Renames.Both(id, time) gives the id a call is shown under and the one it
was made to (Own). Listing, filtering, the summary and vias go by the
shown id; pricing (Record.priceID, block_price's as), window holds and
the gateway's loggedAnswers go by the own one, so a merge moves no cost
or token, only whose name they sit under. The target's face lists what
was merged into it (Named.Merged). Routes: GET /api/usage/deleted/into,
POST /api/usage/deleted {id, into?, name?}; a field not sent stays.
Run (mote, at this tree on
|
||
|
|
c3b0484a96 |
usage: keys of one account show its balance once (mimi)
mimi on Discord (#feedback): "同一个网站,添加多个key时,余额会重复展示" -
a site's keys 1-A031-Pro, 2-S009-Plus and 3-S010-Team-2 each showed the
account's $8.39 and its own curve.
KeyBalances still reads, keeps and charts every key on its own. What
changed is what the Usage page draws:
- balanceRead says whether the reading is the account's (balanceAccountWide),
going by the source, not the vendor's name:
- account-wide: a balance token (new-api /api/user/self, sub2api
/api/v1/user/profile, AiHubMix), a known host's account query
(DeepSeek, Moonshot, OpenRouter credits, SiliconFlow, StepFun, ...),
and sub2api /v1/usage when its mode is "unrestricted" (wallet or the
group's subscription, per sub2api's gateway_handler.go Usage);
- per key: AiHubMix's /dashboard/billing/remain, new-api's
/api/usage/token, sub2api in quota_limited mode, any other Balance
URL the user named.
- Two such keys of one provider with the same amount are one account only
when their balances moved together: the same latest change (from and
to), first read within balanceHistGap. Two accounts with the same
amount stay apart until one is spent from; keys whose amounts differ
are never one. SharedBalance (the first key's name) says so in
/api/usage/quotas, magpie quota --json and /v1/magpie/quotas.
- Refreshing a shared card reads every key it stands for (sharesAskedCard),
so it stays one card. The history is read outside the cache's lock.
- The Usage page draws them as one row, one balance, one curve, with
"+2 keys" beside the key and the keys on hover; the head's sum counts
the account once. The code is in plugins/usage/page.js, so app.js is 9
bytes smaller than before; no budget raised.
Run (mote-run, at the pre-rebase base
|
||
|
|
d50f84c9fc |
provider: Qoder's mover min is 0.2.44, a spent plan beside add-on credits (plugins #454)
0.2.44 counts the plan, add-on and shared pools Qoder spends in turn as one "Total credits" window, so an account whose plan is spent but has add-on credits left no longer reads 0% left in Routing (chansee97). npm view --prefer-online shows 0.2.44 before this change. Run on mote: go build -tags nogui ./..., go vet ./internal/provider, go test ./internal/provider ./internal/plugin (ok). The plugin's own run is in plugins 202ec68. Not run: the full suite (a one-line min). |
||
|
|
014bac1596 |
workbuddy: the mover's min is 0.1.41, a prepaid wallet as a balance (plugins #450)
workbuddy 0.1.41 (plugins #450, MYCF711) sends a package with no cycle total as a "Prepaid credits" balance window (#3950). npm view --prefer-online showed 0.1.41 before this change. Run on mote at this tree: gofmt -l internal/provider (clean), go vet ./internal/provider, go test -tags nogui -run 'Mover|Moved|Migrat| WorkBuddy|Min' ./internal/provider ok. Not run: the full suite (a one-line version string). |
||
|
|
69626580bc |
checkin: each account is checked in through its own proxy, not the global one (#2777)
zRain on Discord (Windows, 0.1.1788, Loomy plugin 0.1.4): the global proxy
is a residential entry, the Loomy provider is set to direct. The balance
read went direct, but every check-in, the loop's and a press, went out
through the global proxy and got ECONNRESET. The usage read wraps its ctx
in ViaLogin (loginQuota); no check-in did, so netproxy.Choice was empty
and the plugin host fell back to the global proxy.
The wrap is made once, where checkiner runs an account's do
(checkin.go): ViaLogin(ctx, a.provider, a.User). That covers every
check-in at once: a plugin's own (plugin.AccountCheckin) and magpie's
Trae CN, MiniMax, Qoder and WorkBuddy check-ins, which reach the vendor
through plugin.Fetch(req.Context()). a.provider is the card id the
proxies are kept under (PluginID, as loginProvider gives the usage read),
and a.User the account's label as the accounts list shows it.
Sibling found on the way: Provider.Origin asked the plugin's loader
(LoaderOptions, which can renew the sign-in) with the bare ctx, before
WorkBuddy's search and draw paths put p.Via on it. It now asks through
p.Via(ctx). The other plugin-host entries were read and already carry
the proxy: sign-in (signInFlow.via, Via in PluginAPIKey and the CLI),
the move's Check (ViaLogin), usage (loginQuota), model lists
(listingProxies) and the gateway's fetch (p.Via in the gateway).
The direction is the one #2777 lays out; skygunner's fork wired the same
wrap per runner.
Test: TestPluginCheckinGoesThroughItsProxy. The fake plugin's check-in
asks $FAKE_CHECKIN_URL (http://vendor.invalid/checkin/<key>); the global
proxy (settings.Proxy, set before the host starts) and the account's own
are recording proxies that answer for it. The provider is direct, one
account has its own proxy. The loop and then a press must leave the
global proxy unasked, claim through the account's proxy, and fail the
direct account (vendor.invalid is reachable by no one).
Broken by hand: a.do(ctx) back in checkin.go turns it red as reported:
the global proxy was asked for both accounts, the direct one claimed
through it, and the account's own proxy saw nothing.
Run (on mote, at this tree): go test -tags nogui -count=1 -run
'TestPluginCheckin|TestMovedLoginProxy|TestPluginSignInGoesThroughItsProxy'
./internal/provider ok; full suite
go test -tags nogui -timeout 45m ./...: every package ok (76), at base
|
||
|
|
a67da2dd36 |
qoder: the mover's min is 0.2.43, the check-in asked as 10:00 (UTC+8) opens
npm view --prefer-online --registry=https://registry.npmjs.org/ @magpie-community/opencode-qoder-auth version: 0.2.43 at 10:02 CST, before this change. 0.2.43 answers auth.checkin's until (plugins fd40b20), which |
||
|
|
a05b373538 |
checkin: a plugin's until is when its answer stops holding (Qoder's 10:00 UTC+8)
sdytman on Discord: Qoder's daily credits start at 10:00, can the plugin's check-in follow it? Qoder's /me/campaigns opens each day's CLAIM_BENEFIT campaign at 10:00 and closes it at 09:59 the next day, UTC+8 (startAt and endAt, read with a real account on 10-28; Qoder.app polls the list every 5 minutes). A check-in before 10:00 meets the day before's campaign. Since #2696 the Qoder plugins are asked again every 30 minutes, so today's was claimed somewhere between 10:00 and 10:30; a plain plugin was settled for the Beijing day. auth.checkin may now answer until (RFC 3339 or epoch ms); host.js passes it as RFC 3339 (plugin.Checkin.Until), kept as ValidUntil. settled holds an answer only until then, whatever its outcome; the loop wakes at it instead of its next 30-minute look; an early done that carries it is not provisional (#3326), as the vendor said when its day turns. Instants throughout, so the machine's zone doesn't matter. The Qoder plugins send until from 0.2.43 (plugins fd40b20): the check-in now lands at 10:01. Run (mote): TestPluginCheckinAsksAgainAtUntil, minute by minute from 09:27 Beijing to the next day's 10:30, with time.Local UTC, UTC-8 and Beijing: asks at 09:27, 10:01, 00:00 (the Beijing day), 10:01; a failure in the 09:59 gap asked at 10:01:00 only. GOOS=linux and windows go vet; go test -tags nogui -timeout 45m ./... all ok (76 packages). gofmt -l clean. Broken by hand, each red: settled ignoring ValidUntil (no 10:01 asks); tick not waking at it (10:27 instead); provisional ignoring it (asked every 30 minutes from 00:00 to 10:00); host.js dropping until (ValidUntil zero). Not tried: the Qoder plugin's recheck path with until (the fake plugin is fakeco; the tick and settled it goes through are the same); a GUI change (none: until isn't shown). |
||
|
|
08b02cf18c |
providers: a pool stops at its caps and reads usage again near them (plugins#349)
What was adopted on magpie-community/plugins#349 (1939869736luosi): one
place, in the GUI and the CLI, for a subscription's account pool, and an
opt-in conservative mode.
- Stop at the caps (Provider.CapStop, off by default): once every account
in use is held at its cap, the request is answered 429 rather than going
on to the provider's fallbacks (plan returns restLast). Off, as before.
- Check usage again near a cap (Provider.CapCareful, off by default,
internal/gateway/cap_careful.go): before planning, a capped account's
usage is read again when its reading is over 15s old within 5 points of
a cap, or over 5m old at all; the request waits at most 10s, and a
failed account is asked again at most every 15s. An account whose usage
was never read, whose last read failed, or whose reading is still that
old is then held as one at its cap is (capHold "unread", traced as
Weighed.Unread, named in the 429 with "--careful off"). Generic: it
goes by provider.UsageRead/ReadUsageNow, so every subscription that
reports usage windows (Codex, Claude, plugins) gets it.
- provider: usedCache records each account's read state; a failed read
keeps the last good reading's time. ReadUsageNow no longer reports
false when the read had already finished on the first ask.
- GUI: under the provider's account list, once an account has a cap (or
either is on), two ticks for the above, and a note naming the accounts
in use with no cap ("used to 100% of each window"). Accounts, order and
caps stay where they were in that list. zh, zh-TW, ja, de added.
app.js 1,309,658 within its 1,310,460 budget, unraised: addRow and a
per-row forgetOf replace 3 add-button and 5 Remove-button builds.
- CLI: magpie provider pool <id> [--accounts a,b,…] [--cap percent|off]
[--stop on|off] [--careful on|off] shows and sets the whole pool.
- docs: gateway-routing.md and providers-accounts.md.
Run (mote, before the rebase at
|
||
|
|
8bade6c5e2 |
provider: a plugin's usage window can be a prepaid wallet's balance (#3950)
SuperMagic's accounts (mycf_711's magicrew plugin) are prepaid wallets of
points with no total. A plugin can now send a usage window as
{name, balance: 6291, unit: "积分"} with no used or limit.
- host.js passes a finite balance on (at least 0), anything else as null.
plugin.UsageWindow.Balance and provider.QuotaWindow.Balance are *float64.
- quotaOfPlugin keeps the figure and does not make the window Text or
Aside, so routing knows the account with no Used invented. allowanceOf
copies it into Limit.Balance; an empty wallet counts as used up.
Allowance.Left(model) is the least balance of the windows that count
the model.
- weighRouted fills routes.Seat.Left and Seat.LeftIn (the account's
provider and unit). Smart, pace and usage (least used) put the seat
with more left first where they would otherwise tie (byLeft), only
when every seat with a balance shares one LeftIn: balances in two
units or two providers are never compared. Tiers still come first.
- The Usage card, the Routing page (Weighed.Balance: the small row's
text, no bar, a why sentence, the account list), magpie accounts and
the status line show the figure, "6,291 积分 left", never a share.
- Docs: provider-plugins (new section), gateway-routing,
providers-accounts, plugin-runtime, host.js typings and the site's
plugins page (en, zh, ja).
Run, at base
|
||
|
|
ed49d1b38e |
provider: the shared-list tests count Codex's own ask of the list apart (#3854)
TestFetchAsksASharedBaseOnce, TestFetchAsksOneListOnceForTwoBasesOfIt and TestFetchUnionsProtocolListsWithoutChat are red on main since |
||
|
|
759b3b8c49 |
proc, provider: the env tests wait for their helper to be running (#3906)
TestEnvOfChild (internal/proc) and TestCodexAppServersOnHome (internal/provider) are red on Linux since |
||
|
|
490c0a4ad0 |
provider: Factory's plugin min is 0.1.38 (plugins #349)
npm has @magpie-community/opencode-factory-auth 0.1.38 since 10-24
(plugins b04cca3): the "Standard usage only" plugin option, which stops an
account once its Standard window is used up and moves on to the next. The
mover's min stayed 0.1.37, and keepMovedCurrent only installs min, so no
moved user could get the option.
Run on mote at this tree (origin/main
|
||
|
|
88466f8bf2 |
provider: a ChatGPT account whose usage read says OpenAI signed it out reads as signed out, with Sign in again (charliepu on Discord)
charliepu (#general): a ChatGPT account sometimes shows no allowance; OpenAI had signed it out, and it needed signing in again. The row said nothing of that. |
||
|
|
c752082e47 |
gateway: a turn's thinking goes back to Qoder's plugin; qoder min 0.2.42
uk.jent on Discord: Qoder dropped the model's earlier thinking. Qoder.app's
own client sends reasoning_content on every earlier assistant turn, and the
Qoder plugin left it out from its first version on; 0.2.42 sends it.
An Anthropic- or Responses-speaking agent's thinking reached the plugin
only when chatReplaysReasoning held, so qoder and qoder-cn are added
beside Command Code's plugin; a tool turn with no thinking gets the same
" " DeepSeek gets, which 0.2.42 reads as none. The qoder mover min is
0.2.42 (npm view --prefer-online: 0.2.42).
Run (mote): go build ./..., go vet -tags nogui on gateway and provider,
go test -tags nogui -timeout 45m ./internal/gateway/ (ok, 535s) and
./internal/provider/, which crashes in TestUnreadLoginsWriteErrorsKeepCredentials
on "close of synctest channel from outside bubble", #3632, open and not
this change. TestPluginStreamsPastTheBudgetWait, run alone, was red 2 of
3 with this change and 3 of 4 on clean
|
||
|
|
3e22123c9c |
usage: a deleted provider's calls stay apart from a new one under its id
cybercaius (Discord): after deleting a provider and adding a new one
that took the same id, the old provider's usage showed under the new one.
Delete now records the provider in providers.json ("deleted": id, name,
icon, when, its Was and Gave). UsageRenames gives a deleted id to
<id>~<when> only once something reuses it (a live provider, a later
deleted record, or a later Was), so a deleted provider nobody replaced
keeps its raw id and the existing probe/usage tests stay as they were.
/api/usage's provider faces name a deleted id from its record and set
Named.deleted; the Usage provider picker notes "Deleted {date}" (zh, zh-TW,
ja, de translated). Old deletes, made before this, have no record and
stay merged: nothing tells their calls apart now.
Run (mote): go test -tags nogui -run 'Deleted|Rename|NotSetUp|Probe'
./internal/usage ./internal/usageapi ./internal/provider ok; gofmt -l
clean; go vet -tags nogui ok.
Broken by hand: dropping the f.Deleted append turns
TestDeletedProviderKeepsItsCallsFromOneAddedUnderItsID and
TestDeletedProviderListedApartAndMarked red; restored, green.
Not tried: a real delete-and-re-add in the GUI app.
|
||
|
|
19fafad16f |
provider: a test holds a plugin model and a group of it to one window (#3654)
mycf_711 (#3654) saw loomy/DeepSeek-V4.1-Flash told 1000000 (the "*"
window typed on the provider) and its group told 1048576 (the plugin's
declaration), and dsh then sent two histories in one request.
On main the member's entry is already the typed window (WindowOf, since
#2112 and
|
||
|
|
8fff54dab7 |
routing: a group in a group left on Smart is routed as the outer one (#3847)
mycf_711 (#3847): an outer group set to Free first held a group whose routing was left blank (Smart); the inner group's free seat was tried after its paid one, as if Free first stopped at the inner group. provider.Group.Within: in membersOff's walk, a nested group with no routing of its own takes the outer group's when the outer one pools its members (Smart, Free first, Fastest, ... ; not In order, By weight or Manual, which try each member whole by its own order, #576). A group that sets a routing keeps it. The gateway, the trace's Subs and the Routing page all read membersOff, so they agree; GROUP_NEST's help sentence says so (zh, zh-TW, ja, de). Run (mote): go test -tags nogui -run 'FreeFirst|Group' ./internal/gateway ./internal/provider ok; GOOS=linux and GOOS=windows go vet -tags nogui on both packages ok; go build -tags nogui ./... ok; gofmt -l clean. Broken by hand: without the Within call TestFreeFirstReachesAGroupInItLeftOnTheDefault is red (paid seat first), green with it. Not tried: the reporter's own groups in the real app. |
||
|
|
74dcf40aac |
provider: WorkBuddy's mover asks plugin 0.1.40, which sends the current desktop client's headers
WorkBuddy accounts used through magpie are being restricted, and a report on X says WorkBuddy changed how it checks request-header fingerprints. The plugin sent WorkBuddy/5.5.6 as its User-Agent and IDE version. Each build's current desktop app (China 5.9.3 with CLI 2.165.0, WorkBuddy AI 5.8.4 with CLI 2.161.0, read from their update feeds, never run) sends "WorkBuddy/<app> <appName>/<app> CLI/<cli>", the app's version as X-IDE-Version, X-Agent-Type on both builds, X-Agent-Runtime: local-agent on 5.9, and the OpenAI SDK's X-Stainless-* headers. Plugin 0.1.40 (magpie-community/plugins b2fe48e) sends them; npm view --prefer-online gives 0.1.40. keepMovedCurrent brings every moved user up to it. Run at |
||
|
|
c2e3a057e9 |
provider: a pool's weekly window is reminded of its renewal too, as the alerts tell of it
What changed:
- dueReminders skipped every aside window, so an Antigravity account's
pool weekly ones ("Gemini · 7 days", aside since g.pools began) were
never reminded of their renewal, though #523 told the usage alerts of
exactly those: toldAside is that exemption now, shared by both, so a
week that renews with much of it left is said, and the pools' 5-hour
asides and the rest stay untold (a 5-hour window renews too often to
be news, #720).
Run:
- TestDueRemindersPoolWeekly is new: on the old condition it fails with
"got []", the account's 7-day pool at 40% renewing in 20h saying
nothing; with the change it is told once, its 5-hour pool still says
nothing, and a nearly spent week still does. TestDueAlertsPoolWindows
and TestDueReminders pass unchanged.
- go test -tags nogui -count=1 ./internal/provider passes; gofmt -l is
clean; go vet -tags nogui passes on darwin and GOOS=linux and
GOOS=windows; the three platforms' builds pass.
Reported by gua2100 (ggbdpq) on GitHub, #2197; the patch is theirs.
Run at this head on mote (review):
- go test -tags nogui -count=1 ./internal/provider ok, with the known
reds #3632 (TestUnreadLoginsWriteErrorsKeepCredentials) and #3854
(three TestFetch* tests) skipped.
- go vet -tags nogui ./internal/provider on darwin, GOOS=linux and
GOOS=windows clean; gofmt -l clean.
Broken by hand: with dueReminders' condition put back to `w.Aside ||`,
TestDueRemindersPoolWeekly fails with "got []".
Not tried: a real Antigravity account's notification; a full
go test ./....
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
|
||
|
|
eaa71168a2 |
import: OpenCode's ids for vendors magpie has a preset at the same address come in on it (#2405)
openCodePresets held 19 of OpenCode's provider ids. 15 more are at the
address of a magpie preset, and the import picker listed each as
skipped, "it has no base URL", which isn't so: zhipuai, zai, alibaba,
alibaba-cn, minimax, modelscope, kilo, cline-pass, kimi-code-plan-cn,
kimi-code-plan-global, stepfun-step-plan, stepfun-ai-step-plan,
volcengine-coding-plan, alibaba-token-plan-cn and tencent-token-plan.
Each now comes in on its preset, the way openai's key does.
Left out, where auth.json says nothing to pick a region by: the coding
plan ids of Zhipu, Z.ai, MiniMax and Tencent, the pay-as-you-go ids of
plan-first presets (stepfun, stepfun-ai, volcengine), and the Xiaomi
MiMo token plans, served by a plugin now.
Patch by ggbdpq (Discord gua2100), as posted in #2405. Review: each of
the 15 targets' default endpoints was printed from Preset() at this
tree and matches the host models.dev gives the id (zhipu and zai
default to the pay-as-you-go paas/v4, volcengine to api/coding/v3,
stepfun and stepfun-cn to step_plan, tencent-cloud to plan/v3), so no
key is sent to a host OpenCode wouldn't send it to. No preset added.
Run (sandbox HOME, at origin/main
|
||
|
|
ff7048dece |
provider: a Command Code plan key's Credits window renews at the plan's period end (#2454)
#2451 drew a plan key's month of credits as a Credits meter beside the 5-hour and weekly windows. Those two say when they start again; the Credits one said nothing, though cmdKeyPlanID already asks billing/subscriptions for the plan id and threw its currentPeriodEnd away. cmdKeyPlanID now keeps the period end beside the plan id (cached the same ten minutes, and the pair read before kept while the endpoint can't be read), and cmdQuotaOf puts it on the Credits window's ResetsAt. No new request. The signed-in subscription's card is the plugin's since be62bcf79; the plugin sets the same reset from commandcode-auth 0.1.13. Patch by ggbdpq (Discord gua2100), as rebased in #2454. Added in review: a period end already past is dropped, so a pair kept while the endpoint fails, or a renewal its reply doesn't show yet, never puts a reset in the past on the card; the test has a case for it. Run (sandbox HOME, at origin/main |
||
|
|
791e27ec34 |
agent: the Codex app's Restart restarts only its app-server, its window stays
yoshi037070 (Discord, 10-27): when magpie restarted Codex, a new Codex window opened. The switch paths (Connect, Disconnect, failover) already end only the app's own app-server (codexAppStep, proc.End: SIGTERM on macOS, exit 0 on Windows), and the app starts another and keeps its window. The Agents row's Restart beside a Codex app left on the old list did not: on macOS ReopenCodexApp ran osascript "quit" and then `open` on the bundle, and that open is what brought up a new window. Now ReopenCodexApp keeps its check (only a bundle the row lists as left on the old list) and calls provider.RestartCodexApp, which ends each process whose command line starts with <bundle>/Contents/ and is the app's own app-server (isCodexAppOwnServer: an app-server, not --listen), waits up to 10s for them to be gone, and errs when none ran. The app, its window and another program's --listen server are left alone. The confirm says only the app-server restarts and the window stays; the status says "Codex app-server restarted" (zh, zh-TW, ja, de). app.js stays under its budget, with no raise (1,310,458 of 1,310,460 after rebasing on |
||
|
|
d1436466a6 |
gui: Kimi Code's region picker says to pick by the account's region (Kimi)
Kimi (a sponsor) asked for two things on 10-27: start the partner card at the user's region, which |
||
|
|
59478916b7 |
provider: qoder's mover min is 0.2.41, for the chat headers Qoder's client sends (plugins#443)
unifilitence (plugins#443) saw a chat carry the machine UUID as
Cosy-ClientIp, -MachineId and -MachineToken. Checked against Qoder.app
0.4.3's worker and signer: its non-chat calls do send all three as the
machine id, and x86_64_win32 is its own Cosy-MachineOS, but its chat
sends no ClientIp, the native device identity's MachineToken and
MachineType or none, and a Cosy-MachineHostname. 0.2.41 (plugins
1a560ba) sends a chat so; npm shows 0.2.41 (npm view --prefer-online).
The min was 0.2.39, so this brings 0.2.40's queue change too.
Run: `go test -count=1 -timeout 45m ./internal/provider/` at this tree with
both min raises applied, skipping four reds that are red on origin/main
|
||
|
|
729d5d0c4c |
provider: zcode's mover min is 0.1.33, for a ZCode 3.16 sign-in's coding plan models (plugins#439)
dinghao-8 (plugins#439): a ZCode 3.16 sign-in that keeps only a
project-key-location record listed the Start Plan's models, without
GLM-5.3, since the plugin's models() read the sign-in without fetching
its key. 0.1.33 (plugins 2ef8b8b) reads the key first; npm shows 0.1.33
(npm view --prefer-online).
Run: `go test -count=1 -timeout 45m ./internal/provider/` at this tree with
both min raises applied, skipping four reds that are red on origin/main
|
||
|
|
22bc7a4477 |
usage: a probe at another host of a provider's site is listed under it (CyberCaius)
CyberCaius on Discord, on the latest release: the Usage page's provider
filter listed Leee and leee.baby, and leee.baby's rows were the model
lists ("模型列表", magpie 自身, 200) asked while Leee was being added.
In the first report the same shape was example on api.example.me with
example.me in the filter, which we had put down to another address typed.
The Add sheet's model list runs before the provider has an id, so
probelog records it under the host asked.
|
||
|
|
2b0387574e |
draw: an OpenAI-compatible plugin's image models draw (SenseNova's sensenova-u1.5-lite)
01huadalang (Discord, #feedback): SenseNova's sensenova-u1.5-lite can draw, but magpie's image generation picker doesn't list it. |
||
|
|
b103ed0582 |
provider: WorkBuddy's plugin min is 0.1.39, whose history keeps an earlier turn's thinking
uk.jent on Discord: through WorkBuddy, Grok Build's chat.completions history lost its thinking. magpie's gateway and the plugin pass an assistant message's reasoning_content on byte for byte (checked with a scratch gateway test posting Grok Build 1.0.67's literal second request to a fake plugin upstream); WorkBuddy itself drops reasoning_content, and its own client sends `reasoning`. Plugin 0.1.39 (magpie-community/plugins 7f99447) sends it that way. keepMovedCurrent brings every moved WorkBuddy user up to it. Run: npm view --prefer-online shows 0.1.39. internal/provider: gofmt -l clean; go vet for darwin, windows and linux; the mover tests (-run 'Mover|Moved|Migrat|Plugin|WorkBuddy|Min') ok; the whole package with -skip TestUnreadLoginsWriteErrorsKeepCredentials (crashes, #3632) red only on TestFetchAsksASharedBaseOnce and its two siblings, #3854, red on main before this change. Broken by hand: the plugin's new test, red on its old index.mjs (see the plugins commit). Nothing here to break: a one-line min. Not tried: the China build (copilot.tencent.com) live; Grok Build end to end through WorkBuddy. |
||
|
|
24fab123bb |
provider, gateway: a Remote magpie's model it offers Fast on can be picked fast
littlekk88 on Discord (#feedback): Claude Code on one computer, wired to
its magpie, which has another magpie as a Remote magpie. The remote's
/v1/models listed service_tiers [{id:"priority",name:"Fast"}] on
gateway/cursor/grok-4.6 (#1234), but the local picker showed no bolt on
it, SetFastPick refused it, and tier_sent was empty on both computers.
Two causes, both on the local magpie:
- provider.CanFast had no case for a Remote magpie, so it was false for
every remote model. It now reads the tiers the remote's list gives the
model (new provider.RemoteTiers) and is true where they hold priority.
UltraOn offers Ultrafast where they also hold ultrafast. The picker,
SetFastPick, routing groups and Codex's catalog all go through CanFast.
- A fast pick from an agent on Anthropic's Messages API carries Claude's
speed "fast". Translated to the remote's Chat Completions or Responses,
nothing turned that into service_tier. forwardTranslated now sets the
tier the remote offers (priority, or ultrafast for an Ultrafast pick
where offered) when the request is fast and names no tier. A request
that names a tier is sent as before.
The remote side already serves a Chat request's service_tier priority to
Codex and to the Cursor plugin (TestChatFastTier,
TestPluginServiceTierReachesFetch), so a remote on an older version works
once the local magpie is updated.
Docs: the remote magpie service tiers row in
docs/subsystems/providers-accounts.md.
Run at this tree (rebased on origin/main):
- New TestRemoteMagpieFastPick: two httptest servers (the remote gateway
and a Chat-only vendor, as the report's native_endpoints). Claude Code
on /v1/messages and a Chat client both reach the remote with priority,
and the remote sends its vendor priority. A model offered no tier
can't be picked, and another agent's request goes without a tier.
- go test ./internal/gateway -run 'Fast|Tier|RemoteMagpie|Remote': ok.
- go test ./internal/codexcat: ok.
- go test ./internal/provider, ./internal/agent, ./internal/gui: the only
reds are already filed and unrelated to this change:
- #3632: the synctest crash in TestUnreadLoginsWriteErrorsKeepCredentials.
Skipped on the rerun; everything else in provider passes except the
three below.
- #3854: TestFetchAsksOneListOnceForTwoBasesOfIt,
TestFetchUnionsProtocolListsWithoutChat and TestFetchAsksASharedBaseOnce.
Also red 3 of 3 at a fresh origin/main
|
||
|
|
ef155a5ca2 |
provider: a new partner provider starts at the region where the user is, Kimi Code's Global plan abroad (Kimi)
Kimi (a sponsor) reported: "伙伴卡编辑器默认区为 China,建议按用户区域分流".
A partner given only by regions started at its first one, and Kimi
Code's partner card lists China first, so a user abroad was offered the
China plan's endpoints, key page and catalog.
Now, when a partner's first region is China's or Global's and the other
is listed too, a new provider of it starts at the one where the user is:
China's in mainland China, Global's elsewhere. The place is read from
this computer's time zone: LocalZone ($TZ, /etc/localtime) on macOS and
Linux, the registry's TimeZoneKeyName on Windows. Asia/Shanghai,
Asia/Urumqi and their old names (Chongqing, Harbin, Kashgar, PRC) and
Windows' "China Standard Time" are mainland China; Hong Kong, Macau and
Taipei have zones of their own and get Global. Windows' China Standard
Time also covers Hong Kong, which Windows doesn't tell apart. A zone
that can't be read keeps the partner's first region, as before.
It is decided in validPartners, where the partner's default endpoints
are filled in, so every add path takes it: the GUI editor (its region
picker marks the region at the preset's endpoints, and Get a key and the
site link follow), the TUI's and CLI's add (FromPreset). The default
region's key page, site, siteHost and catalog become the preset's with
its endpoints, as atRegionOf does for a provider.
Which regions count: only one with id cn/china/global/intl or named
China, China Mainland, Mainland China, Global or International. Checked
against each partner in site/partners.js: Kimi (China, Global, "Pay as
you go · China", "Pay as you go · Global") switches between its two
plans only; APIKEY.FAN (Default, Direct) gives its own top-level
endpoints, so no region is defaulted; WandAPI, CoreCode, Sidrune and
FastAIToken have no regions. yylx (a built-in preset, not a partner)
lists Auto first and would stay at Auto anyway.
Providers already added keep their region: a provider stores its own
endpoints when it is added, and its region is read from them
(regionOf), so a user who moves keeps theirs. The list kept on disk
from before is fixed at the next fetch, which runs at start.
Tests:
- TestPartnerStartsAtTheUsersRegion, from usemagpie.ai/api/partners as
served on 2026-10-27 (testdata/partners-2026-10-27.json): abroad Kimi
Code starts at api.kimi.ai, keys /go/kimi/keys/global, site host
www.kimi.ai, catalog kimi-code-plan-global; in China and with no zone
at api.kimi.com and China's; a provider added in China stays there
after the user is abroad and the list is fetched again; APIKEY.FAN
starts at its own endpoints either way.
- TestHomeRegion: Kimi's four regions, yylx's Auto first, Global first,
plans only, no Global; chinaZone for Shanghai, Urumqi, PRC, China
Standard Time, Hong Kong, Taipei, Singapore, New York, UTC and "".
- Broken by hand: with the region back at p.Regions[0], the test fails
"abroad: a new Kimi Code provider is at {chat:https://api.kimi.com/
coding/v1 … catalog:kimi-code-plan-cn}, want {… api.kimi.ai …
kimi-code-plan-global}" and "the preset's endpoints … aren't its home
region's". With the key page/site/catalog line dropped, it fails on
keys https://usemagpie.ai/go/kimi/keys (not …/keys/cn) in China.
- go test -tags nogui -count=1 -timeout 45m ./internal/provider
./internal/cli ./internal/tui at
|
||
|
|
adf41acdd8 |
provider: the built-in Kimi presets' key pages and sites carry Kimi's referral (aff=magpie)
Kimi (a sponsor) asked for referral tracking on magpie's Kimi entry points. The four built-in Kimi presets now send "Get a key" and the editor's site link to Kimi's own pages with aff=magpie: - moonshot (Kimi, pay as you go, Global): platform.kimi.ai?aff=magpie, platform.kimi.ai/console/api-keys?aff=magpie - moonshot-cn (Kimi (China)): platform.kimi.com?aff=magpie, platform.kimi.com/console/api-keys?aff=magpie - kimi-code (Kimi Code, Global): www.kimi.ai/code?aff=magpie, www.kimi.ai/code/console?aff=magpie (was www.kimi.com, the China site, for both) - kimi-code-cn (Kimi Code (China)): www.kimi.com/code?aff=magpie, www.kimi.com/code/console?aff=magpie Endpoints (api.moonshot.*, api.kimi.*) are unchanged. The partner card (site/partners.js "kimi") already had aff=magpie and is untouched. What happens to providers added before: a provider keeps the Website and KeysURL it was saved with, so an already-added Kimi provider's own "Get a key" link (shown only while it has no key) stays the old page. The editor's site link for a preset without regions reads the preset's, so it shows the new one. Rewriting saved links was left out on purpose: a saved value may be the user's own (keys=/website= in the CLI). Run: - curl -sIL of each of the eight new URLs: all 200, no redirect (platform.kimi.com/.ai, their /console/api-keys, www.kimi.com/.ai/code and /code/console, each with ?aff=magpie). - The editor's link label is hostOf(url), the host only: platform.kimi.ai, platform.kimi.com, www.kimi.ai, www.kimi.com, no query shown. - git grep for the old URLs (platform.moonshot.*, www.kimi.com/code*): no test, doc, site page, i18n string or TUI text pins them; nothing treats these links specially (only models.go comments cite kimi docs). - go test ./internal/provider: see the next commit's record (run with it). Not tried: opening the links from the real app's editor. |
||
|
|
c49c14d7fd |
cursor: the mover's min is 0.2.26 (Haiku listed without thinking)
ysm119 on Discord, after 0.2.25: claude-haiku-5-5-thinking still failed. A Team account's picker has Claude Haiku 5.5 with thinking as its default while cursor-agent lists only claude-haiku-5-5; 0.2.26 (plugins df4dfcd) sends each Haiku id as the id the account lists. npm view --prefer-online says 0.2.26 at landing. Run on origin/main |
||
|
|
4b57e5b658 |
provider: a failed model test's request log row carries its error
ysm119 on Discord: claude-haiku-5-5-thinking's Test "didn't answer", and the request log had nothing to say why. Provider.Do wrote a Test's row with the status alone, so a refusal's row had no text, and a stream that failed after its 200 was written as a plain 200. probe now writes its own rows (the request is Taken, so Do and the transport don't): each try, a retry's too, as before, and the last one with the test's result, the vendor's error or the stream's. Run: go test ./internal/provider ./internal/probelog ./internal/usage ./internal/gui -count=1 -timeout 45m (see the log at the push), gofmt -l, GOOS=linux and GOOS=windows go vet. Broken by hand: with test.go as before, TestFailedModelTestIsWrittenWithItsError is red (both failed rows' error ""). Not tried: a real plugin's failed Test read back on the Requests page. |
||
|
|
14e4d80402 |
usage: an Antigravity card's pools draw their curve, say when they run out and what the whole holds
max2020 (Discord #help, 10-27): "为什么反重力这里没有额度的预测和对价格的预估". An Antigravity card's rows are its pools' windows (Gemini · 5 hours, Claude & GPT · 7 days …). They are Aside, since routing reads the models' own windows, and the models' windows are a Family's. So: - quota history (pointOf) kept none of them. The card had no curve and no "Runs out … at this pace" line, though noteQuotaHistory and the GUI already name a pool's line "Pool · window" ( |
||
|
|
add927e604 |
codex: the Codex app beside the ChatGPT sign-in lists magpie's models too
laddieyao (Discord #general, 10-27): with Codex joined to magpie beside its ChatGPT sign-in, the Codex desktop app's model picker showed OpenAI's GPT models alone, while the Codex CLI listed magpie's. The /models request does reach magpie's gateway and its answer holds magpie's models. ChatGPT.app 26.1013's picker then narrows app-server model/list to the models a Statsig config (107580212, use_hidden_models / available_models) names, while Codex is on its built-in provider, unless Codex reads its list from a file (model_catalog_json, hasConfiguredModelCatalog) or names a provider of its own. The CLI has no such filter. Where the Codex app is installed (codexReaders has an "app"), and only joined/beside the sign-in (not magpie as Codex's provider, not account failover alone), magpie writes the list it hands Codex at /backend-api/codex/models to ~/.codex/magpie-desktop-models.json and names it with model_catalog_json. Codex is still on its built-in provider. With a catalog named Codex asks for no list, so magpie asks the backend itself, with Codex's live sign-in (provider.CodexLiveList): its entries go in verbatim, base_instructions and all, merged as the gateway merges them (codexMerged, factored out of codexModels: picked, hidden, window, V1, AutoReview edits), magpie's models after them. - A list not known (not asked yet, or the backend failing) is unknown: the file as it was stays, never an empty list; a key naming a file that is gone goes, as Codex loads no config then. - Written via temp+rename at Join, set, settle and every Sync (so a change of magpie's models, picks or hidden models rewrites it, as SyncCatalog runs on them); the backend list is asked again hourly (5 min after a failure) and a change syncs again. - A model_catalog_json of the user's own stands; none is written beside. - magpie API, the app gone, or unwire take the key and the file out; unroute never restores the desk file as the user's catalog. - connectinfo counts the file, so a running app on an old list reads as needing a restart. - CLI-only machines: unchanged, the live /models path as before. Run: - Real account, sandbox HOME (copy of auth.json, chatgpt Pro; live ~/.codex untouched): Join wrote model_catalog_json and the file with the real backend's 10 entries (gpt-6.1-sol ... codex-auto-review, each with base_instructions) plus relay/claude-opus-5.5 and relay/claude-sonnet-4-5. Then the real app-server bundled in ChatGPT.app (codex 0.163.0-alpha.10.2, CODEX_HOME sandbox, base URL pointed at a dead port) model/list returned all 12, relay models visible, and config/read showed model_catalog_json set, which is what the app's picker checks to skip its filter. - New tests: TestCodexDesktopListBesideSignIn, ...CLIOnly, ...KeepsTheirs (internal/agent), TestCodexDesktopCatalog (internal/gateway). - Broken by hand, each went red: deskList a no-op (all three agent tests), the user's-own branch removed (KeepsTheirs), the gone-file branch removed (KeepsTheirs), the keep-last-good rule broken in codexDeskRefresh (TestCodexDesktopCatalog). - go test -tags nogui -timeout 45m ./internal/agent ./internal/gateway ./internal/provider ./internal/cli at bc0a99bb6 (on |
||
|
|
94c2aaecba |
usage: a deleted provider's tests stay listed under it, not its host (cybercaius)
cybercaius on Discord: one custom provider (example, on api.example.me)
was listed in the Requests page's provider filter under its id and its
host, and the host stayed after the provider was deleted.
The Add sheet's Detect, model-list and Test requests are sent before the
provider has an id, so probelog records them under the host asked
("a provider being added has no id yet").
|
||
|
|
a312bf3e38 |
codex: switching the ChatGPT account restarts the Codex app's app-server once no turn runs
zhibukaixinyao (Discord #help, 10-27) asked when Windows gets the "restart Codex" step: the Windows GUI has no Restart button, so after an account switch the Codex app kept sending on, and showing the limits of, the account it started with until the user quit and reopened it. noteCodexSwitch now hands the app-server pid it recorded as left on the old account to codexApp's stale set, the same set a route change fills. KeepCodexAppOnItsProvider's step ends it once Codex is idle and no turn is open, and the app starts another that reads auth.json afresh. This covers a switch made in the gateway's process: the GUI's switch and SwitchWhenSpent. Together with |
||
|
|
72d17b4dc1 |
provider: Qoder's mover min is 0.2.39 (plugins#427)
qoder 0.2.39 (plugins a379c54) closes the stream Qoder holds open on a queued call (10605 RESOURCE_LIMIT) before it waits, where 0.2.38 held it until the request ended, and resends each try as a new request_id and chat_record_id in the same request_set_id, as Qoder.app 0.4.3's worker resends a queued ask. npm view @magpie-community/opencode-qoder-auth version --prefer-online: 0.2.39 at landing. Run: go test -count=1 -run 'Mover|Moved|Migrat|Qoder|Min' ./internal/provider ok; gofmt clean. The plugin change itself was run against the owner's real qoder.com account (queued twice, answered at 71s, both refused streams closed at once) and its queue tests fail on 0.2.38's index.mjs. Not tried: a moved user's update to 0.2.39 through keepMovedCurrent. |
||
|
|
e4ca47b0f2 |
provider: Kiro's mover needs 0.1.18, so an image over Kiro's 5 MiB Base64 limit doesn't stick the conversation (plugins#428)
kiro 0.1.18 (plugins ceda580): Kiro counts its 5,242,880-byte image limit on the Base64 string, so imwaco's 4,171,428-byte view_image PNG (5,561,904 as Base64) failed with IMAGE_SIZE_EXCEEDED on that turn and every later one. The plugin now shrinks such an image on the request it sends (Bun.Image: long edge to 2000 px, then WebP/JPEG smaller each try), leaves smaller images byte for byte, and puts a one-line note in place of one it can't bring under, so the turn still goes. npm view --prefer-online --registry=https://registry.npmjs.org/: @magpie-community/opencode-kiro-auth 0.1.18 (latest). Run: go test ./internal/provider -run 'Kiro|Mover|Moved|Min|Retir|HandOver|Adopt|KeepMoved' ok; go vet ./internal/provider (darwin, linux, windows) ok; gofmt -l clean. The whole ./internal/provider package crashes in TestUnreadLoginsWriteErrorsKeepCredentials ("close of synctest channel from outside bubble", #3632, open, on main), and an earlier run hit "no space left on device" (the disk had 290 MB). Plugin side: HOME=$(mktemp -d) bun test packages/kiro 67 pass, also under OpenCode 2.0.25's Bun 1.4.2. Broken by hand (plugin): without the fitting 7 of its 10 new tests fail. Not tried: a real Kiro account; a real move in a sandbox HOME (only the min string changed). |
||
|
|
9bfe680481 |
plugin: a changed plugin option lists the providers again (plugins#430)
WorkBuddy's plugin 0.1.38 adds a "Free models only" switch (a plugin option) that lists only WorkBuddy's free models and refuses any other before it is sent. Its list goes by the switch, but SetProviderOptions only handed the values over: the host cleared its infos while Go kept provCache, so the Providers page and /v1/models showed the old list until something else re-read it. SetProviderOptions now forgets the kept providers (whether the host runs or not), so the next Cached() lists them again. Nothing else runs on a change. The workbuddy mover's min is 0.1.38 (npm view --prefer-online at landing: 0.1.38). Run: - go test ./internal/plugin ./internal/provider -count=1 -timeout 45m at this head ( |
||
|
|
3aead9c627 |
codex: the Windows Codex app's own app-server is found, so Connect, Disconnect and failover restart it there too
zhibukaixinyao on Discord (#help, 10-27): on Windows there is no restart, and Codex keeps the old provider until it is restarted by hand. The cause: isCodexAppServer took the Windows app's codex to live under WindowsApps\OpenAI.*, which was a guess. The real ChatGPT/Codex MSIX (OpenAI.Codex 26.1021.3705.0, installed with winget OpenAI.ChatGPT) runs it from %LOCALAPPDATA%\OpenAI\Codex\bin\<hash>\codex.exe ... app-server --analytics-default-enabled. So findCodexApp found nothing, KeepCodexAppOnItsProvider never ended it, and the "still signed in to the old account" notice never showed on Windows. Now that path counts too (WindowsApps is kept); the npm, WinGet Links and --listen app-servers still don't. Run: - go test ./internal/provider -skip TestUnreadLogins: ok except TestFetchAsksASharedBaseOnce and two siblings, red on main and filed as #3854; TestUnreadLoginsWriteErrorsKeepCredentials crashes the package on main, filed as #3632. Neither is touched here. - go test -run 'TestCodexApp|TestFindCodexApp|TestIsCodexClient' ./internal/provider ./internal/agent: ok. - gofmt -l; go vet on darwin, linux -tags nogui and windows; go build for darwin, windows and linux nogui: clean. - On the Windows box (Windows 11, real Codex app 26.1021, sandbox USERPROFILE/APPDATA/LOCALAPPDATA, gateway on :3491, a fake custom provider): `magpie codex fakeai/fake-1` ended the app's app-server and the app started a new one (pid 63320 -> 56692); `magpie codex default` did it again (56692 -> 56216). The app logged the exit as expected (code 0, app_server_restart_recovery_done) and kept its window. The origin/main build left pid 56216 through both. Broken by hand: with the old WindowsApps-only check, TestCodexAppOwnServer and TestFindCodexApp go red on the real Windows command line. Not tried: a signed-in Windows app switching ChatGPT accounts, the durable host, and the managed `codex app-server daemon` (winget's portable codex 0.161 refuses to run it: "the CLI package does not match this platform or executable"). |