From ca12e703690237d05b9f448e3196302e5b2c340b Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 25 Jan 2024 11:58:55 -0800 Subject: [PATCH] (fix) do nothing if alerting is not switched on --- litellm/proxy/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index e361a82d3d0..43c61e3975f 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -188,6 +188,10 @@ class ProxyLogging: user_current_spend: float, user_info=None, ): + if self.alerting is None: + # do nothing if alerting is not switched on + return + if type == "user_and_proxy_budget": user_info = dict(user_info) user_id = user_info["user_id"]