mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
test(ocr): assert rust_ocr returns the raw bridge dict
This commit is contained in:
parent
17791a2174
commit
ca904f5607
1 changed files with 5 additions and 4 deletions
|
|
@ -66,7 +66,7 @@ def test_use_litellm_rust_toggles_flag():
|
|||
assert rust_bridge.rust_ocr_enabled() is False
|
||||
|
||||
|
||||
def test_rust_ocr_wraps_bridge_response(fake_bridge):
|
||||
def test_rust_ocr_returns_bridge_dict(fake_bridge):
|
||||
response = rust_bridge.rust_ocr(
|
||||
model="mistral-ocr-latest",
|
||||
document=DOCUMENT,
|
||||
|
|
@ -75,9 +75,10 @@ def test_rust_ocr_wraps_bridge_response(fake_bridge):
|
|||
optional_params={"include_image_base64": True},
|
||||
)
|
||||
|
||||
assert isinstance(response, OCRResponse)
|
||||
assert response.pages[0].markdown == "hello world"
|
||||
assert response.model == "mistral-ocr-2505-completion"
|
||||
# rust_ocr returns the raw dict; main.py wraps it into an OCRResponse.
|
||||
assert isinstance(response, dict)
|
||||
assert response["pages"][0]["markdown"] == "hello world"
|
||||
assert response["model"] == "mistral-ocr-2505-completion"
|
||||
assert fake_bridge[0]["model"] == "mistral-ocr-latest"
|
||||
assert fake_bridge[0]["optional_params"] == {"include_image_base64": True}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue