mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-01 21:02:12 +03:00
Local inference backends (oMLX, Ollama, LM Studio) configured as provider_nodes have no health monitoring. When a local provider is down, OmniRoute waits the full timeout before failing. This adds a background health check that polls local provider_nodes: - GET /models with 5s timeout for each local node (localhost only) - In-memory health cache (no DB migration needed) - Promise.allSettled for parallel checks (one slow node doesn't block) - Exponential backoff on failures: 30s → 60s → 120s → 300s max - Reset to 30s on first success after failure - State transition logging (healthy ↔ unhealthy) - Expose health status via GET /api/monitoring/health (localProviders) - Auto-init on first import (same pattern as tokenHealthCheck) - 401 treated as healthy (server up, auth required) - isNodeHealthy() returns true if never checked (optimistic default)