yuancjun (#help on Discord) found the provider editor's Picked only,
with no model picked, ticked the first 24 models the vendor's list
serves (draft.chosen = dashed(), #1818). On a 42-model relay that reads
as Select all, and the next Save wrote those 24 down as the picks.
Ported from their fork (yuancjun/magpie, fix/legacy-picks-serve-all,
321dfd5c9), with two siblings added.
- Picked only with nothing picked now picks nothing (draft.picking),
says "Pick a model first." (the words Names & levels already uses, in
every language), and draws nothing as served.
- Its Save is refused with the same words, in a provider of keys'
editor (yuancjun's) and in a subscription's account editor, which
draws the same models box (renderModels) and would have saved the
vendor's list the same way.
- Select none from there is Usage only, and once a model is picked the
last unpicked leaves none as before (#1831).
- Picks set aside by Vendor's list or Usage only are still given back by
Picked only.
app.js's comments around the models box were cut to pay for it: the
core stays in its budget with no raise.
provider-none-picked now checks that Picked only from Usage only ticks
nothing, says to pick a model first, refuses the Save (no save request)
and that Select none from there is Usage only. provider-best-in-family
says Picked only ticks nothing.
Run on mote at this commit (rebased on a3768cdd1): provider-none-picked,
provider-best-in-family, provider-picked-only-shows-picks and i18n-keys,
both engines, 74/74 pass; TestCoreScriptBudget ok (main's growth took it
17 bytes over after the rebase; the pickingNone comment was cut, no
raise). Broken by hand: dashed() restored, provider-none-picked is red;
the Save guard removed, it times out waiting for .editor-error.
Whole GUI suite on WSL (magpie-desktop): about 214 not ok, run beside
three other sessions' full suites there; every red I checked fails the
same alone at base ed978e560 (balance-fix, click-scroll, codex-auto-reset,
codex-credits-first, codex-predictions, editor-advanced-align,
gateway-key-limit, gateway-key-models, icon-url; #4683, #4908, #4790,
#4385). Not a clean whole-suite record.
Not tried: the real app with a real relay.
claude-switch-only set page.setDefaultTimeout(5000) and then called
page.goto with no timeout of its own, so Playwright held the first load
of app.js, i18n.js and the plugins to the 5s bar meant for clicks. On a
busy box (a whole-suite run at load 130-160) that load took longer and
goto timed out. The same pattern is in 988 GUI test files (1174 pages):
every one of them now also sets setDefaultNavigationTimeout(60000) on
the same page, right after its default, so goto, reload and waitForURL
wait on the load itself with room, while clicks and waits keep their
short bar. group-from-model-add's own 20s navigation bar is raised to the
same minute. claude-switch-only also gives its first provider row (drawn
from the page's first reads) a minute before clicking it.
nav-timeout.test.cjs (no browser) reads every GUI test file and names
each page given a default under a minute without a navigation timeout of
at least a minute, so a new file can't bring the pattern back.
What was run (WSL magpie-desktop, Playwright 1.62.0, load 70-260 from
other sessions):
- node --check on every file in internal/gui/tests: all parse.
- nav-timeout.test.cjs against origin/main's test files: red (names the
1174 pages); against this tree: its only reds were my own probe copies
of the old files, since removed.
- By hand: claude-switch-only with app.js served 7s late (a busy box's
first load), --test-name-pattern "1100 en": origin/main's file 4 of 4
red with "page.goto: Timeout 5000ms exceeded"; this file 4 of 4 green.
- claude-switch-only.test.cjs, both engines, en/zh/ja/de, 1100 and 420:
32 of 32. group-from-model-add, usage-access-key-card and i18n-keys:
green. agent-plugin-agents: Chromium green; WebKit's de 420 subtest red
on a 5s waitForFunction at line 115 (a wait after load, not the
navigation), at load ~230.
Not tried: the whole GUI suite (about 1000 files; the change is one
mechanical line per page), Windows or mote (mote's browsers, #4125).
keleus wanted a subscription's quota in the status bar without anything
routed to it. That has existed since #1818 (noModels), but getting there
took Picked only, then Select none, then Save, and the card then just said
"no models exposed". The models' serves control now has a third option,
Usage only: no picks, noModels on, nothing routed, balance and usage still
read, models the vendor lists later not added. The card's line says
"usage only" for such a provider. Picked only with none picked used to be
the same state under another name; it now starts from the models the
vendor's list serves (the dashed ones), so each of the three options is a
state of its own. Unpicking the last pick still leaves none (#1831),
which now reads as Usage only. Strings in en, zh, zh-TW, ja, de; the old
Picked only tooltip's second half moved to Usage only's.
Decision (owner delegated product calls): name the state rather than
document the path; the backend, CLI (`magpie provider models <id> none`)
and saved files are unchanged.
Run: provider-none-picked.test.cjs and i18n-keys.test.cjs, Chromium and
WebKit, 5 languages, 1100 and 420 wide: 33/33. With app.js put back,
provider-none-picked fails ("+ 'Picked only' - 'Usage only'"). The test's
saved-as-none fixture now has its models off, as /api/providers sends them
(Exposed is empty for it). No Go changed. Not run: the whole GUI suite
(no shared selector or API added).
kchen0x found the model picking hard to follow: with none picked the
provider served every model (dashed), one picked served that one, and
that one unpicked served every model again, while Select none served
none and looked nearly the same as "none picked".
The editor now says which of two things the provider serves, with a
segmented control above the models: "Vendor's list" (up to 24 of it,
dashed, and models it lists later) or "Picked only" (the picks; none
while none are, its balance and usage still shown, saved as noModels).
A click on a model, Select all, Select none, Free only and Working only
are all Picked only, so unpicking the last pick leaves none instead of
flipping back to the vendor's list; only "Vendor's list" goes back to
it. The hint under the list names the mode. Not shown for a decision
API's provider, whose models no agent sees. Strings in zh, zh-TW, ja, de.
Run: provider-none-picked.test.cjs, now also at 420 wide and checking
the control, the last pick unpicked and both segments, passes 30/30 in
Chromium and WebKit in en, zh, zh-TW, ja, de at 1100 and 420; with the
unpick change taken out it fails ("glm-5.3-free after the last pick
unpicked"). i18n-keys passes. The 25 other GUI tests that touch the
model chips pass in both engines (model-first-pick and model-copy-id
failed in the first run, before the hint kept "Click a model to pick
just it", and pass 14/14 and 4/4 after it).
Screenshots looked at for zh 1100 and de 420.
Select none saved `models: []`, which omitempty wrote as no models key at
all, so the provider read back as "no picks" and served the first 24 of
the vendor's list on /v1/models, in auto groups and on the card, while
the editor said none would be served.
What changed:
- Provider.NoModels (json noModels) records the choice; ServesNone() is
NoModels with no picks. A file with no models key still serves the
vendor's list as before.
- Exposed() is empty for it, so the catalog, /v1/models and auto groups
leave it out; resolveIn refuses an explicit pid/model to it; listedBy
and Deciders skip it (a decide-only provider is still a decider).
- SetModels and normalize clear NoModels once there are picks.
- GUI: the editor sends noModels on Save, an edit that omits it keeps it,
the card's exposed count is 0, the hint says nothing is served; with
unlisted the dashed chips explain they are only for groups. Strings in
en, zh, zh-TW, ja, de.
- CLI: `magpie provider models <id> none`.
- docs/subsystems/providers-accounts.md describes it.
Decision (owner delegated): Select none means none, whether or not
unlisted is on; unlisted keeps meaning "hide from the list, still
usable by groups that name it".
Run:
- go test ./internal/provider ./internal/gui ./internal/cli -count=1
(green; second pass ran too) with private GOCACHE and sandbox HOME.
- Broke Exposed's ServesNone check: TestSelectNoneServesNone red
("exposed 24"); broke resolveIn's: red ("watched/m0 resolved"); broke
the GUI keep line: TestProviderSaveSelectNone red ("exposed 24").
- GUI tests chromium + webkit, 5 languages: provider-none-picked 20/20,
provider-draft-picks 10/10 (red with noneChosen broken), plus 12
related model/group/editor tests green.
- gofmt -l clean; go vet darwin, linux -tags nogui, windows clean for the
three packages.
Not run: the gateway package; Codex native model narrowing is unchanged.
searcher-pick.test.cjs fails 3 webkit cases (hover timeout) identically
on the unmodified base 556c01c80, unrelated.
The editor took its picks from the models marked on, and with no pick saved magpie marks on the ones agents are served: the vendor's first 24 (Exposed). So a provider with none picked opened with those 24 ticked as if picked, never dashed as v0.1.689 draws the served ones, and the next Save wrote them as picks. Select none and Save did write none, but opening the editor again showed 24 ticked, and a Save from there made them picks. That is also why Free only looked applied without a Save: the buttons only change the editor's draft, and Cancel, Escape or a click outside drop it, but what opened afterwards was the 24 served, ticked, not what was saved. Now the editor starts from the saved picks (the provider's chosen, those of them still served), so none saved opens with none ticked and the served 24 dashed, with the hint saying agents see the vendor's list. Since a fresh provider now opens dashed rather than ticked, a click on a served chip leaves it out as a click on a ticked one does, the rest of what is served picked in its place; a chip not served is picked as before.
provider-draft-picks.test.cjs (30 models, 3 free, none saved: opens with none ticked and 24 served; Free only then Cancel or Escape writes nothing and opens as before; Free only and Save writes the 3; Select none and Save writes [] and opens with none ticked; saved again untouched it stays []) and provider-none-picked.test.cjs (now: opened with none picked, both drawn as served) fail on the old code; model-rate.test.cjs's chip click now leaves the served chip out. go build -tags nogui ./... passes; the provider and model GUI tests under WebKit pass but provider-levels-scroll, which fails on main as well. Chromium doesn't launch on this machine, so WebKit only, and not tried in the app with a real provider.