mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-21 00:21:49 +00:00
lint(cost): justify blind except in _lookup_model_info_or_none
get_model_info raises a bare Exception for unmapped models, so BLE001 cannot be narrowed; mark it noqa with the reason to stay within the strict budget.
This commit is contained in:
parent
d2af0577d5
commit
4e4008cea9
1 changed files with 1 additions and 1 deletions
|
|
@ -2170,7 +2170,7 @@ def ocr_batch_cost(
|
|||
def _lookup_model_info_or_none(model: str, custom_llm_provider: str | None) -> ModelInfo | None:
|
||||
try:
|
||||
return litellm.get_model_info(model=model, custom_llm_provider=custom_llm_provider)
|
||||
except Exception:
|
||||
except Exception: # noqa: BLE001 # get_model_info raises bare Exception for unmapped models; caller logs and bills 0.0
|
||||
return None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue