axuhere on X: with several providers serving one model, the list and the
model picker should show each one's speed and sort by it. Each row of an
agent's model picker now carries a quiet tag from the usage ledger's last
seven days: tokens a second, or the first token's wait when only that was
timed (title: "first token in Xs, N tokens a second"). Under a search,
rows that match equally go fastest first by about how long a 200-token
reply takes, the untimed last. Without a search the rows keep catalog
order, grouped by provider. "Fastest first" for a routing group already
existed as Speed first (d9a8148d7); nothing added there.
- GET /api/model-speeds (internal/gui/speeds.go): usage.SummarizeTop(Week)
models by provider/model, the catalog ref an option carries; a model
whose calls went to more than one host is left out.
- app.js: readSpeeds (once a minute, on a model picker opening, re-filters
keeping the cursor), speedRank, speedTag. Existing i18n keys only.
app.js 1,304,233 under its 1,311,735 budget, no raise.
- menu-scroll's strict fixture answers /api/model-speeds.
Run, at this head (rebased on bb3565309) unless said:
- mote: go test -run 'Budget|TestModelSpeedsByRef' ./internal/gui ok;
go vet ./internal/gui darwin ok, GOOS=windows ok.
- picker-speeds.test.cjs: Chromium 1000/440px x en, zh, zh-TW, ja, de 10/10
on mote; WebKit 10/10 on the Linux box (wsl-run), because WebKit launch
hangs on mote at present (many pw_run.sh from several sessions, 0 WebKit
processes). i18n-keys 4/4.
- Broken by hand: speeds.go without TPS -> TestModelSpeedsByRef red;
filter() without the speedRank tie-break -> picker-speeds red
("fastest first, the untimed last").
- 57 other GUI files that open a model picker, Chromium, at the pre-rebase
tree, concurrency 4 on mote at load ~30-40: 185 pass, 180 fail. One was
real (menu-scroll's "Unexpected API: /api/model-speeds", fixed here); the
rest were 5000ms locator timeouts and 11 WebKit launch timeouts. A rerun
of those files at concurrency 2 was still running at push.
Not tried: native Linux go vet (the WSL box lacks gtk4/webkitgtk dev
packages); the real app with a real ledger; the full GUI or Go suite.