Files
magpie/internal/gateway
yetone eb1b830004 gateway: Cindy is told each model by its name with its provider's (cdredfox on X)
Cindy's picker listed magpie's GLM-5.3-Flash three times, 千问 3.8-Flash
and DeepSeek-Flash twice each, with nothing to tell them apart. Cindy
0.1.94's model discovery (parseModelsListResponse in its app bundle)
names a row by display_name before name, and magpie's display_name is
the bare model name. /v1/models asked with Cindy's key (magpie-cindy, as
its import link gives it) now gives display_name the name the agents'
lists use, provider.LabelsFor("cindy", ...): "GLM-5.3-Flash · Zhipu",
"... · routing group" for auto/, following Cindy's Provider in model
names (the picker the Agents page already showed for Cindy, which
changed nothing there before), a name the user gave a model kept as
they wrote it. Every other client's display_name is unchanged. In Cindy
a discovered model's shown name follows discoveredMetadata.name, which
its 刷新模型列表 updates for existing models; a name the user typed in
Cindy (nameExplicit) still wins there.

Run:
- TestCindyDiscoveryNamesModelsApart (new): on, own and off, three
  providers' GLM-5.3-Flash apart, a user's own name kept, another client
  plain. Red on the old gateway.go ("on: Cindy told
  map[... or/glm-5.3-flash:GLM-5.3-Flash zp/glm-5.3-flash:GLM-5.3-Flash]").
- Real use: this tree's magpie built and served in a sandbox HOME on
  mica with two custom providers serving glm-5.3-flash; its /v1/models
  with magpie-cindy fed to Cindy 0.1.94's own parseModelsListResponse
  (extracted from /Applications/Cindy.app's app.asar): "GLM-5.3-Flash ·
  OpenRouterX", "GLM-5.3-Flash · ZhipuX", "GLM-5.3-Flash · routing
  group"; with magpie-pi's key all three still "GLM-5.3-Flash".
- Full suite on mica at base e730a14dc (go test -count=1 -timeout 45m ./...): 99 packages ok, no FAIL. go vet ./... (darwin), GOOS=windows go vet ./... and GOOS=linux go vet -tags nogui ./... clean; gofmt -l clean.

Not tried: Cindy's own window. Adding magpie there writes into the live
CindyGlobal folder, which has no account database on this Mac.

- After the rebase onto 9a3f95f3f's parent (two gateway commits): internal/gateway, internal/provider and internal/agent ok on mica.
2026-11-14 08:39:31 +08:00
..
wip
2026-11-12 12:45:39 +08:00
wip
2026-11-12 12:45:39 +08:00
…
…
…
…
…
…