Skip to content

chore(deps): bump Lemonade Server to v2026.39.1 - #4169

Closed
kovtcharov wants to merge 5 commits into
amd:mainfrom
kovtcharov:claude/lemonade-gaia-upgrade-da528b
Closed

kovtcharov wants to merge 5 commits into
amd:mainfrom
kovtcharov:claude/lemonade-gaia-upgrade-da528b

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Bumps the pinned Lemonade Server from v11.8.1 to v2026.39.1, which is the release where Lemonade switched from semver to CalVer. That switch is the reason this is more than a one-line pin bump: the release notes call out that anything parsing or comparing version strings has to be updated, and GAIA does that in five independent places.

Release CalVer happened to compare correctly already (2026 > 11). Development builds did not — they are shaped 2026.39.0~12.abc1234, and int("0~12") raises. Every one of GAIA's seven parsers caught that and returned None, which callers read as "can't tell" and deliberately do not block on, so the gate went silently quiet on every candidate build.

In the Lemonade client it was worse than quiet. Its handler returns compatible on a parse failure, so an old dev build like 9.1.0~4.deadbee was waved through as passing rather than reported unknown — the gate didn't just stop checking, it answered wrong. Each parser now keeps its components' leading digits, and test_client_gate_rejects_an_old_dev_build fails on the pre-fix tree.

Two further gaps this closes:

  • The embeddable SHA-256 pins go stale on every bump (they are keyed by a filename containing the version). Refreshed here, and verified two ways — hashed locally and cross-checked against the digests GitHub publishes.
  • The auto-bump workflow never refreshed those pins, so the next scheduled bump would have shipped stale digests and a guaranteed-red PR. It now rewrites them from the release API, and the cheap shell gate checks all four embeddable assets and their digests before paying for the LLM step.

tests/unit/test_lemonade_calver.py is new and covers all five parsers. It fails on the pre-fix code (5 failures) and passes after, so it is a real regression test rather than a restatement of the implementation.

Test plan

  • Cold embedded install of v2026.39.1 end-to-end — download URL, SHA-256 verification, unpack (gaia lemonade embedded install into an isolated GAIA_HOME, no warm cache)
  • Server starts and serves — /api/v1/health reports "version":"2026.39.1", and all_models_loaded (the schema GAIA depends on) is unchanged
  • Real inference through LemonadeClient on the new server — Gemma-4-E4B-it-GGUF loaded and completed correctly
  • All five version gates exercised against the live-reported string, plus the CalVer dev shape and a genuinely-old version (still correctly rejected)
  • Live upstream asset checks pass for the new pin — tests/integration/test_lemonade_release_assets.py (Windows/macOS/Linux installers) and test_lemonade_embeddable_assets.py (digests)
  • No regression: the Lemonade/installer/email suites produce an identical failure set before and after (26 pre-existing environmental failures on a box with no system-wide Lemonade)
  • python util/lint.py --black --isort clean on every changed file
  • CI green on Windows/Linux runners, where the pre-existing local failures do not apply

⚠️ Heads-up for the reviewer. Two upstream changes are not addressed here and may want follow-up: LEMONADE_ALLOWED_ORIGINS is deprecated in favour of an allowed_origins config/CLI option (auto-migrates with a warning for now), and extra_models_dir models in chat//embeddings//reranking/ are now listed per file instead of as one extra.<dir> model. Neither is referenced in this tree today, so this bump does not touch them.

Proposed follow-ups

Scoped from the release notes, issues only — nothing in this PR depends on them.

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]>
@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes llm LLM backend changes tests Test changes performance Performance-critical changes cpp agents agent::email Email agent changes labels Sep 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes — one gap, one line to close it.

This bumps Lemonade to v2026.39.1 and, more importantly, teaches GAIA's version gates to read the new CalVer format so they don't quietly stop checking on development builds. The diagnosis and the fix are both right, and the four refreshed SHA-256 pins match what the upstream release actually publishes — I checked them against the release API.

The gap: the flagship GAIA agent keeps its own copy of the version comparison, and it wasn't updated. It reads the version string straight from the running server, so on a development build its readiness check still reports "can't tell" instead of pass/fail — exactly the silent-gate failure this PR exists to fix, left in place on the agent most people run. The email agent's equivalent copy was fixed, which makes the omission easy to miss. The new test file is parametrized specifically to catch a partial fix, so adding this parser to that list is what stops it recurring.

Also worth a sweep before merge: two files outside the docs checker's reach still advertise Lemonade 11.8.1 to users, so the bump reads as incomplete to anyone who lands there. The checker only scans docs/ and cpp/, so this will recur on every future bump unless its scan list grows.

Real-world evidence

No evidence-bundle.md was produced for this run — the automated evidence stage didn't write one, so there is no CI-captured CLI/API transcript to relay.

What I could verify directly, and did: the four EMBEDDABLE_SHA256 values in this diff are byte-identical to the sha256: digests GitHub publishes for the v2026.39.1 embeddable assets, and all four assets plus both .msi installers are present on the release. That is the one claim in this PR a reviewer can check without hardware, and it holds.

The rest rests on the author's test plan (cold embedded install, /api/v1/health reporting 2026.39.1, real inference through LemonadeClient), which is specific and matches the surfaces touched, plus static review. The installer and inference paths need a real Lemonade install, so they couldn't be exercised here.

🔍 Technical details

Issues

🟡 The flagship agent's Lemonade version gate is still the strict parser (hub/agents/gaia/python/gaia_agent/server.py:362)

_version_meets_min there is a sixth independent copy of the same logic, and it still does int(p) per component. Its input is probe["version"], read verbatim from /api/v1/health (_probe_lemonade, server.py:412) — not normalized by _VERSION_RE — so it receives exactly the 2026.39.0~12.abc1234 shape this PR is fixing for. Verified:

gaia server.py parser on dev calver:     None
gaia server.py parser on release calver: (2026, 39, 1)

None → compatible: null → the readiness row renders "unknown" and the check is off, which is the failure mode tests/unit/test_lemonade_calver.py's module docstring describes. The email sidecar's identical copy (api_routes.py:394) was fixed; this one wasn't.

    try:
        got = tuple(
            int(re.match(r"\d+", p).group(0))
            for p in str(version).strip().lstrip("v").split(".")[:3]
        )
        want = tuple(int(p) for p in minimum.split(".")[:3])
    except (ValueError, AttributeError):
        return None

(needs import re at module scope.) Then add it to the parametrized list in tests/unit/test_lemonade_calver.py — that file's PARSERS comment says "so a fix applied to only some of them fails here", and right now it can't:

def _gaia_server_parse(version):
    """The flagship agent keeps its own copy too."""
    from gaia_agent.server import _version_meets_min

    return _version_meets_min(version, "10.2.0")

or expose the tuple parser directly and add it to PARSERS like the others.

🟢 tui/README.md:160 still says Lemonade 11.8.1

**Fireworks AI**, or **AMD LLM Gateway** through Lemonade 2026.39.1+. Paste a key into

util/check_doc_versions.py only scans docs/** and cpp/** (SCAN_PATHS, line 38), so tui/ is invisible to the gate that is supposed to make this class of miss impossible. Adding (PROJECT_ROOT / "tui", "**/*.md") to SCAN_PATHS would stop it recurring on the next bump.

🟢 .claude/agents/lemonade-specialist.md:102 still says "GAIA pins 11.8.1"

Same root cause (outside the checker's scan paths). Lower stakes — it's agent guidance, not user docs — but it's what the lemonade-specialist agent will tell the next contributor.

🟢 LemonadeInfo.version_tuple keeps the strict form (src/gaia/installer/lemonade_installer.py:83)

Same file, ~165 lines above the _parse_version this PR fixed, and it's the one that actually parses the installed version for _should_update (line 239) and _check_version_compatibility (init_command.py:1055). It's shielded today — check_installation populates .version from get_installed_version, which returns _VERSION_RE.group(1), already suffix-free — so this is consistency, not a live bug. Worth aligning anyway, since the shielding is a non-obvious invariant two files away and InitCommand._parse_version (which this PR did fix) only ever sees clean constants.

Strengths

  • The pins are verified, not asserted. All four digests match the release API exactly — I re-ran gh api repos/lemonade-sdk/lemonade/releases/tags/v2026.39.1 --jq '.assets[] | select(.name|test("embeddable")) | "\(.name) \(.digest)"' and got the values in the diff.
  • Guard 2b is the right shape for a fail-loudly repo. Refusing to bump when an embeddable asset has no sha256: digest means the workflow can never pin a hash it invented, and it fails on the free shell gate rather than inside the paid Claude step.
  • The test file is a regression test, not a mirror of the implementation. It pins the real strings a live server reports, covers "garbage is still None" so CalVer tolerance doesn't become a blanket pass, and asserts the semver→CalVer transition reads as an upgrade. I confirmed all its assertions hold against the new parser, including _VERSION_RE extracting 2026.39.0 from the dev-build CLI output.
  • The workflow prompt says what breaks and why, including "never carry over an old value, and never invent one" and the stop-don't-open-a-PR instruction for a missing digest — the right guardrails for an agent editing a security-relevant dict.

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]>
@github-actions

Copy link
Copy Markdown
Contributor

🟡 The flagship agent's version gate still breaks on CalVer dev builds — the one change the previous review requested hasn't landed.

hub/agents/gaia/python/gaia_agent/server.py is not in this push's changed files, and _version_meets_min at line 362 still does int(p) with no CalVer tolerance. A Lemonade dev build like 2026.39.0~12.abc1234 raises ValueError, the function returns None, and the readiness row renders "unknown" — the check is silently off for every candidate build. The email sidecar's identical copy was fixed in this same PR; this one wasn't. The new test file (test_lemonade_calver.py) also doesn't cover gaia_agent.server._version_meets_min, so the regression gate the PR adds wouldn't catch a future revert there either.

🔍 Technical details

hub/agents/gaia/python/gaia_agent/server.py:362:

# current (broken for CalVer dev builds)
got = tuple(int(p) for p in str(version).strip().lstrip("v").split(".")[:3])

Fix matches every other parser this PR updated:

import re  # already needed elsewhere in this file?
got = tuple(
    int(re.match(r"\d+", p).group(0))
    for p in str(version).strip().lstrip("v").split(".")[:3]
)

Then add a _gaia_server_parse entry to PARSERS in tests/unit/test_lemonade_calver.py so it's covered by the parametrized suite — the file's module docstring says "five independent places" but only four are tested.

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]>
@kovtcharov

Copy link
Copy Markdown
Contributor Author

Fixed the flagship agent's gate — that was a real miss, and the important one. Pushed in 34185aa.

The catch was right on the diagnosis too: that copy reads /api/v1/health's version verbatim, so nothing strips the CalVer suffix before it. Confirmed the failure and the fix directly rather than by inspection:

before:  '2026.39.0~12.abc1234' -> None      # readiness row renders "unknown", check off
after:   '2026.39.0~12.abc1234' -> True
         '9.1.4'                -> False     # still bites
         'not-a-version'        -> None      # tolerance is not a blanket pass

test_lemonade_calver.py now parametrizes every copy, including LemonadeInfo.version_tuple, which was a seventh one nobody had flagged. The suite fails 7 cases on the unfixed tree and passes on the fixed one, so it can now actually catch the partial fix it claims to.

I also took LemonadeInfo.version_tuple even though it's shielded today, for the reason given — the shielding is an invariant two files away, and callers construct LemonadeInfo directly.

One suggestion I did not take: tui/README.md:160.

That line reads "AMD LLM Gateway through Lemonade 11.8.1+". That's a feature-availability floor, not the pin — cloud provider routing landed in 11.8.1 and works on every release since. Rewriting it to "2026.39.1+" would tell users the feature needs a release three versions newer than it actually does, which is a worse error than the stale-looking number. tui/internal/lemonade/cloud.go:108 carries the same 11.8.1 floor in its 404 message, and docs/guides/ai-providers.mdx:63 says "requires Lemonade 11.8.1 or later" — all three are consistent and correct as they stand.

For the same reason I'd push back on adding tui/ to SCAN_PATHS: the checker would flag that floor on every future bump and pressure exactly the wrong edit. The checker already scans docs/, and it does not flag the ai-providers.mdx floor — its patterns target release URLs, package filenames and version tables, which is the right distinction. The real gap is narrower than "tui/ is unscanned", so I fixed the genuinely-stale references by hand instead:

  • .claude/agents/lemonade-specialist.md — "GAIA pins 11.8.1" was a true pin claim, now 2026.39.1. Good catch.
  • docs/reference/cli.mdx:1581 — sample output showing the embedded version; my local run prints 2026.39.1, so it now matches reality.
  • lemonade_installer.py:834 — the macOS uninstall provenance said "v11.8.1 .pkg BOMs".

On that last one I didn't just bump the number. I pulled the real Lemonade-2026.39.1-Darwin.pkg and checked the BOMs, because if the identifiers had moved, the uninstall instructions GAIA prints users would be silently wrong:

🔍 BOM verification
identifiers:  ai.lemonadeserver.server.{core,dev,Applications,Resources,Runtime,Unspecified}
paths:        ./Library/LaunchDaemons/ai.lemonadeserver.server.plist
              ./Library/LaunchAgents/ai.lemonadeserver.tray.plist
              ./Applications/lemonade-app.app
              ./usr/local/bin/{lemonade,lemond,lemonade-tray}

Every path and identifier the uninstall text names is present and unchanged in v2026.39.1, so the instructions are still correct and the provenance bump is honest.

On the evidence note — the installer and inference paths were exercised, just not in CI, since they need a real Lemonade. I ran a cold embedded install into an isolated GAIA_HOME (download → SHA-256 → unpack), started it, confirmed /api/v1/health reported 2026.39.1 with all_models_loaded intact, and completed a real generation through LemonadeClient on Gemma-4-E4B-it-GGUF. Issue #4172 proposes the CI job that would make this reproducible for a reviewer instead of resting on my word.

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]>
@kovtcharov

Copy link
Copy Markdown
Contributor Author

CI caught a real break in my last push, and fixing it turned up a worse bug than the one this PR started with. Pushed in 2e76eb0.

The break was mine. The five flagship tests I added imported gaia_agent, which isn't installed 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 on my machine because a sibling worktree had the agent editable-installed. Five failures on py3.10/py3.12, one on the macOS smoke job (it runs -x, so it stopped at the first).

conftest's stated answer is importorskip, and I didn't take it: a skip would switch this file off in CI, which is the "the gate stopped running and nothing said so" failure the file exists to catch. Both hub-agent parsers are small and pure, so they're now compiled out of their source with ast — no package import, no FastAPI, no skip, and it still reads the real code. 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.

The worse bug. Covering the Lemonade client's gate — the last copy not exercised directly, since its parser is a closure — showed my own description of the problem was too kind. I'd said an unparseable version makes the gate go indeterminate. In that copy it doesn't: the handler returns compatible, so an old dev build like 9.1.0~4.deadbee was waved through as passing. The gate wasn't just quiet, it answered wrong. I've corrected the PR body, since it changes the severity of what this fixes.

🔍 Verification

Every gate, on an old dev build, after the fix:

readiness          -> False
flagship agent     -> False
client gate        -> False      # returned True before
LemonadeInfo tuple -> (9, 1, 0)  # < (10, 2, 0)

Full tests/unit/ in the CI-matched venv: 6 failures before, 1 after — and that one is test_lemonade_asr.py::TestRealServer, which needs a live ASR server and fails identically on the base commit.

The two traps that made my first reproduction lie, in case they bite someone else: pytest -x aborted at an unrelated test_gaia_binary_on_path failure and never reached my tests, and gh run view --log truncates long jobs at ~3% (and returns nothing at all while the run is in progress), so the summary I needed wasn't in the log I was reading. The run-logs zip after completion has it.

This bump had to fix stale pins in tui/README.md and
.claude/agents/lemonade-specialist.md by hand, because the doc-version
gate only scanned docs/ and cpp/. A bump is only as complete as the
paths that gate can see, so it now covers both.

Only PIN references move. The text pattern requires a "v" before the
number, which is what separates "Lemonade Server v11.8.1+" (tracks the
pin, bumped every release since 10.2.0) from "through Lemonade 11.8.1+"
and "requires Lemonade 11.8.1 or later" — those name the release a
feature first shipped in and have never been bumped since amd#3672 added
them. Marching those forward would turn a true statement into a false
one, so the distinction is documented where the paths are declared.

Verified both directions: a v-prefixed stale pin planted in .claude/ is
caught, and the tui floor is left untouched.

Co-Authored-By: Claude Opus 5 <[email protected]>
@kovtcharov

Copy link
Copy Markdown
Contributor Author

Correcting myself: I was wrong to reject the SCAN_PATHS suggestion, and I've now implemented it in 833956e.

My argument was that adding tui/ would flag the "Lemonade 11.8.1+" floor and pressure the wrong edit on every future bump. That reasoning was sound but the premise was false, and I should have tested it instead of asserting it. The text pattern requires a literal v before the version (check_doc_versions.py:138), and the floor line has no v — so adding the path flags nothing. I confirmed by adding tui/ and .claude/ and re-running: zero mismatches.

So the scan now covers both directories, and I verified it behaves in both directions rather than just that it's quiet:

🔍 Verification

Planting a v-prefixed stale pin back into .claude/agents/lemonade-specialist.md:

[MISMATCH] .claude/agents/lemonade-specialist.md
  Line 102: found v11.8.1, expected v2026.39.1
[FAILED] 1 version mismatch(es) in 1 file(s)   EXIT 1

And with that reverted, the tui/README.md floor is untouched — still 11.8.1+, EXIT 0.

The v prefix is doing real work here, so I documented it where SCAN_PATHS is declared: write a floor without v, or the gate marches it forward and turns a true statement into a false one.

What stands from my earlier reply, now with evidence rather than reasoning — git log -L on each line:

Line History Verdict
docs/guides/npu.mdx:14 bumped every release: 10.2.0 → 10.7.0 → … → 11.8.1 pin — correctly bumped
tui/README.md:160 introduced once by #3672, never bumped floor — correctly left
docs/guides/ai-providers.mdx:63 introduced once by #3672, never bumped floor — correctly left
tui/internal/lemonade/cloud.go:108 introduced once by #3672, never bumped floor — correctly left

All three floors come from the same commit and agree with each other, so the feature genuinely requires 11.8.1, not 2026.39.1.

One gap this does not close, worth a follow-up rather than widening the pattern here: a bare Lemonade <semver> with no v is invisible to the gate even inside docs/. That is how the stale sample output in docs/reference/cli.mdx:1581 survived — I fixed it by hand in this PR. Broadening the pattern to bare numbers would start matching the three floors above, so it needs a real pin-vs-floor marker rather than a looser regex.

CI is green on 2e76eb0 (67 checks), including the three unit jobs that failed on the previous push.

kovtcharov pushed a commit to kovtcharov/gaia that referenced this pull request Sep 24, 2026
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.
kovtcharov pushed a commit to kovtcharov/gaia that referenced this pull request Sep 24, 2026
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.
kovtcharov pushed a commit to kovtcharov/gaia that referenced this pull request Sep 24, 2026
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.
@kovtcharov

Copy link
Copy Markdown
Contributor Author

Superseded by a stack of seven PRs, rebased onto current main (this branch was 52 commits behind). Closing in favour of them.

Splitting it was worth doing for more than tidiness: the CalVer parsing fix is independently valuable and now lands before the pin moves, which is the correct order — the gates have to understand the new format before GAIA installs a release that uses it. PR 1 passes with the pin still at 11.8.1, which is what makes that reviewable on its own.

# PR What it is
1 #4302 CalVer parsing across all seven version gates — merge first
2 #4303 The pin bump to v2026.39.1
3 #4304 The doc-version gate learns to see the pins it was missing
4 #4305 The auto-bump workflow refreshes the embeddable digests
5 #4306 Candidate prereleases get smoke-tested (closes #4172)
6 #4307 Request budget scales with the pinned context window (closes #4171)
7 #4308 GAIA states its eviction policy (closes #4170)

Everything reviewed here is carried forward, including the fix to the flagship agent's gate that the review caught and the SCAN_PATHS change I had wrongly declined.

🔍 A note on how to read the stack

GitHub will not let a PR in this repo target a branch that only exists on the fork, so all seven target main and each one's diff includes its parents' until those merge. Each PR's own change is its top commit — the bodies say so, and the merge order is the table above.

Three things also landed since the last review here: the doc gate now distinguishes a pin from a minimum-version floor (measured — a naive pattern was 75% false positives, including an IP address), the candidate smoke job was run against the real candidate-v2026.40.0 and GAIA passes it, and both new lemond config keys were verified as genuinely parsed by feeding the server a wrong-typed value and watching it exit.

@kovtcharov kovtcharov closed this Sep 25, 2026
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 cpp devops DevOps/infrastructure changes documentation Documentation changes llm LLM backend changes performance Performance-critical changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant