fix(router): declare cooldown_time as float on RouterRateLimitError

The shared base declares cooldown_time as float | None because the budget limiter
and the sync tpm strategy have no window to report. RouterRateLimitError always
receives one, so it redeclares the attribute as float and callers that compare it
keep a narrowed type

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-11 12:19:36 +00:00
parent 20e7ac6d8a
commit 05abb93c5d

View file

@ -967,6 +967,8 @@ class RouterErrorTypes(str, enum.Enum):
class RouterRateLimitError(RouterNoDeploymentsAvailableError):
cooldown_time: float
def __init__(
self,
model: str,