Repository navigation
feat(tui): offer the benchmark's best Fireworks models, ranked - #4040
Conversation
The Fireworks setup screen advertised "Gemma 4 31B IT" and the model list pinned that id to the top, but Fireworks no longer serves it: the live catalog through Lemonade lists 24 models and no gemma-4-31b-it. So the suggestion sorted nothing and named a model nobody could pick. The TUI now carries a ranked list of the models that scored best on the agent task benchmark (September 2026), each with a one-line reason. When the provider serves them they sort to the top in rank order and render as `glm-5p3-flash · #1 best overall, cheapest`; everything else follows alphabetically. The setup screen names the current top recommendation through the same accessor, so it cannot drift from the list again. A recommended model the provider does not return is simply absent - the TUI never injects a row the user cannot select. The three docs that described the old suggestion (tui/README.md, the AI providers guide, the CLI reference) now describe the ranked list and say the ranking is a dated snapshot.
Approve with suggestionsThe TUI stops advertising a Fireworks model nobody can pick and now leads the list with the three models that actually scored best, each labelled with why. The code is correct and the docs were updated everywhere the old suggestion was described. One thing to fix before merge: the new safeguard that keeps a long recommendation row on a single line isn't actually covered. I deleted that safeguard locally and the test added for it still passed — the two widths it checks (100 and 48 columns) are both wide enough that nothing needs shortening, so the wrap it's meant to prevent never happens. At a narrower terminal the row really does spill onto a second line. Add a narrow case and the test becomes a real guard. Worth a second look: the recommendations are matched by exact model id. If the server ever reports these models under their longer account-path names — a form GAIA's own code already handles elsewhere — the ranking would silently do nothing again, which is the exact problem this PR fixes. Nothing breaks if it happens (the models just sort alphabetically like any other), but a quick check against the live catalog, or matching on the trailing name segment, would make it stick. Real-world evidenceNo evidence bundle was produced for this PR, so the verdict rests on static review plus what I ran here: 🔍 Technical details🟡 The one-line-row guard is untested (
|
|
Merged 🔍 Technical detailsMerge commit only — no hand resolution. Net vs main: 7 files (+150/−29) across Tests on the merge result: |
Lemonade reports a Fireworks model under either its short name or the full `accounts/fireworks/models/<name>` path. Rank compared ids verbatim, so the long form matched nothing: no rank label, and the model sorted into the unranked tail — the same invisible no-op the hardcoded Gemma id had. Ranking now keys on provider plus the trailing name segment, so both forms resolve and a gateway model sharing a name still cannot inherit a Fireworks rank. Also covers the one-line row guard. The existing test ran at 100 and 48 columns, both wide enough to fit a ranked row untruncated, so deleting the ansi.Truncate call left it green. The new case runs at 36 columns, where the row must shorten, and fails without the guard.
|
Both review findings were real and are now fixed. The ranking would have silently done nothing for half the ids Lemonade can report. Fireworks names a model either The one-line row guard was not covered. I deleted the truncate call locally and the whole package stayed green, confirming the review. The new case runs at a width where the row genuinely must shorten, and fails without the guard. 🔍 Technical details1. Added func rankKey(id string) string {
provider, name, found := strings.Cut(id, ".")
if !found {
return id
}
return provider + "." + name[strings.LastIndex(name, "/")+1:]
}The provider stays in the key deliberately, so Evidence the long form is live rather than speculative: Two tests: 2. Truncate guard — now covered ( Reproduced the review verbatim: replacing
Validation. Merged current The setup-screen line length note was left alone — it is wrapped by the shared |
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.
The TUI's Fireworks setup screen advertises "Gemma 4 31B IT" and pins that id to the top of the model list, but Fireworks no longer serves it — the live catalog through Lemonade has 24 models and no
gemma-4-31b-it, so the suggestion sorts nothing and names a model nobody can pick. Now the three models that scored best on our agent benchmark lead the list in rank order, each labelled with why (glm-5p3-flash · #1 best overall, cheapest), the setup screen names the current top pick from the same list so it cannot rot separately again, and a recommended model the account does not expose simply does not appear.Test plan
cd tui && go build ./... && go test ./...— all packages green (20 ok locally)cd tui && gofmt -l internal/ && go vet ./internal/lemonade/ ./internal/ui/providers/— cleanpython util/check_doc_links.py --internal-only— passes (989 links)/provider→ Fireworks AI → the setup screen saysRecommended model: glm-5p3-flash · best overall, cheapest; the model list opens with the three recommended rows first, the rest alphabetical, and each row stays on one line at 48 columns🔍 Technical details
lemonade.FireworksModelis replaced bylemonade.RecommendedModels(ranked[]Recommendation{ID, Note}),lemonade.TopRecommendation()(its first entry — the one accessor for anything that still needs a single id) andlemonade.Rank(id) (rank, note, ok). The providers screen sorts by rank key (unranked ids sort after every rank, then alphabetically), labels rows throughRank, and truncates each row to the panel width so a ranked row never wraps and pushes rows above it out of the line budget.The ranking is a dated snapshot from the agent task benchmark (September 2026, 14 coding and knowledge tasks, LLM-judged, same harness for every model) and will need refreshing as Fireworks' catalog and model quality change — the comment on the list says so:
fireworks.glm-5p3-flashfireworks.deepseek-v4p1-flashfireworks.deepseek-v4-pro-0813Reference points on the same tasks: Claude Code on Opus 5 scored 4.97 for $3.89, on Sonnet 5 4.91 for $1.26. Deliberately not recommended:
fireworks.qwen3p8-max(12/14, 4.57, $1.325 — costlier than Claude Code on Sonnet and worse) andfireworks.kimi-k2p7-code(14/14 but 4.50 at $0.404).Tests written first and confirmed failing against the old single-id code: rank-order sort ahead of an alphabetically earlier id, alphabetical order for the rest, an absent recommendation neither injected nor disturbing the order, rank/note on recommended rows only and on one line at 48 columns, the setup text derived from
TopRecommendation(), andRankreturning not-found for an unknown id. The three docs that described the Gemma suggestion (tui/README.md, the AI providers guide, the CLI reference) now describe the ranked list.