From 09e3bfeda4beb266ff552be5b7e2dc0d93f3d81f Mon Sep 17 00:00:00 2001 From: Yujong Lee Date: Tue, 1 Sep 2026 09:26:28 -0700 Subject: [PATCH] fix(python): annotate native exception classes --- litellm/llms/custom_httpx/llm_http_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/llms/custom_httpx/llm_http_handler.py b/litellm/llms/custom_httpx/llm_http_handler.py index e220c449c5d..78f88a0b305 100644 --- a/litellm/llms/custom_httpx/llm_http_handler.py +++ b/litellm/llms/custom_httpx/llm_http_handler.py @@ -2405,8 +2405,8 @@ class BaseLLMHTTPHandler: from litellm.rust_bridge import get_native_bridge native_bridge: Final = get_native_bridge() - declined = getattr(native_bridge, "RustBridgeDeclined", None) - upstream_failed = getattr(native_bridge, "RustUpstreamError", None) + declined: Final = getattr(native_bridge, "RustBridgeDeclined", None) + upstream_failed: Final = getattr(native_bridge, "RustUpstreamError", None) if isinstance(upstream_failed, type) and isinstance(rust_error, upstream_failed): args: Final = rust_error.args status: Final = args[0] if args else 0