From ed54f9bbf8cf2042bae793b4f2a12f3539436f1c Mon Sep 17 00:00:00 2001 From: Sisyphus Date: Sun, 30 Aug 2026 22:08:02 +0800 Subject: [PATCH] fix(proxy): satisfy rate limiter type checks --- litellm/proxy/hooks/parallel_request_limiter_v3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/hooks/parallel_request_limiter_v3.py b/litellm/proxy/hooks/parallel_request_limiter_v3.py index 7331cbd5c34..5463821b9a6 100644 --- a/litellm/proxy/hooks/parallel_request_limiter_v3.py +++ b/litellm/proxy/hooks/parallel_request_limiter_v3.py @@ -1195,7 +1195,7 @@ class _PROXY_MaxParallelRequestsHandler_v3(CustomLogger): # This counter belongs to a window that has already rolled over; # it must not reject the request that starts the new window. - effective_counter_value: Final[CacheCounterValue | None] = 0 if window_expired else counter_value + effective_counter_value: CacheCounterValue | None = 0 if window_expired else counter_value # Determine which limit to use for current_limit and limit_remaining current_limit: int | None = None @@ -1903,7 +1903,7 @@ class _PROXY_MaxParallelRequestsHandler_v3(CustomLogger): # windows independently, so a roll on one can never leave the # sibling counter's stale value stranded under a fresh window # (issue #24677). - window_key: Final = descriptor_window_key(descriptor_key, descriptor_value, rlt) + window_key = descriptor_window_key(descriptor_key, descriptor_value, rlt) # Counter-key TTL and window_size are conceptually distinct # ("how long the counter Redis key lives" vs "how long the # sliding window is"). Kept as separate values so a future