{"record":{"id":"63648261b3ef550d","repo":"BerriAI/litellm","slug":"disabling-llm-api-endpoints-is-an-enterpris","errorCode":null,"errorMessage":"🚨🚨🚨 DISABLING LLM API ENDPOINTS is an Enterprise feature\n🚨 You 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":"🚨🚨🚨 DISABLING LLM API ENDPOINTS is an Enterprise feature\n🚨 You 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":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"enterprise/litellm_enterprise/proxy/auth/route_checks.py","lineNumber":19,"sourceCode":"import os\n\nfrom fastapi import HTTPException, status\n\n\nclass EnterpriseRouteChecks:\n    @staticmethod\n    def is_llm_api_route_disabled() -> bool:\n        \"\"\"\n        Check if llm api route is disabled\n        \"\"\"\n        from litellm.proxy._types import CommonProxyErrors\n        from litellm.proxy.proxy_server import premium_user\n        from litellm.secret_managers.main import get_secret_bool\n\n        ## Check if DISABLE_LLM_API_ENDPOINTS is set\n        if \"DISABLE_LLM_API_ENDPOINTS\" in os.environ:\n            if not premium_user:\n                raise HTTPException(\n                    status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,\n                    detail=f\"🚨🚨🚨 DISABLING LLM API ENDPOINTS is an Enterprise feature\\n🚨 {CommonProxyErrors.not_premium_user.value}\",\n                )\n\n        return get_secret_bool(\"DISABLE_LLM_API_ENDPOINTS\") is True\n\n    @staticmethod\n    def is_management_routes_disabled() -> bool:\n        \"\"\"\n        Check if management route is disabled\n        \"\"\"\n        from litellm.proxy._types import CommonProxyErrors\n        from litellm.proxy.proxy_server import premium_user\n        from litellm.secret_managers.main import get_secret_bool\n\n        if \"DISABLE_ADMIN_ENDPOINTS\" in os.environ:\n            if not premium_user:\n                raise HTTPException(","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/enterprise/litellm_enterprise/proxy/auth/route_checks.py#L1-L37","documentation":"HTTP 500 raised by EnterpriseRouteChecks.is_llm_api_route_disabled: the environment variable DISABLE_LLM_API_ENDPOINTS is set, but premium_user is False. Disabling LLM API endpoints is an enterprise-only control, so OSS/unlicensed instances that set the env var get this error when the check runs.","triggerScenarios":"Setting DISABLE_LLM_API_ENDPOINTS=true in the environment of a proxy without a valid LITELLM_LICENSE; any subsequent route check (should_call_route) evaluates is_llm_api_route_disabled and raises immediately.","commonSituations":"Hardening attempt on an OSS deployment (lock proxy to management-only) using an enterprise knob; license expired or missing in the container while the env var persists from a previous enterprise setup.","solutions":["Remove DISABLE_LLM_API_ENDPOINTS from the environment if you have no enterprise license (enforce equivalent restrictions with a firewall/reverse-proxy rule instead)","Or set a valid LITELLM_LICENSE and restart to make the feature available","Audit container/systemd env files for leftover enterprise env vars when downgrading from enterprise to OSS"],"exampleFix":"# before\nENV DISABLE_LLM_API_ENDPOINTS=true\n# no license -> HTTP 500 on route checks\n\n# after: pick one\n# (a) remove the var, restrict at the gateway:\n#   deny /v1/chat/completions in nginx\n# (b) export LITELLM_LICENSE=<valid-key>","handlingStrategy":"validation","validationCode":"import os\nassert not (os.environ.get('DISABLE_LLM_API_ENDPOINTS') and not os.environ.get('LITELLM_LICENSE')), \\\n    'DISABLE_LLM_API_ENDPOINTS requires an enterprise license'","typeGuard":null,"tryCatchPattern":"resp = httpx.get(f'{PROXY_URL}/health', headers=h)\nif resp.status_code == 500 and 'DISABLING LLM API ENDPOINTS' in resp.text:\n    fail_deploy('license/env mismatch: DISABLE_LLM_API_ENDPOINTS without license')","preventionTips":["Add a deploy-time env linter: enterprise-only flags require LITELLM_LICENSE","Keep enterprise and OSS env templates in separate files"],"tags":["licensing","route-management","configuration","litellm-enterprise"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}