fix(ocr): use defensive getattr in load_rust_ocr

This commit is contained in:
Arjun Pakhan 2026-06-26 13:39:29 +00:00
parent 6ed1c6b420
commit 3f5186f9af

View file

@ -97,7 +97,7 @@ def load_rust_ocr() -> RustOcr | None:
import litellm_python_bridge
except ImportError:
return None
return cast(RustOcr, litellm_python_bridge.ocr)
return cast(RustOcr, getattr(litellm_python_bridge, "ocr", None))
def load_rust_aocr() -> RustAocr | None: