The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
feat: add Last Success column to health check table (#11903)
Cole McIntosh464d981f1c95
diff --git a/ui/litellm-dashboard/src/components/model_dashboard/HealthCheckComponent.tsx b/ui/litellm-dashboard/src/components/model_dashboard/HealthCheckComponent.tsxindex aac92e98c12..834a1c834f8 100644--- a/ui/litellm-dashboard/src/components/model_dashboard/HealthCheckComponent.tsx+++ b/ui/litellm-dashboard/src/components/model_dashboard/HealthCheckComponent.tsx@@ -261,6 +261,7 @@ const HealthCheckComponent: React.FC<HealthCheckComponentProps> = ({[modelName]: {status: 'unhealthy',lastCheck: currentTime,+ lastSuccess: prev[modelName]?.lastSuccess || 'None',loading: false,error: errorMessage,fullError: rawError@@ -319,6 +320,7 @@ const HealthCheckComponent: React.FC<HealthCheckComponentProps> = ({[modelName]: {status: 'unhealthy',lastCheck: currentTime,+ lastSuccess: prev[modelName]?.lastSuccess || 'None',loading: false,error: errorMessage,fullError: rawError@@ -365,6 +367,7 @@ const HealthCheckComponent: React.FC<HealthCheckComponentProps> = ({[modelName]: {status: 'unhealthy',lastCheck: currentTime,+ lastSuccess: prev[modelName]?.lastSuccess || 'None',loading: false,error: errorMessage,fullError: rawError@@ -393,6 +396,7 @@ const HealthCheckComponent: React.FC<HealthCheckComponentProps> = ({[modelName]: {status: 'unhealthy',lastCheck: currentTime,+ lastSuccess: prev[modelName]?.lastSuccess || 'None',loading: false,error: errorMessage,fullError: rawError@@ -562,6 +566,7 @@ const HealthCheckComponent: React.FC<HealthCheckComponentProps> = ({litellm_model_name: model.litellm_model_name,health_status: healthStatus.status,last_check: healthStatus.lastCheck,+ last_success: healthStatus.lastSuccess || 'None',health_loading: healthStatus.loading,health_error: healthStatus.error,health_full_error: healthStatus.fullError,diff --git a/ui/litellm-dashboard/src/components/model_dashboard/health_check_columns.tsx b/ui/litellm-dashboard/src/components/model_dashboard/health_check_columns.tsxindex 14cb200858a..2e70105a241 100644--- a/ui/litellm-dashboard/src/components/model_dashboard/health_check_columns.tsx+++ b/ui/litellm-dashboard/src/components/model_dashboard/health_check_columns.tsx@@ -15,6 +15,7 @@ interface HealthCheckData {litellm_model_name?: string;health_status: string;last_check: string;+ last_success: string;health_loading: boolean;health_error?: string;health_full_error?: string;@@ -235,6 +236,47 @@ export const healthCheckColumns = ();},},+ {+ header: "Last Success",+ accessorKey: "last_success",+ enableSorting: true,+ sortingFn: (rowA, rowB, columnId) => {+ const lastSuccessA = rowA.getValue("last_success") as string || 'Never succeeded';+ const lastSuccessB = rowB.getValue("last_success") as string || 'Never succeeded';++ // Handle special cases+ if (lastSuccessA === 'Never succeeded' && lastSuccessB === 'Never succeeded') return 0;+ if (lastSuccessA === 'Never succeeded') return 1; // Never succeeded goes to bottom+ if (lastSuccessB === 'Never succeeded') return -1;+ if (lastSuccessA === 'None' && lastSuccessB === 'None') return 0;+ if (lastSuccessA === 'None') return 1; // None goes to bottom+ if (lastSuccessB === 'None') return -1;++ // Parse dates for comparison+ const dateA = new Date(lastSuccessA);+ const dateB = new Date(lastSuccessB);++ // If dates are invalid, treat as never succeeded+ if (isNaN(dateA.getTime()) && isNaN(dateB.getTime())) return 0;+ if (isNaN(dateA.getTime())) return 1;+ if (isNaN(dateB.getTime())) return -1;++ // Sort by date (most recent first)+ return dateB.getTime() - dateA.getTime();+ },+ cell: ({ row }) => {+ const model = row.original;+ const modelName = model.model_name;+ const healthStatus = modelHealthStatuses[modelName];+ const lastSuccess = healthStatus?.lastSuccess || 'None';++ return (+ <Text className="text-gray-600 text-sm">+ {lastSuccess}+ </Text>+ );+ },+ },{header: "Actions",id: "actions",