Commit Graph
1 Commits
Author SHA1 Message Date
yetone f7a80bc904 usage: a Model filter beside the Provider filter on Requests (OHHHHHH05 on X)
OHHHHHH05 asked for 按模型筛选 next to the provider filter, with requests,
input/output tokens, cache and estimated cost for the range, gateway and
session-log calls alike. Usage › Requests could already be narrowed to a
model, but only by clicking it in the chart's ranking or typing it in the
search box. Now it has its own filter, after Provider, in the app's menu
(sessPick/openSessCombo, no <select>). It lists the models the other
filters keep, by tokens (/api/usage/requests' by.model, which is counted
without the model's pick). Picking one sends model=, which the server
already applied to both sources, so the sum line (requests, in, out,
cache read/write), the cost head, the through/not-through-magpie cells,
the chart and the rows are all that model's. All models clears it. A
pick made in the ranking shows in the filter too. No API change, no new
strings ("All models", "Model", "{n} tokens" are already in every
locale), app.js untouched (the plugin's page.js only).

Run (at d83823d26 + this; rebased onto b1a1b950f, a routing-classifier
change that touches no Usage file):
- new usage-ledger-model-pick.test.cjs, en zh zh-TW ja de at 1100 and
  420: webkit 14/14 on wsl-run (magpie-desktop), chromium 10/10 on
  wsl-run. mote's browsers were crashing/timing out on launch under
  another session's full GUI suite there, so the GUI runs moved to WSL.
- usage-model-at-provider and usage-ledger-leave: green in both engines.
- usage-ledger: 2 reds, "newest live route needs no return-to-live
  button", the same at origin/main d83823d26 run whole (filed #3104,
  #4078).
- i18n-keys: 1 red, "Unmarked" in plugins/routing (filed #4524).
- go test -tags nogui ./internal/gui on mote: only
  TestSettingsSaveKeepsWhatItDoesNotSend red (SearchAll, filed #4514).
Broken by hand: with the sessPick line taken out of page.js the new
test is 0/10 in chromium (wsl-run); its token note, first written with
a wrong sum, went red in every language before it was corrected.
Not tried: a real gateway's ledger in the running app; the full GUI
suite (one is already running on mote).
2026-10-31 16:44:31 +08:00