Skip to content

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]

fix(sdk): resolve litellm.proxy lazily on attribute access (#45845)

nate-berri691ca0326653
diff --git a/litellm/__init__.py b/litellm/__init__.py
index 4196912488f..a6bbd132cbf 100644
--- a/litellm/__init__.py
+++ b/litellm/__init__.py
@@ -2386,6 +2386,11 @@ def __getattr__(name: str) -> Any:
handler_func: Final = registry[name]
return handler_func(name)
+ if name == "proxy":
+ import importlib
+
+ return importlib.import_module("litellm.proxy")
+
if name == "harness" or name in _AGENT_EXPORTS:
import importlib