mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-21 00:21:49 +00:00
fix(rust_bridge): keep catalog and runtime importable on Python 3.10
StrEnum and typing.assert_never are 3.11+; use (str, Enum) and typing_extensions.assert_never like the rest of the package. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
7a1d433e7a
commit
735ac9fc0f
2 changed files with 5 additions and 3 deletions
|
|
@ -9,14 +9,14 @@ signals ``RustBridgeDeclined`` before any provider I/O.
|
|||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum, StrEnum, auto
|
||||
from enum import Enum, auto
|
||||
from typing import Final, TypeAlias
|
||||
|
||||
from litellm.rust_bridge.configuration import Decision, Rollout
|
||||
from litellm.rust_bridge.configuration import decision as _decision
|
||||
|
||||
|
||||
class Route(StrEnum):
|
||||
class Route(str, Enum):
|
||||
CHAT_COMPLETIONS = "chat_completions"
|
||||
MESSAGES = "messages"
|
||||
RESPONSES = "responses"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ from __future__ import annotations
|
|||
|
||||
from collections.abc import Awaitable, Callable
|
||||
from 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_never
|
||||
|
||||
from litellm.exceptions import APIError
|
||||
from litellm.rust_bridge.bindings import NativeBinding, native_exception_types
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue