From 52f8c39bbf6ade79dc3e67a78652b3a83850de80 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 15 May 2024 09:03:27 -0700 Subject: [PATCH] feat - don't cooldown deployment on BadRequestError --- litellm/router.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/litellm/router.py b/litellm/router.py index ec7df1124c3..e88942c44f1 100644 --- a/litellm/router.py +++ b/litellm/router.py @@ -1975,6 +1975,11 @@ class Router: if deployment is None: return + if exception_status == 400 or exception_status == "400": + # the user sent a BadRequest -> the Deployment is not unhealthy here + # Do NOT Cooldown + return + dt = get_utc_datetime() current_minute = dt.strftime("%H-%M") # get current fails for deployment