ocr: wrap rust bridge dict into OCRResponse at the call site

This commit is contained in:
Ishaan Jaffer 2026-06-22 20:37:21 -07:00
parent 718b1d550c
commit 17791a2174
No known key found for this signature in database

View file

@ -268,7 +268,9 @@ def ocr(
rust_bridge = importlib.import_module("litellm.ocr.rust_bridge")
if custom_llm_provider == "mistral" and rust_bridge.rust_ocr_enabled():
return rust_bridge.rust_ocr(model, document, api_key, api_base, kwargs)
return OCRResponse(
**rust_bridge.rust_ocr(model, document, api_key, api_base, kwargs)
)
# Get provider config
ocr_provider_config: Optional[BaseOCRConfig] = (