BerriAI/litellm · error · Exception
Trying to use secret hidingYou must be a LiteLLM Enterprise
Error message
Trying to use secret hidingYou must be a LiteLLM Enterprise user to use this feature. If you have a license please set `LITELLM_LICENSE` in your env. Get a 7 day trial key here: https://www.litellm.ai/enterprise#trial. Pricing: https://www.litellm.ai/#pricing
What it means
Raised at startup when 'hide_secrets' is configured, litellm-enterprise IS installed, but premium_user is not True. This is the license gate that follows the import gate: LITELLM_LICENSE must be set to a valid enterprise license in the proxy process env, otherwise the SecretDetection callback refuses to initialize. The message appends the standard not-premium-user text with the trial URL.
Source
Thrown at litellm/proxy/common_utils/callback_utils.py:211
)
if premium_user is not True:
raise Exception("Trying to use Llama Guard" + CommonProxyErrors.not_premium_user.value)
llama_guard_object = _ENTERPRISE_LlamaGuard()
imported_list.append(llama_guard_object)
elif isinstance(callback, str) and callback == "hide_secrets":
try:
from litellm_enterprise.enterprise_callbacks.secret_detection import (
_ENTERPRISE_SecretDetection,
)
except ImportError:
raise Exception(
"Trying to use Secret Detection" + CommonProxyErrors.missing_enterprise_package.value
)
if premium_user is not True:
raise Exception("Trying to use secret hiding" + CommonProxyErrors.not_premium_user.value)
_secret_detection_object = _ENTERPRISE_SecretDetection()
imported_list.append(_secret_detection_object)
elif isinstance(callback, str) and callback == "openai_moderations":
try:
from enterprise.enterprise_hooks.openai_moderation import (
_ENTERPRISE_OpenAI_Moderation,
)
except ImportError:
raise Exception(
"Trying to use OpenAI Moderations Check,"
+ CommonProxyErrors.missing_enterprise_package_docker.value
)
if premium_user is not True:
raise Exception("Trying to use OpenAI Moderations Check" + CommonProxyErrors.not_premium_user.value)
openai_moderations_object = _ENTERPRISE_OpenAI_Moderation()View on GitHub (pinned to 77b7c6c40c)
Solutions
- Export a valid LITELLM_LICENSE for the proxy process and restart it.
- Get/renew a trial or paid key via https://www.litellm.ai/enterprise#trial.
- Verify inside the container: docker exec <proxy> printenv LITELLM_LICENSE.
- Alternatively remove 'hide_secrets' from the callbacks list.
Example fix
# before litellm_settings: callbacks: ["hide_secrets"] # no LITELLM_LICENSE in env # after LITELLM_LICENSE=sk-... docker compose up # or set in deployment env
Defensive patterns
Strategy: validation
Validate before calling
import os
if 'hide_secrets' in callbacks and not os.environ.get('LITELLM_LICENSE'):
callbacks.remove('hide_secrets')
logger.warning('hide_secrets requires an enterprise license; disabled') Prevention
- Store LITELLM_LICENSE in the same secret manager entry as other proxy secrets and mount both together.
- Add a startup assertion: enterprise callbacks present implies LITELLM_LICENSE set.
- Monitor proxy startup logs - license-gate errors appear before the server binds.
When it happens
Trigger: hide_secrets enabled with the enterprise package present, but LITELLM_LICENSE unset, expired, or invalid in that process; env var present in CI but stripped in the runtime container; license checked against a mismatched Litellm-Setup-URL.
Common situations: License env forgotten in k8s secret mounts; trial keys lapsing; running proxy via a service manager that does not inherit the shell env.
Related errors
- Trying to use Llama GuardYou must be a LiteLLM Enterprise us
- Trying to use OpenAI Moderations CheckYou must be a LiteLLM
- Trying to use Secret DetectionMissing litellm-enterprise pac
- You must be a LiteLLM Enterprise user to use this feature. I
- Setting tag-based guardrails is only available in litellm-en
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/61a6c2055ab53bbc.
Report an issue: GitHub.