mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-08 21:04:43 +02:00
fix(stt): joindre LiteLLM en IP directe (192.168.10.1:4000)
L'indirection litellm-ext (Service sans sélecteur + Endpoints manuel) ne routait pas
('All connection attempts failed'). open-webui joint LiteLLM en IP directe — on copie
ce pattern éprouvé et on supprime litellm-external.yaml.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FmcxGsyXZXogiAHQLjnZT
This commit is contained in:
parent
35f37bd293
commit
ed387d9a3a
6 changed files with 14 additions and 36 deletions
|
|
@ -58,7 +58,7 @@ Maillon réellement manquant : **l'interface graphique HUD** + le packaging + la
|
|||
│ • Piper (TTS) │ POST │ POST /v1/ask {text} → {reply} │
|
||||
│ • HUD web (ui/ + hud/) │ /v1/ask│ brain → LiteLLM (httpx) │
|
||||
│ • api.py → ServerClient │ ◀───── │ IngressRoute : stt.lab.local │
|
||||
└────────────────────────────────┘ reply │ Service Endpoints : litellm-ext │
|
||||
└────────────────────────────────┘ reply │ → LiteLLM s01 192.168.10.1:4000 │
|
||||
└──────────────┬─────────────────────────┘
|
||||
▼
|
||||
LiteLLM :4000 (storage-01, hors cluster)
|
||||
|
|
@ -67,8 +67,8 @@ Maillon réellement manquant : **l'interface graphique HUD** + le packaging + la
|
|||
|
||||
### Le cerveau — côté serveur
|
||||
|
||||
Le STT-server appelle **LiteLLM `:4000`** (OpenAI-compatible), joint depuis le cluster via
|
||||
un Service sans sélecteur + Endpoints manuel (`litellm-ext` → `192.168.10.1:4000`). LiteLLM
|
||||
Le STT-server appelle **LiteLLM `:4000`** (OpenAI-compatible), joint depuis le cluster en
|
||||
**IP directe** `192.168.10.1:4000` (même pattern qu'open-webui). LiteLLM
|
||||
route lui-même vers Qwen3 (g01) ou Claude selon l'alias `hermes-default` / `hermes-switch`.
|
||||
|
||||
> **« Agir sur Funk »** (outils de l'agent Hermes via le gateway `:8080`) n'est **pas** dans le
|
||||
|
|
@ -95,7 +95,7 @@ route lui-même vers Qwen3 (g01) ou Claude selon l'alias `hermes-default` / `her
|
|||
| — UI/HUD | `stt/client/stt/ui/` + `hud/` | HTTP statique + websocket d'états ; HUD embarqué dans le package |
|
||||
| STT-server | `stt/server/` (conteneur) | FastAPI : `/healthz`, `/v1/ask` ; `brain.py` → LiteLLM |
|
||||
| Image | `ghcr.io/alkatrazz24/funk-stt-server` | construite par `.github/workflows/build-stt-server.yml` |
|
||||
| Manifests | `k8s/apps/stt/` | Deployment, Service, IngressRoute (`stt.lab.local`), `litellm-ext` |
|
||||
| Manifests | `k8s/apps/stt/` | Deployment, Service, IngressRoute (`stt.lab.local`) |
|
||||
| Application ArgoCD | `k8s/apps-of-apps/apps/stt.yaml` | déploie depuis `main` |
|
||||
|
||||
---
|
||||
|
|
@ -125,7 +125,7 @@ Côté client, pilotable depuis `stt/client/config/` + l'écran de réglages du
|
|||
| **0 — Cadrage** | Conception validée | ✅ |
|
||||
| **1 — Client voix + HUD** | `stt` : voix locale + HUD + websocket | ✅ |
|
||||
| **2 — STT-server** | FastAPI `/v1/ask` → LiteLLM | ✅ |
|
||||
| **3 — Déploiement cluster** | image ghcr + manifests k8s + ArgoCD + `litellm-ext` | ✅ (à merger sur `main`) |
|
||||
| **3 — Déploiement cluster** | image ghcr + manifests k8s + ArgoCD (LiteLLM en IP directe) | ✅ déployé |
|
||||
| **4 — HUD avancé** | visualiseur arc-reactor + thèmes + écran réglages | ⏳ |
|
||||
| **5 — Mémoire serveur** | Qdrant s01 + distillée GitHub + sessions | ⏳ |
|
||||
| **6 — Auto-start client** | `install-service.sh` (systemd --user) + kiosk | ⏳ |
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ spec:
|
|||
ports:
|
||||
- containerPort: 8000
|
||||
env:
|
||||
# LiteLLM (s01) joint via le Service Endpoints litellm-ext
|
||||
# LiteLLM (s01) joint en IP directe — même pattern qu'open-webui
|
||||
- name: STT_LITELLM_URL
|
||||
value: "http://litellm-ext:4000/v1/chat/completions"
|
||||
value: "http://192.168.10.1:4000/v1/chat/completions"
|
||||
- name: STT_LITELLM_KEY
|
||||
value: "lm-studio"
|
||||
- name: STT_MODEL
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
# LiteLLM tourne sur storage-01 (HORS cluster) — on l'expose comme un Service interne
|
||||
# via un Service sans sélecteur + Endpoints manuel pointant vers l'IP LAN cluster de s01.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: litellm-ext
|
||||
namespace: ai
|
||||
spec:
|
||||
ports:
|
||||
- port: 4000
|
||||
targetPort: 4000
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Endpoints
|
||||
metadata:
|
||||
name: litellm-ext
|
||||
namespace: ai
|
||||
subsets:
|
||||
- addresses:
|
||||
- ip: 192.168.10.1 # storage-01, IP LAN cluster (cf. CLAUDE.md)
|
||||
ports:
|
||||
- port: 4000
|
||||
|
|
@ -14,7 +14,7 @@ Assistant vocal type *Jarvis* pour le homelab Funk, en **architecture client-ser
|
|||
┌─ POSTE ──────────┐ ┌─ CLUSTER k8s (ns ai) ──────────────┐
|
||||
│ client `stt` │ HTTP │ STT-server (Deployment) │
|
||||
│ • micro + Whisper│ ─────▶ │ POST /v1/ask → LiteLLM │
|
||||
│ • Piper (TTS) │ ◀───── │ (litellm-ext → s01:4000) │
|
||||
│ • Piper (TTS) │ ◀───── │ (→ s01 192.168.10.1:4000) │
|
||||
│ • HUD web │ reply │ Ingress: stt.lab.local │
|
||||
└───────────────────┘ └──────────────┬──────────────────────┘
|
||||
▼
|
||||
|
|
@ -37,8 +37,8 @@ Prérequis poste : micro, Piper + voix dans `~/.local/share/piper/`, `aplay` (al
|
|||
`.github/workflows/build-stt-server.yml` (sur push touchant `stt/server/`).
|
||||
2. **ArgoCD** : `k8s/apps-of-apps/apps/stt.yaml` → déploie `k8s/apps/stt/` **depuis `main`**.
|
||||
Tant que ce n'est pas mergé sur `main`, le cluster ne le prend pas.
|
||||
3. Le serveur joint LiteLLM (s01, hors cluster) via le Service `litellm-ext`
|
||||
(Endpoints manuel → `192.168.10.1:4000`).
|
||||
3. Le serveur joint LiteLLM (s01, hors cluster) en **IP directe** `192.168.10.1:4000`
|
||||
(même pattern qu'open-webui — pas de Service/Endpoints intermédiaire).
|
||||
4. **Image privée** : le Deployment référence un `imagePullSecret` `ghcr-pull`.
|
||||
À créer une fois dans le ns `ai` (même pratique que `ghostfolio-secret`, non versionné) :
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ STT et route l'inférence vers LiteLLM (s01) → Qwen3 (g01) / Claude.
|
|||
|
||||
| Var | Défaut | Rôle |
|
||||
|---|---|---|
|
||||
| `STT_LITELLM_URL` | `http://litellm-ext:4000/v1/chat/completions` | endpoint LiteLLM (via Service Endpoints) |
|
||||
| `STT_LITELLM_URL` | `http://192.168.10.1:4000/v1/chat/completions` | endpoint LiteLLM (IP directe s01, cf. open-webui) |
|
||||
| `STT_LITELLM_KEY` | `lm-studio` | clé LiteLLM (valeur exacte attendue) |
|
||||
| `STT_MODEL` | `hermes-default` | alias LiteLLM (bascule Qwen/Claude via `hermes-switch`) |
|
||||
| `STT_SYSTEM_PROMPT` | prompt vocal FR concis | persona |
|
||||
|
|
@ -34,7 +34,7 @@ curl -s localhost:8000/v1/ask -H 'content-type: application/json' -d '{"text":"b
|
|||
|
||||
- Image construite/poussée par `.github/workflows/build-stt-server.yml` → `ghcr.io/alkatrazz24/funk-stt-server`.
|
||||
- Manifests : `k8s/apps/stt/` ; Application ArgoCD : `k8s/apps-of-apps/apps/stt.yaml` (depuis `main`).
|
||||
- Accès LiteLLM (hors cluster) : Service + Endpoints `litellm-ext` → `192.168.10.1:4000`.
|
||||
- Accès LiteLLM (hors cluster) : IP directe `192.168.10.1:4000` (même pattern qu'open-webui).
|
||||
|
||||
## À venir
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import os
|
|||
|
||||
|
||||
class Settings:
|
||||
# LiteLLM (s01) — joint via un Service ExternalName/Endpoints dans le cluster.
|
||||
# LiteLLM (s01) — joint en IP directe depuis le cluster (cf. open-webui).
|
||||
litellm_url: str = os.getenv(
|
||||
"STT_LITELLM_URL", "http://litellm-ext:4000/v1/chat/completions"
|
||||
"STT_LITELLM_URL", "http://192.168.10.1:4000/v1/chat/completions"
|
||||
)
|
||||
litellm_key: str = os.getenv("STT_LITELLM_KEY", "lm-studio")
|
||||
model: str = os.getenv("STT_MODEL", "hermes-default")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue