diff --git a/Dockerfile b/Dockerfile index 890c90fe449..ba914bd44e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -161,8 +161,8 @@ COPY --from=builder /app/docker /app/docker COPY --from=builder /app/schema.prisma /app/schema.prisma COPY --from=builder /app/litellm/proxy/prisma_migration.py /app/litellm/proxy/prisma_migration.py # enterprise/ is imported by source path at runtime (proxy_cli puts the -# working directory on sys.path; litellm/proxy/hooks resolves -# enterprise.enterprise_hooks from it) +# working directory on sys.path; the moderation and blocked user list +# callbacks import enterprise.enterprise_hooks from it) COPY --from=builder /app/enterprise /app/enterprise COPY --from=builder /app/litellm-proxy-extras /app/litellm-proxy-extras # Prisma CLI + engines are baked under /opt/prisma, a fixed path every diff --git a/docker/Dockerfile.database b/docker/Dockerfile.database index 56210458532..f1fe4a0a757 100644 --- a/docker/Dockerfile.database +++ b/docker/Dockerfile.database @@ -141,8 +141,8 @@ COPY --from=builder /app/docker /app/docker COPY --from=builder /app/schema.prisma /app/schema.prisma COPY --from=builder /app/litellm/proxy/prisma_migration.py /app/litellm/proxy/prisma_migration.py # enterprise/ is imported by source path at runtime (proxy_cli puts the -# working directory on sys.path; litellm/proxy/hooks resolves -# enterprise.enterprise_hooks from it) +# working directory on sys.path; the moderation and blocked user list +# callbacks import enterprise.enterprise_hooks from it) COPY --from=builder /app/enterprise /app/enterprise COPY --from=builder /app/litellm-proxy-extras /app/litellm-proxy-extras # Prisma CLI + engines are baked under /opt/prisma, a fixed path every diff --git a/docker/Dockerfile.non_root b/docker/Dockerfile.non_root index 086c38e0d60..0115597517a 100644 --- a/docker/Dockerfile.non_root +++ b/docker/Dockerfile.non_root @@ -147,8 +147,8 @@ COPY --from=builder /app/docker /app/docker COPY --from=builder /app/schema.prisma /app/schema.prisma COPY --from=builder /app/litellm/proxy/prisma_migration.py /app/litellm/proxy/prisma_migration.py # enterprise/ is imported by source path at runtime (proxy_cli puts the -# working directory on sys.path; litellm/proxy/hooks resolves -# enterprise.enterprise_hooks from it) +# working directory on sys.path; the moderation and blocked user list +# callbacks import enterprise.enterprise_hooks from it) COPY --from=builder /app/enterprise /app/enterprise COPY --from=builder /app/litellm-proxy-extras /app/litellm-proxy-extras # Prisma CLI + engines are baked under /opt/prisma, a fixed path every runtime diff --git a/enterprise/enterprise_hooks/__init__.py b/enterprise/enterprise_hooks/__init__.py index 6de3325f113..e69de29bb2d 100644 --- a/enterprise/enterprise_hooks/__init__.py +++ b/enterprise/enterprise_hooks/__init__.py @@ -1,33 +0,0 @@ -from typing import Dict, Literal, Type, Union - -from litellm_enterprise.proxy.hooks.managed_files import PROXY_LiteLLMManagedFiles -from litellm_enterprise.proxy.hooks.managed_vector_stores import ( - PROXY_LiteLLMManagedVectorStores, -) - -from litellm.integrations.custom_logger import CustomLogger - -ENTERPRISE_PROXY_HOOKS: Dict[str, Type[CustomLogger]] = { - "managed_files": PROXY_LiteLLMManagedFiles, - "managed_vector_stores": PROXY_LiteLLMManagedVectorStores, -} - - -def get_enterprise_proxy_hook( - hook_name: Union[ - Literal[ - "managed_files", - "managed_vector_stores", - "max_parallel_requests", - ], - str, - ], -): - """ - Factory method to get a enterprise hook instance by name - """ - if hook_name not in ENTERPRISE_PROXY_HOOKS: - raise ValueError( - f"Unknown hook: {hook_name}. Available hooks: {list(ENTERPRISE_PROXY_HOOKS.keys())}" - ) - return ENTERPRISE_PROXY_HOOKS[hook_name]