Commit Graph

16 Commits

Author SHA1 Message Date
Hitonabi d8fe1f8097 fix+feat: offene Punkte abgeschlossen
Kontext in Connect-Snippet:
- ConnectPanel: max_tokens nutzt jetzt den echten konfigurierten Kontext
  des Modells (m.meta.ctx) statt hartkodiertem 32768 -> Zed sieht 128k

Phase D - 'Immer aktiv halten' Toggle:
- models.py: UpdateReq bekommt optionales ttl-Feld
- update_model: setzt TTL wenn angegeben (ctx und ttl unabhaengig)
- ModelsPanel: Checkbox 'Immer aktiv halten' im Konfig-Modal
  (TTL=99999 = nie entladen, TTL=300 = Standard 5min)

MoE tps-Schaetzung:
- hw_math.py: extract_active_params_b() erkennt A3B-Suffix
- estimate_speed(): moe_active_ratio-Parameter, sqrt-Boost fuer MoE
- evaluate_fit(): name-Parameter (optional) fuer automatische MoE-Erkennung
- cookbook.py: alle evaluate_fit-Aufrufe mit name= versehen

Cleanup:
- static/js/panels/*.js + static/js/main.js geloescht (Dead Code)
- wird-Datei (versehentlich committet) geloescht
- CLAUDE.md: KISS-Statement auf Vite+Svelte-Stand aktualisiert

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 22:21:15 +02:00
Hitonabi 5e9471a778 fix(vision): mmproj-Projektor wird jetzt automatisch mitgeladen
Bisher: install-recipe + install-model luden nur die Haupt-GGUF, aber
nicht den mmproj-Projektor → Vision-Modelle starteten ohne --mmproj und
konnten keine Bilder verarbeiten (obwohl der Hinweis sagte 'wird automatisch ergänzt').

Fix:
- _pick_mmproj(repo): findet die mmproj-F16/BF16-Datei im HF-Repo
- install-recipe: lädt mmproj mit hf download (multi-file) + ergänzt --mmproj/--jinja im cmd
- install-model: gleicher Fix
- Requirement-Text präzisiert (explizit 'mmproj-F16 wird mitgeladen')

hf-cli unterstützt mehrere Dateien pro Download-Aufruf → ein einziger Job
für Haupt-GGUF + Projektor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 22:13:02 +02:00
Hitonabi 82d15d82db fix(phase-a): Kontext-Cap, Download-State, Recipe-Edit, OS-Badge, Swap-Flash
A1: 32768-Kontext-Cap entfernt (install-recipe, install-model, register) →
    max_ctx_for() liefert nun bis zu 128k auf Strix Halo; behebt "context
    size exceeded" bei externen Tools.
A2: Download-State jetzt im Status-Endpoint sichtbar: Modelle zeigen
    "↓ Download X%" statt "bereit" während Job läuft (Backend + Frontend).
A3: PUT /api/cookbook/user-recipe/{id} + Edit-Button (✎) für eigene Setups.
    Download-Modal setzt Kontext-Input automatisch auf optimal.
A4: /api/updates liefert apt_cache_age_h; Badge zeigt Tooltip + ⚠ wenn >24h.
A5: Swap-Flash: Topbar-Text pulst kurz teal wenn Modell den State wechselt.
A6: LLM-Engine-Update fragt jetzt per confirmModal nach (Konsistenz).
A7: Event-Delegation statt per-render addEventListener in models.js.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 21:33:03 +02:00
Hitonabi 022c42dccb feat(cookbook): Elite-Lineup + MoE-Badge/Faehigkeit + Best-of-4
- Elite-Lineup-Rezept (5 Rollen: coder/manager/reviewer/vision/scout), MoE-orientiert -> wird automatisch 'Beste Wahl' (meiste Modelle, passt).

- MoE-Erkennung clientseitig aus Repo-Name (8xNB / -A3B / mixtral/moe); Chip 'MoE - ~XB aktiv' in Discover-/Such-Karten + Rezept-Detail.

- Faehigkeits-Chip (Bilder/Coden/Logik/Agenten/Allrounder) je Modell.

- Discover hebt je Kategorie das beste lauffaehige Modell hervor (recommended pro Kategorie: bester Fit, dann Downloads).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 17:24:56 +02:00
Hitonabi 4077d06b2d feat(rollen): echte Modellnamen als API-ID + Rollen als Tags/Alias
Modelle erscheinen jetzt mit ihrem ECHTEN Namen (= API-Name, den man in Zed/
OpenCode angibt) statt unter "coder"/"vision". Die Rolle wird ein zusaetzlicher,
sprechender Name (llama-swap-`aliases`) -> in der API funktionieren BEIDE.

- llamaswap.py: model_id_from_path (Repo-Ordner ohne -GGUF) + set_role_alias
  (Rolle als eindeutiger Alias, beim Setzen bei anderen Modellen entfernt) +
  ROLE_IDS (vision/coder/scout/reviewer/manager).
- models.py: register schreibt Key=Modellname, Rolle als Alias; /status liefert
  role + aliases + api_ids; neuer POST /set_role. Rueckwaertskompatibel: Legacy-
  Eintraege (coder/vision ohne Alias) behalten ihren Key als Rolle.
- cookbook.py: install-recipe/-model nutzen dasselbe Schema (Name + Rollen-Alias).
- models.js: Zeile zeigt echten Namen + Rollen-Tag + API-Name (klick=kopieren);
  neuer "Rolle"-Dialog mit 5 Schnellwahl-Rollen + freier Eingabe.
- cookbook.js: Profi-Download-Feld ist jetzt optionale Rolle (Name kommt vom
  Modell), Pflichtfeld-Pruefung entsprechend gelockert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 16:58:07 +02:00
Hitonabi 0c16fb28c2 feat(cookbook): autonome Modell-Entdeckung aus vertrauenswuerdigen Quellen
"Aktuell beste Modelle fuer dein System": fragt vertrauenswuerdige HF-Orgs
(unsloth/bartowski/ggml-org/lmstudio-community) LIVE ab, kategorisiert die
Treffer (vision/coder/reasoning/agent/scout), filtert per hw_math auf das,
was auf die Hardware passt, und cached das Ergebnis (TTL 12 h, lazy + Knopf
"Aktualisieren"). Damit bleibt das Cookbook von selbst aktuell, ohne dass
Modelle hartkodiert werden.

- sources.py: TRUSTED_AUTHORS + CATEGORIES + SKIP_TOKENS (reine Daten).
- config.py: DISCOVER_CACHE_PATH (persistent neben den Modellen, uebersteht
  Deploys) + DISCOVER_TTL.
- cookbook.py: /api/cookbook/discover (force-Param), refresh_discover,
  Bestandsabgleich (_model_installed -> "schon installiert als X") und
  ehrliche Voraussetzungen je Modell (Vision->mmproj/jinja, unquantisiert,
  zu gross/knapp).
- cookbook.js: Sektion mit Kategorien, Fit-Ampel, Downloads, Hinweisen,
  1-Klick-Installieren bzw. "installiert"-Markierung; "Aktualisieren"-Knopf.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 16:47:37 +02:00
Hitonabi 81f6861df8 feat: eigene Cookbook-Setups erstellen & loeschen
- Nutzer koennen im Cookbook eigene Use-Case-Setups anlegen (Titel, Beschreibung,
  beliebige Modelle: Repo + Rolle + Quant). Groesse wird aus dem Repo-Namen
  abgeleitet; Fit-Ampel + optimaler Kontext kommen wie bei kuratierten Setups
  zur Laufzeit aus hw_math.
- Persistenz: JSON-Datei (MC_USER_RECIPES, Default /srv/models/...) -> ueberlebt
  Deploys (liegt bewusst NICHT im rsync-Ziel).
- /api/cookbook/recipes merged eingebaute + eigene Setups; install-recipe findet
  beide. Neue Endpunkte POST/DELETE /api/cookbook/user-recipe.
- UI: "+ Eigenes Setup", Modal mit dynamischen Modell-Zeilen; eigene Karten mit
  "Dein Setup"-Tag + Loeschen. "Beste Wahl" bleibt auf kuratierte beschraenkt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 16:13:55 +02:00
Hitonabi 3cf36d436b feat: echter Download-Fortschritt via Datei-Polling
`hf` gibt im Nicht-TTY-Modus keinen Fortschritt aus (am Bosgame verifiziert:
0 CR-Frames). Stattdessen pollt jobengine.attach_download_progress die
wachsende <local-dir>/.cache/huggingface/download/*.incomplete-Datei gegen die
Gesamtgroesse aus der HF-Tree-API (cookbook.hf_file_size) -> exaktes %.

- attach_download_progress an /api/download, install-recipe, install-model
- Frontend (Aktivitaet + Server-Karte): nutzt job.progress bevorzugt,
  Log-%-Parsing bleibt Fallback fuer Tools, die selbst Prozente ausgeben

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:26:27 +02:00
Hitonabi 720b47a6e1 feat: Cookbook-Download-Fix, Live-Update-Konsole, Profi-Highlight, OpenCode-Guide
Backend:
- hf_bin() + HF_DOWNLOAD_ENV zentral in config.py; install-recipe und
  install-model in cookbook.py nutzten weiter das fehlende `hf` + falsches
  XET-Env -> Haupt-Installationsweg war ebenso kaputt, jetzt konsistent gefixt

Frontend:
- Server: laufende Updates (LLM-Engine/OS) live auf der Server-Seite mitlesbar,
  inkl. klarer Fertig-/Fehlgeschlagen-Meldung (onJobs + Aktueller-Vorgang-Karte)
- Cookbook/Profi-Modus: meistgeladenes, passendes Modell wird als
  "★ Beste Wahl für dein System" hervorgehoben (analog zu den Templates)
- Verbinden: OpenCode korrekt per opencode.json (@ai-sdk/openai-compatible)
  statt irrefuehrender Felder; erklaert "Connect to API"-Fehler (LAN-IP statt
  localhost)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:03:12 +02:00
Hitonabi e8685f16f3 v6 Phase C: Cookbook diversifiziert + 'Beste Wahl' hervorgehoben
- recipes.py: best-in-class je Use-Case, herstelleruebergreifend (Qwen3-Coder, Gemma 3,
  Mistral Small, DeepSeek-R1, Qwen3-VL) + neue Kategorie 'Nachdenken & Logik'.
- recipes-Endpoint: recommended_id = reichstes Setup das komplett passt.
- cookbook.js + CSS: 'Beste Wahl fuer dein System' (Rahmen + Badge).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:42:31 +02:00
Hitonabi d7a3253740 v6 Phase A: Dashboard & Toolbar
- 'Dein Stack' zeigt echtes Modell (Dateiname) hinter coder/scout/vision.
- Top-News-Karte auf der Uebersicht (neben Stack).
- Toolbar-Update-Badges: /api/updates (OS via apt-Cache + Modell-Upgrades),
  klickbar -> Server bzw. News. compute_upgrades aus cookbook wiederverwendet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:38:18 +02:00
Hitonabi b75335dafd v5 Phase 3: News-Quellen aufgeraeumt + Upgrade-Vorschlaege
- news.py: Git-Release-Feeds raus (b9745-Rauschen), Qualitaetsquellen rein
  (HuggingFace, r/LocalLLaMA, Simon Willison, Latent Space, Ahead of AI, The Batch).
- cookbook.py: /upgrades (matcht installierte alte Modelle gegen UPGRADES-Map) +
  /install-model (einzelnes Modell tauschen, GGUF dynamisch, optimaler ctx).
- news.js: 'Fuer dich: Upgrades'-Sektion oben (Modell X ersetzt dein Y, weil ... [Installieren]).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:18:37 +02:00
Hitonabi 970e04af30 v5 Phase 2: aktuelle Modelle, GGUF-Klartext, Tools, HF-Token
- recipes.py: Juni-2026-Modelle (Qwen3-Coder-30B-A3B, Qwen3-8B/30B, Qwen2.5-VL-7B, Qwen3-4B);
  nur Repo gespeichert, GGUF-Datei wird beim Installieren dynamisch aufgeloest (_pick_gguf) +
  UPGRADES-Map fuer Phase 3.
- cookbook: 'kein GGUF' neutral statt rot + GGUF-Erklaerung (infoDot); ctx-infoDot.
- connect.js: 'Empfohlene Tools (Juni 2026)' (OpenCode/Cline/Continue) + MCP-Hinweis.
- HF-Token in Einstellungen -> als HF_TOKEN an Downloads/Recipe-Install durchgereicht.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:13:30 +02:00
Hitonabi 29f37bd916 v4 Schritt 2: Cookbook 2.0 — Use-Case-Setups (Stacks)
- recipes.py: 6 kuratierte Use-Case-Stacks (Coding, Vision, Chat, LongDoc, Agents, Fast).
- cookbook.py: /recipes (Stack-Fit pro Modell + Gesamturteil) + /install-recipe
  (download + register aller Modelle mit optimalem, gedeckeltem Kontext).
- cookbook.js: Use-Case-Karten als Haupteinstieg + Setup-Modal + 'Komplettes Setup
  installieren'; Roh-Suche in 'Profi-Modus' (collapsible).
- models.py /register: exists()-Check entfernt (fixt frischen Download-Install).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 13:36:36 +02:00
Hitonabi 654720ed05 v4 Schritt 1: optimale Kontextfenster automatisch ermitteln
- hw_math: max_ctx_for() (Umkehrung der ctx-Heuristik) + extract_params_b + recommend_ctx.
- cookbook.py: optimal_ctx pro Datei in analyze + evaluate.
- models.py status: params_b + optimal_ctx pro Modell (psutil-RAM).
- models.js Konfig-Modal: Empfehlung + 'Optimal uebernehmen'.
- cookbook.js Modal: 'Empfohlener Kontext ... uebernehmen'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 13:13:30 +02:00
Hitonabi 0a81a9fe99 feat: smart cookbook MVP mit odysseus fit logik 2026-06-20 23:13:05 +02:00