The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(rust_bridge): keep catalog and runtime importable on Python 3.10
Yujong Lee735ac9fc0f19
diff --git a/litellm/rust_bridge/catalog.py b/litellm/rust_bridge/catalog.pyindex 04d413beed2..68263682ad7 100644--- a/litellm/rust_bridge/catalog.py+++ b/litellm/rust_bridge/catalog.py@@ -9,14 +9,14 @@ signals ``RustBridgeDeclined`` before any provider I/O.from __future__ import annotationsfrom dataclasses import dataclass-from enum import Enum, StrEnum, auto+from enum import Enum, autofrom typing import Final, TypeAliasfrom litellm.rust_bridge.configuration import Decision, Rolloutfrom litellm.rust_bridge.configuration import decision as _decision-class Route(StrEnum):+class Route(str, Enum):CHAT_COMPLETIONS = "chat_completions"MESSAGES = "messages"RESPONSES = "responses"diff --git a/litellm/rust_bridge/runtime.py b/litellm/rust_bridge/runtime.pyindex 46b7c99f3bc..843183144e2 100644--- a/litellm/rust_bridge/runtime.py+++ b/litellm/rust_bridge/runtime.py@@ -2,7 +2,9 @@ from __future__ import annotationsfrom collections.abc import Awaitable, Callablefrom dataclasses import dataclass-from typing import Final, Generic, NoReturn, TypeAlias, TypeVar, assert_never+from typing import Final, Generic, NoReturn, TypeAlias, TypeVar++from typing_extensions import assert_neverfrom litellm.exceptions import APIErrorfrom litellm.rust_bridge.bindings import NativeBinding, native_exception_types