Repository navigation
feat(tui): show the measurement behind each ranked Fireworks pick - #4385
kovtcharov wants to merge 3 commits into
Conversation
Picking a Fireworks model in the TUI meant scrolling an alphabetical list of bare ids with one "suggested" marker on Gemma and no idea what anything cost or was good at. The Fireworks model list now pins three measured picks right after the suggested default — GLM-5.3 Flash, DeepSeek V4.1 Flash, Kimi K2.7 Code — each labelled "benchmarked" and, when focused, showing its name, cost tier, and the numbers from the GAIA flagship-agent runs (14 everyday coding tasks, mean of 3; TheRock, 4 real ROCm build bugs in a 144K-line repo). Discovery still decides what is offered: a pick the account does not expose is never shown, and the Gemma default keeps its place. The `/model ` palette is unchanged on purpose — it lists only ids that need no discovery. The README and the AI providers guide carry the same three picks and one table of numbers, so no doc lists a different set.
|
Verdict: Approve with suggestions Picking a Fireworks model in the TUI now surfaces three measured picks right after the suggested default, each labelled and showing its cost and results when focused — a real improvement over scrolling bare model ids. The logic is clean, the ordering is centralized in one place, and the new tests cover the cases that matter: ordering, the rendered labels and notes, and the case where the account doesn't expose a pick. One thing worth fixing before merge is cosmetic, not functional: on a narrow terminal, the two extra detail lines under a focused pick push the panel past its height budget, so the list's own heading (and on very narrow widths part of the "Enter selects a model" instruction) gets trimmed off the top. The visible-item count is derived from a fixed assumption about how many lines of chrome the panel has, and the new lines aren't counted in it. The focused row, the "N of M" counter and the key hints all stay visible, so nothing becomes unusable — the header just disappears. I verified this by rendering the panel at several sizes and comparing against a non-benchmarked model focused at the same size. Smaller points: the setup screen names all three picks before any discovery has happened, so it promises models an account may not expose (the same is already true of the suggested-model line, so this is consistent rather than new), and the provider guide hardcodes "Three Fireworks models" — it will read wrong the day a fourth pick is added. Real-world evidenceNo evidence bundle was produced for this PR, and the PR's own live check — What I could verify locally, and did: 🔍 Technical details🟢 Focused-pick detail lines aren't counted in the visible-item budget (
|
| size | heading visible, pick focused | heading visible, non-pick focused |
|---|---|---|
| 80x24 | ✅ | ✅ |
| 60x24 | ❌ | ✅ |
| 40x24 | ❌ (also loses "Enter selects a model. Existing") | ✅ |
Reserving the wrapped height of the two new lines restores the heading at 60x24 and 40x24 (verified locally, existing tests still green):
count := max(1, m.height-14)
if m.focus >= 0 && m.focus < len(models) {
if pick, ok := lemonade.BenchmarkedPick(models[m.focus].ID); ok {
detail := len(strings.Split(ansi.Wrap(pick.Name+" — "+pick.Note, w, ""), "\n")) +
len(strings.Split(ansi.Wrap(pick.Bench, w, ""), "\n"))
count = max(1, count-detail)
}
}
(Indentation above matches the case "models": block; drop one tab if applying inline.)
🟢 Setup screen advertises picks unconditionally (tui/internal/ui/providers/model.go:381)
"Benchmarked picks: "+benchmarkedNames() renders before any key is configured or discovery has run, so all three names are promised even when the account exposes none — and docs/guides/ai-providers.mdx explicitly says a pick the account doesn't expose "is not offered." The adjacent Suggested model: line has the same property, so this is at worst pre-existing inconsistency; worth a hedge ("when your account exposes them") if you touch that string.
🟢 Docs hardcode the pick count (docs/guides/ai-providers.mdx:24)
"Three Fireworks models were measured…" goes stale as soon as lemonade.Benchmarked grows. The Go doc comment on Benchmarked avoids naming a count; the prose could too.
The Fireworks models below were measured end to end with the GAIA flagship agent —
Verified locally
gofmt -l internal/lemonade internal/ui/providers— cleango vet ./internal/...— cleango test ./internal/lemonade/... ./internal/ui/providers/...— bothokdocs/guides/terminal-hub.mdx:360has## What a session costs, so the#what-a-session-costsanchor in the new prose resolves;#benchmarked-fireworks-picksmatches the new## Benchmarked Fireworks picksheading, and the../docs/guides/ai-providers.mdx#…relative link fromtui/README.mdresolves on GitHub. These are relative/site-internal links, so theamd-gaia.ai/docs/prefix rule doesn't apply.
Strengths
- Ordering moved out of the sort closure into
PickRank, so "suggested → picks → alphabetical rest" lives in one testable function and the tie-break stays deterministic. The old two-ifclosure wasn't a strict weak ordering in the both-suggested case; this is. Benchmarkedis deliberately an ordered slice with the reason in a comment, and nothing invents a pick that discovery didn't return — no silent fallback, no synthesized catalog entry.benchmarked_test.gochecks the data itself (validfireworks.cloud id, not the suggested default, no duplicates, single-line non-empty copy), which is the right guard for a hand-maintained table.- Both doc surfaces (
tui/README.md,docs/guides/ai-providers.mdx) were updated together with the numbers in one place and a link from the other, matching CLAUDE.md's rule about a functional change updating every doc that describes it.
|
Needs your call before this can merge: main grew a second copy of this feature while the PR was open. #4040 landed on main about 40 minutes after the review bot looked at this branch, and it does the same job — the Fireworks picker already puts the benchmark's best models first, labelled with why. Merging main brings three conflicts and leaves the TUI with two parallel recommendation tables that disagree with each other, so this needs a decision rather than a conflict resolution. The two lists name a different third model, and the PR body says why yours excludes main's: main ranks One thing worth carrying across regardless of the decision: main's matching handles both id forms Lemonade reports, and this branch's does not — so on an account that reports the long form, the picks would quietly sort last with no marker. Main has a regression test for exactly that. The bot's narrow-terminal clipping finding is still open too, but it sits in code that will be rewritten by whichever direction you pick, so I left it alone. I merged main locally, confirmed the collision, then aborted — nothing is pushed, the branch is untouched. 🔍 Technical detailsThe collision.
This branch adds a parallel
plus Three ways out, all yours to pick:
The id-form gap. func rankKey(id string) string {
provider, name, found := strings.Cut(id, ".")
if !found {
return id
}
return provider + "." + name[strings.LastIndex(name, "/")+1:]
}
Eval gate: not applicable. The diff is Go TUI plus docs — no tool registration, system prompt, or agent-loop change — so Verified locally: |
|
Heads-up on one of the three picks: as of 2026-09-26 |
Main's ranked recommendations (amd#4040) replace this branch's separate pick list; what remains is the measured evidence behind each ranked pick, shown when the model is focused, and the table of those measurements in the guide. Kimi K2.7 Code is dropped: Fireworks no longer serves it.
|
Landed on Your Kimi 404 catch needed no action — your own merge commit One thing did change, and it is worth knowing about. Of the ten figures the Safe to close this one. 🔍 Two corrections and a merge-order hazardA correction to my own first pass. I initially recorded Orphaned godoc fixed: Merge-order hazard for #4176 / #4265. Both rewrite |
…pick (amd#4414) Picking a Fireworks model in the TUI showed a rank and a three-word label — "best overall, cheapest" — with nothing to say what that was measured on or what a run costs. Focusing a ranked model now shows the measurement behind its label: tasks solved, judged quality, and the dollar cost of one pass. Every figure on that line is the model's own row in the benchmark table published in amd#4335, and a test fails if the two ever drift apart. This replaces amd#4385 (@kovtcharov's `feat/tui-benchmarked-fireworks-models`). All three of its commits are ancestors here, authorship intact; the difference is that the TheRock half of each line is gone. Neither TheRock quality score — 3.69/5 for GLM, 4.44/5 for DeepSeek — is published anywhere a reader can reach, and amd#4335 says so itself: "TheRock tier results will be added once its reruns complete." A line labelled `Measured:` that a user cannot trace is the thing this repo's evidence rule exists to prevent, so the untraceable half was removed rather than sourced. The everyday-suite figures stay, because they match amd#4335's table cell for cell. ## Test plan - [x] `go build ./...` and `go vet` clean on the whole `tui` module (Go 1.26.3, Strix Halo) - [x] `go test ./...` — 21 of 23 packages pass; the two that don't are `internal/ui/chat` and `internal/ui/preflight`, which fail identically on plain `main` (a headless clipboard read and a Lemonade autostart, both hanging until the timeout, neither touched by this change) - [x] Drift guard proven by breaking it: changing `4.89` to `4.95` fails `TestEvidenceIsTranscribed` with the published cell named - [x] Rendered panel captured: rank 1 and 2 show their `Measured:` line, rank 3 (no published figures) and an unranked model show none - [x] `python util/check_doc_links.py --internal-only` — 1042 links, 0 broken - [ ] With a Fireworks key: `/provider` → Fireworks AI → focus `glm-5p3-flash` against a live account <details> <summary>🔍 Provenance check: which figures have a source</summary> Every figure in amd#4385 was searched for across the whole tree, every PR body in the repo's last 120 PRs, and every issue comment on the last 60. | Figure | Model | Source | | |---|---|---|---| | 14/14, 4.89, $0.09, 7:04 | GLM-5.3 Flash, everyday | amd#4335 merged body, GAIA row | traceable | | 14/14, 4.92, $0.10, 5:39 | DeepSeek V4.1 Flash, everyday | amd#4335 merged body, GAIA row | traceable | | 4/4, 3.69, $0.42 | GLM-5.3 Flash, TheRock | only amd#4397, still open | not citable | | 4/4, 4.44, $0.47 | DeepSeek V4.1 Flash, TheRock | cost only — `docs/plans/nightly-benchmarks.mdx` puts DeepSeek's `therock` pass at `~$0.47`; the 4.44 quality score nowhere | not citable | `14/14` and `4/4` denominators are independently checkable: `eval/tasks/tasks.json` defines `everyday` as 14 tasks and `therock` as 4. ``` $ rg -n --fixed-strings 4.89 . ./tui/internal/lemonade/cloud.go:39: Evidence: "14/14 tasks · quality 4.89/5 · $0.09 per 14-task run · TheRock 4/4, 3.69/5, $0.42", ./docs/guides/ai-providers.mdx:55:| GLM-5.3 Flash | `fireworks.glm-5p3-flash` | 14/14 solved, quality 4.89/5, $0.09 per run, 7:04 | 4/4, quality 3.69/5, $0.42 | $ gh pr list -R amd/gaia --state all --limit 120 --json number,title,body | python -c "<scan for 3.69 / 4.44 / \$0.42 / \$0.47>" scanned 120 PRs 4397 feat(agent): evict stale tool results from the sent context, ['3.69', '$0.42'] 4385 feat(tui): show the measurement behind each ranked Fireworks ['3.69', '$0.42'] $ <same scan over issue comments on the 60 most recent PRs> no comment on the last 60 PRs contains 4.44 / $0.47 / 3.69 / $0.42 ``` Corrected after review: an earlier version of this table said `$0.47` was sourced nowhere. It is in `docs/plans/nightly-benchmarks.mdx` on `main` (line 37 and the `therock` row), attributed to DeepSeek V4.1 Flash under a column headed "Cost per pass (measured)". That is a planning estimate for the suite rather than a published per-model cell, and the `4.44/5` quality score in the same trailer still has no source, so the trailer still cannot ship — but the claim as written was wrong. `$0.42` does have zero occurrences anywhere. amd#4397 is open, and carries the GLM row only, as an aside: "the earlier GLM TheRock row without eviction: 3.69, $0.42". The DeepSeek TheRock figures have no public source at all. </details> <details> <summary>🔍 Ancestry, build, tests, and the rendered panel</summary> Every commit of amd#4385 is an ancestor of this branch: ``` $ git merge-base --is-ancestor e472abc HEAD; echo $? 0 $ git merge-base --is-ancestor 56eadd4 HEAD; echo $? 0 $ git merge-base --is-ancestor bfa1070 HEAD; echo $? 0 ``` Build and vet, on Strix Halo (no Go toolchain on the authoring machine): ``` $ go version go version go1.26.3 linux/amd64 $ gofmt -l internal/lemonade internal/ui/providers $ go build ./... ; echo BUILD_EXIT=$? BUILD_EXIT=0 $ go vet ./internal/lemonade/... ./internal/ui/providers/... VET_OK ``` Full module, this branch: ``` $ go test -timeout 150s ./... ok github.com/amd/gaia/tui/internal/catalog 0.004s ok github.com/amd/gaia/tui/internal/cli 0.012s ok github.com/amd/gaia/tui/internal/client 9.834s ok github.com/amd/gaia/tui/internal/control 0.859s ok github.com/amd/gaia/tui/internal/daemon 0.325s ok github.com/amd/gaia/tui/internal/event 0.011s ok github.com/amd/gaia/tui/internal/gaiainit 0.007s ok github.com/amd/gaia/tui/internal/gaiaslack 0.018s ok github.com/amd/gaia/tui/internal/lemonade 0.014s ok github.com/amd/gaia/tui/internal/ui 0.169s ok github.com/amd/gaia/tui/internal/ui/agents 0.009s ok github.com/amd/gaia/tui/internal/ui/brand 0.010s ok github.com/amd/gaia/tui/internal/ui/cards 0.040s FAIL github.com/amd/gaia/tui/internal/ui/chat 150.015s ok github.com/amd/gaia/tui/internal/ui/components 1.096s ok github.com/amd/gaia/tui/internal/ui/gateway 0.005s FAIL github.com/amd/gaia/tui/internal/ui/preflight 150.007s ok github.com/amd/gaia/tui/internal/ui/providers 0.003s ok github.com/amd/gaia/tui/internal/ui/root 0.015s ok github.com/amd/gaia/tui/internal/ui/status 0.001s ok github.com/amd/gaia/tui/internal/ui/theme 0.104s ok github.com/amd/gaia/tui/test 112.666s ok github.com/amd/gaia/tui/test/mockagent 0.001s ``` Same two packages, same two tests, on plain `origin/main` — pre-existing and environmental, not from this change: ``` this branch: origin/main: running tests: running tests: TestCtrlVReadsTheClipboard (2m30s) TestCtrlVReadsTheClipboard (2m30s) running tests: running tests: TestADownLemonadeOffersTheOneKeySetup TestADownLemonadeOffersTheOneKeySetup FAIL .../internal/ui/chat 150.015s FAIL .../internal/ui/chat 150.016s FAIL .../internal/ui/preflight 150.007s FAIL .../internal/ui/preflight 150.008s ``` The drift guard, proven by breaking it: ``` $ sed -i 's|quality 4.89/5|quality 4.95/5|' internal/lemonade/cloud.go $ go test -run TestEvidenceIsTranscribed ./internal/lemonade/... --- FAIL: TestEvidenceIsTranscribed (0.00s) cloud_test.go:210: fireworks.glm-5p3-flash: evidence "14/14 tasks · quality 4.95/5 · $0.09 per 14-task run" dropped published cell "4.89" FAIL $ <restore> ok github.com/amd/gaia/tui/internal/lemonade 0.002s ``` The panel as rendered, walking focus down the list: ``` › glm-5p3-flash · #1 best overall, cheapest deepseek-v4p1-flash · #2 fastest deepseek-v4-pro-0813 · #3 most truthful plain-model 1 of 4 Measured: 14/14 tasks · quality 4.89/5 · $0.09 per 14-task run glm-5p3-flash · #1 best overall, cheapest › deepseek-v4p1-flash · #2 fastest deepseek-v4-pro-0813 · #3 most truthful plain-model 2 of 4 Measured: 14/14 tasks · quality 4.92/5 · $0.10 per 14-task run glm-5p3-flash · #1 best overall, cheapest deepseek-v4p1-flash · #2 fastest › deepseek-v4-pro-0813 · #3 most truthful plain-model 3 of 4 ← no published figures, so no line ``` </details> <details> <summary>🔍 Merge-order note for amd#4176 and amd#4265</summary> Both rewrite `RecommendedModels` into a registry-populated slice whose populating line copies only two fields (`tui/internal/lemonade/recommended.go:70` — `Recommendation{ID: r.ID, Note: r.Note}`) and drop `Evidence` from the struct entirely. Landing this first does **not** silently drop the evidence: it produces a hard conflict a human has to resolve. ``` $ git merge-tree --write-tree itomek/tui-measured-evidence pr4176 CONFLICT (content): Merge conflict in tui/internal/lemonade/cloud.go CONFLICT (content): Merge conflict in tui/internal/ui/providers/model.go $ git merge-tree --write-tree itomek/tui-measured-evidence pr4265 CONFLICT (content): Merge conflict in tui/internal/lemonade/cloud.go CONFLICT (content): Merge conflict in tui/internal/ui/providers/model.go CONFLICT (content): Merge conflict in tui/internal/ui/providers/model_test.go ``` Stages 1, 2 and 3 are all present, so it is an ordinary content conflict with a shared base, not an add/add. Whoever resolves it needs to carry `Evidence` and `EvidenceSource` into the registry shape, or `TestEvidenceIsTranscribed` and the `Measured:` line go with it. Both PRs already conflict with `main` on `hub/agents/gaia/npm/CHANGELOG.md` independently of this. </details> Replaces amd#4385 — leave that one open for @kovtcharov to close or keep. --------- Co-authored-by: Kalin Ovtcharov <[email protected]>
|
Superseded by #4414 (merged as 9a30544). Closing rather than rebasing. Why#4414's merge commit carries all three commits from this branch ( Closing as duplicate rather than merging a version with the uncited TheRock figures. |
The TUI now ranks the Fireworks models that scored best on the agent benchmark, but a rank and a three-word label cannot tell a user what "best overall" or "fastest" was measured on, or what a run costs. Focusing a ranked model now shows the measurement behind its label — tasks solved, judged quality, cost per run, and the same on TheRock — and the providers guide carries the table those lines come from, so the numbers are checkable rather than asserted.
Two of the three ranked picks carry evidence (GLM-5.3 Flash, DeepSeek V4.1 Flash: 14 everyday coding tasks, mean of 3 runs, and 4 real ROCm build-system bugs, judged by an independent Opus 5 judge, billed at Fireworks' published rates). DeepSeek V4 Pro keeps its rank and shows no measured line until it has one. Kimi K2.7 Code, which this branch first proposed, is gone: Fireworks stopped serving it on 2026-09-26.
Test plan
cd tui && go build ./... && go test ./...— all packages green; new tests: evidence resolves for both id forms Lemonade reports and never for another provider or an unranked id; the focused ranked row showsMeasured: …and a plain row does notgofmt -l internal/ui internal/lemonadeclean (the one remaining hit,internal/control/state.go, is unchanged from main);go veton the touched packages cleanpython util/check_doc_links.py --internal-only— all links valid/provider→ Fireworks AI → focusglm-5p3-flash; the detail line under the list readsMeasured: 14/14 tasks · quality 4.89/5 · $0.09 per 14-task run · TheRock 4/4, 3.69/5, $0.42