Skip to content

feat(models): support Qwen3 30B A3B and compare it with Qwen3.8 Flash - #4265

Closed
kovtcharov wants to merge 82 commits into
amd:mainfrom
kovtcharov:claude/qwen3-30b-option
Closed

kovtcharov wants to merge 82 commits into
amd:mainfrom
kovtcharov:claude/qwen3-30b-option

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #4176. Until that merges, this diff includes its commits; review only the last commit here.

On big-memory PCs (a 128 GB Strix Halo) GAIA had one large model, Qwen3.8 Flash, and no measured alternative. Qwen3-30B-A3B-Instruct-2507 is a 17 GB Lemonade built-in that reportedly generates 2–5x faster on the same hardware but reads text only. This PR makes it a supported, highlighted model you can switch to, and adds a script that measures both on your own machine, so the Strix Halo default is decided by data rather than published benchmarks. The default does not change here; flipping it is a one-line change once the numbers are in.

The HRX build (Qwen3-30B-A3B-Instruct-2507-HRX) is deliberately not a supported option yet. It runs on Linux only, and upstream reports it failing past 2K tokens of context, while GAIA runs at 32K–64K. Its decode speed is no better than the llama.cpp build of the same weights. The script can still measure it on Linux.

Test plan

  • pytest tests/unit/test_compare_local_models.py tests/unit/test_model_fit.py tests/unit/test_init_command.py; go test ./internal/lemonade/ ./internal/ui/providers/ ./internal/ui/preflight/
  • Real run on an Apple M4 (the only model it can hold): python util/compare_local_models.py --models Gemma-4-E4B-it-GGUF --ctx 65536 measured load, speed at every prompt size, and 4/4 tool calls
  • On a 128 GB Strix Halo: python util/compare_local_models.py --tasks core, which compares Flash and the 30B model on speed, tool calls and agent quality
  • Optionally on Linux: python util/compare_local_models.py --models Qwen3-30B-A3B-Instruct-2507-HRX Qwen3-30B-A3B-Instruct-2507-GGUF
🔍 Technical details
  • Qwen3-30B-A3B-Instruct-2507 is a Lemonade built-in in both v11.8.1 and v2026.39.1: llama.cpp, Q4_0, 17.4 GB, tagged tool-calling. It is pulled without registration fields, because passing recipe for a built-in gets a 400 (gaia init --profile npu fails with status 400 (missing user. prefix for model name) #1655).
  • Published Strix Halo decode speeds: 30B 85–90 tok/s (llama.cpp Vulkan and HRX); Flash UD-IQ3_XXS 15–39 tok/s. Nobody has measured the IQ3_XXS quant's effect on Flash's quality, which is why the script runs the agent task suite.
  • Memory: Flash at 64K needs ~88 GB, the 30B ~25 GB. The script unloads each model before loading the next.
results.md from the Apple M4 run (Gemma 4 E4B, the only model it can hold)
Context size 65536. Speeds are Lemonade's own /stats for each request.

| Model | Load | Short: TTFT / gen | 8K: prompt / gen | 32K: prompt / gen | Tool calls | Tasks passed | Quality |
|---|---|---|---|---|---|---|---|
| Gemma-4-E4B-it-GGUF | 4.4 s | 0.36 s / 28.1 t/s | 319.7 t/s / 26.4 t/s | 208.1 t/s / 15.3 t/s | 4/4 (64.0 s) | — | — |

That run measured the filler's real size at 13.4K and 53.6K tokens rather than 8K and 32K; the filler was re-sized from those counts afterwards. A rerun on the same Mac then hit Metal compute errors because another Lemonade instance held a second copy of Gemma. The script reported the failed requests and exited non-zero, as intended.

Kalin Ovtcharov and others added 18 commits September 24, 2026 13:56
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.
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.
…ions

Fireworks does not serve Qwen3.8 Flash per-token, so its row could only ever
say "deploy it first". Fireworks goes back to exactly what it did before this
PR: its suggested Gemma 4 31B IT first, then everything the account exposes.
The recommended list, fit check and download flow stay local-only.
The bump workflow told its bot to copy the release API's digests as
published, which are "sha256:<hex>", while the installer compares the
pins against hashlib's bare hexdigest(). The next automated bump would
have broken every embedded install. The query now strips the prefix, and
a unit test fails if any pin is not 64 lowercase hex characters.
A 128 GB Strix Halo still on Lemonade 11.x would have been handed an 82 GB
download that its bundled llama.cpp cannot load (qwen4exp arrived in
v2026.39.1), because `gaia init --yes` keeps an older Lemonade that meets
the profile minimum. Qwen3.8 Flash now carries min_lemonade_version; gaia
init skips it on an older or unknown server and says to upgrade with
`gaia init --force-reinstall`, a user default_model is refused the same
way, and the TUI picker marks it "needs newer Lemonade".

Also: when Lemonade cannot report GPU memory, gaia init now prints why the
larger model was skipped instead of only the model it kept.
On a 16 GB Mac running Lemonade 11.8.1, gaia init's only reason for
skipping Qwen3.8 Flash was "upgrade Lemonade", which would not have made
an 82 GB model fit. Fit is now judged first everywhere (hardware pick, a
user default_model, the TUI picker); the version reason appears only for a
model the PC could hold.
Lemonade requires 77.2 GiB (82.9 GB) to pull this checkpoint: three model
shards plus the 0.9 GB mmproj. GAIA sized it at the shards alone (81.96 GB),
so a disk with 82.0-82.9 GB free passed GAIA's fit check and was then
refused by Lemonade after the smaller models had already downloaded. Found
by running gaia init against a real Lemonade v2026.39.1.
…the UI

Addresses review on amd#4176.

- A timeout or HTTP error from /system-info aborted `gaia init --check`
  (exit 2), so the TUI said "could not determine" to a user whose models
  genuinely were not downloaded. An unanswered request now keeps the floor
  model with the reason, as an unreadable report already did; a failed
  /health read counts as "version unknown".
- --check no longer refuses a user's default_model that won't fit or that
  the server cannot load; it reports it missing so the TUI offers setup,
  and setup refuses it loudly before downloading.
- A larger default whose download size GAIA does not know is skipped
  instead of being judged as 0 GB, which would fit every PC.
- The Agent UI status only named the machine's default once a model was
  loaded; with nothing loaded it sent the Gemma schema default, so the UI's
  load and download actions targeted Gemma on a PC set up for Qwen.
- Removed the dead _DEFAULT_MODEL_NAME and repointed the two comments that
  cited it.
Big-memory PCs (a 128 GB Strix Halo) had one large model, Qwen3.8 Flash,
with no tested alternative. Qwen3-30B-A3B-Instruct-2507 is a Lemonade
built-in (17 GB) that generates 2-5x faster there but reads text only.
It is now a known, sized model, highlighted in the TUI picker and
switchable with `gaia config set default_model`.

util/compare_local_models.py measures candidates on the PC itself, one
at a time: load time, time to first token, prompt and generation
tokens/s at short, ~8K and ~32K prompts, tool-call correctness, and
optionally the flagship's scored task suite. It never downloads a model
that does not fit, and exits non-zero when any request fails. The
default is unchanged until those numbers come in from real hardware.
@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes llm LLM backend changes cli CLI changes tests Test changes performance Performance-critical changes cpp agents agent::email Email agent changes tui Go terminal UI (gaia-tui) labels Sep 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

This adds Qwen3 30B A3B as a second supported big-PC chat model and a script that measures it head-to-head against Qwen3.8 Flash on your own machine. Nothing changes for existing users — the default model, the gaia init download set and the agent profiles are all untouched, so the only user-visible change is one extra row in the terminal UI's model picker and a model you can opt into by name.

The one thing worth fixing before merge: the user-facing docs state the speed win as settled fact while the PR itself says it is unmeasured. The changelog tells users the new model is "faster than Qwen3.8 Flash Next" and the CLI reference says it "generates several times faster" — but the Strix Halo measurement is still an unchecked box, and the script in this PR exists precisely to produce that number. Hedge both lines to "reported" until the run lands, or land the run first. It costs nothing now and avoids a claim the project would have to walk back.

Two smaller things: the providers guide still enumerates the ★ recommended models as "Qwen3.8 Flash Next, Gemma 4 E4B, and the Qwen3 Coder models", which is no longer what the picker shows; and the new model's size appears as two different numbers in two places.

Real-world evidence

No evidence bundle was produced for this run, so the verdict rests on static review plus what I could execute here. I ran the Go tests for the changed terminal-UI packages in this checkout and they pass. The Python unit tests could not be run — pytest is not installed in this reviewer environment — and no local inference is available here, so neither the script's real measurements nor the picker rendering were exercised. The PR's own test plan reports a real script run on an Apple M4 (load, speed at every prompt size, 4/4 tool calls) but does not include the output; pasting the generated results.md table would make that verifiable, and it is the only artifact this PR is really about. The Strix Halo comparison that motivates the change is still pending, which is consistent with the PR not changing the default.

🔍 Technical details

Scoped to the final commit (f8a71ea3), as the description asks — the rest of the diff belongs to #4176.

Issues

🟡 Unmeasured speed claim shipped as fact (hub/agents/gaia/npm/CHANGELOG.md:17, docs/reference/cli.mdx:252)

The PR body is explicit that the 2–5x figure is reported, not measured, and that util/compare_local_models.py exists to settle it on real hardware. Both user-facing docs drop the hedge. src/gaia/llm/lemonade_client.py:236 gets this right ("settled by util/compare_local_models.py on real hardware") — match it.

- Qwen3 30B A3B Instruct 2507 is a supported chat model on the same big-memory
  PCs: reported to generate faster than Qwen3.8 Flash Next, text only. Switch with
  `gaia config set default_model Qwen3-30B-A3B-Instruct-2507-GGUF`.

🟡 The providers guide's recommended list no longer matches the picker (docs/guides/ai-providers.mdx:34)

recommended_models.json gained the 30B entry, but the guide still says the ★ list is "Qwen3.8 Flash Next, Gemma 4 E4B, and the Qwen3 Coder models". CLAUDE.md's rule is that a change updates every doc describing it; this is the doc that enumerates that list. hub/agents/gaia/npm/README.md and SPEC.md name no models, so nothing is owed there.

🟢 Two sizes for one model (tui/internal/lemonade/recommended_models.json:31 vs src/gaia/llm/lemonade_client.py:602)

The picker note says "~19 GB" while the fit check uses size_gb=17.4 (GiB vs GB, most likely). Also worth a word: the size_gb field comment at lemonade_client.py:506 says built-ins leave it None because Lemonade's catalog reports their size — this entry deliberately sets it so compare_local_models.py can gate the download, which the comment now contradicts.

🟢 Numeric tool arguments returned as strings score as failures (util/compare_local_models.py:221)

_loose lowercases strings and passes everything else through, so a model that emits "duration_minutes": "45" — common, and accepted by every real tool layer — is recorded as a wrong call. Since tool-call correctness is one of the numbers deciding the default, a false negative here is expensive.

def _loose(value: Any) -> Any:
    if isinstance(value, str):
        stripped = value.strip()
        return int(stripped) if stripped.lstrip("-").isdigit() else stripped.lower()
    return value

🟢 "Never downloaded" holds only for models in MODELS (util/compare_local_models.py:16, :319)

if size: means a model with no MODELS entry skips the fit check entirely and goes straight to ensure_model_downloaded. The script's own usage example does this — --models Qwen3-30B-A3B-Instruct-2507-HRX is not a known model, so the docstring's "A model that does not fit this PC … is reported and skipped, never downloaded" does not apply to it. Either say "a known model", or refuse an unsized model unless a flag opts in.

🟢 Task-suite errors don't reach the exit code (util/compare_local_models.py:438)

broken checks tasks["error"], which run_tasks only sets when the scorecard is missing. A suite that produced a scorecard with N errored tasks exits 0. summarize() already returns errors; surfacing it in the table or the exit check would match the script's stated "exits non-zero when any request fails".

Strengths

  • The measurement script is honest in the ways that matter: a fresh nonce per prompt so prefill can't be a cache hit, auto_download=False on every request so the explicitly loaded ctx_size is what actually gets measured, an unload between models, and a non-zero exit when a request fails rather than a table with quiet holes.
  • Adding the model is genuinely inert. The new MODELS key is in no AGENT_PROFILES entry, so get_required_models and gaia init are unaffected, and DEFAULT_MODEL_LADDER is untouched — the "default does not change here" claim checks out.
  • pull_kwargs() returning {} for the built-in is pinned by a test that names gaia init --profile npu fails with status 400 (missing user. prefix for model name) #1655, so the recipe-on-a-built-in 400 can't come back by accident.
  • The Python/Go drift test was extended alongside the new entry rather than after the fact, and the tool-call checker is tested against the failure shapes that actually occur (prose instead of a call, malformed JSON arguments, arguments as an object).

Kalin Ovtcharov added 21 commits September 25, 2026 23:14
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.
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 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
kovtcharov-amd pushed a commit to kovtcharov/gaia that referenced this pull request Sep 29, 2026
…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]>
@itomek

itomek commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Closing this, and not because the work is wrong. The comparison script is the right instinct — settle the default with numbers off the machine, not published benchmarks — the 30B registration really is inert, and the doc hedges and the two scoring nits from the earlier reviews are all fixed.

What changed is the merge path. Main's ranked-model display was rebuilt earlier today and this branch replaces the same lines with a different design, so those files need rewriting, not rebasing. The last CI run here is red and three days old. And #4176 closed this morning as contained here, so this branch now carries two separate things at once.

The second is the model question, unchanged since 24 Sep: on a 128 GB machine, the 82 GB local Flash or the Fireworks-served Qwen? Nobody has answered it and no eval has run against it. That belongs in an issue, not parked on a branch.

I'd like both halves back separately, and the split already written up on this PR is the right one:

  1. The fit rule, the capacity read, the picker refusals and the comparison script — off current main, layered on top of the new measurement display rather than replacing it. No default change, no eval needed; it merges on its own evidence.
  2. The Qwen default question as an issue, with the Strix Halo numbers your script exists to produce attached to it.

Nothing is lost here. claude/qwen3-30b-option is on your fork and stays exactly as it is; this reopens in one click.

🔍 Technical details

State: 82 commits ahead of main (41 non-merge), 47 behind, 45 files, +3795/−200. mergeStateStatus: DIRTY. Head is kovtcharov/gaia:claude/qwen3-30b-option at 282c006ca.

CI: last run 26 Sep. Unit Tests (Linux, py3.12) (step Run unit tests), Test Gaia Agent, the Windows and macOS smoke lanes and Installers / Smoke-test installer (linux) all report step-level conclusion: failure — real failures, not cancellations. 47 commits behind now, so it isn't a signal anyone can act on ahead of the rewrite below.

Conflicts — git merge-tree --write-tree origin/main <head> exits 1 on four paths:

hub/agents/gaia/npm/CHANGELOG.md
tui/internal/lemonade/cloud.go
tui/internal/ui/providers/model.go
tui/internal/ui/providers/model_test.go

The three Go ones are design collisions with #4414 (9a3054455, 29 Sep 01:30 UTC — the last commit to touch cloud.go), not rebase noise:

  • cloud.go — feat(tui): show the sourced measurement behind each ranked Fireworks pick #4414 added Evidence to Recommendation, plus EvidenceSource, Evidence(id) and TestEvidenceIsTranscribed (cloud_test.go:199). This branch deletes the literal RecommendedModels slice and repopulates it in recommended.go init() with Recommendation{ID: r.ID, Note: r.Note} — Evidence is never copied, so Evidence(id) returns "" for every model and the "Measured:" line silently disappears. TestEvidenceIsTranscribed then fails hard on fireworks.glm-5p3-flash: (r.Evidence != "") != ok → false != true. Fixing it means carrying evidence plus its source through recommended_models.json.
  • model.go — both sides rewrite the same block, right after strings.Join(details, " · "). Main appends "Measured: "+evidence (:467-468); this branch appends the recommendation Note and "Can't use: "+Reason (:653-657).

What main has of this PR: nothing.

$ git ls-tree -r --name-only origin/main | grep -E 'model_fit|compare_local_models|recommended_models|recommended\.go|capacity\.go'
(no output)

$ git grep -l "compare_local_models\|check_fit\|RecommendedFor\|recommended_models" origin/main
tests/unit/test_gateway.py        # :373 test_recommended_models_sort_first — unrelated

$ git grep -n "DEFAULT_MODEL_LADDER\|recommend_default_chat_model" origin/main
(no output)

$ git grep -n "Selectable()\|CheckFit\|WontFit" origin/main -- tui/
(no output)

Nine files here are new against main: model_fit.py, capacity.go, catalog.go, catalog_test.go, recommended.go, recommended_models.json, compare_local_models.py and the two new test files — 2,723 added lines across the reusable set.

Why the eval gate attaches: this branch contains #4176, so relative to main it does move the default off Gemma on a big machine — DEFAULT_MODEL_LADDER and recommend_default_chat_model don't exist on main. recommended_models.json puts Qwen3.8-Flash-Next-GGUF at size_gb: 82.86, which is the number the product call turns on.

@itomek itomek closed this Sep 29, 2026
kovtcharov-amd added a commit to kovtcharov/gaia that referenced this pull request Sep 29, 2026
Cherry-picked from amd#4265 (f8a71ea) to register the model before
flipping the local default to it.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Closing — this PR's content is now folded into #4176, and its premise (measure both models before deciding) is superseded by a direct product decision.

#4176 has been updated to:

  • Fold in this PR's Qwen3 30B A3B registration and util/compare_local_models.py comparison script.
  • Make Qwen3 30B A3B (17.4 GB) the auto-selected local default wherever it fits — which, being much smaller than Qwen3.8 Flash's 82.86 GB, now reaches most dGPU and CPU-only PCs with enough RAM, not just a 128 GB-class Strix Halo.
  • Keep Qwen3.8 Flash Next registered and switchable (gaia config set default_model user.Qwen3.8-Flash-Next-GGUF), but no longer auto-selected.
  • Sync every doc that described the old default (CLAUDE.md, ai-providers.mdx, cli.mdx, the npm package's CHANGELOG/SKILL, and the TUI's recommended_models.json) and fix the tests that assumed Flash-specific behavior (version floor, registration kwargs, fit boundary) now belongs to whichever model is actually configured.

Two small follow-up refinements from this branch (hedging the 30B speed claim as "reported" not "measured", and hardening the comparison script's tool-argument comparison) weren't carried over in this pass — worth a small follow-up PR against #4176's new state if still wanted, but not required for correctness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent::email Email agent changes agents cli CLI changes cpp devops DevOps/infrastructure changes documentation Documentation changes llm LLM backend changes performance Performance-critical changes tests Test changes tui Go terminal UI (gaia-tui)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants