From 8325d52451e7ddd64064b13081f89fc1d1a802ff Mon Sep 17 00:00:00 2001 From: ishaan-berri <155045088+ishaan-berri@users.noreply.github.com> Date: Mon, 22 Jun 2026 18:36:10 -0700 Subject: [PATCH] Potential fix for pull request finding 'CodeQL / Module-level cyclic import' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- litellm/ocr/rust_bridge.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/litellm/ocr/rust_bridge.py b/litellm/ocr/rust_bridge.py index deb47f98c2d..5864d93d098 100644 --- a/litellm/ocr/rust_bridge.py +++ b/litellm/ocr/rust_bridge.py @@ -8,8 +8,6 @@ extension, which performs the whole OCR call (URL, headers, HTTP, parse) in Rust from typing import Any, Dict, Optional -from litellm.llms.base_llm.ocr.transformation import OCRResponse - _RUST_OCR_ENABLED = False @@ -30,9 +28,10 @@ def rust_ocr( api_key: Optional[str], api_base: Optional[str], optional_params: Dict[str, Any], -) -> OCRResponse: +) -> "OCRResponse": """Run a Mistral OCR call end-to-end in Rust and wrap the result as ``OCRResponse``.""" import litellm_python_bridge + from litellm.llms.base_llm.ocr.transformation import OCRResponse return OCRResponse( **litellm_python_bridge.ocr(model, document, api_key, api_base, optional_params)