From 5c9f3febd28e4175e53c34bf853eb1196b5550fb Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Sat, 28 Feb 2026 18:21:21 -0800 Subject: [PATCH] address greptile review feedback (greploop iteration 3) - fix falsy-zero bug in _compute_overhead_pct: use 'is not None' instead of truthiness check so 0.0 overhead is reported correctly --- litellm/proxy/performance_endpoints/endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/performance_endpoints/endpoints.py b/litellm/proxy/performance_endpoints/endpoints.py index 1326b5295be..78f983f3fd8 100644 --- a/litellm/proxy/performance_endpoints/endpoints.py +++ b/litellm/proxy/performance_endpoints/endpoints.py @@ -326,6 +326,6 @@ def _compute_overhead_pct(latency_stats: dict) -> Optional[float]: return None avg_overhead = overhead.get("avg_ms") avg_total = total.get("avg_ms") - if avg_overhead and avg_total and avg_total > 0: + if avg_overhead is not None and avg_total is not None and avg_total > 0: return round((avg_overhead / avg_total) * 100, 1) return None