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]

[Refactor] Move LLM Guard, Secret Detection to Enterprise Pip packagea (#10782)

Ishaan Jaff3130c4f8f9cb
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 26660e109e6..7eab78cd766 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -659,6 +659,7 @@ jobs:
pip install "pytest-asyncio==0.21.1"
pip install "pytest-cov==5.0.0"
# Run pytest and generate JUnit XML report
+ - setup_litellm_enterprise_pip
- run:
name: Run tests
command: |
diff --git a/enterprise/enterprise_hooks/llama_guard.py b/enterprise/litellm_enterprise/enterprise_callbacks/llama_guard.py
similarity index 97%
rename from enterprise/enterprise_hooks/llama_guard.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/llama_guard.py
index 2c53fafa5b6..a2d77f51a49 100644
--- a/enterprise/enterprise_hooks/llama_guard.py
+++ b/enterprise/litellm_enterprise/enterprise_callbacks/llama_guard.py
@@ -7,24 +7,23 @@
# +-------------------------------------------------------------+
# Thank you users! We ❤️ you! - Krrish & Ishaan
-import sys
import os
+import sys
from collections.abc import Iterable
sys.path.insert(
0, os.path.abspath("../..")
) # Adds the parent directory to the system path
-from typing import Optional, Literal
-import litellm
import sys
-from litellm.proxy._types import UserAPIKeyAuth
-from litellm.integrations.custom_logger import CustomLogger
+from typing import Literal, Optional
+
from fastapi import HTTPException
+
+import litellm
from litellm._logging import verbose_proxy_logger
-from litellm.types.utils import (
- ModelResponse,
- Choices,
-)
+from litellm.integrations.custom_logger import CustomLogger
+from litellm.proxy._types import UserAPIKeyAuth
+from litellm.types.utils import Choices, ModelResponse
litellm.set_verbose = True
diff --git a/enterprise/enterprise_hooks/llm_guard.py b/enterprise/litellm_enterprise/enterprise_callbacks/llm_guard.py
similarity index 99%
rename from enterprise/enterprise_hooks/llm_guard.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/llm_guard.py
index 934646acb0e..59981154aa5 100644
--- a/enterprise/enterprise_hooks/llm_guard.py
+++ b/enterprise/litellm_enterprise/enterprise_callbacks/llm_guard.py
@@ -7,15 +7,17 @@
# Thank you users! We ❤️ you! - Krrish & Ishaan
## This provides an LLM Guard Integration for content moderation on the proxy
-from typing import Optional, Literal
-import litellm
-from litellm.proxy._types import UserAPIKeyAuth
-from litellm.integrations.custom_logger import CustomLogger
+from typing import Literal, Optional
+
+import aiohttp
from fastapi import HTTPException
+
+import litellm
from litellm._logging import verbose_proxy_logger
-import aiohttp
-from litellm.utils import get_formatted_prompt
+from litellm.integrations.custom_logger import CustomLogger
+from litellm.proxy._types import UserAPIKeyAuth
from litellm.secret_managers.main import get_secret_str
+from litellm.utils import get_formatted_prompt
litellm.set_verbose = True
diff --git a/enterprise/enterprise_hooks/secret_detection.py b/enterprise/litellm_enterprise/enterprise_callbacks/secret_detection.py
similarity index 99%
rename from enterprise/enterprise_hooks/secret_detection.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secret_detection.py
index 158f26efa30..8a7a82df686 100644
--- a/enterprise/enterprise_hooks/secret_detection.py
+++ b/enterprise/litellm_enterprise/enterprise_callbacks/secret_detection.py
@@ -5,18 +5,19 @@
# +-------------------------------------------------------------+
# Thank you users! We ❤️ you! - Krrish & Ishaan
-import sys
import os
+import sys
sys.path.insert(
0, os.path.abspath("../..")
) # Adds the parent directory to the system path
+import tempfile
from typing import Optional
-from litellm.caching.caching import DualCache
-from litellm.proxy._types import UserAPIKeyAuth
+
from litellm._logging import verbose_proxy_logger
-import tempfile
+from litellm.caching.caching import DualCache
from litellm.integrations.custom_guardrail import CustomGuardrail
+from litellm.proxy._types import UserAPIKeyAuth
GUARDRAIL_NAME = "hide_secrets"
diff --git a/enterprise/enterprise_hooks/secrets_plugins/__init__.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/__init__.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/__init__.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/__init__.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/adafruit.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/adafruit.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/adafruit.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/adafruit.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/adobe.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/adobe.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/adobe.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/adobe.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/age_secret_key.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/age_secret_key.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/age_secret_key.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/age_secret_key.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/airtable_api_key.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/airtable_api_key.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/airtable_api_key.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/airtable_api_key.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/algolia_api_key.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/algolia_api_key.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/algolia_api_key.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/algolia_api_key.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/alibaba.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/alibaba.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/alibaba.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/alibaba.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/asana.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/asana.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/asana.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/asana.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/atlassian_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/atlassian_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/atlassian_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/atlassian_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/authress_access_key.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/authress_access_key.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/authress_access_key.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/authress_access_key.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/beamer_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/beamer_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/beamer_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/beamer_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/bitbucket.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/bitbucket.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/bitbucket.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/bitbucket.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/bittrex.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/bittrex.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/bittrex.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/bittrex.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/clojars_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/clojars_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/clojars_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/clojars_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/codecov_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/codecov_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/codecov_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/codecov_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/coinbase_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/coinbase_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/coinbase_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/coinbase_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/confluent.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/confluent.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/confluent.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/confluent.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/contentful_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/contentful_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/contentful_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/contentful_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/databricks_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/databricks_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/databricks_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/databricks_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/datadog_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/datadog_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/datadog_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/datadog_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/defined_networking_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/defined_networking_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/defined_networking_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/defined_networking_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/digitalocean.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/digitalocean.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/digitalocean.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/digitalocean.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/discord.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/discord.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/discord.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/discord.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/doppler_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/doppler_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/doppler_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/doppler_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/droneci_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/droneci_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/droneci_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/droneci_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/dropbox.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/dropbox.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/dropbox.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/dropbox.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/duffel_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/duffel_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/duffel_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/duffel_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/dynatrace_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/dynatrace_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/dynatrace_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/dynatrace_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/easypost.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/easypost.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/easypost.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/easypost.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/etsy_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/etsy_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/etsy_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/etsy_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/facebook_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/facebook_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/facebook_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/facebook_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/fastly_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/fastly_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/fastly_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/fastly_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/finicity.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/finicity.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/finicity.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/finicity.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/finnhub_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/finnhub_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/finnhub_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/finnhub_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/flickr_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/flickr_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/flickr_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/flickr_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/flutterwave.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/flutterwave.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/flutterwave.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/flutterwave.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/frameio_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/frameio_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/frameio_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/frameio_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/freshbooks_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/freshbooks_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/freshbooks_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/freshbooks_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/gcp_api_key.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/gcp_api_key.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/gcp_api_key.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/gcp_api_key.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/github_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/github_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/github_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/github_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/gitlab.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/gitlab.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/gitlab.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/gitlab.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/gitter_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/gitter_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/gitter_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/gitter_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/gocardless_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/gocardless_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/gocardless_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/gocardless_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/grafana.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/grafana.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/grafana.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/grafana.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/hashicorp_tf_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/hashicorp_tf_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/hashicorp_tf_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/hashicorp_tf_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/heroku_api_key.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/heroku_api_key.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/heroku_api_key.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/heroku_api_key.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/hubspot_api_key.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/hubspot_api_key.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/hubspot_api_key.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/hubspot_api_key.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/huggingface.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/huggingface.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/huggingface.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/huggingface.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/intercom_api_key.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/intercom_api_key.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/intercom_api_key.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/intercom_api_key.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/jfrog.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/jfrog.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/jfrog.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/jfrog.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/jwt.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/jwt.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/jwt.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/jwt.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/kraken_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/kraken_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/kraken_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/kraken_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/kucoin.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/kucoin.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/kucoin.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/kucoin.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/launchdarkly_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/launchdarkly_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/launchdarkly_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/launchdarkly_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/linear.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/linear.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/linear.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/linear.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/linkedin.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/linkedin.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/linkedin.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/linkedin.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/lob.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/lob.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/lob.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/lob.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/mailgun.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/mailgun.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/mailgun.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/mailgun.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/mapbox_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/mapbox_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/mapbox_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/mapbox_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/mattermost_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/mattermost_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/mattermost_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/mattermost_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/messagebird.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/messagebird.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/messagebird.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/messagebird.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/microsoft_teams_webhook.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/microsoft_teams_webhook.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/microsoft_teams_webhook.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/microsoft_teams_webhook.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/netlify_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/netlify_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/netlify_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/netlify_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/new_relic.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/new_relic.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/new_relic.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/new_relic.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/nytimes_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/nytimes_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/nytimes_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/nytimes_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/okta_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/okta_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/okta_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/okta_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/openai_api_key.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/openai_api_key.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/openai_api_key.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/openai_api_key.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/planetscale.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/planetscale.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/planetscale.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/planetscale.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/postman_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/postman_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/postman_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/postman_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/prefect_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/prefect_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/prefect_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/prefect_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/pulumi_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/pulumi_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/pulumi_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/pulumi_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/pypi_upload_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/pypi_upload_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/pypi_upload_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/pypi_upload_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/rapidapi_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/rapidapi_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/rapidapi_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/rapidapi_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/readme_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/readme_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/readme_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/readme_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/rubygems_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/rubygems_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/rubygems_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/rubygems_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/scalingo_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/scalingo_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/scalingo_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/scalingo_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/sendbird.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/sendbird.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/sendbird.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/sendbird.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/sendgrid_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/sendgrid_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/sendgrid_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/sendgrid_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/sendinblue_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/sendinblue_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/sendinblue_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/sendinblue_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/sentry_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/sentry_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/sentry_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/sentry_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/shippo_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/shippo_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/shippo_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/shippo_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/shopify.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/shopify.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/shopify.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/shopify.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/slack.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/slack.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/slack.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/slack.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/snyk_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/snyk_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/snyk_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/snyk_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/squarespace_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/squarespace_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/squarespace_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/squarespace_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/sumologic.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/sumologic.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/sumologic.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/sumologic.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/telegram_bot_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/telegram_bot_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/telegram_bot_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/telegram_bot_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/travisci_access_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/travisci_access_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/travisci_access_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/travisci_access_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/twitch_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/twitch_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/twitch_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/twitch_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/twitter.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/twitter.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/twitter.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/twitter.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/typeform_api_token.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/typeform_api_token.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/typeform_api_token.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/typeform_api_token.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/vault.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/vault.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/vault.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/vault.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/yandex.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/yandex.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/yandex.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/yandex.py
diff --git a/enterprise/enterprise_hooks/secrets_plugins/zendesk_secret_key.py b/enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/zendesk_secret_key.py
similarity index 100%
rename from enterprise/enterprise_hooks/secrets_plugins/zendesk_secret_key.py
rename to enterprise/litellm_enterprise/enterprise_callbacks/secrets_plugins/zendesk_secret_key.py
diff --git a/litellm/proxy/common_utils/callback_utils.py b/litellm/proxy/common_utils/callback_utils.py
index 1c1b6f32c16..9f4f370f331 100644
--- a/litellm/proxy/common_utils/callback_utils.py
+++ b/litellm/proxy/common_utils/callback_utils.py
@@ -56,7 +56,7 @@ def initialize_callbacks_on_proxy( # noqa: PLR0915
pii_masking_object = _OPTIONAL_PresidioPIIMasking(**params)
imported_list.append(pii_masking_object)
elif isinstance(callback, str) and callback == "llamaguard_moderations":
- from enterprise.enterprise_hooks.llama_guard import (
+ from litellm_enterprise.enterprise_callbacks.llama_guard import (
_ENTERPRISE_LlamaGuard,
)
@@ -69,7 +69,7 @@ def initialize_callbacks_on_proxy( # noqa: PLR0915
llama_guard_object = _ENTERPRISE_LlamaGuard()
imported_list.append(llama_guard_object)
elif isinstance(callback, str) and callback == "hide_secrets":
- from enterprise.enterprise_hooks.secret_detection import (
+ from litellm_enterprise.enterprise_callbacks.secret_detection import (
_ENTERPRISE_SecretDetection,
)
@@ -125,7 +125,9 @@ def initialize_callbacks_on_proxy( # noqa: PLR0915
google_text_moderation_obj = _ENTERPRISE_GoogleTextModeration()
imported_list.append(google_text_moderation_obj)
elif isinstance(callback, str) and callback == "llmguard_moderations":
- from enterprise.enterprise_hooks.llm_guard import _ENTERPRISE_LLMGuard
+ from litellm_enterprise.enterprise_callbacks.llm_guard import (
+ _ENTERPRISE_LLMGuard,
+ )
if premium_user is not True:
raise Exception(
diff --git a/litellm/proxy/guardrails/guardrail_initializers.py b/litellm/proxy/guardrails/guardrail_initializers.py
index 5b5ab23d7f2..a5b0447fc53 100644
--- a/litellm/proxy/guardrails/guardrail_initializers.py
+++ b/litellm/proxy/guardrails/guardrail_initializers.py
@@ -87,7 +87,9 @@ def initialize_presidio(litellm_params, guardrail):
def initialize_hide_secrets(litellm_params, guardrail):
- from enterprise.enterprise_hooks.secret_detection import _ENTERPRISE_SecretDetection
+ from litellm_enterprise.enterprise_callbacks.secret_detection import (
+ _ENTERPRISE_SecretDetection,
+ )
_secret_detection_object = _ENTERPRISE_SecretDetection(
detect_secrets_config=litellm_params.get("detect_secrets_config"),
diff --git a/tests/local_testing/test_llm_guard.py b/tests/local_testing/test_llm_guard.py
index ff380b74dfc..da881e19d3c 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 litellm_enterprise.enterprise_callbacks.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_secret_detect_hook.py b/tests/local_testing/test_secret_detect_hook.py
index f240e9b6066..8340fb91482 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 litellm_enterprise.enterprise_callbacks.secret_detection import (
_ENTERPRISE_SecretDetection,
)
from litellm.proxy.proxy_server import chat_completion
diff --git a/tests/proxy_unit_tests/test_proxy_reject_logging.py b/tests/proxy_unit_tests/test_proxy_reject_logging.py
index 756a2311547..aa43e245170 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 litellm_enterprise.enterprise_callbacks.secret_detection import (
_ENTERPRISE_SecretDetection,
)
from litellm.proxy.proxy_server import (