Skip to content

Commit 74684a3

Browse files
Merge pull request #14524 from BenYao21/feature-lazyloading
Feature lazyloading
2 parents d182c04 + 3b52919 commit 74684a3

File tree

3 files changed

+2
-1316
lines changed

3 files changed

+2
-1316
lines changed

litellm/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,11 +1230,6 @@ def __getattr__(name: str) -> Any:
12301230
# cache class
12311231
setattr(modules[__name__], original_name, attr)
12321232

1233-
# if the request is a lowercase name → automatically instantiate
1234-
if name[0].islower():
1235-
instance = attr()
1236-
setattr(modules[__name__], name, instance)
1237-
return instance
12381233
return attr
12391234
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
12401235

tests/local_testing/test_dynamic_rate_limit_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
import pytest
2222

2323
import litellm
24-
from litellm.caching.caching import DualCache, Router
24+
from litellm.caching.caching import DualCache
25+
from litellm.router import Router
2526
from litellm.proxy._types import UserAPIKeyAuth
2627
from litellm.proxy.hooks.dynamic_rate_limiter import (
2728
_PROXY_DynamicRateLimitHandler as DynamicRateLimitHandler,

0 commit comments

Comments
 (0)