Reproduced with two magpies under sandbox HOMEs: B on 127.0.0.1:3592 with
a relay and routing groups, and A on 3593 with B added as Remote magpie
(renamed to "home"), plus a second remote with the id "remote". Codex
(codex-cli 0.162.1) and Pi (1.1.0) were wired through A, and both ran real
turns on remote ids (group/, provider/ and multi-slash ones).
The cause: Spell left a value the field's picker didn't offer as the
agent's own. A remote's model is missing from the picker when magpie
visible keeps it from the agent, or when the remote added it after A last
fetched the remote's list (a key provider's list is fetched on Refresh or
RefreshEvery). For Pi, `magpie pi remote/group/smart` then wrote
defaultProvider "remote", defaultModel "group/smart", said "disconnected
from magpie: … is Pi's own", and Pi went to its own endpoint ("Your account
is not active"). Codex got model = "remote/group/…" with no catalog entry.
The rename itself was fine: `magpie provider set remote-magpie id=home`
moved Codex's and Pi's values, and the old id still routes through Was.
Spell now refuses (notOffered) a value that names one of magpie's models
the agent isn't shown, a model of one of magpie's providers not on its
list, or a group/… magpie has no group for, and says how to fix it
(magpie models <agent>, magpie visible <agent> all, magpie provider
refresh <id>). Every agent's model field goes through Spell (CLI set,
GUI /api agent set, aside, profiles). A model shown to the agent that a
field offers fewer of (Claude Desktop's tiers) is still taken, and so is a
value whose provider part one of the agent's own models uses.
Run:
- TestSpellRefusesMagpieModelNotOffered (Pi and Codex, visibility on the
relay: hidden, unlisted and unknown-group values refused; shown and own
values spelled as before). It fails with notOffered disabled by hand:
all 8 refusals were spelled as given.
- go test -tags nogui -p 1 ./internal/cli/ (whole package; it caught
Claude Desktop's tiers, so the hidden check is on the agent's shown
catalog, not the field's options), ./internal/profile/ (whole package),
internal/agent -run 'Spell|Pick|Connect|Visible|Rename|Pi|Codex|Set|Apply|Own'
plus every test in the files that call Spell or Pick, and internal/gui's
agent_connect, agent_models*, agent_model_order, agent_disconnect,
agent_nomodels, aside_native, aside_offline and codex_agents_v1 tests:
all pass.
- gofmt -l; go vet -tags nogui ./internal/agent for darwin, linux and windows.
- The built binary in the sandbox: Pi and Codex narrowed to "home" refuse
remote/group/smart with the message and keep their config; an unlisted
remote/group/newpool is refused; shown every model again, both take it;
Pi's own anthropic/… still disconnects as before.
Not tried: the GUI picker (it only offers shown models; the GUI's set
endpoint now gets the error text). No GUI file changed.
Full suite: SUITE_LINE