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 <songkuan-zheng@users.noreply.github.com>
This commit is contained in:
songkuan-zheng 2026-09-15 07:35:30 +00:00
parent 8f3a7b54c7
commit be50ed3773

View file

@ -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