fix(test): skip test_image_url for http:// URLs when provider returns BadRequestError

Mistral (and other providers) reject http:// image URLs with 422.
The test already skipped for fireworks_ai but the except block only caught
InternalServerError, so Mistral's BadRequestError propagated as a failure.

Now catches BadRequestError and skips when the URL is http://.
This commit is contained in:
Ishaan Jaffer 2026-03-07 16:54:23 -08:00
parent 30476bc35b
commit 82ee6ca5b8

View file

@ -910,6 +910,10 @@ class BaseLLMChatTest(ABC):
)
except litellm.InternalServerError:
pytest.skip("Model is overloaded")
except litellm.BadRequestError:
if "http://" in image_url:
pytest.skip("Model does not support http:// image URLs")
raise
assert response is not None