From c8273448400a8560c35400a450f24fcc7881ba7c Mon Sep 17 00:00:00 2001 From: Yujong Lee Date: Tue, 15 Sep 2026 04:23:45 +0000 Subject: [PATCH] fix(rust-bridge): tighten _native stub for OCR input_sources and websocket construction Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/rust_bridge/_native.pyi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/litellm/rust_bridge/_native.pyi b/litellm/rust_bridge/_native.pyi index d01a480a0a8..4c1033aee79 100644 --- a/litellm/rust_bridge/_native.pyi +++ b/litellm/rust_bridge/_native.pyi @@ -1,6 +1,6 @@ from asyncio import Future from collections.abc import Coroutine, Mapping, Sequence -from typing import final +from typing import Never, final from litellm.llms.base_llm.ocr.transformation import OCRResponse from litellm.rust_bridge.ocr import LiteLLMOcrRequest @@ -16,7 +16,7 @@ def ocr( custom_llm_provider: str | None = None, extra_headers: Mapping[str, object] | None = None, optional_params: Mapping[str, object] | None = None, - input_sources: Sequence[object] | None = None, + input_sources: Mapping[str, str] | None = None, timeout_seconds: float | None = None, ) -> dict[str, object]: ... def aocr( @@ -27,7 +27,7 @@ def aocr( custom_llm_provider: str | None = None, extra_headers: Mapping[str, object] | None = None, optional_params: Mapping[str, object] | None = None, - input_sources: Sequence[object] | None = None, + input_sources: Mapping[str, str] | None = None, timeout_seconds: float | None = None, ) -> Future[dict[str, object]]: ... @@ -113,6 +113,7 @@ def achat_completions( @final class ResponsesWebSocketConnection: + def __new__(cls, _uninstantiable: Never, /) -> Never: ... @classmethod def connect( cls,