From 8f3a7b54c7b7b63729d502b25d5de331dd88b36c Mon Sep 17 00:00:00 2001 From: songkuan-zheng <252822057+songkuan-zheng@users.noreply.github.com> Date: Fri, 11 Sep 2026 12:29:43 +0000 Subject: [PATCH] fix(router): keep cooldown_time off the shared no-deployment base error Declaring cooldown_time as float | None on the base widened the attribute on RouterRateLimitError, whose callers compare it as a float, and redeclaring it as float on the subclass is an incompatible override. The base now carries only status_code; RouterRateLimitError keeps its own float cooldown_time exactly as before Co-authored-by: songkuan-zheng <252822057+songkuan-zheng@users.noreply.github.com> Co-authored-by: songkuan-zheng --- litellm/types/router.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/litellm/types/router.py b/litellm/types/router.py index 5ebf37d4022..5ae5c3a91b0 100644 --- a/litellm/types/router.py +++ b/litellm/types/router.py @@ -944,7 +944,6 @@ class RouterGeneralSettings(BaseModel): class RouterNoDeploymentsAvailableError(ValueError): status_code: int = 429 - cooldown_time: float | None = None class RouterRateLimitErrorBasic(RouterNoDeploymentsAvailableError): @@ -967,8 +966,6 @@ class RouterErrorTypes(str, enum.Enum): class RouterRateLimitError(RouterNoDeploymentsAvailableError): - cooldown_time: float - def __init__( self, model: str,