diff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailContent.tsx b/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailContent.tsx index 533e51d31bb..75618076079 100644 --- a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailContent.tsx +++ b/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailContent.tsx @@ -258,6 +258,12 @@ function GuardrailLabel({ label, maskedCount }: { label: string; maskedCount: nu } function MetricsSection({ logEntry, metadata }: { logEntry: LogEntry; metadata: Record }) { + const completionStartTime = logEntry.completionStartTime; + const ttftMs = + completionStartTime && completionStartTime !== logEntry.endTime + ? new Date(completionStartTime).getTime() - new Date(logEntry.startTime).getTime() + : null; + const hasCacheActivity = logEntry.cache_hit || (metadata?.additional_usage_values?.cache_read_input_tokens && @@ -284,6 +290,9 @@ function MetricsSection({ logEntry, metadata }: { logEntry: LogEntry; metadata: ${formatNumberWithCommas(logEntry.spend || 0, 8)} {logEntry.request_duration_ms != null ? (logEntry.request_duration_ms / 1000).toFixed(3) : "-"} s + {ttftMs != null && ttftMs > 0 && ( + {(ttftMs / 1000).toFixed(3)} s + )} {hasCacheActivity && ( <>