style(cost): suppress BLE001 on image pricing fallbacks

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Devin AI 2026-09-22 01:54:16 +00:00
parent e623d647dd
commit cc6044aacc

View file

@ -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