From cc6044aacc69d16bfeb2650205582706c07f505e Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 22 Sep 2026 01:54:16 +0000 Subject: [PATCH] style(cost): suppress BLE001 on image pricing fallbacks Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../llm_cost_calc/tool_call_cost_tracking.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/litellm_core_utils/llm_cost_calc/tool_call_cost_tracking.py b/litellm/litellm_core_utils/llm_cost_calc/tool_call_cost_tracking.py index 83cef0d49c3..164ba14b200 100644 --- a/litellm/litellm_core_utils/llm_cost_calc/tool_call_cost_tracking.py +++ b/litellm/litellm_core_utils/llm_cost_calc/tool_call_cost_tracking.py @@ -279,7 +279,7 @@ class StandardBuiltInToolCostTracking: n=1, size=size if isinstance(size, str) else None, ) - except Exception as e: + except Exception as e: # noqa: BLE001 # pricing helpers raise bare Exception for unmapped models; bill 0.0 verbose_logger.debug("Could not price Responses API image_generation_call item: %s", e) return 0.0 @@ -294,7 +294,7 @@ class StandardBuiltInToolCostTracking: model_info: Final = litellm.get_model_info( model=tool_model, custom_llm_provider=custom_llm_provider or "openai" ) - except Exception as e: + except Exception as e: # noqa: BLE001 # get_model_info raises bare Exception for unmapped models; bill 0.0 verbose_logger.debug("Could not resolve pricing for image tool model %s: %s", tool_model, e) return 0.0 image_gen: Final = tool_usage.image_gen