From d43ca9b7891590082a4bb72268b13c8bb2d8e96f Mon Sep 17 00:00:00 2001 From: Emerson Gomes Date: Tue, 15 Sep 2026 13:07:20 -0500 Subject: [PATCH] fix(router): log Redis failures before cancellable cleanup --- litellm/router_strategy/budget_limiter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/router_strategy/budget_limiter.py b/litellm/router_strategy/budget_limiter.py index fe736c56b5e..63c49d03a27 100644 --- a/litellm/router_strategy/budget_limiter.py +++ b/litellm/router_strategy/budget_limiter.py @@ -439,8 +439,8 @@ class RouterBudgetLimiting(CustomLogger): try: await pipeline_task except Exception: - await self._requeue_detached_increment_operations() verbose_router_logger.exception("Error pushing queued Redis increment operations to Redis") + await self._requeue_detached_increment_operations() return await self._clear_detached_increment_operations() @@ -465,8 +465,8 @@ class RouterBudgetLimiting(CustomLogger): try: await asyncio.shield(pipeline_task) except Exception: - await asyncio.shield(self._requeue_detached_increment_operations()) verbose_router_logger.exception("Error pushing queued Redis increment operations to Redis") + await asyncio.shield(self._requeue_detached_increment_operations()) return False except asyncio.CancelledError: await asyncio.shield(self._finish_increment_pipeline_after_cancellation(pipeline_task))