From 69004900b141234c68ce77ead61ffbec50063d4d Mon Sep 17 00:00:00 2001 From: Deepanshu Date: Tue, 18 Aug 2026 13:56:05 -0400 Subject: [PATCH] style(rate-limiting): fix a LIT010 rebind the base's ratcheted-down budget now flags configured_limit/tag_value were rebound via unpacking after already being bound by an earlier for-loop over the same atomic_checks sequence; only the first unpacking binding of a name is exempt from requiring Final. Renamed to failing_limit/failing_tag_value, and used the literal `_` placeholder (the only underscore-prefixed name this gate's Final-exemption recognizes) for the discarded third element instead of reusing `_key`. --- litellm/proxy/hooks/tag_rate_limiter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/hooks/tag_rate_limiter.py b/litellm/proxy/hooks/tag_rate_limiter.py index 2bed00989a4..c74beae3703 100644 --- a/litellm/proxy/hooks/tag_rate_limiter.py +++ b/litellm/proxy/hooks/tag_rate_limiter.py @@ -975,8 +975,8 @@ class _PROXY_TagRateLimiter( # pyright: ignore[reportUnusedClass] # only refer ) ) if failing_index is not None: - configured_limit, tag_value, _key = atomic_checks[failing_index] - self._raise_over_limit(configured_limit, tag_value, model, current=values[0]) + failing_limit, failing_tag_value, _ = atomic_checks[failing_index] + self._raise_over_limit(failing_limit, failing_tag_value, model, current=values[0]) concurrency_reservations: Final = tuple( (key, _partition_key(configured_limit.entry))