Keep router connected to profile controller

This commit is contained in:
Mikei386
2026-09-15 11:30:57 +02:00
parent 80917e72b4
commit 54d38a31aa
2 changed files with 13 additions and 3 deletions
+9 -3
View File
@@ -73,7 +73,7 @@ import os
import urllib.request
key = os.environ["ROUTER_API_KEY"]
for path in ("/health", "/v1/models"):
for path in ("/health", "/v1/models", "/status"):
request = urllib.request.Request(
"http://127.0.0.1:8081" + path,
headers={"Authorization": "Bearer " + key},
@@ -82,10 +82,16 @@ for path in ("/health", "/v1/models"):
body = response.read()
if response.status != 200:
raise SystemExit(f"{path}: HTTP {response.status}")
if path.endswith("models") and not json.loads(body).get("data"):
data = json.loads(body)
if path.endswith("models") and not data.get("data"):
raise SystemExit("Router meldet keine Modelle")
if path == "/status":
if data.get("current_profile") not in data.get("profiles", {}):
raise SystemExit("Router erkennt das aktive Profil nicht")
if not data.get("qwen", {}).get("available"):
raise SystemExit("Router meldet Qwen als nicht verfügbar")
PY
pass "Router-Liveness und OpenAI-Modellliste funktionieren"
pass "Router erkennt aktives Profil; Liveness und Modellliste funktionieren"
latest=/data/docker-backups/athena-latest.tar.gz
[[ -s $latest ]] || fail "Kein gueltiges Athena-Backup: $latest"