diff --git a/litellm_proxy/proxy_server.py b/litellm_proxy/proxy_server.py index b3cc32b865..166b9a17df 100644 --- a/litellm_proxy/proxy_server.py +++ b/litellm_proxy/proxy_server.py @@ -372,15 +372,7 @@ from fastapi.security.api_key import APIKeyHeader from fastapi.staticfiles import StaticFiles # import enterprise folder -try: - # when using litellm cli - import litellm_proxy.enterprise as enterprise -except Exception: - # when using litellm docker image - try: - import enterprise # type: ignore - except Exception: - pass +import enterprise server_root_path = os.getenv("SERVER_ROOT_PATH", "") _license_check = LicenseCheck() diff --git a/tests/local_testing/test_blocked_user_list.py b/tests/local_testing/test_blocked_user_list.py index 3489fd9453..0819a09450 100644 --- a/tests/local_testing/test_blocked_user_list.py +++ b/tests/local_testing/test_blocked_user_list.py @@ -29,7 +29,7 @@ from litellm import Router, mock_completion from litellm._logging import verbose_proxy_logger from litellm.caching.caching import DualCache from litellm_proxy._types import UserAPIKeyAuth -from litellm_proxy.enterprise.enterprise_hooks.blocked_user_list import ( +from enterprise.enterprise_hooks.blocked_user_list import ( _ENTERPRISE_BlockedUserList, ) from litellm_proxy.management_endpoints.internal_user_endpoints import ( diff --git a/tests/local_testing/test_llm_guard.py b/tests/local_testing/test_llm_guard.py index 6c52c60391..97f3cf18dd 100644 --- a/tests/local_testing/test_llm_guard.py +++ b/tests/local_testing/test_llm_guard.py @@ -16,7 +16,7 @@ sys.path.insert( ) # Adds the parent directory to the system path import pytest import litellm -from litellm_proxy.enterprise.enterprise_hooks.llm_guard import _ENTERPRISE_LLMGuard +from enterprise.enterprise_hooks.llm_guard import _ENTERPRISE_LLMGuard from litellm import Router, mock_completion from litellm_proxy.utils import ProxyLogging, hash_token from litellm_proxy._types import UserAPIKeyAuth diff --git a/tests/local_testing/test_openai_moderations_hook.py b/tests/local_testing/test_openai_moderations_hook.py index 2a4591aaed..46e2d9b6a9 100644 --- a/tests/local_testing/test_openai_moderations_hook.py +++ b/tests/local_testing/test_openai_moderations_hook.py @@ -16,7 +16,7 @@ sys.path.insert( ) # Adds the parent directory to the system path import pytest import litellm -from litellm_proxy.enterprise.enterprise_hooks.openai_moderation import ( +from enterprise.enterprise_hooks.openai_moderation import ( _ENTERPRISE_OpenAI_Moderation, ) from litellm import Router, mock_completion diff --git a/tests/local_testing/test_secret_detect_hook.py b/tests/local_testing/test_secret_detect_hook.py index 876251b9ba..958861a0f0 100644 --- a/tests/local_testing/test_secret_detect_hook.py +++ b/tests/local_testing/test_secret_detect_hook.py @@ -29,7 +29,7 @@ from litellm import Router, mock_completion from litellm.caching.caching import DualCache from litellm.integrations.custom_logger import CustomLogger from litellm_proxy._types import UserAPIKeyAuth -from litellm_proxy.enterprise.enterprise_hooks.secret_detection import ( +from enterprise.enterprise_hooks.secret_detection import ( _ENTERPRISE_SecretDetection, ) from litellm_proxy.proxy_server import chat_completion diff --git a/tests/proxy_unit_tests/test_banned_keyword_list.py b/tests/proxy_unit_tests/test_banned_keyword_list.py index 3784189b8f..2e9bcb00c9 100644 --- a/tests/proxy_unit_tests/test_banned_keyword_list.py +++ b/tests/proxy_unit_tests/test_banned_keyword_list.py @@ -15,7 +15,7 @@ sys.path.insert( ) # Adds the parent directory to the system path import pytest import litellm -from litellm_proxy.enterprise.enterprise_hooks.banned_keywords import ( +from enterprise.enterprise_hooks.banned_keywords import ( _ENTERPRISE_BannedKeywords, ) from litellm import Router, mock_completion diff --git a/tests/proxy_unit_tests/test_proxy_reject_logging.py b/tests/proxy_unit_tests/test_proxy_reject_logging.py index 8cd18917d4..38d9ac3d22 100644 --- a/tests/proxy_unit_tests/test_proxy_reject_logging.py +++ b/tests/proxy_unit_tests/test_proxy_reject_logging.py @@ -34,7 +34,7 @@ from litellm import Router, mock_completion from litellm.caching.caching import DualCache from litellm.integrations.custom_logger import CustomLogger from litellm_proxy._types import UserAPIKeyAuth -from litellm_proxy.enterprise.enterprise_hooks.secret_detection import ( +from enterprise.enterprise_hooks.secret_detection import ( _ENTERPRISE_SecretDetection, ) from litellm_proxy.proxy_server import (