Repository navigation
fix(ui): Agent UI status reports its own probe failures - #4628
Conversation
A broken ~/.gaia/config.json made the Agent UI silently report the "chat" profile, and a stopped or missing Lemonade sent users to lemonade-server.ai with a promise that GAIA would start it - printed after auto-start had already failed. These now say what went wrong and point at `gaia init` or the start command resolved for this machine. - Agent UI status carries the config load error and the banner shows it - Lemonade remedies lead with `gaia init`; GAIA's own server counts as installed, so its users get the start hint instead of "not installed" - `gaia init` shows hub-catalog and config-reset warnings on the console and logs through gaia.logger - Email/GAIA sidecar connection errors append the resolved start hint - Agent-loop notify failures are logged with the session id - Removed the unreferenced install-ui scripts, the retired litellm extra, the uncalled interactive menu and the unused device-to-recipe map
The status endpoint swallowed failures of its catalog, inference-stats, device and disk probes, so the response looked complete while those fields silently kept their defaults. Each failure now lands in a new probe_warnings list on the status response and is logged at warning (once per distinct message, since the UI polls). - Drop the try around urlparse, which never raises, and its hard-coded fallback. - A failed health query logs its cause instead of only setting the generic lemonade_error. - Model preload logs a failed re-check before loading anyway. - The memory router logs a failed store close and counts embeddings it cannot decode during reconcile. - Memory upkeep is wired for any MemoryMixin agent by direct attribute access, so a renamed method fails loudly instead of quietly disabling consolidation and reconciliation.
|
Verdict: Approve with suggestions When one of the Agent UI's status checks fails (model catalog, inference stats, device info or disk space), the status response now lists the failure instead of quietly leaving a blank field. Memory upkeep also fails loudly if the agent's methods get renamed. The changes are narrow and well tested, and none of the fixes widens an outage: a failed side check still leaves Lemonade reported as running. Nothing blocks merge. The diff also carries #4618's commits (config-error banner, Worth a look before merge:
Real-world evidenceN/A: no evidence bundle was produced for this run. The verdict rests on static review and the unit tests the author reports passing. The 🔍 Technical details🟡 Important
🟢 Minor
Strengths
|
…installed LemonadeClient.initialize now counts GAIA's embedded Lemonade as installed, and reports an unreachable LEMONADE_BASE_URL as not reachable instead of telling the user to run gaia init. The sidecar relay hints drop their own start sentence so the resolved start instruction is the only remedy.
The config-error banner is no longer dismissable, since its dismiss flag also suppressed the Lemonade-down warning. A non-UTF-8 config.json now raises GaiaConfigError, so the status endpoint reports it instead of returning 500.
Each probe now clears its last-warning entry on success, so a failure that returns after a healthy poll logs a warning instead of debug. A non-200 from Lemonade's /system-info is reported in probe_warnings like the other probes.
Merge after #4618 — this branch contains its commits.
The Agent UI status endpoint hid its own probe failures. When the model-catalog, inference-stats, device or disk check failed, the response still looked complete: the GPU row went blank, download state stayed unknown and stats disappeared, with nothing to say why. Each failure is now listed in a new
probe_warningsfield on/api/system/statusand logged at warning. The UI doesn't render the field yet (no Node on the authoring machine), but the API exposes it and the TS types include it. Memory upkeep also no longer stops silently: if the agent's consolidate/reconcile methods are renamed, wiring them now fails loudly.🔍 Technical details
httpx.HTTPError,ValueError,TypeError,AttributeError) instead ofException. Anything else falls through to the existing "Lemonade health query failed" path, which now logs its cause.urlparsetry/except was dead code (it never raises) and is removed._register_agent_memory_opschecksisinstance(agent, MemoryMixin)and then reads the attributes directly. Agents without memory are still skipped.disk_space_gbstill defaults to0.0when the disk probe fails, because making it nullable would need a frontend change I couldn't verify without Node. The new warning explains the 0.python -m gaia.ui.export_openapi, with this worktree'ssrconPYTHONPATH. Theapi.gen.tsline was added by hand to match the generator's output.Test plan
pytest tests/unit/chat/ui/test_status_probe_failures.py: stats, device, catalog (exception and HTTP 500) and disk failures each appear inprobe_warnings, Lemonade stays "running", repeat failures log at warning once, memory-op wiring (registers, skips, fails on a renamed method), and the store-close failure is loggedpytest tests/unit/test_init_command.py tests/unit/installer tests/unit/chat/ui tests/unit/test_memory_router.py tests/unit/test_ui_gpu_detection.py tests/integration/test_memory_api_integration.py(1658 passed), run with freshGAIA_HOME/GAIA_DAEMON_HOMEtest_export_openapipasses against the regenerated schemacd src/gaia/apps/webui && npm run gen:api-typesproduces no diff toapi.gen.ts