feat(local-llm): B0 — Gamebox llama.cpp + RVS-Adapter (Provider-Seite)

Plan B, Phase B0 (Provider): lokales Qwen3-8B auf der Gamebox, angebunden
per RVS wie f5tts/whisper (kein IP-Pflegen, nur URL+Token).

- xtts/llm-adapter/: RVS-Client (spiegelt whisper-bridge: TLS+ws-Fallback,
  Reconnect-Backoff), nimmt llm_request, ruft llama.cpp /v1/chat/completions
  lokal, antwortet llm_response (korreliert per requestId). Nicht-streamend
  in B0; llm_partial fuer B2 reserviert.
- xtts/docker-compose.yml: neue Services `llama` (llama.cpp server-cuda,
  GGUF via ./models, OpenAI-API auf :8081) + `llm-adapter`.
- rvs/server.js: ALLOWED_TYPES += llm_request/llm_response/llm_partial.
- GGUF (mehrere GB) via .gitignore aus dem Repo; xtts/models/ mit .gitkeep.

Topologie-Hinweis: Gamebox@home, ARIA@RZ -> Bounce ueber Internet ist
unvermeidbar (Voice macht's schon so); Router faellt bei Nichterreichbarkeit
per Escalation auf Claude zurueck. Consumer-Seite (Bridge-Relay + Brain-
Client + Router) kommt als naechstes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 09:43:46 +02:00
co-authored by Claude Opus 4.8
parent 79dab81a77
commit 98c78af7ad
8 changed files with 290 additions and 1 deletions
+44
View File
@@ -89,3 +89,47 @@ services:
# Stimm-Embedding) persistent zwischen
# Container-Restarts.
restart: unless-stopped
# ─── Lokales LLM (Plan B, B0) — llama.cpp-Server (GPU) ────────
# Serviert Qwen3-8B (GGUF Q4_K_M) OpenAI-kompatibel auf :8081, NUR im
# Compose-Netz (kein RVS direkt) — die Bruecke macht der llm-adapter.
# Modell-Datei nach ./models/ legen: siehe llm-adapter/README.md.
# VRAM auf der RTX 3060 (12 GB): whisper-small (~1-2) + f5tts (~1-2) +
# qwen3-8b-q4 (~6) ~= 9-10 GB. Passt, aber knapp — bei OOM: LLM_CTX kleiner
# oder Modell auf Q4_K_S/IQ4 wechseln.
llama:
image: ghcr.io/ggml-org/llama.cpp:server-cuda
container_name: aria-llama
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
volumes:
- ./models:/models
command: >
-m /models/${LLM_GGUF:-qwen3-8b-q4_k_m.gguf}
--host 0.0.0.0 --port 8081
-ngl 99 -c ${LLM_CTX:-8192} --jinja
restart: unless-stopped
# ─── Local-LLM-Adapter — RVS <-> llama.cpp (Plan B, B0) ──────
# Verbindet sich per Token an den RVS (wie f5tts/whisper), nimmt
# llm_request entgegen, ruft llama.cpp lokal, antwortet llm_response.
llm-adapter:
build: ./llm-adapter
container_name: aria-llm-adapter
depends_on:
- llama
environment:
- RVS_HOST=${RVS_HOST}
- RVS_PORT=${RVS_PORT:-443}
- RVS_TLS=${RVS_TLS:-true}
- RVS_TLS_FALLBACK=${RVS_TLS_FALLBACK:-true}
- RVS_TOKEN=${RVS_TOKEN}
- LLAMA_URL=http://llama:8081
- LLM_MODEL=${LLM_MODEL:-qwen3-8b}
- LLM_TIMEOUT_SEC=${LLM_TIMEOUT_SEC:-60}
restart: unless-stopped