fix(azure_ai): raise TypeError for wrong response type and dedupe test basename

This commit is contained in:
shrey kharbanda 2026-09-24 01:05:59 +00:00
parent 4db328319d
commit dc09609e55
2 changed files with 2 additions and 2 deletions

View file

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

View file

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