Repository navigation
fix(memory): don't download a model for profile inference unasked - #7270
Conversation
Memory > Run Inference on a PC set up with a cloud model used to download and load the local Gemma (5.6 GB) with no question and no progress, behind a log line that only said it was calling the local LLM. It now stops with a message that the local model isn't downloaded and where in Settings to download it. Profile inference runs only on the default local chat model; the route checked that the model is local but not that it is on disk, and Lemonade pulls a missing model on first use. The route now reads Lemonade's catalog and refuses when the model isn't listed as downloaded, and an unreadable catalog refuses as before. Closes amd#7218
|
Verdict: Approve with suggestions Memory › Run Inference no longer downloads the 5.6 GB local model without asking. When the default local model isn't on disk, it now stops with a message saying where in Settings to download it. The fix is narrow and correct, and the tests cover the three cases: not listed, listed but not downloaded, and catalog unreadable.
Real-world evidenceN/A: no evidence bundle was produced for this run. The verdict rests on static review alone. I couldn't run the unit tests here because pytest isn't installed on this runner. The Agent UI surface (Memory › Run Inference) has not been exercised, and the PR's own manual test-plan item is still unchecked. 🔍 Technical detailsIssues 🟡 No real-world evidence for a UI-backed route (PR description): the only end-to-end item in the test plan is unchecked. Route-level evidence would be enough for merge-time CI: a capture of 🟢 Catalog-failure message names the wrong check ( The test asserts only 🟢 Redundant shape check ( Checked, not an issue
Strengths
|
…ails The catalog failure is now usually reached through the download check, so "couldn't confirm it is a local model" named the wrong question. Also drop a shape check list_models already makes.
|
When Lemonade's model list can't be read, the message now says GAIA "couldn't check '' on this PC", which fits both the local-model and the download check. The three tests that read that message assert the new wording and failed before the change.
Merged current |
…rcuit A registered model Lemonade lists under its stripped id must still count as downloaded, another downloaded model must not, and a cloud default must be refused before the catalog is read.
…d#7331) In rc18 a cloud-only user had a 5 GB local model downloaded and loaded without being asked: by the start-up warm-up, by Memory > Run Inference, and by a scheduled run. Each bug fired only from one starting state, and every existing test started from a PC that was already set up, with the client mocked. This adds a matrix that crosses five starting states with three entry points, runs each against the installer journeys' stand-in Lemonade over real HTTP, and asserts what actually reached that server. A new starting state or entry point is one row; every combination is then covered, and a combination with no rule is an error. | | start-up warm-up | Memory > Run Inference | scheduled run | |---|---|---|---| | cloud model as `default_model` | ✅ | ✅ | ✅ | | cloud model picked in the app | ✅ | ✅ (amd#7270) | ❌ **new: amd#7329** | | cloud model as Custom model ID | ✅ (amd#7271) | ✅ | ❌ **new: amd#7329** | | empty cache | ✅ | ✅ (amd#7270) | not asserted | | local model on disk (control) | ✅ | ✅ | ✅ | The two ❌ cells are strict expected failures naming the issue, so the fix has to delete its line. Three more cells failed when this PR opened (amd#7217, amd#7218); their fixes, amd#7270 and amd#7271, merged since, the strict markers tripped as designed, and those lines are gone. **New bug it found:** amd#7184 made `gaia schedule run` honour `default_model`, but a cloud model picked in the desktop app is saved elsewhere, so a scheduled run for that user still loads (and downloads) local Gemma. Filed as amd#7329. ## Test plan - [ ] `python -m pytest tests/unit/test_starting_state_matrix.py -q` reports 14 passed, 2 xfailed - [ ] Delete a line from `KNOWN_BUGS` and the failure prints the requests the server saw, ending in `POST /api/v1/load Gemma-4-E4B-it-GGUF` - [ ] Runs in the unit job; the warm-up column needs the flagship package, so it skips there and runs in `test_gaia_agent.yml`, which now names this file <details> <summary>🔍 Technical details</summary> - `tests/fixtures/fake_lemonade.py` starts `installer/headless/fake_model_server.py` (the server the setup and installer journeys already use) and reads its request log into `pulls`, `loads`, `chats` and `downloads`. No second fake server. A load or chat asked of a model that is not downloaded counts as a download, because real Lemonade fetches it by itself. - The matrix pins installed memory to 128 GB, because the warm-up is skipped on a small PC and a CI runner would hide the bug, and stubs the PC scan so profile inference never reads the machine it runs on. - Not covered here: what the setup and model screens *say* from these states (F1, F6, F43). Those are assertions on API payloads, not on server requests. </details> --------- Co-authored-by: Kalin Ovtcharov <[email protected]>
Memory > Run Inference on a PC set up with a cloud model used to download
and load the local Gemma (5.6 GB) with no question and no progress, behind a
log line that only said it was calling the local LLM. It now stops with a
message that the local model isn't downloaded and where in Settings to
download it.
Profile inference runs only on the default local chat model; the route
checked that the model is local but not that it is on disk, and Lemonade
pulls a missing model on first use. The route now reads Lemonade's catalog
and refuses when the model isn't listed as downloaded, and an unreadable
catalog refuses as before.
Closes #7218
Closes #7218
Test plan
python -m pytest tests/unit/test_memory_router.py(3 new tests fail on main)