feat(llm): Flotten-Katalog + modell-bewusstes LLM-Routing (Stage C)
ARIA nutzt lokale LLMs auf mehreren ai-boxen; jede Box (llama-swap) kann mehrere Modelle fahren. Auswahl nach MODELL, Box wird automatisch gewaehlt. - xtts/llm-adapter/adapter.py: fragt beim Connect llama-swap GET /v1/models ab und meldet die Modell-Liste in worker_hello (models:[...]), Fallback [LLM_MODEL]. - bridge/aria_bridge.py: Worker-Registry speichert models[]; _pick_worker(service, model=) beruecksichtigt nur Boxen, die das Modell fahren koennen (nachsichtig: keine → None → Broadcast/Claude-Fallback); Round-Robin je service+model verteilt mehrere Projekte auf mehrere Boxen; _local_llm reicht das Modell durch; _worker_list traegt models[]. - diagnostic/server.js: workers-Map + workerList um models[] erweitert. - diagnostic/index.html: Compute-Flotte zeigt bei llm die Modell-Liste; das "Lokales Modell"-Dropdown wird LIVE aus den angemeldeten Boxen gebaut (Vereinigung + kuratierte Namen aus local_models.json, "· N Box(en)"/"offline"), darunter eine kompakte LLM-Box-Liste (Node→Modelle→Health). Speisung aus dem vorhandenen worker_update-Broadcast. Kein Brain-/App-Eingriff. Routing greift nur bei aktivem Lokal-Schalter. Deploy: diagnostic + bridge + llm-Boxen neu bauen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -499,7 +499,7 @@ function workerList() {
|
||||
const now = Date.now();
|
||||
return Array.from(workers.values()).map(w => ({
|
||||
instanceId: w.instanceId, service: w.service, node: w.node,
|
||||
gpus: w.gpus, model: w.model, busy: !!w.busy,
|
||||
gpus: w.gpus, model: w.model, models: w.models || [], busy: !!w.busy,
|
||||
online: (now - (w.last_seen || 0)) < WORKER_OFFLINE_MS,
|
||||
}));
|
||||
}
|
||||
@@ -1019,6 +1019,7 @@ function connectRVS(forcePlain) {
|
||||
workers.set(p.instanceId, {
|
||||
instanceId: p.instanceId, service: p.service || "",
|
||||
node: p.node || "", gpus: p.gpus || "", model: p.model || "",
|
||||
models: Array.isArray(p.models) ? p.models : (p.model ? [p.model] : []),
|
||||
busy: !!prev.busy, last_seen: Date.now(),
|
||||
});
|
||||
broadcastWorkers();
|
||||
@@ -1032,7 +1033,7 @@ function connectRVS(forcePlain) {
|
||||
let w = workers.get(p.instanceId);
|
||||
if (!w) {
|
||||
const svc = String(p.instanceId).split("@")[0];
|
||||
w = { instanceId: p.instanceId, service: svc, node: "", gpus: "", model: "", busy: false, last_seen: 0 };
|
||||
w = { instanceId: p.instanceId, service: svc, node: "", gpus: "", model: "", models: [], busy: false, last_seen: 0 };
|
||||
workers.set(p.instanceId, w);
|
||||
}
|
||||
w.busy = !!p.busy;
|
||||
|
||||
Reference in New Issue
Block a user