{"record":{"id":"7439b4aef9fda5b7","repo":"BerriAI/litellm","slug":"trying-to-use-enterprise-blockeduseryou-must-be-a","errorCode":null,"errorMessage":"Trying to use ENTERPRISE BlockedUserYou 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 ENTERPRISE BlockedUserYou 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":290,"sourceCode":"                    raise Exception(\"Trying to use Llm Guard\" + CommonProxyErrors.missing_enterprise_package.value)\n\n                if premium_user is not True:\n                    raise Exception(\"Trying to use Llm Guard\" + CommonProxyErrors.not_premium_user.value)\n\n                llm_guard_moderation_obj = _ENTERPRISE_LLMGuard()\n                imported_list.append(llm_guard_moderation_obj)\n            elif isinstance(callback, str) and callback == \"blocked_user_check\":\n                try:\n                    from enterprise.enterprise_hooks.blocked_user_list import (\n                        _ENTERPRISE_BlockedUserList,\n                    )\n                except ImportError:\n                    raise Exception(\n                        \"Trying to use Blocked User List\" + CommonProxyErrors.missing_enterprise_package_docker.value\n                    )\n\n                if premium_user is not True:\n                    raise Exception(\"Trying to use ENTERPRISE BlockedUser\" + CommonProxyErrors.not_premium_user.value)\n\n                blocked_user_list = _ENTERPRISE_BlockedUserList(prisma_client=prisma_client)\n                imported_list.append(blocked_user_list)\n            elif isinstance(callback, str) and callback == \"banned_keywords\":\n                try:\n                    from enterprise.enterprise_hooks.banned_keywords import (\n                        _ENTERPRISE_BannedKeywords,\n                    )\n                except ImportError:\n                    raise Exception(\n                        \"Trying to use Banned Keywords\" + CommonProxyErrors.missing_enterprise_package_docker.value\n                    )\n\n                if premium_user is not True:\n                    raise Exception(\"Trying to use ENTERPRISE BannedKeyword\" + CommonProxyErrors.not_premium_user.value)\n\n                banned_keywords_obj = _ENTERPRISE_BannedKeywords()\n                imported_list.append(banned_keywords_obj)","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/common_utils/callback_utils.py#L272-L308","documentation":"The 'blocked_user_check' callback found the enterprise module (the import succeeded), but the license check failed: premium_user is not True. The proxy appends CommonProxyErrors.not_premium_user to 'Trying to use ENTERPRISE BlockedUser' and stops config loading. The license state is read from LITELLM_LICENSE at startup.","triggerScenarios":"The proxy runs on the enterprise Docker image with callbacks: ['blocked_user_check'], but LITELLM_LICENSE is unset, expired, or rejected by the license check.","commonSituations":"The Docker image is correct but the -e LITELLM_LICENSE flag was dropped from the run command. The trial ended. The license key was rotated and the old one is still in the deployment manifest.","solutions":["Set a valid LITELLM_LICENSE env var on the proxy process and restart it.","Or remove 'blocked_user_check' from the callbacks list.","Check startup logs for the license verification call to confirm the key was sent and accepted."],"exampleFix":"# before\ndocker run litellm/litellm-enterprise --config config.yaml\n\n# after\ndocker run -e LITELLM_LICENSE=\"sk-...\" litellm/litellm-enterprise --config config.yaml","handlingStrategy":"validation","validationCode":"import os\n\ndef startup_env_ok(callbacks: list[str]) -> list[str]:\n    errs = []\n    if \"blocked_user_check\" in callbacks and not os.environ.get(\"LITELLM_LICENSE\"):\n        errs.append(\"LITELLM_LICENSE missing for blocked_user_check\")\n    return errs","typeGuard":null,"tryCatchPattern":"try:\n    start_proxy(cfg)\nexcept Exception as e:\n    if \"ENTERPRISE BlockedUser\" in str(e):\n        log.error(\"set LITELLM_LICENSE or remove blocked_user_check\")\n        raise SystemExit(2)\n    raise","preventionTips":["Pass LITELLM_LICENSE explicitly in docker run / compose / k8s env blocks.","Alert on startup log lines containing 'not_premium_user' to catch license drift early.","Keep an unlicensed fallback config (no enterprise callbacks) for local development."],"tags":["litellm","enterprise","license","config","blocked-users"],"backgroundTag":"enterprise-license-required","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}