Skip to content

fix(ui): stop flagging Macs, Linux and Ryzen AI laptops as unsupported - #4325

Merged
kovtcharov-amd merged 4 commits into
amd:mainfrom
kovtcharov:claude/device-check-default-model
Sep 26, 2026
Merged

kovtcharov-amd merged 4 commits into
amd:mainfrom
kovtcharov:claude/device-check-default-model

Conversation

@kovtcharov

Copy link
Copy Markdown
Contributor

Agent UI Settings showed a red "Processor: darwin" on every Mac and flagged Linux machines and most Ryzen AI laptops as unsupported. The check still required a Ryzen AI Max or a 24 GB Radeon, the bar for the old Qwen3.5-35B default, but the default model is now the 4B Gemma. Nothing acts on that verdict, and memory fit is already covered by the Memory row and the per-agent memory warning. So the verdict is removed, and the Processor row now just names the real CPU (e.g. "Apple M4" instead of "darwin"). The silent except Exception: pass around the check is gone too.

Overlap: #4176, #4265 and #4309 also edit src/gaia/ui/routers/system.py, but not the device block, so any conflict is textual only.

Test plan

  • Backend tests fail before the fix and pass after: all 7 new tests/unit/test_device_check.py tests and the new test_system_status_names_the_processor_without_a_support_verdict failed on main, and all pass with the fix.
  • GAIA_HOME=<tmp> GAIA_DAEMON_HOME=<tmp> python -m pytest tests/unit/chat/ui/ tests/unit/test_device_check.py -q: 1038 passed.
  • Agent UI, run with Node 22 from src/gaia/apps/webui: npx tsc --noEmit -p . is clean and npx vitest run passes 398/398.
  • On a Mac, GET /api/system/status against a real create_app() returns processor_name: "Apple M4" and no device_supported field. On main it returned "darwin" / false.
  • black, isort, and pylint (errors-only config) pass on the changed Python files.
  • Open Settings in the Agent UI on Windows and Linux and confirm the Processor row shows the CPU name without the warning colour.

Fixes #4230

… as unsupported

Agent UI Settings showed a red "Processor: darwin" on every Mac and flagged Linux machines and most Ryzen AI laptops as unsupported. The check still demanded a Ryzen AI Max or a 24 GB Radeon (the bar for Qwen3.5-35B), while the default model is now the 4B Gemma. Nothing in the UI acts on that verdict. Memory fit is already covered by the Memory row and the per-agent min_memory_gb warning, so the verdict is removed and the Processor row is informational.

- The Processor row names the real CPU on macOS (sysctl) and Linux (/proc/cpuinfo) instead of the platform string, and is cached and read off the event loop.
- The status endpoint's `except Exception: pass` around the check is gone, along with GAIA_SKIP_DEVICE_CHECK and the remote-URL bypass that only existed to silence it. Detection failures are logged and hide the row.
- device_supported is removed from SystemStatus and the Agent UI types; nothing else consumed it.

Fixes amd#4230
@github-actions github-actions Bot added the tests Test changes label Sep 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

This removes the hardware "supported / unsupported" verdict from the Agent UI Settings panel and turns the Processor row into a plain, informational CPU name — which is the right call now that the default model is a 4B Gemma rather than the 35B that set the old 24 GB bar. The removal looks complete: nothing in the backend, the UI, or the Go TUI still reads the old field, and the silent except Exception: pass around the check is gone rather than relocated.

One thing to fix before merge: the CLI reference still tells users the Agent UI requires a Ryzen AI Max or a 24 GB Radeon, and that unsupported devices get a warning banner. That is exactly the claim this PR deletes from the product, so the docs would ship contradicting the code. It's a one-line edit; a suggested replacement is below.

Smaller things worth a look: the processor name is cached for the life of the server, including the empty result from a transient detection failure, so a one-off hiccup hides the row until restart; and a stale "Device compatibility check" comment survives on the backend model even though its TypeScript counterpart was removed.

Real-world evidence

No evidence-bundle.md was produced for this PR, so I did not run the surface myself — my verdict rests on static review plus the evidence in the PR description, which is solid for the backend and the build:

  • Backend: tests/unit/chat/ui/ tests/unit/test_device_check.py → 1038 passed, with the new tests failing on main first.
  • Agent UI: npx tsc --noEmit clean, npx vitest run 398/398.
  • Live route on a Mac: GET /api/system/status returns processor_name: "Apple M4" and no device_supported, versus "darwin" / false on main.

The one gap is the pixels: the Settings-panel check on Windows and Linux is still unticked in the test plan. Per the review rubric that's a nudge, not a blocker — the underlying route evidence is present. Worth posting a Settings screenshot when the strix-halo lane runs.

🔍 Technical details

Issues

🟡 Stale hardware requirement in the CLI reference (docs/reference/cli.mdx:96)

The Note still reads "The Agent UI requires an AMD Ryzen AI Max (Strix Halo) or an AMD Radeon GPU with ≥ 24 GB VRAM. If your device is not supported, a dismissible warning banner will appear in the UI." Both halves are false after this change — there is no verdict and no banner. CLAUDE.md's doc-sync rule ("a functional change must update EVERY doc that describes it") applies here.

  `gaia chat --ui` continues to work as an alias. The Settings panel reports your processor, memory and model status for information — GAIA does not gate the Agent UI on the processor model.

docs/releases/v0.17.0.mdx:71,74 also mention the old requirement and GAIA_SKIP_DEVICE_CHECK, but those are historical release notes — leave them.

🟢 lru_cache also caches the failure (src/gaia/device.py:116)

get_processor_name() returning "" on a sysctl timeout or an unreadable /proc/cpuinfo is memoized for the process lifetime, so a transient failure hides the Processor row until the server restarts. Caching only a non-empty result keeps the "compute once" win without that stickiness — e.g. keep an uncached _detect_processor_name() and have the cached wrapper skip storing empties, or accept it as harmless given detection is near-deterministic.

🟢 Stale comment on the backend model (src/gaia/ui/models.py:81)

The TypeScript type dropped its // Device compatibility check comment; the Pydantic model kept it above a field that is now display-only.

    # Display-only CPU name for the Settings panel; None when undetectable

🟢 Windows no longer falls back to platform.processor() (src/gaia/device.py:131-152)

If the registry read fails on Windows the row now disappears rather than showing Intel64 Family 6 Model .... That reads deliberate given the docstring ("callers hide the row rather than show a guess") — flagging only so it's a conscious choice, not a side effect of the rewrite.

Strengths

  • The removal is genuinely complete, not half-done: device_supported, check_device_supported, get_gpu_info, GITHUB_DEVICE_SUPPORT_URL and GAIA_SKIP_DEVICE_CHECK have no live references left anywhere in src/, the webui, or tui/ (only a captured eval artifact and historical release notes mention them).
  • test_no_device_support_verdict_remains and assert "device_supported" not in data are good regression guards — they'll fail loudly if the gate is reintroduced by a merge, which is more than a deletion PR usually leaves behind.
  • Exception handling moved the right way: broad except Exception: pass replaced with OSError / subprocess.SubprocessError plus a debug log, and the blocking sysctl call is pushed off the event loop with asyncio.to_thread.

The Agent UI no longer computes a support verdict or shows an unsupported-device
banner, so the Note promising a Ryzen AI Max / 24 GB Radeon requirement described
behavior that this branch deletes.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Fixed the docs contradiction the review flagged, plus the stale comment.

docs/reference/cli.mdx still promised the Agent UI requires a Ryzen AI Max or a 24 GB Radeon and would show a warning banner on unsupported devices — exactly the behavior this PR deletes. The Note now says the UI doesn't gate on the processor and the Settings panel is informational. Also replaced the # Device compatibility check comment above processor_name with one describing what the field is now.

Merged origin/main in (clean, no conflicts). tests/unit/test_device_check.py + tests/unit/chat/ui/test_models.py: 38 passed. check_doc_links.py --internal-only: 0 broken. black/isort clean.

🔍 Technical details

Confirmed the claim was genuinely dead before editing: git grep for device_supported, check_device_supported, GAIA_SKIP_DEVICE_CHECK and DEVICE_SUPPORT_URL across src/ and tui/ returns nothing on this branch, so the doc was the only place the requirement still existed outside historical release notes. Left docs/releases/v0.17.0.mdx alone as the review suggested — it's a historical record.

Not addressed here (both 🟢 in the review, and neither is a correctness claim in shipped docs): the lru_cache memoizing an empty detection result, and the deliberate removal of the Windows platform.processor() fallback.

@github-actions github-actions Bot added the documentation Documentation changes label Sep 26, 2026
# Conflicts:
#	src/gaia/ui/routers/system.py
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Sep 26, 2026
Merged via the queue into amd:main with commit 9492f63 Sep 26, 2026
43 of 45 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the claude/device-check-default-model branch September 26, 2026 06:04
pull Bot pushed a commit to bhardwajRahul/gaia that referenced this pull request Sep 26, 2026
…kend (amd#4345)

The Agent UI's TypeScript API types are written by hand, and nothing
checked them against what the backend actually sends. Five had already
drifted: settings were missing the agent mode, system status was missing
the active profile, schedules were missing their parsed config, and
three fields were typed as never-null although the backend sends null.
Now CI fails and names the field whenever a hand-written type and the
backend disagree, and those five types are fixed. Nothing changes for
users; no UI code read the missing fields yet.

This is the type-generation half of amd#4246. It also covers amd#3327's
"snapshot the schema" and "check the TS types agree" items, but not its
route `response_model` and conformance-test items.

## Test plan

- [x] `python -m pytest tests/unit/chat/ui/test_export_openapi.py
tests/unit/chat/ui/test_models.py tests/unit/chat/ui/test_server.py
tests/unit/test_webui_agent_info_contract.py -q`: 170 passed
- [x] `python -m gaia.ui.export_openapi --check` exits 0, also from
another working directory with different env
- [x] `cd src/gaia/apps/webui && npx tsc --noEmit`: clean. With `main`'s
`types/index.ts` restored it fails five times, naming `agent_mode`,
`active_profile`, `schedule_config`, `mail_provider`, `extension`
- [x] `cd src/gaia/apps/webui && npm test`: 400 passed. Deleting one
line from `api.gen.ts` fails the new generation test and `node
scripts/gen-api-types.mjs --check`
- [x] `npm run build` succeeds
- [x] black, isort, pylint clean on the new Python files
- [ ] CI: the Agent UI Vitest job's new Type-check step passes

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

**The pipeline:** `python -m gaia.ui.export_openapi` writes
`src/types/api.schemas.json` from `create_app(":memory:").openapi()`,
then `npm run gen:api-types` writes `src/types/api.gen.ts`. Each step
has a stale check: a pytest test for the JSON and a Vitest test for the
TS. `src/types/apiContract.ts` then compares 18 hand-written wire types
with their generated counterparts at compile time. It flags backend
fields missing from TS, TS fields never sent, and kind mismatches
(string/number/boolean/null/array/object). It also has a self-test so it
can't pass vacuously. `tsc` runs in the PyPI build on every PR, and now
in the Agent UI Vitest job too.

**Why not openapi-typescript:** it has a peer dependency on
`typescript@^5` and uses the TS 5 compiler API. The Agent UI is on
TypeScript 7, the native port, which has no JS API, so npm refuses the
install. Its 6.x line has no TS dependency but pulls a vulnerable
`undici`. `[email protected]` is pinned exact and adds no
new `npm audit` findings (still 6, all pre-existing). The lockfile was
written with npm 11 to keep its `libc` fields.

**Only the component schemas are snapshotted, not the full OpenAPI
doc.** Route docstring edits don't cause regenerations, since the types
don't depend on them.

**AgentInfo's 14 "TS-only" fields aren't drift.** They're Hub catalog
fields from `merge_with_registry`, and
`tests/unit/test_webui_agent_info_contract.py` (amd#3846) already checks
each one against its emitter. The contract allowlists exactly those 14.

**Not covered:** camelCase view models (`Message`, `AgentStep`,
`CommandOutput`), and TS types whose routes have no `response_model`
(tunnel, MCP, connectors). The latter are amd#3327's remaining work.

**Things to know:**
- CI installs unpinned `fastapi`/`pydantic`, as the email agent's
`export_openapi --check` already does. The committed snapshot matches
the current latest (fastapi 0.141.1, pydantic 2.13.5), but a future
release that changes schema output would need a regenerate.
- A dependabot bump of `json-schema-to-typescript` or its `prettier`
dependency may need `npm run gen:api-types` run on its PR.

**Overlap:**
- amd#4325 removes `SystemStatus.device_supported` from the backend and TS.
Whichever of the two PRs merges second must rerun the two regenerate
commands. The fixture edits touch separate hunks.
- Other open PRs that edit pydantic models in `src/gaia/ui/` need the
same regenerate after this lands.
- amd#4186 and amd#4340 don't touch these files.
</details>

Part of amd#4246

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ui): Settings flags every Mac, Linux machine and most Ryzen AI laptops as unsupported

2 participants