Repository navigation
feat(diagnostics): save a local problem report when a model call fails - #6665
Conversation
"Couldn't reach the local LLM" told a maintainer nothing: not the address the agent used, whether Lemonade or FastFlowLM was alive, or what GAIA asked it to load. Now the failure itself writes a redacted JSON record under ~/.gaia/failures/ and the error names it (GF-YYYYMMDD-HHMMSS-xxxx). The record holds versions, OS and kernel, Lemonade's devices and backend states (FLM/llama.cpp versions, NPU), the agent's address against Lemonade's, whether a key was sent (never the key), loaded models, lemond/llama-server/flm liveness and lemond's exit, the last load requests and how their window was chosen, the chat request's size (never its words), timing, the HTTP outcome, and the lemond.log tail. Ten kept, 256 KB each. It only reads a Lemonade on this PC, with no proxy or redirect; nothing is sent anywhere. Recorded from the agent's failure answer, the Agent UI chat errors, failed setup runs, sidecars that never start and `gaia llm`. `gaia diagnostics` bundles the records, and a "Save a troubleshooting report" button sits under a failed answer and in Settings > Privacy, reusing setup's report.
|
Verdict: Request changes When a local model call fails, GAIA now saves a redacted problem report on the user's PC and names it in the error, so one bug report carries the fault. The recording is well guarded: a report that can't be built never replaces the user's real error, only a Lemonade on this PC is probed, and keys and the home folder are redacted. One gap in the Agent UI needs fixing first.
Real-world evidenceN/A: no evidence bundle was produced for this run. The verdict rests on static review alone. The chat, setup and CLI failure paths weren't exercised here. 🔍 Technical details🟡 Streamed chat errors drop the record id in the live view ( It would be better still to show the record id in that live bubble, so the user can quote it. A test in 🟡 Agent UI change without screenshot evidence. 🟡 Follow-up: the report note isn't localized. 🟢 Nits
Strengths
|
A failed turn the chat put in its own words dropped the GF- id, so the "Save a troubleshooting report" button only appeared after a reload. The chat error now names the saved report in the user's language. - A setup report asked for as a run fails waits for its problem report. - Two processes noting a model load at once no longer drop one: the shared load file is written under GAIA's cross-process file lock. - The setup journey stopped leaking the daemon and agent sidecars, which start in their own session and kept writing into a home being deleted. - Settings' report card gets its own layout rule.
A real problem report scans every process and probes Lemonade (~2 s), and setup tests left those threads running into later tests, which made unrelated timing-sensitive tests flaky under -n 8. Tests that exercise the report opt in with the failure_records marker.
…irzakhani-5df4d1 # Conflicts: # src/gaia/agents/base/agent.py # src/gaia/apps/webui/src/i18n/locales/ar.ts # src/gaia/apps/webui/src/i18n/locales/en.ts
|
All review points are fixed in d448e6b and the commits before it.
|
The Settings load tests sent their request on a per-request event loop, which cancels the background load task on exit; when the load thread had not started yet, the load never ran. They now keep one loop open for the client's life. The path-access tests waited for the pending-answer flag, which is set before the request is queued, then read the queue at once; they now wait for the request itself. Both failures reproduce every time with a forced delay and pass with it after this change.
The queued request must be granted once a 50 ms lease lapses, but the test allowed 1 s, which a loaded Windows runner exceeded before scheduling the waiter. 5 s still proves the wake-up: without it the request either hangs or gives up at its 10 s limit, and the test fails that way when the wake-up is removed.
…irzakhani-5df4d1 # Conflicts: # src/gaia/apps/webui/e2e/harness.ts
…irzakhani-5df4d1 # Conflicts: # src/gaia/cli.py
…irzakhani-5df4d1 # Conflicts: # src/gaia/agents/base/agent.py
…irzakhani-5df4d1 # Conflicts: # src/gaia/ui/_chat_helpers.py
amd#6777 stopped sending a separate error event, so a failed turn's error now rides on the closing done event. This integration test still looked for the old event and failed on main as well.
…port The test made the cancel undeliverable by closing the fake daemon's listener. Under `go test ./...` another test process can bind that freed port and answer the cancel, so Close saw no error. The fake now drops the cancel's connection without an answer, which fails the same way every time.
The purge test ran the runner's real update-desktop-database and gtk-update-icon-cache over /usr/share, which outlasted its 5 s timeout on a busy Linux runner. It now stubs them, as the file's other maintainer-script tests already do.
…irzakhani-5df4d1 # Conflicts: # tests/integration/test_chat_ui_integration.py
…ffectionate-mirzakhani-5df4d1 # Conflicts: # src/gaia/llm/lemonade_client.py
…ffectionate-mirzakhani-5df4d1 # Conflicts: # src/gaia/ui/_chat_helpers.py
## Why this matters v0.26.0 makes the first reply in a new chat much faster by loading tools on demand (amd#6449), and adds long recordings and video links (amd#6451), read aloud in both apps (amd#6489), a live system usage strip (amd#6548), cloud spend in the composer (amd#6775), local problem reports for failed model calls (amd#6665) and GAIA on stock GNOME without a tray (amd#6868). Among the fixes, a duplicated edit can no longer damage a file and long-running agents on macOS keep answering. 31 commits since v0.25.4; the notes are in `docs/releases/v0.26.0.mdx` and credit 4 outside contributors. This is a minor: 7 `feat` commits, and dynamic tool loading drops two environment variables and the old Beta toggle (listed under Breaking Changes). Merging it moves main to 0.26.0 so `v0.26.0-rc1` can be tagged right after v0.25.4 publishes. The changelog is regenerated before the final. ## Test plan - [x] `python util/validate_release_notes.py docs/releases/v0.26.0.mdx --tag v0.26.0` passes, and with `--tag v0.26.0-rc1` - [x] `mintlify validate` (from `docs/`) passes; the notes have no unescaped `<` or `{` - [x] Narrative word count is 391, under the 600 cap for a minor - [x] `python util/release_versions.py --check`, `python util/check_doc_links.py --internal-only` and `python util/check_doc_versions.py` pass - [x] `python util/check_component_core_api.py --release-version 0.26.0` passes - [x] `pytest tests/unit/test_docs_json_release.py tests/unit/test_check_component_core_api.py tests/unit/test_release_tag.py tests/unit/test_hub_core_version_gate.py tests/unit/test_release_versions.py hub/agents/gaia/python/tests/test_npm_doc_min_version.py`: 232 passed - [ ] CI green on the merge commit - [ ] `release_train_dryrun.yml` passes on that commit before the RC tag <details> <summary>🔍 Technical details</summary> - `test_release_versions.py` simulated a core bump to a hard-coded `0.26.0`, which is a no-op once the tree is on 0.26.0. It now bumps to the next minor above whatever the tree declares. - The flagship agent stays at 0.3.5; its `amd-gaia` floors and `min_gaia_version` move to 0.26.0 through `--stamp`, and its npm CHANGELOG's `[Unreleased]` quotes the new minimum. `hub/components/agent-ui/` is no longer published and is left alone. - `RELEASED_DAEMON_API` no longer exists (amd#5394); the core API guard reads released versions from PyPI. </details> ## Evals to re-run on the RC tag LLM-affecting PRs merged without per-PR evals; run these on `v0.26.0-rc1`: - `gaia_tool_selection`, `tool_selection`, `gaia_core` and `context_retention` for dynamic tool loading (amd#6449, amd#6842) - `gaia_media` and `gaia_voice` (amd#6451, amd#6489, amd#6825) - `gaia_data` and `gaia_honesty` (amd#6828, amd#6831, amd#6817) - `gaia_files` (amd#6844) - `adversarial` (amd#6837) - `memory` and `gaia_memory` (amd#6828, amd#6843) - `gaia_email` (amd#6842) ## Release checklist - [ ] Merge once v0.25.4 has published; amd#6114 (flagship follows core) is not part of this release PR - [ ] Freeze main, wait for green CI on the exact commit, pass `release_train_dryrun.yml`, then push `v0.26.0-rc1` (the RC freezes its own flagship; no agent release needed) - [ ] Before the final: release the flagship from the release commit (`agent-pkg-gaia-v<next>`), merge its pin-lock PR, and pass `check_flagship_release.py` - [ ] Regenerate the changelog if main gains commits before the final tag
When a local model call failed, users saw "Couldn't reach the local LLM" and we couldn't tell why. Their report didn't say which address the agent called, whether Lemonade or FastFlowLM was running, or what GAIA had asked it to load (#6632). Now the failure saves a local problem report on the spot, and the error names it (
GF-20261104-192233-3f2a). One report is enough to root-cause the failure without follow-up questions. Nothing is sent anywhere: the user saves it with Save a troubleshooting report, under the failed answer or in Settings → Privacy, and attaches it themselves.max_tokens, stream. Never the message text. Also:lemond.logtailgaia llm. Errors that already say what happened (out of memory, context overflow, a stop) get no report.gaia diagnosticsbundles them, and leaves them out with--no-logs.Refs #6632
Test plan
python -m pytest tests/unit/test_failure_record.py tests/unit/cli/test_cli_diagnostics.py: one test per failure class, redaction, size cap, loopback-only probing, and an FLM crash during load whose report carries every NPU chat fails with "Couldn't reach the local LLM" on embedded Lemonade (rc4) #6632 fieldpython -m pytest tests/unit: 37,411 passed locally. Two Windows-only tests (System32 guard, tar symlink) fail only after another test leavesplatform.systempatched; they pass on their own and fail the same way on maincd src/gaia/apps/webui && npm test && npm run test:rtl: 2,941 and 340 passed; covers a live chat error keeping its report name and button, and a visual test of the failed answer in English and ArabicGF-report,~/.gaia/failures/holds it, and Save a troubleshooting report downloads a bundle that contains it🔍 Technical details
gaia.llm.failure_record(builds and writes the record) andgaia.llm.call_ledger(in-memory notes of each load and chat request; finished loads also go tofailures/recent-loads.json, because in the Agent UI the backend loads the model and the agent's own process chats with it).LemonadeClient.load_model,chat_completionsandresolve_ctx_sizefeed the ledger. A streamed reply's entry closes when the stream ends, fails or is dropped.GF-id and the button (classifyChatErrorappends it). The setup report waits up to 30 s for the run's record.recent-loads.jsonis written under a file lock, so loads finished at once by several processes are all kept.failure_records: a real one takes ~2 s and its threads were slowing unrelated timing tests under-n 8.POST /api/setup/report, which already runsgaia diagnostics.StageLogsnow uses the same shared component.lemonade-logs-in-uiwork adds a log reader. Once it lands,_lemond_log_tailcan switch to it, and a user-installed Lemonade's log stream can join the record.