{"record":{"id":"61a6c2055ab53bbc","repo":"BerriAI/litellm","slug":"trying-to-use-secret-hidingyou-must-be-a-litellm-e","errorCode":null,"errorMessage":"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. \nPricing: https://www.litellm.ai/#pricing","messagePattern":"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\\. \nPricing: https://www\\.litellm\\.ai/#pricing","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/proxy/common_utils/callback_utils.py","lineNumber":211,"sourceCode":"                    )\n\n                if premium_user is not True:\n                    raise Exception(\"Trying to use Llama Guard\" + CommonProxyErrors.not_premium_user.value)\n\n                llama_guard_object = _ENTERPRISE_LlamaGuard()\n                imported_list.append(llama_guard_object)\n            elif isinstance(callback, str) and callback == \"hide_secrets\":\n                try:\n                    from litellm_enterprise.enterprise_callbacks.secret_detection import (\n                        _ENTERPRISE_SecretDetection,\n                    )\n                except ImportError:\n                    raise Exception(\n                        \"Trying to use Secret Detection\" + CommonProxyErrors.missing_enterprise_package.value\n                    )\n\n                if premium_user is not True:\n                    raise Exception(\"Trying to use secret hiding\" + CommonProxyErrors.not_premium_user.value)\n\n                _secret_detection_object = _ENTERPRISE_SecretDetection()\n                imported_list.append(_secret_detection_object)\n            elif isinstance(callback, str) and callback == \"openai_moderations\":\n                try:\n                    from enterprise.enterprise_hooks.openai_moderation import (\n                        _ENTERPRISE_OpenAI_Moderation,\n                    )\n                except ImportError:\n                    raise Exception(\n                        \"Trying to use OpenAI Moderations Check,\"\n                        + CommonProxyErrors.missing_enterprise_package_docker.value\n                    )\n\n                if premium_user is not True:\n                    raise Exception(\"Trying to use OpenAI Moderations Check\" + CommonProxyErrors.not_premium_user.value)\n\n                openai_moderations_object = _ENTERPRISE_OpenAI_Moderation()","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/common_utils/callback_utils.py#L193-L229","documentation":"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.","triggerScenarios":"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.","commonSituations":"License env forgotten in k8s secret mounts; trial keys lapsing; running proxy via a service manager that does not inherit the shell env.","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."],"exampleFix":"# before\nlitellm_settings:\n  callbacks: [\"hide_secrets\"]  # no LITELLM_LICENSE in env\n\n# after\nLITELLM_LICENSE=sk-... docker compose up  # or set in deployment env","handlingStrategy":"validation","validationCode":"import os\n\nif 'hide_secrets' in callbacks and not os.environ.get('LITELLM_LICENSE'):\n    callbacks.remove('hide_secrets')\n    logger.warning('hide_secrets requires an enterprise license; disabled')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["litellm","proxy","callbacks","hide-secrets","enterprise","license","premium"],"backgroundTag":"missing-license-key","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}