From be50ed37731647cc361b3991561fe500f76fc381 Mon Sep 17 00:00:00 2001 From: songkuan-zheng <252822057+songkuan-zheng@users.noreply.github.com> Date: Tue, 15 Sep 2026 07:35:30 +0000 Subject: [PATCH] fix(router): import the no-deployments error where the cooldown callback uses it Keeps the new symbol out of the module-level litellm.router and litellm.types.router cycle that CodeQL flags. Co-authored-by: songkuan-zheng <252822057+songkuan-zheng@users.noreply.github.com> Co-authored-by: songkuan-zheng --- litellm/router.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/router.py b/litellm/router.py index 3a2dc2eeb97..074a160c760 100644 --- a/litellm/router.py +++ b/litellm/router.py @@ -296,7 +296,6 @@ from litellm.types.router import ( RouterErrors, RouterGeneralSettings, RouterModelGroupAliasItem, - RouterNoDeploymentsAvailableError, RouterRateLimitError, RouterRateLimitErrorBasic, RoutingContext, @@ -8254,6 +8253,8 @@ class Router: ) return False + from litellm.types.router import RouterNoDeploymentsAvailableError + if isinstance(exception, RouterNoDeploymentsAvailableError): return False