From 2471e85f544e7767a95f6fa1319866373a15812c Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 20 Aug 2026 18:28:59 -0700 Subject: [PATCH] chore(lint): note why the streamed cost fallback swallows pricing errors --- litellm/proxy/common_request_processing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/common_request_processing.py b/litellm/proxy/common_request_processing.py index d533df8616d..7975db5cb85 100644 --- a/litellm/proxy/common_request_processing.py +++ b/litellm/proxy/common_request_processing.py @@ -3562,7 +3562,7 @@ class ProxyBaseLLMRequestProcessing: ) -> float | None: try: cost: Final = litellm_logging_obj._response_cost_calculator(result=model_response) # pyright: ignore[reportPrivateUsage] # reuse the call's own cost calc for pricing parity with the logging callback - except Exception: + except Exception: # noqa: BLE001 # a pricing failure falls back to model-name pricing instead of breaking the stream return None return float(cost) if isinstance(cost, (int, float)) and not isinstance(cost, bool) else None