mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
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 <songkuan-zheng@users.noreply.github.com>
This commit is contained in:
parent
05abb93c5d
commit
8f3a7b54c7
1 changed files with 0 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue