mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-30 01:52:18 +00:00
fix(azure_ai): raise TypeError for wrong response type and dedupe test basename
This commit is contained in:
parent
4db328319d
commit
dc09609e55
2 changed files with 2 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ def cost_calculator(
|
|||
Azure AI image generation cost calculator
|
||||
"""
|
||||
if not isinstance(image_response, ImageResponse):
|
||||
raise ValueError(f"image_response must be of type ImageResponse got type={type(image_response)}")
|
||||
raise TypeError(f"image_response must be of type ImageResponse got type={type(image_response)}")
|
||||
|
||||
resolved: Final = resolve_image_model_info(
|
||||
model=model,
|
||||
|
|
|
|||
|
|
@ -161,5 +161,5 @@ def test_unlisted_model_bills_deployment_rates() -> None:
|
|||
|
||||
|
||||
def test_non_image_response_raises() -> None:
|
||||
with pytest.raises(ValueError, match="must be of type ImageResponse"):
|
||||
with pytest.raises(TypeError, match="must be of type ImageResponse"):
|
||||
cost_calculator(model="FLUX.2-flex", image_response=object())
|
||||
Loading…
Add table
Reference in a new issue