yetone
|
ff94998ad2
|
accounts: a moved built-in keeps its place in Providers and in magpie accounts (要保证插件订阅 provider 跟内置的订阅 provider所有逻辑都要一模一样) — with WorkBuddy and WorkBuddy AI both moved, WorkBuddy AI came first when its plugin listed it first, as a moved one placed already didn't count; and magpie accounts put every moved built-in's accounts after all the others. Both now go where the built-in stood. TestMovedAccountsKeepTheirOrder and TestAllLoginsMovedKeepTheirPlace fail without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass.
|
2026-10-01 11:15:26 +08:00 |
|
yetone
|
d4817bea56
|
plugin: a moved provider goes through its own proxy, and each account through its own (#237) — a plugin's fetches and usage went through magpie's global proxy whatever the provider or the account was set to. Go now hands the host the proxy ctx names, and host.js gives every fetch made for it Bun's proxy option; "direct" goes through none. Bun reads *_PROXY once and puts every fetch through them, so the host is started with them as MAGPIE_*_PROXY and applies magpie's itself to a fetch with no proxy of its own. A plugin sign-in's usage looks its proxy up under the provider's id, not "plugin:<id>". TestPluginProxy and TestMovedLoginProxy fail without the change.
|
2026-10-01 03:42:06 +08:00 |
|
yetone
|
aed5e30d43
|
providers: a built-in moved onto its plugin keeps its place among the accounts — the plugins' accounts were listed after every built-in, so a moved one dropped to the end of the providers list, and of the order routing and the agents' model lists follow. One a built-in was moved onto now stands where the built-in stood; a plugin's own provider still goes last. TestMovedAccountKeepsItsPlace fails without the change.
|
2026-10-01 03:41:46 +08:00 |
|
yetone
|
8756ece70c
|
plugins: a plugin's model is priced only when the plugin prices it, and says whether it takes images when the plugin says — OpenCode prices a model it has no price for at 0, as the plugins give their plans' models, and a 0 price made each plugin model the cheapest where magpie picks by price (a small model to search or describe images with, one to draw with) and showed it free. A price of 0 is none now. A model the plugin (or models.dev) says takes images, or doesn't, carries that answer (ImageInput), as a built-in's list did; one it said nothing of stays unknown. TestPluginCatalogPriceAndImages and TestFakePlugin fail without the change.
|
2026-10-01 03:41:46 +08:00 |
|
yetone
|
cb9a6c0872
|
providers: a moved provider's models are the ones its plugin lists — Available read the list last fetched under the provider's id first, and a built-in moved onto its plugin left its own there, so the moved provider kept offering the built-in's last models whatever the plugin listed. A plugin's provider reads no fetched list; Fetched says none either. TestMovedProviderModelsArePlugins fails without the change.
|
2026-10-01 03:41:44 +08:00 |
|