Expand description
§Provider Health Monitor
Tracks latency, error rates, and availability for each configured LLM provider. Exposes a health score (0.0–1.0) per provider.
The monitor maintains a rolling window of latency samples (in milliseconds)
per provider. After every record call the p50/p95/p99 latencies and
the rolling error rate are recomputed from the current window, and a fresh
health score is derived via the formula:
score = (1.0 - error_rate) * latency_weight
where latency_weight = 1.0 / (1.0 + p95_latency_ms / 1000.0)Structs§
- Provider
Health - A point-in-time health snapshot for a single provider.
- Provider
Health Monitor - A thread-safe, cloneable monitor that tracks per-provider health.