feat(models): skip install-time pull; hardware-aware picks in Models tab

Windows installer no longer auto-downloads models; points to the Models tab.
synapse/hardware.py detects RAM + best-effort VRAM and a curated catalog;
GET /models/recommended annotates each model with fit (gpu/ram/no); the Models
page shows detected RAM/VRAM with fit badges and per-row Pull buttons.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jon
2026-07-23 15:46:48 -05:00
co-authored by Claude Opus 4.8
parent 52b3c5c3f0
commit 9aea6d4228
5 changed files with 156 additions and 31 deletions
+10 -27
View File
@@ -305,33 +305,16 @@ Pop-Location
if ($seedOk) { Write-OK "Default model set to $ChatModel" }
else { Write-Warn "Could not persist default model - pick it at the top of the chat instead." }
Write-Step "Pulling models ($ChatModel for chat, $MemModel for memory, $EmbedModel for recall)"
# A prompt, not "press Ctrl+C to skip": Ctrl+C in PowerShell 5.1 terminates the
# whole script, so the escape hatch the installer advertised was also the one
# thing that stopped it finishing - no Ollama cleanup, no summary, no window
# close. Answering "n" declines the download and the installer carries on.
Write-Host " These are several GB. You can skip and pull them later from the Models tab." -ForegroundColor DarkGray
$pullAnswer = Read-Host " Download them now? [Y/n]"
if ($pullAnswer -match '^\s*(n|no)\s*$') {
Write-Warn "Model download skipped - get them from the Models tab when you are ready."
} else {
# No pipe: 'ollama pull' draws a progress bar with cursor control, and piping it
# (to Out-Host or anything else) buffers the redraws - the download then shows no
# output for minutes and reads as a hang. Let it own the console.
# No try/catch either: a native command that exits non-zero does not throw, so
# the catch never fired and a failed pull was reported as success.
ollama pull $ChatModel
if ($LASTEXITCODE -eq 0) { Write-OK "$ChatModel ready (default chat model)" }
else { Write-Warn "$ChatModel pull skipped/failed - pull it from the Models tab later." }
ollama pull $MemModel
if ($LASTEXITCODE -eq 0) { Write-OK "$MemModel ready (memory curator)" }
else { Write-Warn "$MemModel pull skipped/failed - the memory service will fall back to the chat model." }
ollama pull $EmbedModel
if ($LASTEXITCODE -eq 0) { Write-OK "$EmbedModel ready (conversation recall)" }
else { Write-Warn "$EmbedModel pull skipped/failed - recall will fall back to lexical search." }
}
# No auto-download: the right models depend on the machine (a 4GB GPU can't fit
# an 8B model). The Models tab detects VRAM/RAM and marks which models fit, so
# the user pulls the right ones there instead of us guessing several GB.
Write-Step "Skipping model download (pick hardware-appropriate models in the app)"
Write-Host " No models were downloaded. Open NexusOS -> Models: it detects your" -ForegroundColor DarkGray
Write-Host " VRAM/RAM and flags which models fit (green = GPU, yellow = CPU/RAM)." -ForegroundColor DarkGray
Write-Host " Pull at least:" -ForegroundColor DarkGray
Write-Host " - $EmbedModel (required for recall / document search)" -ForegroundColor Gray
Write-Host " - a chat model the Models tab marks as fitting your GPU (or $ChatModel on a big one)" -ForegroundColor Gray
Write-Host " - $MemModel for the memory curator (optional)" -ForegroundColor Gray
# -- Make Ollama manual-start (NexusOS owns the lifecycle) ----------------------
Write-Step "Setting Ollama to manual start"