From 653aff65271a463c41b11af3c6bf1cdedba55cfa Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 16 Jul 2024 08:53:46 -0700 Subject: [PATCH] fix storing request status in mem --- 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 a7607fbad..466938197 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -284,11 +284,14 @@ class ProxyLogging: if self.alerting is None: return + # current alerting threshold + alerting_threshold = self.alerting_threshold or 120 + await self.internal_usage_cache.async_set_cache( key="request_status:{}".format(litellm_call_id), value=status, local_only=True, - ttl=120, + ttl=alerting_threshold, ) # The actual implementation of the function