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
refactor(types): import CustomLogger and CustomLLM under TYPE_CHECKING in adapter TypedDicts (#45774)
nate-berri13191e5b661b
diff --git a/litellm/types/adapter.py b/litellm/types/adapter.pyindex 924fabcb86d..a9c7b77f6b1 100644--- a/litellm/types/adapter.py+++ b/litellm/types/adapter.py@@ -1,8 +1,11 @@+from typing import TYPE_CHECKING+from typing_extensions import TypedDict-from litellm.integrations.custom_logger import CustomLogger+if TYPE_CHECKING:+ from litellm.integrations.custom_logger import CustomLoggerclass AdapterItem(TypedDict):id: str- adapter: CustomLogger+ adapter: "CustomLogger"diff --git a/litellm/types/llms/custom_llm.py b/litellm/types/llms/custom_llm.pyindex e57a7a28007..6b583b0a83d 100644--- a/litellm/types/llms/custom_llm.py+++ b/litellm/types/llms/custom_llm.py@@ -1,8 +1,11 @@+from typing import TYPE_CHECKING+from typing_extensions import TypedDict-from litellm.llms.custom_llm import CustomLLM+if TYPE_CHECKING:+ from litellm.llms.custom_llm import CustomLLMclass CustomLLMItem(TypedDict):provider: str- custom_handler: CustomLLM+ custom_handler: "CustomLLM"