diff --git a/ui/litellm-dashboard/src/components/shared/date_range_presets.ts b/ui/litellm-dashboard/src/components/shared/date_range_presets.ts index 115d03af547..1da3185bef4 100644 --- a/ui/litellm-dashboard/src/components/shared/date_range_presets.ts +++ b/ui/litellm-dashboard/src/components/shared/date_range_presets.ts @@ -8,11 +8,11 @@ export interface RelativeTimeOption { } /** Widest window the sub-day (ClickHouse rollup) usage path serves; longer ranges use the daily tables. */ -export const SUB_DAY_MAX_RANGE_MS = 7 * 24 * 60 * 60 * 1000; +export const SUB_DAY_MAX_RANGE_MS = 24 * 60 * 60 * 1000; /** - * A range that does not start at a local midnight is a sub-day investigation window - * (Last 1h, 14:05 to 14:35): it is served from spend-log rollups and never snapped to day edges. + * A window of at most 24 hours that does not start at a local midnight is a sub-day investigation + * window (Last 1h, 14:05 to 14:35): it is served from spend-log rollups and never snapped to day edges. */ export const isSubDayRange = (from: Date, to: Date): boolean => !moment(from).isSame(moment(from).startOf("day")) && to.getTime() - from.getTime() <= SUB_DAY_MAX_RANGE_MS;