From 3736152e7da342ea0ab4e5618cb92b00a45074cd Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 16 Jul 2024 20:31:56 -0700 Subject: [PATCH] fix calculate correct alerting threshold --- litellm/proxy/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index 0dd905940..8a8494ce4 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -285,8 +285,11 @@ class ProxyLogging: return # current alerting threshold + alerting_threshold: float = self.alerting_threshold + # add a 100 second buffer to the alerting threshold - alerting_threshold = self.alerting_threshold or 120 + 100 + # ensures we don't send errant hanging request slack alerts + alerting_threshold += 100 await self.internal_usage_cache.async_set_cache( key="request_status:{}".format(litellm_call_id),