fix import path

This commit is contained in:
Ishaan Jaff 2025-04-23 14:48:13 -07:00
parent ce58c53ff1
commit 101c350f98
7 changed files with 7 additions and 15 deletions

View file

@ -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()

View file

@ -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 (

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 (