From 5d7dcc2f08954b1fdc1cc391dfe864f86a372f4b Mon Sep 17 00:00:00 2001 From: addy79 <125811947+addy79@users.noreply.github.com> Date: Wed, 21 Oct 2026 21:09:41 +0000 Subject: [PATCH] style(cost_calculator): avoid bare except pass in rerank_cost --- litellm/cost_calculator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/cost_calculator.py b/litellm/cost_calculator.py index 095f1dde175..35d13438ad3 100644 --- a/litellm/cost_calculator.py +++ b/litellm/cost_calculator.py @@ -2723,8 +2723,8 @@ def rerank_cost( try: builtin_info = litellm.get_model_info(model=model, custom_llm_provider=custom_llm_provider) model_info = {**(model_info or {}), **builtin_info} if model_info else builtin_info - except Exception: - pass + except Exception as e: + verbose_logger.debug("Failed to get model info in rerank_cost: %s", e) return config.calculate_rerank_cost( model=model,