From 82ee6ca5b84353134b694abe7d46e8d48f026b8b Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Sat, 7 Mar 2026 16:54:23 -0800 Subject: [PATCH] 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://. --- tests/llm_translation/base_llm_unit_tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/llm_translation/base_llm_unit_tests.py b/tests/llm_translation/base_llm_unit_tests.py index ffdcd1b79ff..d4d0cbdf218 100644 --- a/tests/llm_translation/base_llm_unit_tests.py +++ b/tests/llm_translation/base_llm_unit_tests.py @@ -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