mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
chore(lint): note why the streamed cost fallback swallows pricing errors
This commit is contained in:
parent
12ed364e47
commit
2471e85f54
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue