Repository navigation
Description
Overview
Add a user-visible hardware-requirement label per model in the model selection UI, so a user manually picking between catalog entries has a clear cue about which model their machine can actually run.
Problem Statement
PR #1134 landed Gemma 4 E4B and 31B alongside the existing Ministral 3B/8B entries and wired up RAM-tier-based auto-recommendation (recommended_model_id_for(family)). That covers the "default recommendation" path.
What it does not cover: a user who opens the model manager and wants to compare options themselves. The UI currently shows only file size and quantization (packages/desktop-app/src/lib/components/settings/model-manager.svelte lines 95-99). A user on 8 GB RAM has no signal that Gemma 4 31B will be unusable until they've downloaded ~18.7 GB and tried to load it.
#1094 listed "Both models appear in model selection UI with hardware requirements visible" as an acceptance criterion. That criterion was deferred from PR #1134 for scope reasons (the reviewer agreed the deferral was reasonable; this issue is the explicit follow-up).
Proposed Solution
Carry a minimum-RAM hint on every catalog entry, propagate it through the Tauri serialization boundary, and render it in the model card.
Implementation Approach
Phase 1: Catalog metadata
- Add
min_memory_gb: u8field toCatalogEntryinpackages/agent/src/local_agent/model_manager.rs. - Populate it on all four existing entries:
MINISTRAL_3B: 8MINISTRAL_8B: 16GEMMA_4_E4B: 16GEMMA_4_31B: 24
Phase 2: Propagation to frontend
- Add
pub min_memory_gb: u8toModelInfoinpackages/agent/src/agent_types.rs. - Populate it in
GgufModelManager::list()(themodels.push(ModelInfo { ... })block) from the catalog entry. - For
OllamaInferenceEngine'sModelInfoconstruction inpackages/agent/src/local_agent/ollama_model_manager.rs, pick a sensible value (Ollama models are size-driven, so 16 GB is a reasonable default) or model it asOption<u8>and have Ollama returnNone. - Add the matching field to the TypeScript
ModelInfotype inpackages/desktop-app/src/lib/types/agent-types.ts.
Phase 3: UI surfacing
- In
packages/desktop-app/src/lib/components/settings/model-manager.svelte(the.model-card-metablock around lines 95-99), add a third inline span:Requires {min_memory_gb} GB RAM. - When the user's detected system RAM is below
min_memory_gb, dim the card or add a subdued warning chip so the constraint is obvious before download.
Acceptance Criteria
-
CatalogEntry::min_memory_gbfield added and populated for all four catalog entries -
ModelInfocarriesmin_memory_gbthrough serde and Tauri serialization - TypeScript
ModelInfotype matches the Rust struct - Model selection UI shows "Requires X GB RAM" for every model
- Models the current machine cannot run are visually distinguished (dimmed / warning chip)
- Tests cover the new field on
CatalogEntry(extendlist_models_have_correct_metadataandlist_includes_gemma4_entries_with_correct_metadatainmodel_manager.rs) - Code passes
bun run quality:fix - Tests pass (
bun run test:all)
Technical Specifications
Reference Files
- Catalog:
packages/agent/src/local_agent/model_manager.rs(CatalogEntryat lines ~36-60; entries at ~63-118;list()impl around line 245) - Shared types:
packages/agent/src/agent_types.rs(ModelInfostruct) - Ollama bridge:
packages/agent/src/local_agent/ollama_model_manager.rs(oneModelInfo {...}construction site) - Frontend types:
packages/desktop-app/src/lib/types/agent-types.ts(ModelInfointerface) - UI:
packages/desktop-app/src/lib/components/settings/model-manager.svelte(model card meta row)
Detection of System RAM
The system-RAM detection function already exists in the same crate: detect_system_ram() in packages/agent/src/local_agent/model_manager.rs. The UI does not need to call it directly — expose the comparison via a Tauri command or reuse recommended_model_id_for(family) to highlight the recommended choice. The simplest UX is to surface the static min_memory_gb label and let the user judge against their own machine.
Suggested RAM Thresholds
| Model | min_memory_gb | Rationale |
|---|---|---|
| Ministral 3B | 8 | ~2.1 GB GGUF + Metal working set fits comfortably on 8 GB |
| Ministral 8B | 16 | ~5.2 GB GGUF; needs headroom for context window |
| Gemma 4 E4B | 16 | ~5.0 GB GGUF; validated on M2 Pro 16 GB in nodespace-nlp-experiment |
| Gemma 4 31B | 24 | ~18.7 GB GGUF; matches issue #1094's stated "24 GB+ Apple Silicon" recommendation |
Dependencies
- Add Gemma 4 E4B and 27B as downloadable model options #1094 (parent — Gemma 4 catalog entries already landed)
Related Issues
- Add Gemma 4 E4B and 27B as downloadable model options #1094 (parent)
- Originating review: PR Add Gemma 4 E4B and 31B as downloadable model options (#1094) #1134 (specifically the re-review approving with this work deferred)
Non-Goals
- Hard-blocking downloads on insufficient RAM. The label is informational; users may have reasons to download a model that exceeds their current machine (e.g., transferring to another machine, planning a hardware upgrade).
- Detecting available disk space. That is a separate concern handled in
check_disk_spaceand is unrelated to runtime memory headroom.
Activity
malibio commentedon May 18, 2026
Frontend baseline: 128 files, 3916 tests passed
Add hardware requirement labels to model selection UI (closes #1140) (#…