The live gateway's /v1/models listed devin/Adaptive and devin/adaptive,
and Devin answered both with 502 "no API providers are available".
They came from magpie, not the plugin: the plugin's list (and its cached
copy in plugin-providers.json) has neither, since parseFamilies and
parseConfigFamilies skip Adaptive and Fusion. The owner's providers.json
keeps "Adaptive" and "adaptive" in the devin entry's picks (models), saved
when the built-in still listed Devin's router families, before ce8d0e065
served Devin's chat API. A pick only leaves Models when a list that had it
stops having it (dropGonePicks), and no list fetched since ever had these,
so after the move to the plugin they were served as picks of the user's
own (Exposed's unlisted picks) and offered to every agent.
normalize now reads a devin provider's Models and Delisted without
Adaptive and Fusion, in any case (devinRouter, withoutDevinRouters, which
devinModelsFlatten now uses too). Every reader that goes through All
(the gateway's /v1/models, the agents' lists, the editor's Picks) sees
them gone, so old files are fixed for every user on read; the next Save
writes the file without them, and a save that sends one back drops it.
Scoped to provider id devin: another provider's "adaptive" is its own.
Not changed: AccountModels (an account's own list only narrows what it
serves; dropping a lone "adaptive" there would widen it to every model),
Fallback ("devin/adaptive" as another provider's fallback is still tried
and refused) and settings.json's hiddenModels/picked lists (they hide or
pick, never add a model). PickedFrom keeps them, which only means "listed
then". The plugin needs no change.
Run:
- TestDevinRouterPicksNotServed (new): a sandbox HOME with the owner's
devin entry as written, the plugin moved and its list cached. Red on
the old provider.go: "served [Adaptive adaptive swe-2 claude-opus-5-5
Fusion fusion], want [swe-2 claude-opus-5-5]"; green with the change.
- Real data: magpie built at a83fe2325 and at this change (-tags nogui,
on mica), `magpie models` under a sandbox HOME holding copies of the
owner's devin entry from providers.json, plugins.json, plugin-auth.json,
migrations.json and plugin-providers.json. Old: devin/Adaptive and
devin/adaptive first under Devin, as the live gateway lists them. New:
the list starts at devin/swe-2, the rest unchanged.
- Full suite on mica through suite.lock at 3b164fafb (this change on
a83fe2325): gofmt -l empty, go vet ./..., GOOS=linux go vet -tags nogui
./..., GOOS=windows go vet ./..., go build for darwin, linux (nogui) and
windows, go test -tags nogui -count=1 -timeout 45m ./...: suite exit 0,
99 packages ok, no FAIL.
- Rebased onto dc85a7ca5 (56 files changed upstream, b76016676 in
internal/provider): gofmt, vet (darwin, linux, windows) and
internal/provider's tests again there: vet-ok, ok internal/provider 156s.
Then rebased once more onto 74c94b5db and e36541ddf (internal/gui
appearance and site/ only, not re-run).
Not tried: a request through a real gateway, since the requests that
still go (devin/swe-2 and the rest) take no path this change touches.