{"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/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/enterprise/litellm_enterprise/proxy/auth/route_checks.py#L1-L37","documentation":"Raised as HTTPException 500 by EnterpriseRouteChecks.is_llm_api_route_disabled when the DISABLE_LLM_API_ENDPOINTS env var is set but the proxy is not a premium (Enterprise licensed) user. The env var is an enterprise-only hardening feature that blocks all /chat/completions, /embeddings etc.; the license check fires as soon as the variable is merely present in the environment, regardless of its value.","triggerScenarios":"Deploying the proxy with DISABLE_LLM_API_ENDPOINTS in the environment (any value, including 'false' or empty) while running the free tier; a base Docker image or k8s deployment manifest that sets the variable globally; a hardened deployment template (docker-compose.hardened.yml style) applied without a license.","commonSituations":"Copy-pasting a hardened enterprise config to a community deployment; leaving the env var defined in .env after an enterprise trial expired; CI containers inheriting the variable from a shared base image.","solutions":["Remove DISABLE_LLM_API_ENDPOINTS from the proxy environment entirely (do not set it to 'false' - presence alone triggers the check) and restart","If you need the feature, set a valid LITELLM_LICENSE (get a trial key at https://www.litellm.ai/enterprise#trial)","Audit deployment manifests, Dockerfiles, and CI env for stray definitions: env | grep DISABLE_LLM_API_ENDPOINTS","If the goal was blocking management endpoints instead, use community-supported auth controls rather than this env var"],"exampleFix":"# before (deployment.yaml)\nenv:\n  - name: DISABLE_LLM_API_ENDPOINTS\n    value: \"true\"   # no license -> 500\n# after\nenv: []            # variable fully removed; or add LITELLM_LICENSE","handlingStrategy":"validation","validationCode":"# Deploy-time guard: variable presence alone trips the license check\nimport os\nif \"DISABLE_LLM_API_ENDPOINTS\" in os.environ and not licensed():\n    del os.environ[\"DISABLE_LLM_API_ENDPOINTS\"]\n    # or abort deploy: raise ConfigError(...)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only define DISABLE_LLM_API_ENDPOINTS in licensed environments (helm values per-tier)","Remember presence, not value, triggers the check - 'false' still fails","Add a CI check that scans deployment env for enterprise-gated variables alongside LITELLM_LICENSE presence"],"tags":["litellm","enterprise","license","env-var","httpexception","route-disable"],"backgroundTag":"license-required","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}