Repository navigation
feat(models): default to Qwen3.8 Flash where it fits; TUI lists every Lemonade model - #4176
kovtcharov wants to merge 48 commits into
Conversation
Request changesThis makes the default chat model follow the machine — Qwen3.8 Flash Next on a 128 GB Strix Halo, Gemma 4 E4B everywhere else — and rebuilds the TUI's local model picker to list Lemonade's whole catalog with a fit check. The rule, the Go/Python drift test, and the CalVer parser coverage are well built. Three things should be fixed before merge, all in the "big machine" path that nothing here could exercise. A PC with a graphics card whose memory Lemonade doesn't report gets judged on total system RAM. On a 128 GB workstation with a 24 GB Radeon card — a configuration GAIA still officially supports — the fit check concludes there is 128 GB available, decides the 82 GB model fits, and A big machine now stops downloading Gemma, but Gemma is still what the vision and document-image features ask for. After a fresh setup on a Strix Halo, anything that reads an image or extracts from a scanned PDF requests a model that was never downloaded. Either keep Gemma in the download list for those profiles (as this PR already does for
Smaller: the shipped agent package's integration guide now contradicts itself about which Lemonade version is required, and two SDK spec pages still describe the old fixed default. Real-world evidenceN/A — no 🔍 Technical details🔴 Critical1. GPU present but VRAM unreported falls back to total system RAM (
Failure: 128 GB RAM + 24 GB dGPU → The fix is a shape distinction, not a bigger margin: no GPU reported at all → system RAM is the right pool; a GPU reported with unknown VRAM → raise 2. ids = [chat if m == DEFAULT_MODEL_NAME else m for m in ids]For But Gemma remains pinned as the default at: The 🟡 Important3.
4. Bundled docs contradict each other on the required Lemonade version ( Item 1 of the same list still reads “Lemonade 10.2.0 or newer, running ( Also stale on the same claim:
5. No eval for a default-model change — CLAUDE.md requires 🟢 Minor
Strengths
|
|
🟡 The version-bump workflow's new SHA-pinning step will produce broken embeddable installs the next time it runs. The workflow's Claude prompt (step 3) tells the bot to extract digests with 🔍 Technical detailsWhere the mismatch lives: The jq query produces output like: "Use the digests exactly as published" means the bot writes actual = digest.hexdigest() # → "235c2361be3a..."
if actual != expected_sha256: # → "sha256:235c..." != "235c..." → always failsFix: strip the prefix in the jq query — --jq '.assets[] | select(.name|test("embeddable")) | "\(.name) \(.digest | ltrimstr("sha256:"))"'— or add an explicit sentence to the prompt: "Strip the leading Guard 2b correctly checks that the API field starts with |
Addresses review on amd#4176. - A GPU Lemonade reports without its memory (Lemonade 11's Radeon dGPU entries, or the legacy amd_igpu/amd_dgpu keys) was judged on total RAM, so a 128 GB workstation with a 24 GB card would have downloaded the 82 GB model. Such a report now means "can't tell": gaia init keeps Gemma and says why, and the TUI blocks downloads with "fit unknown". Both languages read the legacy keys; tests run against the captured Lemonade 11 reports. - A big machine now downloads its chat model alongside Gemma instead of in place of it: vision and document-image extraction still load Gemma by name. - gaia init --check answers exit 2 with a one-line reason for a corrupt config, a default_model that won't fit, or a Lemonade error, instead of a traceback read as "needs setup" (exit 1). get_system_info takes a timeout; the fit probes use 15 s instead of the 900 s default. - An already-downloaded default_model skips the fit check (nothing to download), and init no longer calls its own recorded pick "your setting". - The Agent UI status resolves the default once, before the probe whose catch-all would report a corrupt config as "Lemonade not running". - SKILL.md no longer names the removed `lemonade-server serve` and states the v2026.39.1 floor for Qwen3.8 Flash; the SDK specs describe the resolved default.
|
All three blockers are fixed in 553a942. Most of the smaller items are fixed too; the eval stays a Strix Halo gate.
One thing the fixtures showed for whoever tests this: on Linux, the Strix Halo fixture reports 0.5 GB VRAM + 62.5 GB GTT (the kernel's default of half of RAM). By Lemonade's own rule that's ~63 GB for models, so Qwen3.8 Flash isn't picked there until the GTT limit is raised. Windows with a 96 GB carve-out reports ~112 GB. 🔍 Technical details
|
|
Fixed in 1afdf6a. The bump workflow's query now strips the |
Addresses review on amd#4176. - A GPU Lemonade reports without its memory (Lemonade 11's Radeon dGPU entries, or the legacy amd_igpu/amd_dgpu keys) was judged on total RAM, so a 128 GB workstation with a 24 GB card would have downloaded the 82 GB model. Such a report now means "can't tell": gaia init keeps Gemma and says why, and the TUI blocks downloads with "fit unknown". Both languages read the legacy keys; tests run against the captured Lemonade 11 reports. - A big machine now downloads its chat model alongside Gemma instead of in place of it: vision and document-image extraction still load Gemma by name. - gaia init --check answers exit 2 with a one-line reason for a corrupt config, a default_model that won't fit, or a Lemonade error, instead of a traceback read as "needs setup" (exit 1). get_system_info takes a timeout; the fit probes use 15 s instead of the 900 s default. - An already-downloaded default_model skips the fit check (nothing to download), and init no longer calls its own recorded pick "your setting". - The Agent UI status resolves the default once, before the probe whose catch-all would report a corrupt config as "Lemonade not running". - SKILL.md no longer names the removed `lemonade-server serve` and states the v2026.39.1 floor for Qwen3.8 Flash; the SDK specs describe the resolved default.
1afdf6a to
74a6a6e
Compare
Addresses review on amd#4176. - A GPU Lemonade reports without its memory (Lemonade 11's Radeon dGPU entries, or the legacy amd_igpu/amd_dgpu keys) was judged on total RAM, so a 128 GB workstation with a 24 GB card would have downloaded the 82 GB model. Such a report now means "can't tell": gaia init keeps Gemma and says why, and the TUI blocks downloads with "fit unknown". Both languages read the legacy keys; tests run against the captured Lemonade 11 reports. - A big machine now downloads its chat model alongside Gemma instead of in place of it: vision and document-image extraction still load Gemma by name. - gaia init --check answers exit 2 with a one-line reason for a corrupt config, a default_model that won't fit, or a Lemonade error, instead of a traceback read as "needs setup" (exit 1). get_system_info takes a timeout; the fit probes use 15 s instead of the 900 s default. - An already-downloaded default_model skips the fit check (nothing to download), and init no longer calls its own recorded pick "your setting". - The Agent UI status resolves the default once, before the probe whose catch-all would report a corrupt config as "Lemonade not running". - SKILL.md no longer names the removed `lemonade-server serve` and states the v2026.39.1 floor for Qwen3.8 Flash; the SDK specs describe the resolved default.
464bc5f to
e3d415e
Compare
|
Closing: we're going with the Qwen 3.8 models Fireworks serves instead of running Qwen3.8 Flash locally. |
Lemonade switched from semver to CalVer in this release (11.9.0 ->
2026.39.1) and called out that anything parsing or comparing version
strings has to be updated.
Release CalVer already compared correctly by luck — 2026 > 11 — but
development builds are shaped 2026.39.0~12.abc1234, and int("0~12")
raises. All five of GAIA's version parsers swallowed that and returned
None, which every caller reads as "can't tell" and deliberately does
not block on. The gate would have been silently off for every candidate
build rather than failing loudly. Each parser now keeps its components'
leading digits.
Also refreshes the embeddable SHA-256 pins, which are keyed by a
filename containing the version and so go stale on every bump.
The auto-bump workflow never refreshed those digests, so the next
scheduled bump would have shipped stale pins and a red PR. It now
rewrites them from the release API's digest field, and the cheap shell
gate checks the four embeddable assets and their digests before paying
for the LLM step.
Verified against a real v2026.39.1: cold embedded install (download,
checksum, unpack), server start, and a chat completion through
LemonadeClient on Gemma-4-E4B-it-GGUF.
Co-Authored-By: Claude Opus 5 <[email protected]>
Adding the module-level `import re` for CalVer parsing turned the function-local `import re as _re` into a reimport, which pylint treats as a critical error. The label-stripping call now uses the module import. Co-Authored-By: Claude Opus 5 <[email protected]>
The flagship agent keeps its own copy of the version comparison, and the first pass of this change missed it. It reads /api/v1/health's version verbatim — nothing normalizes the CalVer dev suffix away first — so on a development build it returned None and the readiness row rendered "unknown", leaving the check off on the agent most people run. That is the exact failure this change exists to remove. LemonadeInfo.version_tuple gets the same treatment. It is shielded today because check_installation fills version from get_installed_version, which already strips the suffix, but that invariant lives two files away and callers build LemonadeInfo directly. test_lemonade_calver.py now parametrizes every copy, so fixing only some of them fails there — it could not have caught this miss before. Also refreshes three version references the docs checker cannot see: it only scans docs/ and cpp/. The macOS uninstall provenance is updated after verifying against the real v2026.39.1 .pkg that every path and pkgutil identifier it names is unchanged. Co-Authored-By: Claude Opus 5 <[email protected]>
The flagship tests added with the last commit imported gaia_agent, which is absent in the unit-test CI job: the root conftest puts a hub agent on sys.path only when its package already resolves somewhere, and that job installs nothing but gaia[api]. It passed locally because a sibling worktree had the agent editable-installed. Five failures on py3.10 and py3.12, one on the macOS smoke job, which stops at the first. conftest's stated answer is importorskip, but a skip would switch this file off in CI — the failure it exists to catch. Both hub-agent parsers are small and pure, so compile them out of their source with ast instead: no package import, no skip, still reading the real code. Also covers the Lemonade client's gate, which is a closure and was the last copy not exercised directly. Doing so turned up a second bug in the pre-fix code: an unparseable version fell into an except-branch that returns "compatible", so an OLD dev build like 9.1.0~4.deadbee was waved through rather than merely reported unknown. Verified in a venv built to match the CI job, with neither hub agent importable: 35 pass there, and 8 still fail against the unfixed tree. Co-Authored-By: Claude Opus 5 <[email protected]>
A 128 GB Strix Halo ran the same 4B Gemma as a 16 GB laptop. `gaia init` now reads the machine's model memory and free disk from Lemonade's /system-info and sets up Qwen3.8-Flash-Next (125B MoE, 6B active; UD-IQ3_XXS, 82 GB) where it fits, Gemma 4 E4B everywhere else. The pick is recorded as default_model, which every agent now resolves through instead of a hard-coded Gemma; a default_model the user set always wins. - model_fit: one fit rule (size x1.1 + 2 GB against the llama.cpp memory pool, download against free disk), mirrored by the TUI and pinned by a drift test against tui/internal/lemonade/recommended_models.json. - Qwen3.8 Flash is a custom user. model: registration now carries mmproj, vision and reasoning. Needs llama.cpp qwen4exp support, first bundled in Lemonade v2026.39.1 (amd#4169). - Registry lookups tolerate the user. prefix Lemonade strips when listing, so a picked listed id still loads at the 64K window. - Init profiles whose agents follow default_model swap Gemma for the machine's pick; vlm, email and sd keep Gemma.
The local picker only showed models already downloaded, so there was no way to discover or fetch anything else from the TUI. It now lists every chat model Lemonade offers, with a starred Recommended group first (Qwen3.8 Flash, Gemma 4 E4B, the Qwen3 Coder models; tested Fireworks models for that provider). Each local row says whether it is downloaded, how big it is, or why it won't fit this PC. Selecting a model that fits downloads it in the panel with progress, then switches to it; a model that doesn't fit cannot be downloaded, and if Lemonade can't report the PC's memory no download is allowed at all. Fireworks lists Qwen3.8 Flash as unavailable until the account has a deployment for it, since Fireworks does not serve it per-token. The setup gate's gaia init timeout grows from 60 min to 5 h so the 82 GB first download on a Strix Halo is not killed mid-way.
A 128 GB Strix Halo could still end up downloading and loading Gemma, or with a default that was never downloaded; this makes every path agree. - The idle-server preload loaded Gemma with auto_download, so gaia init's verify step and Agent UI startup pulled a model nobody used. It now seeds the machine's default (Gemma only when that default is a cloud model). - default_model is recorded only once the picked model is on disk, so a declined download or --skip-models no longer leaves agents pointed at a missing model. - A local model picked in the TUI replaces the hardware default in the setup gate: setup downloads embedders only, and the gate checks the pick is downloaded. Picking Gemma on a big PC no longer forces 82 GB. - A Claude or cloud default_model is not a local download; the local chat model follows the hardware instead. A user default_model that will not fit is refused with the command to change it. --check raises on a corrupt config instead of treating it as unset. - The minimal profile keeps Gemma; it promises a ~3 GB setup. - The Agent UI's readiness banner, download progress and startup preload follow the machine default and match user. models by their listed id. - Fit margin is now size x1.05 + 1 GB: x1.1 + 2 GB marked Gemma 4 E4B as not fitting a 16 GB iGPU laptop whose Lemonade pool is ~8 GB, where it runs today. Qwen keeps ~5 GB over its weights for the 64K window.
With the system installer gone nothing imports gaia.llm.lemonade_embedded at collection time, so pyfakefs unloaded it after the first purge-guard case and the second case patched an orphaned class.
The expected substrings use "/" but Windows prints "\", so the dry-run test could never pass there.
On a first run, callers that start at the same moment (Agent UI boot plus the first chat, or several sidecars) each saw an idle Lemonade server and sent their own `/load` — up to two parallel multi-GB downloads and two cold loads of the same model. Now the first caller loads the model and the rest wait for it, then pick up the result; if that load fails, each waiter retries and reports its own error instead of hanging. The existing concurrency test couldn't catch this because its mock returned "loaded" on the second status read; it now blocks in `load_model` and keeps the server idle until the load finishes, so it fails on `main` (2 loads) and passes here. <details> <summary>🔍 Technical details</summary> - `LemonadeManager._preload_in_flight` (a `threading.Event`) is set before `_try_preload_with_ctx` releases the lock and cleared in its `finally` after re-acquiring. `ensure_ready` waits on it, with the lock released, at the top of its locked block. - Overlap with open PRs: amd#4176 renames `DEFAULT_MODEL_NAME` → `model` inside `_try_preload_with_ctx` and amd#4193 adds a daemon start call after the "Initializing Lemonade" log in `ensure_ready`. Neither changes the lock handling, so they shouldn't conflict beyond possible adjacent-line rebases. </details> ## Test plan - [x] `pytest tests/unit/test_lemonade_manager_preload.py -k concurrent`: fails on `origin/main` (`load_model` called 2 times), passes with the fix (5/5 repeated runs) - [x] `pytest tests/unit/test_lemonade_manager_preload.py`: 23 passed, including the new `test_failed_preload_releases_waiting_callers` - [x] Neighbouring `LemonadeManager` suites (`test_chat_preflight`, `test_hardware_selection`, `test_llm`, `test_multi_device_wiring`, `test_npu_device_support`, `test_base_agent_lemonade_api_key`, `test_init_verify_ctx_display`, `chat/ui/test_server`, `chat/ui/test_chat_helpers`): 333 passed - [x] black / isort / pylint clean on the changed files Fixes amd#4212 --------- Co-authored-by: Kalin Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
# Conflicts: # hub/agents/gaia/npm/SKILL.md # hub/agents/gaia/python/gaia_agent/server.py # src/gaia/installer/init_command.py # src/gaia/llm/lemonade_manager.py # tests/unit/test_init_command.py
# Conflicts: # hub/agents/gaia/npm/SKILL.md
Main ranked the benchmark's best Fireworks models in the TUI picker while this branch moved the picker onto recommended_models.json. The ranking now lives in that file as the Fireworks recommendations, so RecommendedModels, Rank and the picker's ★ group read one list; cloud recommendations also match their account-path ids.
|
I read this end to end rather than deferring it as "too large", and size turns out not to be the issue at all. It merges cleanly into You reversed direction on this yourself and never said what changed back. On 24 Sep you closed it with "we're going with the Qwen 3.8 models Fireworks serves instead of running Qwen3.8 Flash locally", then reopened it four minutes later with no note. That is the whole premise of the PR — whether GAIA runs an 82 GB model locally on a big machine at all. Nobody else can settle it, and everything below is moot if the answer is Fireworks. A default-model change needs an agent eval, and there is none. CLAUDE.md names the default LLM explicitly in the list of changes that require One piece of good news: your "merge #4169 first" instruction is stale. #4169 was closed unmerged, but the Lemonade bump landed anyway — 🔍 Technical detailsMerge and tests. Clean merge onto Still open from the 26 Sep review: the download-cancel race in A decomposition that would unblock most of this without the eval. Relationship to #4265: What I need from you: the direction call first (local Qwen3.8 Flash, or Fireworks-served), then either a Strix Halo eval or the split above. I am not merging a default-model change on unmeasured quality. |
_gaia_home() resolves the override, which on Windows adds a drive letter, so a rootless /srv/gaia-alt never compared equal there.
amd#4325) Agent UI Settings showed a red "Processor: darwin" on every Mac and flagged Linux machines and most Ryzen AI laptops as unsupported. The check still required a Ryzen AI Max or a 24 GB Radeon, the bar for the old Qwen3.5-35B default, but the default model is now the 4B Gemma. Nothing acts on that verdict, and memory fit is already covered by the Memory row and the per-agent memory warning. So the verdict is removed, and the Processor row now just names the real CPU (e.g. "Apple M4" instead of "darwin"). The silent `except Exception: pass` around the check is gone too. Overlap: amd#4176, amd#4265 and amd#4309 also edit `src/gaia/ui/routers/system.py`, but not the device block, so any conflict is textual only. ## Test plan - [x] Backend tests fail before the fix and pass after: all 7 new `tests/unit/test_device_check.py` tests and the new `test_system_status_names_the_processor_without_a_support_verdict` failed on `main`, and all pass with the fix. - [x] `GAIA_HOME=<tmp> GAIA_DAEMON_HOME=<tmp> python -m pytest tests/unit/chat/ui/ tests/unit/test_device_check.py -q`: 1038 passed. - [x] Agent UI, run with Node 22 from `src/gaia/apps/webui`: `npx tsc --noEmit -p .` is clean and `npx vitest run` passes 398/398. - [x] On a Mac, `GET /api/system/status` against a real `create_app()` returns `processor_name: "Apple M4"` and no `device_supported` field. On `main` it returned `"darwin"` / `false`. - [x] black, isort, and pylint (errors-only config) pass on the changed Python files. - [ ] Open Settings in the Agent UI on Windows and Linux and confirm the Processor row shows the CPU name without the warning colour. Fixes amd#4230 --------- Co-authored-by: Kalin Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
pyfakefs' teardown calls os.getuid() while the test's faked "linux" platform is still active, which raises on Windows; the tests only read one file, so a real tmp dir covers them without the fake filesystem.
The fake-spawn helper let shutdown reach the real tree-kill: on Windows its taskkill went through the patched Popen and crashed, and on POSIX it sent SIGTERM to process group 4242, whatever that is on the machine. Stub the tree-kill and the group probe in the helper.
A second test patches Popen itself rather than using the fake-spawn helper, so its shutdown still ran taskkill (Windows) or killpg (POSIX) against the fake pid. An autouse fixture now passes only real Popen children to the tree-kill.
Windows' os has neither, so monkeypatch.setattr raised before the test ran; raising=False creates the stand-in instead.
The stripped env set only HOME, but Windows resolves the home dir from USERPROFILE, so the child crashed at import before printing the refusal.
The refusal prints an emoji; on Windows the parent decoded the pipe as cp1252 and got None for stdout. Pin the child's and the reader's encoding to UTF-8.
reap_stale deliberately leaves a dead leader's survivors alone on Windows (a documented gap: no process group to kill), so asserting a group kill there can only fail.
…them The fake daemon replied with a POSIX string while the resolver returned a Path, which Windows renders with backslashes, so the CLI saw a mismatch that no real daemon would report.
# Conflicts: # hub/agents/gaia/npm/SKILL.md
|
Triaged this alongside #4265 rather than separately, and the short version is that #4265 already contains every commit on this branch — so the two are one decision, not two, and keeping both open is part of why they kept getting deferred together. The decision itself is untouched and still open: does GAIA run Qwen3.8 Flash Next locally on a big machine, or take the Fireworks-served route you named when you closed this on 24 Sep? That reversal is still the premise and still unexplained. One thing worth separating out — the picker half does not depend on that answer. Roughly 1,900 of the 2,993 added lines are the picker rebuild, the capacity read, the honest "won't fit" / "fit unknown" refusals and the Python↔Go drift test. None of it changes a default, none of it needs an eval, and it is a strict improvement over main's "you can only pick what you already downloaded". That half could land while the model question stays open. 🔍 Technical detailsContainment: 34 on top, 5 of them non-merge: Two corrections to the review record, both in your favour:
A collision nobody has flagged — #4385 (open) touches the same three files: Two of those are the literal core of the picker half. #4385 adds an |
…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]>
|
Closing as contained in #4265 — every commit here is already an ancestor of that branch, so nothing is lost and this reopens in one click if the Qwen question resolves the other way. |
|
Direct product decision: Qwen3 30B A3B Instruct 2507 is now the local default (not Qwen3.8 Flash) — Flash stays a supported, switchable option. Updated this branch accordingly:
Still outstanding, unchanged from the original PR: the Local verification: full |
A 128 GB Strix Halo ran the same 4B Gemma as a 16 GB laptop, and the TUI could only pick models that were already downloaded. Now
gaia initchecks the PC's model memory and disk through Lemonade and adds Qwen3.8 Flash Next (125B MoE, 6B active, 82 GB) as the chat model where it fits, and keeps Gemma 4 E4B (still needed for vision) everywhere. The TUI's/providerpicker lists every Lemonade model: a ★ Recommended group comes first, and each row shows its size, "downloaded", or why it won't fit. Models that fit download in the panel; models that don't fit can't be downloaded.Stacked on #4169. Merge that first. Qwen3.8 Flash needs llama.cpp's
qwen4expsupport, first bundled in Lemonade v2026.39.1. The current pin, 11.8.1, can't load it.Fireworks is unchanged. Qwen3.8 Flash isn't served per-token there (it needs a paid on-demand deployment), so this PR adds nothing for it; Fireworks still suggests Gemma 4 31B IT first.
Opting out:
gaia config set default_model Gemma-4-E4B-it-GGUFkeeps a big machine on Gemma. Picking Gemma with p at the TUI setup screen does the same for one session. Adefault_modelthe user set is never overwritten, and one that won't fit is refused with the command to change it.Expect a reload after images on a big machine. Lemonade holds one model at a time, and vision and document-image extraction still load Gemma by name. On a PC running Qwen3.8 Flash, the first image in a session swaps out the 82 GB model, and the next chat turn reloads it. Routing vision to Qwen (which is vision-capable) is a follow-up that needs its own eval.
Merge gates: the two unchecked Strix Halo items below. Nothing here has run on the hardware this is for, and a default-model change needs an agent eval.
Test plan
user.model registered, loaded and chatted by its prefixed id on v2026.39.1 (HTTP 200).gaia init --checkon this Mac still asks for Gemma (no default change for small machines).python util/lint.py --all,go vet ./...,go test ./...pass.gaia initpicks Qwen3.8 Flash, downloads it, and recordsdefault_model.gaia tuithen chats on it at the 64K window. On Linux, raise the GTT limit first: at the kernel default Lemonade reports ~63 GB and Gemma is kept, with the reason printed. Lemonade must be v2026.39.1+ (gaia init --force-reinstallupgrades an older one).gaia eval agent --category rag_quality --agent-type docon Qwen3.8 Flash vs the Gemma baseline. Couldn't run here: the model doesn't fit this Mac, and Fireworks doesn't serve it.🔍 Technical details
src/gaia/llm/model_fit.py, mirrored intui/internal/lemonade/capacity.go):size × 1.05 + 1 GBmust fit Lemonade's own llama.cpp memory pool. For an AMD iGPU that'svram_gb + virtual_mem_gb, matchingselect_gpu_memory_pool; otherwise dGPU VRAM, the Metal working set, or system RAM. The download must also fitmodel_storage.free_bytes. The constants and the Qwen registration live inrecommended_models.json;tests/unit/test_model_fit.pyfails if Python and Go drift.resolve_default_chat_model()(configdefault_model, else Gemma) replaces the hard-coded fallback in the baseAgent,ChatAgent, the flagship's/v1/gaia/initprobe,LemonadeManager's idle-server preload, and the Agent UI's readiness banner.default_modelis recorded only after the model is on disk. Theminimal,vlm,emailandsdprofiles keep Gemma.user.XasX, so registry lookups now tolerate the prefix. Otherwise a picked listed id would load at the 32K floor instead of 64K.gaia initcap goes from 60 min to 5 h, enough for 82 GB at about 5 MB/s.gaia inithasn't set up.xhighreasoning effort. If turns are slow on hardware, sendchat_template_kwargs: {reasoning_effort: "medium"}, which also needs an eval.