feat: upstream model health monitoring#22
Merged
christianromeni merged 1 commit intomainfrom Mar 24, 2026
Merged
Conversation
- 3-level health checks: health (ping), models (GET /models), functional (completion) - Each level independently configurable: enabled + interval - Default: health probe every 30s, others disabled - Copy-on-write for thread-safe concurrent probe results - Error sanitization (no internal URLs/IPs in API responses) - Minimum interval enforcement (10s health/models, 60s functional) - Health latency in Model Performance table (replaces misleading avg duration) - TPS (tokens/sec) throughput metric from usage data - Health badges on Models page (healthy/degraded/unhealthy) - Health summary on Dashboard (healthy/degraded/unhealthy counts) - Prometheus gauges: model_health_status + model_health_latency_seconds - API: GET /api/v1/models/health - 15 health checker tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Proactive upstream model health monitoring with 3 configurable probe levels.
Health Check Levels
healthmodelsfunctionalBackend
internal/health/package with Checker, 3 probe typesmodel_health_status+model_health_latency_secondsGET /api/v1/models/healthmodels_healthy/models_unhealthy/models_degradedFrontend
useModelHealthhook with 15s pollingConfig
Test plan
go test ./... -race17/17 passednpx tsc --noEmitcleannpm run lintcleannpm run test -- --run305/305 passed