diff --git a/tests/test_litellm_rust/ocr/test_dispatch.py b/tests/test_litellm_rust/ocr/test_dispatch.py index 8ff79517f7f..7b4b9fab579 100644 --- a/tests/test_litellm_rust/ocr/test_dispatch.py +++ b/tests/test_litellm_rust/ocr/test_dispatch.py @@ -1,4 +1,3 @@ -import sys from typing import Final import pytest @@ -17,23 +16,6 @@ def ocr_server(recording_server: RecordingServer) -> RecordingServer: return recording_server -def test_native_ocr_rejects_disabled_gil_before_provider_call( - ocr_server: RecordingServer, monkeypatch: pytest.MonkeyPatch -) -> None: - ocr_server.expected_requests = 0 - monkeypatch.setattr(sys, "_is_gil_enabled", lambda: False, raising=False) - - with pytest.raises(RuntimeError, match="native OCR requires the Python GIL"): - litellm.ocr( - model=OCR_MODEL, - document=OCR_DOCUMENT, - api_key="test-key", - api_base=ocr_server.base_url, - ) - - assert not ocr_server.requests - - @pytest.mark.parametrize("enabled", [False, True, None]) def test_public_ocr_uses_native_route_independently_of_flag(ocr_server: RecordingServer, enabled: bool | None) -> None: litellm.rust(enabled) diff --git a/tests/test_litellm_rust/test_ocr.py b/tests/test_litellm_rust/test_ocr.py index 1f3421b18b3..e0e06d685b8 100644 --- a/tests/test_litellm_rust/test_ocr.py +++ b/tests/test_litellm_rust/test_ocr.py @@ -224,7 +224,7 @@ def test_native_ocr_rejects_invalid_input_before_network(ocr_server, custom_prov from litellm.rust_bridge import _native server, requests = ocr_server - with pytest.raises(ValueError, match=r"invalid (OCR request field|provider)|invalid request"): + with pytest.raises(ValueError, match="Document URL is required"): _native.ocr( model="mistral-ocr-latest", custom_llm_provider=custom_provider,