BerriAI/litellm Β· error Β· HTTPException
π¨π¨π¨ DISABLING LLM API ENDPOINTS is an Enterprise feature
Error message
π¨π¨π¨ DISABLING LLM API ENDPOINTS is an Enterprise feature π¨ 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. Pricing: https://www.litellm.ai/#pricing
What it means
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.
Source
Thrown at enterprise/litellm_enterprise/proxy/auth/route_checks.py:19
import os
from fastapi import HTTPException, status
class EnterpriseRouteChecks:
@staticmethod
def is_llm_api_route_disabled() -> bool:
"""
Check if llm api route is disabled
"""
from litellm.proxy._types import CommonProxyErrors
from litellm.proxy.proxy_server import premium_user
from litellm.secret_managers.main import get_secret_bool
## Check if DISABLE_LLM_API_ENDPOINTS is set
if "DISABLE_LLM_API_ENDPOINTS" in os.environ:
if not premium_user:
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail=f"π¨π¨π¨ DISABLING LLM API ENDPOINTS is an Enterprise feature\nπ¨ {CommonProxyErrors.not_premium_user.value}",
)
return get_secret_bool("DISABLE_LLM_API_ENDPOINTS") is True
@staticmethod
def is_management_routes_disabled() -> bool:
"""
Check if management route is disabled
"""
from litellm.proxy._types import CommonProxyErrors
from litellm.proxy.proxy_server import premium_user
from litellm.secret_managers.main import get_secret_bool
if "DISABLE_ADMIN_ENDPOINTS" in os.environ:
if not premium_user:
raise HTTPException(View on GitHub (pinned to 6c2dcb801b)
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
Example fix
# before ENV DISABLE_LLM_API_ENDPOINTS=true # no license -> HTTP 500 on route checks # after: pick one # (a) remove the var, restrict at the gateway: # deny /v1/chat/completions in nginx # (b) export LITELLM_LICENSE=<valid-key>
Defensive patterns
Strategy: validation
Validate before calling
import os
assert not (os.environ.get('DISABLE_LLM_API_ENDPOINTS') and not os.environ.get('LITELLM_LICENSE')), \
'DISABLE_LLM_API_ENDPOINTS requires an enterprise license' Try / catch
resp = httpx.get(f'{PROXY_URL}/health', headers=h)
if resp.status_code == 500 and 'DISABLING LLM API ENDPOINTS' in resp.text:
fail_deploy('license/env mismatch: DISABLE_LLM_API_ENDPOINTS without license') Prevention
- Add a deploy-time env linter: enterprise-only flags require LITELLM_LICENSE
- Keep enterprise and OSS env templates in separate files
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- π¨π¨π¨ DISABLING ADMIN ENDPOINTS is an Enterprise feature π¨
- Setting tag based guardrail modes is only available in litel
- You must be a LiteLLM Enterprise user to use this feature. I
- Database not connected
- DB not connected. This endpoint needs a database; set DATABA
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/63648261b3ef550d.
Report an issue: GitHub.