diff --git a/litellm/router_strategy/budget_limiter.py b/litellm/router_strategy/budget_limiter.py index 6fd2a2534ce..fe736c56b5e 100644 --- a/litellm/router_strategy/budget_limiter.py +++ b/litellm/router_strategy/budget_limiter.py @@ -677,12 +677,12 @@ class RouterBudgetLimiting(CustomLogger): for key, value in redis_values.items(): if value is None: continue - pending_spend: Final = sum( + pending_spend = sum( # rebind-ok: each cache key has independent queued spend operation["increment_value"] for operation in self.redis_increment_operation_queue if operation["key"] == key ) - updated_spend: Final = float(value) + pending_spend + updated_spend = float(value) + pending_spend # rebind-ok: each cache key has an independent total await self.dual_cache.in_memory_cache.async_set_cache(key=key, value=updated_spend) verbose_router_logger.debug("Updated in-memory cache for %s: %s", key, updated_spend)