mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-09 10:57:03 +08:00
feat(health): add model and provider health monitoring
- Rename the original health monitor to endpoint health monitor - Add tab navigation for endpoint, model, and provider health views - Add model health monitor cards with availability, latency, first-byte latency, and 60-point history - Add admin-only provider health monitor with collapsible active-provider sections - Show per-provider model health cards after expanding a provider - Add backend model health and provider health monitor payload builders - Add admin endpoint for provider health monitoring - Add provider-scoped usage breakdown filtering for per-provider model statistics - Add frontend API types and request helpers for model/provider health data - Add demo mock data for model and provider health monitoring - Fix model health timeline time-unit handling so request history segments render correctly Verification: - cargo fmt - npm run type-check - npm run build - cargo test -p aether-gateway health_models - cargo test -p aether-gateway health_providers - cargo test -p aether-gateway gateway_exposes_frontdoor_manifest_without_proxying_upstream
This commit is contained in:
@@ -242,6 +242,40 @@ impl<'a> AdminAppState<'a> {
|
||||
.await
|
||||
}
|
||||
|
||||
pub(crate) async fn build_model_health_monitor_payload(
|
||||
&self,
|
||||
lookback_hours: u64,
|
||||
model_limit: usize,
|
||||
per_model_limit: usize,
|
||||
options: crate::handlers::public::ModelHealthMonitorOptions,
|
||||
) -> Option<serde_json::Value> {
|
||||
crate::handlers::public::build_model_health_monitor_payload(
|
||||
self.app,
|
||||
lookback_hours,
|
||||
model_limit,
|
||||
per_model_limit,
|
||||
options,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
pub(crate) async fn build_provider_health_monitor_payload(
|
||||
&self,
|
||||
lookback_hours: u64,
|
||||
provider_limit: usize,
|
||||
per_provider_model_limit: usize,
|
||||
per_model_event_limit: usize,
|
||||
) -> Option<serde_json::Value> {
|
||||
crate::handlers::public::build_provider_health_monitor_payload(
|
||||
self.app,
|
||||
lookback_hours,
|
||||
provider_limit,
|
||||
per_provider_model_limit,
|
||||
per_model_event_limit,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
pub(crate) async fn execute_execution_runtime_sync_plan(
|
||||
&self,
|
||||
trace_id: Option<&str>,
|
||||
|
||||
Reference in New Issue
Block a user