From 0c808c8afa4d4fe022abf32524cd3f0f8eb3c91f Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 3 Jun 2024 20:49:05 -0700 Subject: [PATCH] fix - analytics use last hour of endTime and first hr startTime --- .../src/components/model_dashboard.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ui/litellm-dashboard/src/components/model_dashboard.tsx b/ui/litellm-dashboard/src/components/model_dashboard.tsx index f9c172f1a..a2c1a2807 100644 --- a/ui/litellm-dashboard/src/components/model_dashboard.tsx +++ b/ui/litellm-dashboard/src/components/model_dashboard.tsx @@ -924,6 +924,16 @@ const ModelDashboard: React.FC = ({ selected_customer = null; } + // make startTime and endTime to last hour of the day + startTime.setHours(0); + startTime.setMinutes(0); + startTime.setSeconds(0); + + endTime.setHours(23); + endTime.setMinutes(59); + endTime.setSeconds(59); + + try { const modelMetricsResponse = await modelMetricsCall( accessToken,