Skip to content

fix(cli): run gaia -p on the apps' model and never download one - #7808

Merged
kovtcharov-amd merged 12 commits into
amd:mainfrom
kovtcharov:kalin/rc18-headless-model
Nov 19, 2026
Merged

kovtcharov-amd merged 12 commits into
amd:mainfrom
kovtcharov:kalin/rc18-headless-model

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

On a PC set up with a cloud model, gaia -p ignored that choice, silently downloaded about 6 GB of the default local model, loaded it on the GPU and answered with it. Now gaia -p with no --model runs the same model the Agent UI and TUI reopen on. A local model that isn't downloaded is refused, with its size and a remedy that works for where that model came from (--model, last_model or default_model), before anything is fetched or loaded, and without a Python class name in front.

Closes #7734
Closes #7871

🔍 Technical details
  • Resolution is resolve_chat_model(): last_model, then default_model, then the shipped default. A cloud model skips the catalog check.
  • For a local model, print mode reaches the server with preload=False (new pass-through on initialize_lemonade_for_agent), reads get_model_info, and refuses when downloaded is false. Only then does the usual start/preload run, which can then only load.
  • The refusal's remedy follows the source: --model gets "pass another --model or download it"; last_model names gaia config set last_model <id> or "", since setting default_model does nothing while last_model is set; otherwise default_model. gaia -p's own refusals raise PrintModeError and print without "RuntimeError:"; unexpected errors keep their class name.
  • The relayed path (agent binary through the daemon) gets the same check and still leaves the load to the daemon. Attempts now pass the resolved --model to each attempt.
  • docs/reference/cli.mdx states the new default and the no-download rule.

Test plan

  • python -m pytest tests/unit/test_print_mode.py: new tests pin the apps' model, the shipped-default fallback, a refused undownloaded model (one attach with preload=False, a catalog read, no other Lemonade call), the relayed path, and a remedy per model source with no class name. They fail on main
  • python -m pytest tests/unit/cli/test_cli_backend_flags.py tests/unit/cli/test_prompt_device_model.py tests/unit/test_chat_agent_flag.py tests/unit/test_cli_config.py tests/unit/test_context_size_resolution.py tests/unit/test_cli_memory_drain_on_exit.py
  • Replayed in the app: on a home set up with a cloud model and no local model, gaia -p "hi" answers with the cloud model and downloads nothing
  • Replayed in the app: with last_model set to a local model that is not downloaded, gaia -p hi prints the last_model remedy, and following it makes the next run answer

Before: on a PC set up with a cloud model, `gaia -p` ignored it, silently
downloaded about 6 GB of the default local model, loaded it on the GPU and
answered with that. After: with no --model it runs the model the Agent UI
and TUI reopen on (last_model, then default_model, then the shipped default),
and a local model that is not downloaded is refused with its size and the
ways to get it, before anything is downloaded or loaded.

Print mode now resolves through resolve_chat_model, reaches the model server
without preloading, reads the model's catalog entry, and only then starts the
server as before. initialize_lemonade_for_agent passes a new preload flag
through to LemonadeManager.ensure_ready. The relayed (agent binary) path gets
the same check and still leaves the model load to the daemon.

Closes amd#7734
@github-actions github-actions Bot added documentation Documentation changes cli CLI changes tests Test changes labels Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes

gaia -p with no --model now runs the model the Agent UI and TUI reopen on. It also refuses a local model that isn't downloaded, where it used to fetch ~6 GB silently. The logic is sound and well tested. Two things are left before merge:

  • Show it working for real. The one test-plan item that proves the fix, a cloud-only PC answering gaia -p "hi" without downloading anything, is still unchecked. Paste that run's output on the PR.
  • Some cloud models would be refused as "not downloaded." Only Fireworks and AMD models are recognised by name. A cloud model from any other provider that isn't in Lemonade's catalog (for example because its token expired) gets the new "not downloaded (X GB)" error. That error points the user at a download that doesn't exist.

Real-world evidence

N/A: no evidence bundle was produced for this run, and the PR shows no real gaia -p output. The verdict rests on static review. The CLI change itself was not exercised here.

🔍 Technical details

🟡 Cloud check is name-only, so other providers hit the download refusal (src/gaia/print_mode.py:252)

cloud_model_provider(model) without metadata recognises only the fireworks/amd prefixes. Any other gateway id falls through to get_model_info. If the catalog lists it, cloud entries report downloaded: True, so it passes. If it's missing from the catalog (no or expired provider token, which _is_cloud_model's docstring calls out as the common case), get_model_info returns downloaded: False plus a name-based size estimate. The user is then told to download a gateway model. The client already has the sibling check that warms the catalog and matches registered gateway namespaces. Use it on the same client:

    model = model or resolve_chat_model()
    if cloud_model_provider(model):
        return model
    detected_base_url = _start_server(model, base_url, preload=False)
    client = LemonadeClient(base_url=base_url or detected_base_url, verbose=False)
    if client._is_cloud_model(model):
        return model
    info = client.get_model_info(model)

🟡 Missing real CLI evidence. Per the rubric, a CLI behaviour change needs the real gaia -p run and its output. The unchecked test-plan item ("cloud model, no local model, downloads nothing") is exactly that evidence. A second run showing the refusal message for an undownloaded local model would cover the other branch.

🟢 Duplicate catalog check with --attempts (src/gaia/print_mode.py:209, :302). _run_with_attempts resolves and checks the model, then the combining _run_turn repeats the server attach and catalog read, and so does each attempt subprocess. This is harmless but redundant. You could pass the resolved model through, or have _run_turn skip the check when it was already done.

Note: the relayed path now attaches to the server from the client process (preload=False), where before it deliberately left that to the daemon. preload=False loads nothing, so the race the old test guarded against (two loads) doesn't come back. Worth a glance that reaching a stopped server here doesn't start a second one beside the daemon's.

No doc drift: docs/reference/cli.mdx is the only page describing the --model default, and it was updated.

Strengths

  • Resolution reuses resolve_chat_model() rather than another hand-rolled last_model/default_model chain, so -p and the apps can't drift apart again.
  • The refusal is fail-loud and actionable: it names the model, its size, and three ways forward.
  • The tests assert the shape of the Lemonade calls (one preload=False attach, one catalog read, nothing else) rather than just that something was called. That is the right guard for the cold-start class of bug this fixes.

A cloud model from a provider whose token is missing or expired is absent from Lemonade's catalog, so the download check called it not downloaded and pointed at a download that does not exist. Print mode now asks the client's gateway check first, as the chat path does.

Refs amd#7734
@kovtcharov

Copy link
Copy Markdown
Contributor Author

Fixed the cloud check: print mode now asks the client's gateway check before the download check, so a gateway model missing from the catalog runs instead of being called "not downloaded". There's a test for it.

Real run, from a fresh home against the repo's stand-in Lemonade (tests/fixtures/fake_lemonade.py) with nothing downloaded, gaia -p "hi":

  • On main: it sent /load for Gemma-4-E4B-it-GGUF. That is the request a real Lemonade answers by downloading 5.6 GB.
  • On this branch: it exits 1 and the server receives no model request:
❌ gaia -p: RuntimeError: Gemma-4-E4B-it-GGUF is not downloaded (5.6 GB), and gaia -p does not download models. Pick a model you have with --model, download this one from the GAIA app's Settings > Model, or set the default with `gaia config set default_model <id>`.

The cloud-model run still needs the app replay in the test plan. It uses a real cloud key, which this machine's test rules keep out of this work.

The repeated catalog check under --attempts is left as is: it is one cheap read per process, and each attempt is its own gaia -p.

When the model gaia -p would run was not downloaded, the refusal began with
"RuntimeError:" and told the user to set default_model, which does nothing
while last_model names another model. The message is now clean and its
remedy follows where the model came from: --model, last_model (change or
clear it), or default_model, plus the download in the app.

gaia -p's own refusals raise PrintModeError, printed without a class name;
unexpected errors still show theirs.

Refs amd#7871
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Nov 13, 2026
…ad (amd#8113)

On a PC set up in the app with a cloud model, \`gaia schedule run\` and
every run the schedule daemon fires loaded the local Gemma model,
downloaded 4.7 GB of it if it was missing, and died with a raw traceback
when the load failed. Scheduled runs now answer on the model the Agent
UI and TUI reopen on, and a local model that isn't on disk is refused
with one line saying what to do, never downloaded. This matches what
amd#7808 does for \`gaia -p\`.

The \`gaia email\` half of amd#7974 is left out: the standalone email agent
is being removed in amd#7108.

Closes amd#7974
Closes amd#7329

## Test plan
- [x] \`pytest tests/unit/test_unattended_default_model.py
tests/unit/cli/test_cli_schedule.py tests/unit/test_schedule_daemon.py
tests/unit/test_schedule_one_shot.py\` (176 passed; new tests:
\`last_model\` cloud wins with no catalog call, an undownloaded local
model is refused before any agent session, the remedy names the app when
\`last_model\` is the missing one, \`schedule run\` prints one line and
exits 1 for repeating and one-time schedules)
- [x] \`pytest tests/unit/test_starting_state_matrix.py\`: the two
\`scheduled_run\` cells marked as known bugs for amd#7329 now pass and are
retired; the empty-cache cell now checks that nothing downloads
- [x] black, isort
- [ ] Replayed in the app
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes

The gateway-model fix is in. A cloud model from any provider that's missing from the catalog now runs instead of being refused as "not downloaded". The no-download refusal also has a real run on a fresh home. One item from the last review is still open:

  • 🟡 The cloud path has never been run for real. This PR exists to fix one case: a PC set up with only a cloud model, where gaia -p "hi" should answer with that model and download nothing. That test-plan item is still unchecked, and only mocks cover it. Please have someone with a cloud key run it and paste the output, or check off the replay. Then this is ready to merge.
🔍 Technical details
  • The cloud branch is cloud_model_provider(model) followed by client._is_cloud_model(model) in src/gaia/print_mode.py (_model_on_disk). The tests stub LemonadeClient, so they can't show that a real gateway model gets past the catalog read and answers.
  • No new regressions found in this push. Hybrid routing still resolves through _resolve_model, and the concrete model is then checked in _run_turn.

@kovtcharov-amd

kovtcharov-amd commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

The cloud path is now covered at the CLI level, which is the evidence we're going with for this fix; a run with a real cloud key stays on the RC checklist.

From a fresh home whose default_model is a cloud model (fireworks.kimi-k2-instruct), against the repo's stand-in Lemonade with nothing downloaded, gaia -p "hi" sent its chat request for that cloud model and never pulled or loaded a local chat model. The stand-in has no cloud backend, so the turn then ends on its "cloud model unavailable" error, as expected.

🔍 Technical details
  • Requests the server received for chat models: POST /api/v1/chat/completions with fireworks.kimi-k2-instruct; no /pull or /load for Gemma-4-E4B-it-GGUF or any other chat model.
  • The only local model fetched was the memory embedder (user.embeddinggemma-300m-GGUF), which memory pulls on its own on main too. It is outside this PR's scope (the chat model) so skipping it under -p would be a separate change.
  • Unit coverage of the same branch: tests/unit/test_print_mode.py (426 passed with the CLI suites listed in the test plan, after merging current main).

@kovtcharov-amd kovtcharov-amd added the ready_for_ci Run CI workflows on draft PR without requesting review label Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes

The fix is right: gaia -p with no --model now runs the model the Agent UI and TUI reopen on, and refuses a local model that isn't downloaded instead of quietly fetching gigabytes. The refusal also tells the user which setting to change. The code looks correct and the tests are thorough. The one thing missing is proof from a real run.

  • Show the command working. The PR changes what a CLI command does, but both real-run items in the test plan are still unchecked. Paste the output of gaia -p "hi" on a cloud-model setup (it should answer with nothing downloaded) and the last_model refusal, then this can merge.
  • Follow-up, not blocking: a hybrid run whose classifier is set to a local model that isn't downloaded still downloads it, so the docs' new "never downloaded" line has one exception.

Real-world evidence

N/A: no evidence bundle was produced for this run. The verdict rests on reading the code, and the new behaviour hasn't been seen running here. I couldn't run the unit tests either, because pytest isn't installed on this runner.

🔍 Technical details

🟡 Important

  • No real CLI evidence (PR description, Test plan). The two "Replayed in the app" items are unchecked, and the rubric asks for the real gaia <subcommand> output when a CLI surface changes. The mocked _Catalog proves the call order, but not that Lemonade's /models?show_all really reports downloaded: false for an unpulled built-in on a cold box. That cold-cache case is the one gaia init --profile npu fails with status 400 (missing user. prefix for model name) #1655 missed.
  • Follow-up: hybrid classifier can still auto-download (src/gaia/print_mode.py:281). Issue title: "gaia -p: hybrid classifier load bypasses the no-download check". _route calls _start_server(router.settings.classifier_model, base_url) with the default preload=True. That goes through _try_preload_with_ctx → load_model(..., auto_download=True). The default classifier is cloud (amd.DeepSeek-V4.1-Flash), so this only fires when hybrid_classifier_model is set to a local model that isn't on disk. The new cli.mdx row says a local model is "refused, never downloaded". One way to fix it is to run the classifier through the same gate:
        detected = _start_server(
            _model_on_disk(router.settings.classifier_model, base_url), base_url
        )
    
    The routed cheap/strong model is already checked, because _run_turn calls _model_on_disk(route.model).

🟢 Minor

  • Remedy for a routed hybrid model (src/gaia/print_mode.py:358). When hybrid picks a strong/cheap model that isn't downloaded, _model_on_disk receives the routed id as requested. The remedy then says "Pass --model with a model you have", but the user passed hybrid (or nothing). The more useful pointer is hybrid_strong_model / hybrid_cheap_model. This only affects the wording.
  • Catalog fetch failures still print the class name. get_model_info raises LemonadeClientError when /models can't be read. That falls through to the generic handler and prints LemonadeClientError: …, which is fine, but it isn't the clean PrintModeError wording the PR aims for elsewhere.

Docs drift: I grepped docs/ and CLAUDE.md for the old "default_model from gaia config" default for -p. Only the cli.mdx row this PR updates had it.

Strengths

  • The remedy changes with where the model came from (--model / last_model / default_model). That avoids the trap of telling the user to set default_model while last_model overrides it, and tests pin each branch.
  • preload=False is passed through to the existing ensure_ready parameter instead of adding a new probe. The relayed and --attempts paths get the same check, and attempts now pass the resolved --model, so they can't drift onto a different model.
  • PrintModeError gives the CLI's own refusals clean wording, while unexpected errors keep their class name for debugging.

…g it

With hybrid_classifier_model set to a local model that isn't downloaded,
gaia -p still loaded it with auto-download, the one exception to the new
no-download rule. The classifier now goes through the same check, and the
refusal names the setting to change.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Fixed the hybrid exception: a local hybrid_classifier_model now goes through the same no-download check, and the refusal names that setting to change. There's a test for it, and it fails without the change.

On real-run evidence: the maintainer has accepted the unit tests plus the stand-in Lemonade run above (fresh home, cloud default_model, no local chat model pulled or loaded) for this fix. A run with a real cloud key stays on the RC checklist rather than blocking the merge.

🔍 Technical details
  • The routed cheap/strong remedy wording and the LemonadeClientError class name on a failed catalog read are left as is: both are wording only, and the second is an unexpected error, which keeps its class name by design.

@kovtcharov-amd kovtcharov-amd added ready_for_ci Run CI workflows on draft PR without requesting review and removed ready_for_ci Run CI workflows on draft PR without requesting review labels Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

gaia -p now runs on the same model the Agent UI and TUI reopen on. It refuses a local model that isn't downloaded, with a fix that matches where that model came from, instead of quietly fetching ~6 GB. The logic is sound, the tests pin the "nothing gets loaded or downloaded" contract, and the one doc that states the default is updated.

Two refusal messages can still send users the wrong way. Fix them here or file follow-ups:

  • A mistyped or unknown --model is reported as "not downloaded". The message shows an estimated size and says to download the model from Settings › Model, but no such model exists to download. It should say the model isn't known to the model server.
  • With --model hybrid, a missing cheap or strong model gets the wrong fix. The message says "Pass --model with a model you have", but the user did pass --model, and the model actually came from the hybrid settings. The classifier already gets the right fix; the cheap and strong models should get the same.

Real-world evidence

N/A: no evidence bundle was produced for this run. The two "Replayed in the app" items in the PR's test plan (a cloud-only PC answers without downloading anything; a missing last_model prints the matching fix) are still unchecked, and the PR shows no real gaia -p output. This verdict rests on reading the code alone. Paste both runs' output on the PR before merging.

🔍 Technical details

🟡 Unknown model id is refused as "not downloaded" (src/gaia/print_mode.py, _model_on_disk)
LemonadeClient.get_model_info returns {"downloaded": False, "size_gb": <estimate>} when the id isn't in the show_all catalog. So gaia -p --model Gemma-4-E4B-typo prints "…is not downloaded (X GB)… or download it from the GAIA app's Settings > Model", and both the size and the remedy are wrong. Before this change, the load path reported "not found". To tell the two apart, either check that info["id"] matched a catalog row or call list_models(show_all=True) once, then word the unknown case separately ("isn't a model the model server knows; check the id").

🟡 Routed hybrid model gets the --model remedy (src/gaia/print_mode.py, _run_turn → _model_on_disk)
_route returns route.model (the cheap or strong model), and _run_turn checks it with requested=route.model, so _missing_model_remedy takes the requested branch. A hybrid_cheap_model or hybrid_strong_model that isn't downloaded then says "Pass --model with a model you have". Pass setting="hybrid_cheap_model"/"hybrid_strong_model" when route is not None, as _route already does for hybrid_classifier_model. PrintModeError is caught ahead of the generic handler, so _explain_routed doesn't rescue this message either.

🟡 Real-world evidence missing (rubric: CLI surface)
The user-facing claim is a CLI one (gaia -p on a cloud-configured home downloads nothing). Real gaia -p "hi" output for both unchecked test-plan items would close this.

Checked, no finding

  • Sibling paths: the in-process, relayed, --attempts and hybrid-classifier paths all go through _model_on_disk. The relayed path now reaches the server with preload=False and still leaves the load to the daemon.
  • _resolve_model (used only to detect hybrid) and resolve_chat_model read config in the same order, so the two can't disagree on which model is the default.
  • Doc drift: the old default wording ("default_model … else the agent's own default") appears nowhere else in docs/ or hub/skills/.
  • Not run here: this runner has no pytest, so tests/unit/test_print_mode.py wasn't executed. Rely on CI for it.

Strengths

  • Moving the download check ahead of any load (preload=False, then a catalog read) closes the silent ~6 GB download where it starts, rather than catching it after the fact.
  • The remedy follows the order the model was chosen in (--model › last_model › default_model), so it never suggests a setting that would have no effect. The tests check each case.
  • PrintModeError keeps RuntimeError: out of messages written for the user while unexpected errors still show their class name.

A mistyped --model was refused as "not downloaded" with a guessed size and
a download remedy for a model that doesn't exist; it is now called unknown.
A hybrid cheap or strong model that isn't downloaded now names its
hybrid_*_model setting instead of telling the user to pass --model.
@github-actions github-actions Bot added llm LLM backend changes performance Performance-critical changes labels Nov 15, 2026
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Both fixed. A mistyped or unknown --model is now refused as a model the server doesn't know, with "correct the id" instead of a size and a download remedy. A hybrid cheap or strong model that isn't downloaded now names hybrid_cheap_model or hybrid_strong_model to change. Tests cover each and fail without the change.

@kovtcharov-amd kovtcharov-amd added ready_for_ci Run CI workflows on draft PR without requesting review and removed ready_for_ci Run CI workflows on draft PR without requesting review labels Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes

gaia -p now runs on the model the Agent UI and TUI reopen on, and it refuses a local model that isn't downloaded instead of quietly fetching gigabytes. The fix is right and well tested. One new refusal gives the wrong advice, though:

  • A real GAIA model that Lemonade hasn't registered yet is called a typo. The opt-in Flash model (user.…) and an NPU model whose backend isn't installed both fit this case. The user is told to "correct the id" when the id is fine and the fix is to download the model. Check GAIA's own model table before calling an id unknown.
  • No real CLI run is shown yet. Both "replayed in the app" items in the test plan are still unchecked. Paste the gaia -p output for the cloud-model and missing-last_model cases.

Real-world evidence

N/A: no evidence bundle was produced for this run. The verdict rests on static review and the unit tests in the diff. The CLI surface was not exercised here.

🔍 Technical details

Issues

🟡 "Unknown model" refusal fires for valid GAIA ids that Lemonade doesn't list yet (src/gaia/print_mode.py:362)
get_model_info(...)["listed"] is False for any id missing from list_models(show_all=True). Two documented ids reach that state while still being correct:

  • FLASH_OPTION_MODEL_NAME = "user.Qwen3.8-Flash-Next-GGUF": CLAUDE.md says you choose it with gaia config set default_model. A user.* model only enters the catalog once a pull registers it.
  • FLM models such as gemma4-it-e4b-FLM: Lemonade lists none until the flm:npu backend is installed.

In both cases the user is told the model server doesn't know the model and to "correct the id". Before this PR the preload would have registered and pulled the model. With this PR the run should still refuse, but with the download remedy. A suggested fix is to treat an id GAIA knows as listed-but-not-downloaded:

    from gaia.llm.lemonade_client import MODELS
    if not info["listed"] and model not in MODELS:

(adjust if MODELS is keyed by something other than the Lemonade id). Add a test with _Catalog.listed = False and a MODELS id.

🟡 No CLI evidence for a user-visible CLI change. The description shows no gaia -p output, and both manual replay items are unchecked. Per the rubric, CLI changes need the real command and its output.

🟢 Hybrid turns check the catalog twice. run() calls _model_on_disk for the routed model, then _run_turn calls it again. That is two reachability calls and two /models?show_all reads per hybrid turn. It's harmless but could be skipped once run() has verified the model.

🟢 The relay path now reaches the server itself. _model_on_disk calls _start_server(preload=False) before relaying. The old test said starting the server here would race the daemon. preload=False loads nothing, and a restart goes through the daemon supervisor, so this looks safe. The updated test docstring covers it.

Sibling paths / docs: resolve_chat_model() and _resolve_model() agree on last_model → default_model → shipped default, and hybrid is still routed first. docs/reference/cli.mdx is updated, and no other doc states the old gaia -p default.

Strengths

  • Each remedy depends on where the model came from (--model, last_model, default_model, the hybrid_* keys), so the advice actually fixes the next run. The tests cover each source.
  • PrintModeError separates GAIA's own worded refusals from unexpected errors, which keep their class name. This is fail-loudly done right.
  • A cloud model, or another provider's model whose token has expired, skips the catalog check, so the original gaia -p on a PC set up with a cloud model downloads 5.6 GB of Gemma and answers with it, without saying so #7734 case gets no local download.

A user.* model or an NPU model is listed by Lemonade only once pulled, so
the unknown-model refusal told users to correct a valid id. A model in
GAIA's own table now gets the not-downloaded refusal.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Fixed: a model in GAIA's own table (the opt-in Flash model, an NPU model) that Lemonade hasn't listed yet now gets the not-downloaded refusal with the download remedy; only an id neither knows is called unknown. There's a test, and it fails without the change.

The real-run items stay on the RC checklist; the stand-in Lemonade run above covers the cloud case for this merge.

@kovtcharov-amd kovtcharov-amd added ready_for_ci Run CI workflows on draft PR without requesting review and removed ready_for_ci Run CI workflows on draft PR without requesting review labels Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes

gaia -p now runs on the same model the Agent UI and TUI reopen on. It also refuses a local model that isn't downloaded, with a fix that matches where the model was chosen, instead of quietly fetching about 6 GB. The code looks correct and the tests cover each place a model can come from. The one blocker is proof: the two test-plan items that run the real command are still unchecked, so nothing yet shows the fix working.

  • Show the real runs. Paste the output of gaia -p "hi" on a home set up with a cloud model, showing it answers and downloads nothing. Also paste the refusal printed when last_model points at a local model that isn't downloaded. Once those are on the PR, this can merge.
  • A smaller point: a hybrid turn that routes to a local model checks the server and its model list twice, which adds a short wait for no benefit.

Real-world evidence

N/A: no evidence bundle was produced for this run, and I couldn't run the tests here (pytest isn't installed on this runner). The verdict rests on static review alone. The changed CLI surface wasn't exercised, and the PR's own two replay items are unchecked.

🔍 Technical details

Issues

🟡 No real-world evidence for a CLI change. The diff changes what gaia -p runs by default and adds new refusal messages. The two "Replayed in the app" items in the test plan are the evidence the rubric asks for, and both are unchecked. Paste each command and what it printed (stderr and the exit code) into the description.

🟢 A routed hybrid turn checks the model twice (src/gaia/print_mode.py:179-180 and :450). run() calls _model_on_disk(route.model, …, setting=…), then _run_turn calls _model_on_disk(model, base_url) on the same id. Each call reaches the server with preload=False and reads list_models(show_all=True). Passing the already-checked model through, or skipping the second check when route is not None, removes one round trip. The setting-specific remedy only comes from the first call, so keep that one.

Checked, no finding

  • Sibling paths: the relayed binary path, --attempts (which now passes the resolved --model to each attempt) and the hybrid classifier, strong and cheap models all go through _model_on_disk. _route's last_model or default_model agrees with resolve_chat_model()'s order, so a hybrid last_model still routes.
  • With preload=False, ensure_ready only checks the server is reachable and leaves the manager uninitialised, so the later _start_server(model) still seeds the model at its window. The relay path no longer loads anything itself, so it doesn't race the daemon.
  • Cold start: on a cloud model, _model_on_disk returns before any server contact. On a local model with no Lemonade, the refusal is the existing "could not be started" message, now raised as PrintModeError so no class-name prefix is shown.
  • Doc drift: the old "default_model … else the agent's own default" wording appears only in the cli.mdx row this PR updates. Nothing else in docs/, hub/skills or the README states -p's default model.

Strengths

  • The remedy follows where the model came from (--model, last_model, default_model, or a hybrid_* key). It never tells the user to set default_model when last_model would override it.
  • The listed flag on get_model_info separates a typo from a model that isn't downloaded yet, and still treats GAIA's own user.* and NPU ids as undownloaded rather than unknown.
  • The tests check the outgoing calls, not just the result: exactly one attach with preload=False, then a catalog read, then nothing else.

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Replayed from an empty home (no ~/.gaia, no config) against the repo's stand-in Lemonade with nothing downloaded, on main and on this branch. On main, a home set up with a cloud last_model still loads the ~5.6 GB default local model; on this branch it sends its chat to the cloud model and loads nothing local, and every local-model case is refused before any pull or load, with the remedy that matches where the model came from.

A run against a real Lemonade with a real gateway key still isn't shown: the Lemonade on the box I used is older than GAIA supports, so every run there stopped at the version check before reaching this code.

🔍 Technical details

gaia -p hi from the PR head (4d9f28d6b) and origin/main, GAIA_MEMORY_DISABLED=1, fresh temp HOME per run. "Loads" and "chats" are the requests the stand-in received.

Setup Branch Exit Loads / pulls Chats What it printed
empty home main 1 load Gemma-4-E4B-it-GGUF none RuntimeError: The model server could not be started…
empty home PR 1 none none Gemma-4-E4B-it-GGUF is not downloaded (5.6 GB), and gaia -p does not download models. Pass --model …, run gaia config set default_model <id>, or download it…
last_model = amd.DeepSeek-V4.1-Flash main 1 load Gemma-4-E4B-it-GGUF none same as above
last_model = amd.DeepSeek-V4.1-Flash PR 1* none amd.DeepSeek-V4.1-Flash stand-in has no cloud backend (404)
default_model = amd.DeepSeek-V4.1-Flash PR 1* none amd.DeepSeek-V4.1-Flash same
last_model local, --model amd.DeepSeek-V4.1-Flash PR 1* none amd.DeepSeek-V4.1-Flash same
empty home, --model Qwen3-0.6B-GGUF PR 1 none none …not downloaded (0.4 GB)… Pass --model with a model you have, or download it…
last_model = Qwen3-0.6B-GGUF PR 1 none none last_model remedy, including gaia config set last_model ""
empty home, --model Gemma-4-typo PR 1 none none …isn't a model the model server knows… or correct the id.

* Fails only because the stand-in has no cloud backend; nothing local was pulled or loaded.

Affected unit suites (print_mode, hybrid routing, predownload checks, CLI backend/model flags, config, ctx resolution, starting-state matrix): 922 passed on the PR head, 908 on main, no failures on either. The 14 extra tests are the PR's new ones.

Separate from this PR: a failed cloud turn prints its error on stdout as well as stderr, and the wording points CLI users at "/model in the TUI".

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Every code finding from the reviews is fixed, and the cold-state replay here is the real-run evidence for this merge: from an empty home, main loads the 5.6 GB local default, while this branch sends a cloud last_model/default_model turn to the cloud model and refuses every undownloaded local model before any pull or load. A run with a real gateway key stays on the RC checklist.

🔍 Technical details
  • Fixed in later commits: gateway models missing from the catalog (_is_cloud_model), the hybrid classifier download, unknown id vs. not downloaded (listed), GAIA-table ids Lemonade hasn't listed yet, and the hybrid_cheap_model/hybrid_strong_model remedy.
  • Left as is: the second catalog read on a routed hybrid turn and under --attempts. It's one cheap /models read per process, and the first call is the one that carries the setting-specific remedy.

@kovtcharov-amd
kovtcharov-amd merged commit 19121d6 into amd:main Nov 19, 2026
95 of 125 checks passed
@kovtcharov-amd kovtcharov-amd mentioned this pull request Nov 19, 2026
kovtcharov-amd added a commit that referenced this pull request Nov 19, 2026
# GAIA v0.27.0 Release Notes

## Summary

- Connect more than one Google or Microsoft account, and manage each one
separately.
- GAIA desktop has a browser beside the chat that both you and GAIA can
use.
- Type `/` and a skill's name to run that skill on a request.
- New skills build and check Office files and triage logs.
- The standalone email agent is gone; the main GAIA agent handles mail.
- 8 contributors merged 87 PRs and closed 72 issues since v0.26.0.

## Breaking Changes

- **The standalone email agent is removed** — `gaia email`, the
`gaia-agent-email` and `@amd-gaia/agent-email` packages, the `/v1/email`
routes and the `email` setup profile are gone. Ask GAIA about your mail
in `gaia chat` or the Agent UI instead; it reads, drafts and sends
through the Google and Microsoft connectors, as the [Email
guide](/guides/email) describes. On upgrade the old install is removed,
and any email it had scheduled is named once, since it won't be sent.
(PR [#7108](#7108))
- **`gaia agent list` and `gaia eval benchmark` are removed** — GAIA
ships one agent, and `gaia agent list` now says what replaced it. (PR
[#7108](#7108))
- **`gaia.ui.email_sidecar` is renamed `gaia.ui.sidecar`** — update the
import. (PR [#7108](#7108))

## What's New

- **Several accounts per mail provider** — `gaia connectors connect
google --add` adds another account; Settings and the terminal UI list
each one with its own Reconnect, Make default and Disconnect. (PRs
[#8331](#8331),
[#8332](#8332),
[#8333](#8333))
- **Browser pane in GAIA desktop** — browse beside the chat while GAIA
reads and drives the same tab, and pick part of a page to ask about. (PR
[#5973](#5973))
- **Run a skill by name** — start a message with `/skill-name` in the
Agent UI, terminal UI, `gaia -p` or the API; typing `/` lists installed
skills. (PR [#8483](#8483))
- **Office documents** — the `office-docs` skill builds spreadsheets,
decks with editable charts and Word files; its `verify_workbook` tool
recalculates formulas to catch wrong cell references. (PR
[#5417](#5417))
- **Log triage** — the `log-triage` skill's `triage_logs` tool reads
every named log in one call and returns the anomalies, bursts and hosts
hit. (PR [#5465](#5465))
- **Skill auto-load, opt-in** — with `GAIA_SKILL_AUTOLOAD=1` a skill
that clearly matches the request loads before the turn. Off by default.
(PR [#5442](#5442))
- **Document reranking, opt-in** — `RAGConfig(enable_reranking=True)`
reorders retrieved passages with a downloaded Lemonade reranking model.
(PR [#6136](#6136))
- **Review saved folder answers** — `gaia trust` lists, adds, declines
and forgets GAIA's per-folder answers about project guidance files. (PR
[#8480](#8480))
- **Sign in to Gmail over SSH** — `gaia connectors connect google
--callback-port PORT` fixes the sign-in port so it can be forwarded. (PR
[#8474](#8474))
- **Settings reach open chats** — a model server, connector or skill
change applies on an open chat's next message, including in the terminal
UI. (PR [#8400](#8400))
- **Agent UI** — Ctrl+/ lists keyboard shortcuts, formulas render
instead of LaTeX source, the library shows which chats use each
document, a scheduled task can be edited in place with its past runs
listed, and connector setup is shown as numbered steps. (PRs
[#7504](#7504),
[#7499](#7499),
[#7514](#7514),
[#7527](#7527),
[#8281](#8281),
[#8279](#8279),
[#8280](#8280))
- **Scripted `gaia -p` runs** — `--disallowed-tools`, `--no-web` and
`--no-skills` withhold tools; the run uses the apps' model without
downloading one, uses its whole `--time-limit`, and the agent knows
nobody is there to answer questions. (PRs
[#8326](#8326),
[#7808](#7808),
[#8385](#8385),
[#8451](#8451))
- **Large tool results pass by handle** — a tool given an `output_…`
handle gets the full result without it entering the prompt. (PR
[#8121](#8121))

## Bug Fixes

- **A missing command-line program becomes a step to install it**, not a
dead end. (PR [#8251](#8251))
- **A reply that stalls partway is requested again.** (PR
[#8446](#8446))
- **A chat fails at once when the chosen model server is down**, instead
of waiting. (PR [#8436](#8436))
- **A failed turn stays marked failed in history.** (PR
[#8335](#8335))
- **A document is never reported attached when nothing was written.**
(PR [#8388](#8388))
- **Attached file names keep their spaces and non-Latin scripts.** (PR
[#8461](#8461))
- **The agent can read images GAIA generated.** (PR
[#8478](#8478))
- **A bare JSON answer ends the turn.** (PR
[#8462](#8462))
- **A reply that was all thinking is told to act**, and the next one
thinks less. (PRs [#8430](#8430),
[#8448](#8448))
- **A file shown whole with `cat` counts as read back.** (PR
[#8458](#8458))
- **`run_python` says when long output was cut**, and a script missing a
module is pointed at the system Python. (PRs
[#8450](#8450),
[#8426](#8426))
- **Time limits are respected** — the model is told the limit, a
command's timeout never outlasts it, and no test run is requested after
it. (PRs [#8429](#8429),
[#8424](#8424),
[#8452](#8452))
- **`gaia -p` streams its model calls**, so a long reply is not lost.
(PR [#8427](#8427))
- **Model SDKs load on first use**, and context checkpoints are limited.
(PR [#8459](#8459))
- **A shell result sent to the model leaves out what it already knows.**
(PR [#8428](#8428))
- **Outlook availability is no longer guessed** when a meeting's time
can't be read. (PR [#8267](#8267))
- **No local chat download is planned while chat runs on a cloud
model.** (PR [#8086](#8086))
- **Setup shows the same model size and name as Settings.** (PR
[#8431](#8431))
- **A reply cut short by a crash isn't continued.** (PR
[#8391](#8391))
- **An MCP connector shows Connected only after a check has started
it.** (PR [#8434](#8434))
- **The document library's install hint matches this build.** (PR
[#8327](#8327))
- **A document overlap of 0 repeats nothing between chunks.** (PR
[#8382](#8382))
- **Documents in Russian, Greek, Polish and other languages are split
into sentences**, so their chunks overlap like English ones instead of
being cut every 2,000 characters. (PR
[#8499](#8499))
- **Documents added while the model server was down are indexed once it
is back**, and show "Waiting", not "Failed". (PR
[#8353](#8353))
- **Setup retries and resumes a dropped assistant download** instead of
failing. (PR [#8490](#8490))
- **A failed model download stays reported after Settings closes**,
until you dismiss it. (PR
[#8468](#8468))
- **Impossible input gets a 4xx error, not a 500.** (PR
[#8291](#8291))
- **Agent UI layout** — popovers stay on screen in right-to-left layouts
at phone width, the Mac window buttons clear the folded sidebar, and
closing the resource strip says how to bring it back. (PRs
[#8455](#8455),
[#8476](#8476),
[#8432](#8432))
- **The "GAIA doesn't run this model server" line is translated in
Arabic.** (PR [#8435](#8435))
- **A release candidate names its own pre-release as the agent's
source.** (PR [#8433](#8433))

## Known Issues

- **Installed builds: `gaia -p` refuses `--time-limit`,
`--disallowed-tools`, `--no-web` and `--no-skills`**, because there the
agent runs through GAIA's background service — run without them, or from
a developer install that includes the agent package. Tracked in
[#8495](#8495).
- **NPU PCs: chat on the NPU profile returns an empty reply** — use the
GPU/CPU profile for now. Tracked in
[#6008](#6008).
- **Fedora 44: setup cannot reach any HTTPS site**, so it can neither
connect a cloud model nor download one — tracked in
[#7226](#7226).
- **Long sessions on Windows: Lemonade's bundled llama-server leaks
handles on every request** — restart the model server from time to time.
Tracked in [#8312](#8312).
- **Coding: editing a config, data or `SKILL.md` file does not mark an
earlier "tests pass" as stale** — re-run the tests after such an edit.
Tracked in [#8213](#8213).
- **Your own model server, stopped: the connection banner says it is
"not installed"** — start your server again. Tracked in
[#8313](#8313).
- **Summarizing a 1,000+ page document can time out** — ask about
sections or page ranges instead. Tracked in
[#8218](#8218).

## Contributors

Thanks to the community members who contributed to this release:

- [@tylerbea](https://github.com/tylerbea) — several accounts per
connector, the browser pane, `/skill-name` in chat, and Mac window
layout (PRs [#8331](#8331),
[#8332](#8332),
[#8333](#8333),
[#5973](#5973),
[#8483](#8483),
[#8476](#8476))
- [@akshat-lakhera](https://github.com/akshat-lakhera) — `gaia trust`
and the Gmail sign-in callback port (PRs
[#8480](#8480),
[#8474](#8474))
- [@rapuckett](https://github.com/rapuckett) — failed-turn history,
honest document attachment, right-to-left popovers, and test and tooling
fixes (PRs [#8335](#8335),
[#8388](#8388),
[#8455](#8455),
[#8453](#8453),
[#8454](#8454),
[#8471](#8471))
- [@eshitakundu](https://github.com/eshitakundu) — passing tool results
by handle, and measuring what MCP servers cost an agent (PRs
[#8121](#8121),
[#8294](#8294))
- [@bniladridas](https://github.com/bniladridas) — bare JSON answers,
attachment names, failed-download reporting, and installer and test CI
fixes (PRs [#8462](#8462),
[#8461](#8461),
[#8468](#8468),
[#8482](#8482),
[#8466](#8466),
[#8465](#8465),
[#8467](#8467),
[#8464](#8464),
[#8402](#8402))
- [@huong8373tt-beep](https://github.com/huong8373tt-beep) — optional
Lemonade reranking for document search (PR
[#6136](#6136))
- [@0z5a](https://github.com/0z5a) — sentence splitting for non-ASCII
languages (PR [#8499](#8499))

## Full Changelog

**87 commits** since v0.26.0. The PR links above are the changelog.

Full Changelog:
[v0.26.0...v0.27.0](v0.26.0...v0.27.0)
rapuckett pushed a commit to rapuckett/gaia that referenced this pull request Nov 19, 2026
…7808)

On a PC set up with a cloud model, `gaia -p` ignored that choice,
silently downloaded about 6 GB of the default local model, loaded it on
the GPU and answered with it. Now `gaia -p` with no `--model` runs the
same model the Agent UI and TUI reopen on. A local model that isn't
downloaded is refused, with its size and a remedy that works for where
that model came from (`--model`, `last_model` or `default_model`),
before anything is fetched or loaded, and without a Python class name in
front.

Closes amd#7734
Closes amd#7871

<details>
<summary>🔍 Technical details</summary>

- Resolution is `resolve_chat_model()`: `last_model`, then
`default_model`, then the shipped default. A cloud model skips the
catalog check.
- For a local model, print mode reaches the server with `preload=False`
(new pass-through on `initialize_lemonade_for_agent`), reads
`get_model_info`, and refuses when `downloaded` is false. Only then does
the usual start/preload run, which can then only load.
- The refusal's remedy follows the source: `--model` gets "pass another
--model or download it"; `last_model` names `gaia config set last_model
<id>` or `""`, since setting `default_model` does nothing while
`last_model` is set; otherwise `default_model`. `gaia -p`'s own refusals
raise `PrintModeError` and print without "RuntimeError:"; unexpected
errors keep their class name.
- The relayed path (agent binary through the daemon) gets the same check
and still leaves the load to the daemon. Attempts now pass the resolved
`--model` to each attempt.
- `docs/reference/cli.mdx` states the new default and the no-download
rule.
</details>

## Test plan
- [x] `python -m pytest tests/unit/test_print_mode.py`: new tests pin
the apps' model, the shipped-default fallback, a refused undownloaded
model (one attach with `preload=False`, a catalog read, no other
Lemonade call), the relayed path, and a remedy per model source with no
class name. They fail on `main`
- [x] `python -m pytest tests/unit/cli/test_cli_backend_flags.py
tests/unit/cli/test_prompt_device_model.py
tests/unit/test_chat_agent_flag.py tests/unit/test_cli_config.py
tests/unit/test_context_size_resolution.py
tests/unit/test_cli_memory_drain_on_exit.py`
- [ ] Replayed in the app: on a home set up with a cloud model and no
local model, `gaia -p "hi"` answers with the cloud model and downloads
nothing
- [ ] Replayed in the app: with `last_model` set to a local model that
is not downloaded, `gaia -p hi` prints the `last_model` remedy, and
following it makes the next run answer

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
rapuckett pushed a commit to rapuckett/gaia that referenced this pull request Nov 19, 2026
# GAIA v0.27.0 Release Notes

## Summary

- Connect more than one Google or Microsoft account, and manage each one
separately.
- GAIA desktop has a browser beside the chat that both you and GAIA can
use.
- Type `/` and a skill's name to run that skill on a request.
- New skills build and check Office files and triage logs.
- The standalone email agent is gone; the main GAIA agent handles mail.
- 8 contributors merged 87 PRs and closed 72 issues since v0.26.0.

## Breaking Changes

- **The standalone email agent is removed** — `gaia email`, the
`gaia-agent-email` and `@amd-gaia/agent-email` packages, the `/v1/email`
routes and the `email` setup profile are gone. Ask GAIA about your mail
in `gaia chat` or the Agent UI instead; it reads, drafts and sends
through the Google and Microsoft connectors, as the [Email
guide](/guides/email) describes. On upgrade the old install is removed,
and any email it had scheduled is named once, since it won't be sent.
(PR [amd#7108](amd#7108))
- **`gaia agent list` and `gaia eval benchmark` are removed** — GAIA
ships one agent, and `gaia agent list` now says what replaced it. (PR
[amd#7108](amd#7108))
- **`gaia.ui.email_sidecar` is renamed `gaia.ui.sidecar`** — update the
import. (PR [amd#7108](amd#7108))

## What's New

- **Several accounts per mail provider** — `gaia connectors connect
google --add` adds another account; Settings and the terminal UI list
each one with its own Reconnect, Make default and Disconnect. (PRs
[amd#8331](amd#8331),
[amd#8332](amd#8332),
[amd#8333](amd#8333))
- **Browser pane in GAIA desktop** — browse beside the chat while GAIA
reads and drives the same tab, and pick part of a page to ask about. (PR
[amd#5973](amd#5973))
- **Run a skill by name** — start a message with `/skill-name` in the
Agent UI, terminal UI, `gaia -p` or the API; typing `/` lists installed
skills. (PR [amd#8483](amd#8483))
- **Office documents** — the `office-docs` skill builds spreadsheets,
decks with editable charts and Word files; its `verify_workbook` tool
recalculates formulas to catch wrong cell references. (PR
[amd#5417](amd#5417))
- **Log triage** — the `log-triage` skill's `triage_logs` tool reads
every named log in one call and returns the anomalies, bursts and hosts
hit. (PR [amd#5465](amd#5465))
- **Skill auto-load, opt-in** — with `GAIA_SKILL_AUTOLOAD=1` a skill
that clearly matches the request loads before the turn. Off by default.
(PR [amd#5442](amd#5442))
- **Document reranking, opt-in** — `RAGConfig(enable_reranking=True)`
reorders retrieved passages with a downloaded Lemonade reranking model.
(PR [amd#6136](amd#6136))
- **Review saved folder answers** — `gaia trust` lists, adds, declines
and forgets GAIA's per-folder answers about project guidance files. (PR
[amd#8480](amd#8480))
- **Sign in to Gmail over SSH** — `gaia connectors connect google
--callback-port PORT` fixes the sign-in port so it can be forwarded. (PR
[amd#8474](amd#8474))
- **Settings reach open chats** — a model server, connector or skill
change applies on an open chat's next message, including in the terminal
UI. (PR [amd#8400](amd#8400))
- **Agent UI** — Ctrl+/ lists keyboard shortcuts, formulas render
instead of LaTeX source, the library shows which chats use each
document, a scheduled task can be edited in place with its past runs
listed, and connector setup is shown as numbered steps. (PRs
[amd#7504](amd#7504),
[amd#7499](amd#7499),
[amd#7514](amd#7514),
[amd#7527](amd#7527),
[amd#8281](amd#8281),
[amd#8279](amd#8279),
[amd#8280](amd#8280))
- **Scripted `gaia -p` runs** — `--disallowed-tools`, `--no-web` and
`--no-skills` withhold tools; the run uses the apps' model without
downloading one, uses its whole `--time-limit`, and the agent knows
nobody is there to answer questions. (PRs
[amd#8326](amd#8326),
[amd#7808](amd#7808),
[amd#8385](amd#8385),
[amd#8451](amd#8451))
- **Large tool results pass by handle** — a tool given an `output_…`
handle gets the full result without it entering the prompt. (PR
[amd#8121](amd#8121))

## Bug Fixes

- **A missing command-line program becomes a step to install it**, not a
dead end. (PR [amd#8251](amd#8251))
- **A reply that stalls partway is requested again.** (PR
[amd#8446](amd#8446))
- **A chat fails at once when the chosen model server is down**, instead
of waiting. (PR [amd#8436](amd#8436))
- **A failed turn stays marked failed in history.** (PR
[amd#8335](amd#8335))
- **A document is never reported attached when nothing was written.**
(PR [amd#8388](amd#8388))
- **Attached file names keep their spaces and non-Latin scripts.** (PR
[amd#8461](amd#8461))
- **The agent can read images GAIA generated.** (PR
[amd#8478](amd#8478))
- **A bare JSON answer ends the turn.** (PR
[amd#8462](amd#8462))
- **A reply that was all thinking is told to act**, and the next one
thinks less. (PRs [amd#8430](amd#8430),
[amd#8448](amd#8448))
- **A file shown whole with `cat` counts as read back.** (PR
[amd#8458](amd#8458))
- **`run_python` says when long output was cut**, and a script missing a
module is pointed at the system Python. (PRs
[amd#8450](amd#8450),
[amd#8426](amd#8426))
- **Time limits are respected** — the model is told the limit, a
command's timeout never outlasts it, and no test run is requested after
it. (PRs [amd#8429](amd#8429),
[amd#8424](amd#8424),
[amd#8452](amd#8452))
- **`gaia -p` streams its model calls**, so a long reply is not lost.
(PR [amd#8427](amd#8427))
- **Model SDKs load on first use**, and context checkpoints are limited.
(PR [amd#8459](amd#8459))
- **A shell result sent to the model leaves out what it already knows.**
(PR [amd#8428](amd#8428))
- **Outlook availability is no longer guessed** when a meeting's time
can't be read. (PR [amd#8267](amd#8267))
- **No local chat download is planned while chat runs on a cloud
model.** (PR [amd#8086](amd#8086))
- **Setup shows the same model size and name as Settings.** (PR
[amd#8431](amd#8431))
- **A reply cut short by a crash isn't continued.** (PR
[amd#8391](amd#8391))
- **An MCP connector shows Connected only after a check has started
it.** (PR [amd#8434](amd#8434))
- **The document library's install hint matches this build.** (PR
[amd#8327](amd#8327))
- **A document overlap of 0 repeats nothing between chunks.** (PR
[amd#8382](amd#8382))
- **Documents in Russian, Greek, Polish and other languages are split
into sentences**, so their chunks overlap like English ones instead of
being cut every 2,000 characters. (PR
[amd#8499](amd#8499))
- **Documents added while the model server was down are indexed once it
is back**, and show "Waiting", not "Failed". (PR
[amd#8353](amd#8353))
- **Setup retries and resumes a dropped assistant download** instead of
failing. (PR [amd#8490](amd#8490))
- **A failed model download stays reported after Settings closes**,
until you dismiss it. (PR
[amd#8468](amd#8468))
- **Impossible input gets a 4xx error, not a 500.** (PR
[amd#8291](amd#8291))
- **Agent UI layout** — popovers stay on screen in right-to-left layouts
at phone width, the Mac window buttons clear the folded sidebar, and
closing the resource strip says how to bring it back. (PRs
[amd#8455](amd#8455),
[amd#8476](amd#8476),
[amd#8432](amd#8432))
- **The "GAIA doesn't run this model server" line is translated in
Arabic.** (PR [amd#8435](amd#8435))
- **A release candidate names its own pre-release as the agent's
source.** (PR [amd#8433](amd#8433))

## Known Issues

- **Installed builds: `gaia -p` refuses `--time-limit`,
`--disallowed-tools`, `--no-web` and `--no-skills`**, because there the
agent runs through GAIA's background service — run without them, or from
a developer install that includes the agent package. Tracked in
[amd#8495](amd#8495).
- **NPU PCs: chat on the NPU profile returns an empty reply** — use the
GPU/CPU profile for now. Tracked in
[amd#6008](amd#6008).
- **Fedora 44: setup cannot reach any HTTPS site**, so it can neither
connect a cloud model nor download one — tracked in
[amd#7226](amd#7226).
- **Long sessions on Windows: Lemonade's bundled llama-server leaks
handles on every request** — restart the model server from time to time.
Tracked in [amd#8312](amd#8312).
- **Coding: editing a config, data or `SKILL.md` file does not mark an
earlier "tests pass" as stale** — re-run the tests after such an edit.
Tracked in [amd#8213](amd#8213).
- **Your own model server, stopped: the connection banner says it is
"not installed"** — start your server again. Tracked in
[amd#8313](amd#8313).
- **Summarizing a 1,000+ page document can time out** — ask about
sections or page ranges instead. Tracked in
[amd#8218](amd#8218).

## Contributors

Thanks to the community members who contributed to this release:

- [@tylerbea](https://github.com/tylerbea) — several accounts per
connector, the browser pane, `/skill-name` in chat, and Mac window
layout (PRs [amd#8331](amd#8331),
[amd#8332](amd#8332),
[amd#8333](amd#8333),
[amd#5973](amd#5973),
[amd#8483](amd#8483),
[amd#8476](amd#8476))
- [@akshat-lakhera](https://github.com/akshat-lakhera) — `gaia trust`
and the Gmail sign-in callback port (PRs
[amd#8480](amd#8480),
[amd#8474](amd#8474))
- [@rapuckett](https://github.com/rapuckett) — failed-turn history,
honest document attachment, right-to-left popovers, and test and tooling
fixes (PRs [amd#8335](amd#8335),
[amd#8388](amd#8388),
[amd#8455](amd#8455),
[amd#8453](amd#8453),
[amd#8454](amd#8454),
[amd#8471](amd#8471))
- [@eshitakundu](https://github.com/eshitakundu) — passing tool results
by handle, and measuring what MCP servers cost an agent (PRs
[amd#8121](amd#8121),
[amd#8294](amd#8294))
- [@bniladridas](https://github.com/bniladridas) — bare JSON answers,
attachment names, failed-download reporting, and installer and test CI
fixes (PRs [amd#8462](amd#8462),
[amd#8461](amd#8461),
[amd#8468](amd#8468),
[amd#8482](amd#8482),
[amd#8466](amd#8466),
[amd#8465](amd#8465),
[amd#8467](amd#8467),
[amd#8464](amd#8464),
[amd#8402](amd#8402))
- [@huong8373tt-beep](https://github.com/huong8373tt-beep) — optional
Lemonade reranking for document search (PR
[amd#6136](amd#6136))
- [@0z5a](https://github.com/0z5a) — sentence splitting for non-ASCII
languages (PR [amd#8499](amd#8499))

## Full Changelog

**87 commits** since v0.26.0. The PR links above are the changelog.

Full Changelog:
[v0.26.0...v0.27.0](amd/gaia@v0.26.0...v0.27.0)
kovtcharov-amd pushed a commit that referenced this pull request Nov 19, 2026
)

A model added with `gaia model add` says "it downloads the first time
you use it", but `gaia -p --model <that id>` refused to run it, and
`ensure_model_downloaded("<that id>")` failed with Lemonade's "not
registered with Lemonade Server". `gaia -p` can now download a local
model that is not on disk: it asks first, shows the progress, and
answers.

## Summary

- `gaia -p` asks before downloading a missing local model, then
downloads it and answers. Before, it refused (#7808). Nothing is ever
downloaded without a yes.
- Scripts say yes in advance with `--yes` (`-y`). With nobody to ask and
no flag, the run exits 1 without downloading and without waiting.
- A model added with `gaia model add` downloads by its id alone, with or
without a progress callback.
- The size shown for such a model is the recorded one (18.6 GB), not a
guess from its name (5.0 GB).

## Changes

- **The question.** On stderr: `gaia -p: <id> is not downloaded (18.6
GB). Download it now? [y/N]`. Only `y` or `yes` downloads; any other
answer, a bare Enter or EOF exits 1, and Ctrl+C exits 130, each with a
line saying nothing was downloaded.
- **Nobody to ask.** The question needs stdin and stderr to be a
terminal. With a piped prompt or redirected streams the run exits 1 and
names `--yes`.
- **`--yes` / `-y`.** Same name and meaning as on `gaia init` and `gaia
agent import`.
- **Every pick is covered:** `--model`, `last_model`, `default_model`,
and the hybrid model's classifier and routed model.
- **Progress on stderr.** On a terminal, a bar with percent and
downloaded/total size, redrawn in place. In a pipe or log file, one
plain line every 10%. stdout still carries only the answer, and
`--output-format json` still prints one object.
- **Stopping and failing.** Ctrl+C during the download exits 130; a
failed download exits 1 with Lemonade's reason.
- **Registration.** `pull_model` now fills in an added model's
checkpoint, recipe, vision projector and labels, as `pull_model_stream`
did. Arguments the caller passes still win.
- **Size.** `get_model_info` uses the size GAIA has on record before the
name-based estimate, and the estimate reads the whole parameter count
("27B" used to match "7b").
- Not changed: `gaia schedule run` still refuses a model that is not
downloaded.

## Testing

- `python -m pytest tests/unit/test_print_mode.py
tests/unit/test_custom_models.py
tests/unit/test_lemonade_predownload_checks.py`: the question (yes, no,
Enter, EOF, Ctrl+C), nobody to ask, `--yes`, JSON stdout in every case,
the bar on a terminal and in a pipe, a failed download, the pull payload
and the size.
- Unit test files that touch the changed code: 3790 passed, 37 skipped
(print mode and CLI); 3714 passed, 6 skipped (Lemonade client).
- Live, with `Qwen3-0.6B-GGUF` (0.38 GB): without `--yes` and no
terminal, exit 1 and nothing downloaded; with `-y`, the model downloaded
with a progress line every 10%, stdout was one JSON object, exit 0. The
model load and the answer were stubbed in that run, because the model
server was in use; the test model was deleted afterwards.
- Not run: the typed answer and the in-place bar on a real terminal,
Ctrl+C at a real console, and resuming an interrupted download.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cli CLI changes documentation Documentation changes llm LLM backend changes p2 low priority performance Performance-critical changes ready_for_ci Run CI workflows on draft PR without requesting review tests Test changes

Projects

None yet

2 participants