BerriAI/litellm · error · HTTPException
Project management is an enterprise feature. You must be a…
Error message
Project management 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
Litellm's project-management REST surface lives in the litellm_enterprise package and is gated by a premium-user check. At startup the proxy validates the LITELLM_LICENSE environment variable and sets the premium_user flag; if the license is missing, expired, or invalid, premium_user is False and POST /project/new is rejected with HTTP 403 before any database write. The message names the exact remedy: set LITELLM_LICENSE or get a trial key.
Solutions
- Set a valid enterprise license in the proxy environment (export LITELLM_LICENSE=<key>, or the equivalent env entry in Docker/K8s) and restart the proxy
- If evaluating the feature, request the 7-day trial key from https://www.litellm.ai/enterprise#trial and set it the same way
- If the variable is already set, verify the key is still valid for the running litellm version and check startup logs for license-validation failures
- If you do not intend to license, stop calling /project/* endpoints and model ownership with /team/* and /key/* endpoints instead
Example fix
# before (403: enterprise feature) docker run -p 4000:4000 litellm/litellm --config /app/config.yaml # after docker run -p 4000:4000 -e LITELLM_LICENSE='sk-enterprise-...' litellm/litellm --config /app/config.yaml
Defensive patterns
Strategy: try-catch
Try / catch
try:
r = httpx.post(base + '/project/new', headers=hdr, json=payload)
r.raise_for_status()
except httpx.HTTPStatusError as e:
if e.response.status_code == 403 and 'enterprise feature' in e.response.text:
raise RuntimeError('proxy lacks an enterprise license: set LITELLM_LICENSE on the litellm proxy, not the client') from None
raise Prevention
- Keep LITELLM_LICENSE in the proxy deployment manifest and verify it at startup
- Feature-flag /project/* usage in your client until a licensed proxy is confirmed
- Smoke-test one premium endpoint in CI against a licensed staging proxy
When it happens
Trigger: POST /project/new (any JSON body) against a proxy running without a valid LITELLM_LICENSE, i.e. premium_user is False. This check runs before the prisma_client check, so it fires even when no DATABASE_URL is configured.
Common situations: Self-hosting the OSS litellm proxy image and assuming /project/* endpoints are available; forgetting to pass LITELLM_LICENSE into the Docker container or Kubernetes deployment; a license that expired or was mistyped so the startup check silently downgrades premium_user to False after a restart or upgrade.
Related errors
- Cannot reassign project to a team you are not an admin of
- Exception BadRequestError
- Only admins can delete projects
- Only admins or team admins can create projects. Your role is
- Only admins or team admins can update projects
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/45c675d45dd3db0b.
Report an issue: GitHub.
Appendix: source
Thrown at enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py:370
```
"""
from litellm.proxy.proxy_server import (
litellm_proxy_admin_name,
premium_user,
prisma_client,
)
try:
if getattr(data, "tags", None) is not None and not premium_user:
raise HTTPException(
status_code=403,
detail={
"error": "Only premium users can add tags to projects. " + CommonProxyErrors.not_premium_user.value
},
)
if not premium_user:
raise HTTPException(
status_code=403,
detail={
"error": "Project management is an enterprise feature. " + CommonProxyErrors.not_premium_user.value
},
)
# ADD METADATA FIELDS
for field in LiteLLM_ManagementEndpoint_MetadataFields_Premium:
if getattr(data, field, None) is not None:
_set_object_metadata_field(
object_data=data,
field_name=field,
value=getattr(data, field),
)
delattr(data, field)
if prisma_client is None:
raise HTTPException(View on GitHub (pinned to 77b7c6c40c)