{"record":{"id":"0767363883eb0069","repo":"BerriAI/litellm","slug":"trying-to-use-enterprise-bannedkeywordyou-must-be","errorCode":null,"errorMessage":"Trying to use ENTERPRISE BannedKeywordYou 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 BannedKeywordYou 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":305,"sourceCode":"                    )\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)\n            elif isinstance(callback, str) and callback == \"detect_prompt_injection\":\n                from litellm.proxy.hooks.prompt_injection_detection import (\n                    _OPTIONAL_PromptInjectionDetection,\n                )\n\n                prompt_injection_params = None\n                if \"prompt_injection_params\" in litellm_settings:\n                    prompt_injection_params_in_config = litellm_settings[\"prompt_injection_params\"]\n                    prompt_injection_params = LiteLLMPromptInjectionParams(**prompt_injection_params_in_config)\n\n                prompt_injection_detection_obj = _OPTIONAL_PromptInjectionDetection(\n                    prompt_injection_params=prompt_injection_params,\n                )\n                imported_list.append(prompt_injection_detection_obj)\n            elif isinstance(callback, str) and callback == \"batch_redis_requests\":","sourceCodeStart":287,"sourceCodeEnd":323,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/common_utils/callback_utils.py#L287-L323","documentation":"The 'banned_keywords' callback loaded its enterprise module, but the license gate failed: premium_user is not True at config load time. The message combines 'Trying to use ENTERPRISE BannedKeyword' with the standard not_premium_user text that points to LITELLM_LICENSE and the trial link. Startup aborts at this raise.","triggerScenarios":"Proxy runs on the enterprise Docker image with callbacks: ['banned_keywords'] while LITELLM_LICENSE is absent, expired, or invalid.","commonSituations":"The image is right but the license env var never reached the container. The license expired after a billing change. Staging works, production fails because only staging got the env var.","solutions":["Export a valid LITELLM_LICENSE for the proxy process and restart.","Or drop 'banned_keywords' from the callbacks list.","In Kubernetes/compose, verify the env var is in the pod spec and not only in the local shell."],"exampleFix":"# before (compose, no license)\nenvironment:\n  - LITELLM_MASTER_KEY=sk-...\n\n# after\nenvironment:\n  - LITELLM_MASTER_KEY=sk-...\n  - LITELLM_LICENSE=sk-...","handlingStrategy":"validation","validationCode":"import os\n\ndef validate_config(cfg: dict) -> None:\n    cbs = (cfg.get(\"litellm_settings\") or {}).get(\"callbacks\") or []\n    if \"banned_keywords\" in cbs and not os.environ.get(\"LITELLM_LICENSE\"):\n        raise SystemExit(\"banned_keywords needs LITELLM_LICENSE\")","typeGuard":null,"tryCatchPattern":"try:\n    start_proxy(cfg)\nexcept Exception as e:\n    if \"ENTERPRISE BannedKeyword\" in str(e):\n        raise SystemExit(\"license missing: export LITELLM_LICENSE or drop banned_keywords\")\n    raise","preventionTips":["Inject the license env var the same way in staging and production.","Add a scheduled check of license validity before expiry dates.","Keep local dev configs free of enterprise callbacks so license issues never block development."],"tags":["litellm","enterprise","license","config","banned-keywords"],"backgroundTag":"enterprise-license-required","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}