Files
magpie/internal/settingsapi
yetone e0ed2c4d81 gateway: model ids without the provider can be listed alone, in place of provider/model
qQianye on X (v0.1.4094 in Docker, several WorkBuddy accounts): the
client on their computer lists every model as provider/model and they
want those hidden. The advice was the Agents page's model list, but
gateway mode (what the Docker image's web page runs as) has no Agents
page. Settings › Network and sharing › Model ids without the provider
was drawn there already, but only added bare ids beside the prefixed
ones, so the list got longer, not shorter.

The row is now Off / On / Only. Only (settings.BareModelIDsOnly,
POST /api/settings/bare-ids {"on":true,"only":true}) lists each bare id
in place of the first row it stands for (provider.OnlyBare) and leaves
the other rows it stands for out: the found group it reaches
(auto/glm-5.3) and every provider's row of that model it reaches. A row
the bare id doesn't reach (b/vendor/m9, whose bare id names provider
vendor), a held key's row whose bare id isn't listed for it, and other
groups keep their ids, so no model leaves the list. Requests by
provider/model are served as before; only /v1/models changes. Another
magpie's list is unchanged. Claude Code's discovery, which drops a bare
row it wouldn't keep because the full row is there, lists it by its
alias with Only (there is no full row). Off clears Only.

Run, at this commit (base 3dbbb173e, origin/main unchanged at push):
- go test -count=1 -timeout 45m ./... on mica: 101 packages ok, no FAIL
  (log kept whole at mica:~/runs/qq-sb/suite.log). gofmt -l clean;
  go vet ./..., GOOS=linux go vet -tags nogui ./...,
  GOOS=windows go vet ./... clean.
- GUI (Chromium + WebKit, 420 and 900, all five languages) on mica:
  bare-ids, i18n-keys, i18n-en-no-cjk, gateway-mode, settings-tabs-stick:
  66/66 pass. Not the whole GUI suite: mote was over its load and mica
  holds another session's GUI run.
- Broken by hand: with Only ignored in listModels, TestBareModelIDsOnly
  is red (every provider row listed); with Claude Code's bare rule left
  as before it is red (1 of 5 models listed to discovery).
- Docker-style run on mica: the built binary as `magpie serve
  --web` with the image's env (HOME/XDG under a sandbox, MAGPIE_ADDR,
  MAGPIE_WEB_KEY), two custom providers serving kimi-k3 and glm-5.3; the
  page boots with gateway:true and draws #bareIdsRow. /v1/models:
  Off  auto/kimi-k3 auto/glm-5.3 wb1/kimi-k3 wb1/glm-5.3 wb2/kimi-k3 wb2/glm-5.3
  On   the same, then kimi-k3 glm-5.3
  Only kimi-k3 glm-5.3
  kimi-k3 answered by wb1, wb2/kimi-k3 still by wb2.
Not tried: a real WorkBuddy plugin account, and a client reaching it
through another magpie (whose list never takes bare ids).
2026-11-14 21:05:50 +08:00
..