From 848eee5d1ccd3e4db01d68c4ff512928bff981c7 Mon Sep 17 00:00:00 2001
From: duffyduck
Date: Sat, 31 Oct 2026 19:14:24 +0100
Subject: [PATCH] =?UTF-8?q?feat(diagnostic):=20Modell=20per=20HuggingFace-?=
=?UTF-8?q?Link=20in=20den=20Katalog=20=E2=80=94=20mit=20GGUF-Vorschlaegen?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bisher kamen Modelle nur ueber "Von HuggingFace aktualisieren" und die
Trends in den Katalog. Jetzt: Feld "HuggingFace-Link oder org/name".
Hat das Repo kein GGUF (z.B. nur safetensors wie Virtue-AI-HUB/VulnLLM-R-7B
oder fdtn-ai/Foundation-Sec-8B), sucht der Server GGUF-Fassungen desselben
Modells (HF-Suche, filter=gguf, nach Downloads) und bietet sie mit
"Diese nehmen" an. Hinzugefuegte stehen danach gefiltert in der Liste.
Getestet gegen HuggingFace: beide Beispiele ohne GGUF erkannt, je 5
ladbare GGUF-Fassungen gefunden (Q4_K_M ~4,7–4,9 GB).
Co-Authored-By: Claude Opus 5.5
---
diagnostic/index.html | 35 +++++++++++++++++++++++++++++++++++
diagnostic/server.js | 41 +++++++++++++++++++++++++++++++++--------
2 files changed, 68 insertions(+), 8 deletions(-)
diff --git a/diagnostic/index.html b/diagnostic/index.html
index 7f09b8f..bebc038 100644
--- a/diagnostic/index.html
+++ b/diagnostic/index.html
@@ -960,6 +960,12 @@
den Fortschritt. Danach ist es im Modell-Dropdown oben waehlbar.
Achte auf den VRAM der Box (Spalte VRAM).
+
+
+
+
+
(lade Katalog…)
@@ -10206,6 +10212,35 @@
'
' + act + '
';
}).join('') + '';
}
+ // Modell per Link/Repo in den Katalog. Ohne GGUF: GGUF-Fassungen vorschlagen.
+ async function addCatalogByLink(repo) {
+ const inp = document.getElementById('llm-catalog-add');
+ const out = document.getElementById('llm-catalog-add-result');
+ const val = repo || (inp.value || '').trim();
+ if (!val) return;
+ out.innerHTML = 'Prüfe ' + escapeHtml(val) + ' auf HuggingFace …';
+ try {
+ const j = await (await fetch('/api/llm-catalog/add', { method: 'POST', headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({ hfRepo: val, manual: true }) })).json();
+ if (j.ok) {
+ _llmCatalog = j.models || _llmCatalog;
+ renderLlmCatalog();
+ inp.value = '';
+ out.innerHTML = '✓ ' + escapeHtml(j.id) + (j.existed ? ' war schon im Katalog' : ' ist jetzt im Katalog') + ' — unten Ziel-Karte wählen und laden.';
+ const s = document.getElementById('llm-catalog-search');
+ if (s) { s.value = j.id; filterLlmCatalog(); }
+ return;
+ }
+ const alts = j.alternatives || [];
+ out.innerHTML = '⚠ ' + escapeHtml(j.error || 'Fehler') + ''
+ + (alts.length ? '