WorkBuddy's model list read "GLM-5.3:workbuddy/glm-5.3" with Provider in
model names Off. WorkBuddy (5.5.6 renderer, getModelDisplayName) shows
every custom model as "name:id" unless the name is empty or equal to
the id, and magpie wrote the catalog id (provider/model) as the id. So
the provider came back after the colon whatever the names said.
- agent (buddyIDs): for WorkBuddy and WorkBuddy AI under Off or Own,
each magpie entry in models.json gets the name as its id too, so the
list shows "GLM-5.3" alone. The catalog id stays when two models
share a name, when the name is another model's id, when the entries
point at a magpie on another machine or in WSL, and in On mode.
A model turned off in WorkBuddy, its default effort and a reply limit
typed in carry across the change of id: an old id is mapped back
through every label form (Label, PlainName, the list's name).
- provider.AgentNamed: the catalog id of the one model an agent's list
names so.
- gateway (namedFor): a request with WorkBuddy's or WorkBuddy AI's key
for such a name goes to that model before any other resolution, so a
bare id that another provider serves first is not asked instead. The
reply keeps the name that was asked for. Other agents' keys are not
mapped.
Siblings: CodeBuddy Code shares the writer and keeps catalog ids. Its
settings.json names the model by the catalog id (codebuddy.go), and its
CLI picker shows the name alone (no name:id template in its bundle).
What users meet: a change of mode, or of a model's name, changes the
id. WorkBuddy then picks another model for a session that had the old
one, as it does for any model that leaves its list.
Run:
- Unit tests: TestWorkBuddyNamesAreIDsWithoutProvider covers Off, Own,
back to On, WorkBuddy AI and CodeBuddy. TestWorkBuddyAsksByName uses
the real handler: a name equal to a bare id that a provider listed
first serves (hidden from WorkBuddy) reaches the named model, and
OpenCode's key for the same name does not.
- Broken by hand (on mica), each red:
- buddyIDs always returning the catalog id: the test sees
id deepseek/pro under Off.
- namedFor's mapping skipped: the request went to provider "first".
- The old-id mapping skipped: Own lost disabled.
- Sandbox HOME, built binary:
- magpie provider add zai (fake upstream) and magpie workbuddy
provider magpie wrote "zai/glm-5.3 | GLM-5.3 · Z.ai".
- magpie model suffix workbuddy off rewrote the file to
"GLM-5.3 | GLM-5.3".
- magpie serve on a spare port, then a curl with magpie-workbuddy for
"GLM-5.2" reached upstream as glm-5.2 (reply model GLM-5.2).
- WorkBuddy 5.5.6's own CLI (app.asar.unpacked/cli/bin/codebuddy -p
--model GLM-5.3), with HOME set to the sandbox, answered "pong", and
upstream saw glm-5.3, streamed.
- Full suite on mote at this tree (go test -count=1 -timeout 45m ./...):
every package ok (agent 369s, gateway 1062s, provider 230s,
sessions 254s), log kept whole. The doc line in agent-wiring.md was
added after the run; no test reads that file. gofmt -l is empty,
and go vet ./... passes. On mica, GOOS=linux go vet -tags nogui
./..., GOOS=windows go vet ./..., and the linux nogui and windows
builds pass.
- That suite ran at base ac0b5c287. The change was then rebased onto
5211fd3ba (usage currency; no file in common). At the pushed head,
on mica: go build, go vet of agent, gateway and provider, and
-run "WorkBuddy|CodeBuddy|AgentSuffix|Labels" in those three
packages all pass.
Not tried: WorkBuddy's window itself (the name:id rule is read from
its renderer source, not seen on screen), and WorkBuddy AI's app.