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
View File
@@ -43,6 +43,16 @@ def test_keep_alive_pins_the_model():
assert "keep_alive" not in mgr._apply_keep_alive({"model": "x"})
def test_hardware_fit_logic():
from synapse import hardware
assert hardware._fit(2.5, 4.0, 16.0) == "gpu" # 2.5+1 <= 4 -> fits GPU
assert hardware._fit(4.7, 4.0, 16.0) == "ram" # too big for 4GB GPU, fits RAM
assert hardware._fit(4.7, None, 16.0) == "ram" # VRAM unknown -> RAM
assert hardware._fit(40.0, 4.0, 16.0) == "no" # too big everywhere
rec = hardware.recommend()
assert "hardware" in rec and all("fit" in m for m in rec["models"])
def test_stt_status_endpoint():
# Reports whether local Whisper is installed; wiring must respond either way.
resp = TestClient(app).get("/stt/status")