Repository navigation
fix(tui): check the picked local model when the default is a cloud model - #6017
Conversation
With an AMD LLM Gateway model saved as default_model, a TUI launch on a picked local model still showed the gateway model as "not downloaded — About 4 GB". The sidecar's /init reports the saved default, and the daemon gate judged that model even though this launch never uses it. A cloud default under a local pick now gets the picked model's on-disk check instead. Closes #6016
Covers a fireworks default, a user.-prefixed model on disk, a missing pick, and a failed Lemonade listing under a local pick, and checks a missing local default under a local pick still offers its download.
|
Verdict: Approve with suggestions With an AMD LLM Gateway model saved as the default, launching the TUI on a local model you picked no longer shows the gateway model as a ~4 GB download and blocks on it. The model check now looks at the local model you actually picked: green when it's on disk, and when it's missing, it names that model. The fix is narrow: it only applies when the saved default is a cloud model, so a local default behaves exactly as it did before. The logic is correct and the tests cover the cases that matter. One thing before merge:
Real-world evidenceN/A: no evidence bundle was produced for this run. The verdict rests on static review plus a local 🔍 Technical detailsIssues found 🟡 No real-surface evidence for a user-visible TUI change. The change alters what the preflight screen shows and whether launch is blocked, but the PR has only stubbed-daemon tests. Please attach the TUI preflight output (or a screenshot) from the manual step in the test plan before merging. 🟢 The picked-local path drops context-window reporting ( Ordering check (no issue). The new branch sits after the cloud-launch branch, so Strengths
|
|
Code, tests and CI are green; what's left is the manual launch with a saved gateway key, which this machine can't do without a real key. I merged 🔍 Technical details
|
|
Verdict: Approve With a cloud (AMD LLM Gateway) model saved as the default, launching the TUI on a local model you picked used to block on a ~4 GB download of the gateway model, which that launch never uses. Now the TUI checks the model you actually picked: the row goes green when it's on disk, and names that model when it isn't. The fix is small, reuses the existing on-disk check, and leaves the local-default path alone. The new tests cover the downloaded, missing, The one gap is the manual step in the test plan (gateway default plus a local pick on a real machine), which is still unchecked. A maintainer should run it before relying on this in a release. Real-world evidenceN/A: no evidence bundle was produced for this run. The change is in TUI preflight logic, and real-machine validation needs a saved gateway key, so it is left to the author's manual step. The verdict rests on static review plus a local run of the preflight package tests: 🔍 Technical detailsIssues found 🟢 Local variable shadows the (then pass 🟢 Ordering assumption worth knowing. The new branch in Strengths
|
With an AMD LLM Gateway model saved as the default, launching the TUI on a picked local model listed the gateway model as "not downloaded — About 4 GB" and blocked the launch on a download it would never use. Now the model row checks the local model you picked: it goes green when that model is on disk, and if it isn't, the row names that model, not the cloud one. This is the local-launch half of #5992, which covers launching on the gateway model itself.
Closes #6016
Test plan
cd tui && go test ./internal/ui/...passes, including a new test that reproduces the issue's exact "amd.… not downloaded — About 4 GB" row without the fixpython util/lint.py --allpasses in CI (here GAIA wasn't installed, so the two checks that import it failed for that reason)amd.*gateway model asdefault_model, launchgaia-tuion a downloaded local model (e.g. Gemma-4-E4B). The model row should read "downloaded — chat uses Gemma-4-E4B-it-GGUF", with no download offer🔍 Technical details
probeInit(tui/internal/ui/preflight/check.go) readsbody.Modelfrom the sidecar's/init, which names the saveddefault_model. With a cloud default and a localcfg.Model, that cloud id came backpresent:false, so the row fell through to the localFixPullModel/ "About 4 GB" branch.cfg.Modelis a local pick and the sidecar's model is a cloud id, the row comes fromcheckLocalModelDownloaded, the existing on-disk check pulled out oflocalRunner.checkPickedModelinlocal.go.cfg.Model, this one a localcfg.Model.TestDaemonGateChecksThePickedLocalModelOverACloudDefaultincloud_daemon_test.gocovers both the downloaded and the missing pick.