fix: update Swapper endpoints (/health, /models), remove upload size limits, auto-convert images
This commit is contained in:
@@ -200,21 +200,26 @@ class NodeGuardian:
|
||||
# Collect Swapper Metrics
|
||||
swapper_url = os.getenv("SWAPPER_URL", "http://swapper-service:8890")
|
||||
try:
|
||||
# Check healthz
|
||||
# Check health (Swapper uses /health, not /healthz)
|
||||
try:
|
||||
r = await self.client.get(f"{swapper_url}/healthz", timeout=3.0)
|
||||
metrics["swapper_healthy"] = (r.status_code == 200)
|
||||
r = await self.client.get(f"{swapper_url}/health", timeout=3.0)
|
||||
if r.status_code == 200:
|
||||
health_data = r.json()
|
||||
metrics["swapper_healthy"] = health_data.get("status") == "healthy"
|
||||
else:
|
||||
metrics["swapper_healthy"] = False
|
||||
except Exception:
|
||||
metrics["swapper_healthy"] = False
|
||||
|
||||
# Check models
|
||||
# Check models (Swapper uses /models, not /v1/models)
|
||||
try:
|
||||
r = await self.client.get(f"{swapper_url}/v1/models", timeout=5.0)
|
||||
r = await self.client.get(f"{swapper_url}/models", timeout=5.0)
|
||||
if r.status_code == 200:
|
||||
data = r.json()
|
||||
models = data.get("models", [])
|
||||
metrics["swapper_models_total"] = len(models)
|
||||
metrics["swapper_models_loaded"] = sum(1 for m in models if m.get("loaded") is True)
|
||||
# Swapper uses "status": "loaded" not "loaded": true
|
||||
metrics["swapper_models_loaded"] = sum(1 for m in models if m.get("status") == "loaded")
|
||||
metrics["swapper_state"] = data
|
||||
except Exception as e:
|
||||
# logger.warning(f"Failed to fetch Swapper models: {e}")
|
||||
|
||||
@@ -39,3 +39,4 @@ echo " docker-compose -f docker-compose.city-space.yml logs -f"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -42,3 +42,4 @@ echo " ./scripts/test-phase2-e2e.sh"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -51,3 +51,4 @@ echo ""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -55,3 +55,4 @@ echo "📚 Documentation: docs/PHASE4_READY.md"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,3 +14,4 @@ echo "✅ Services stopped!"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -17,3 +17,4 @@ echo " docker-compose -f docker-compose.agents.yml down -v"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,3 +16,4 @@ echo ""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,3 +11,4 @@ echo "✅ Phase 4 services stopped"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -204,3 +204,4 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user