{"record":{"id":"a232c85b1368285e","repo":"BerriAI/litellm","slug":"only-premium-users-can-add-tags-to-projects-you-m","errorCode":null,"errorMessage":"Only premium users can add tags to projects. 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":"Only premium users can add tags to projects\\. 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":403,"severity":"error","filePath":"enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py","lineNumber":337,"sourceCode":"        \"description\": \"Personalized hotel recommendation engine\",\n        \"team_id\": \"team-123\",\n        \"models\": [\"claude-3-sonnet\"],\n        \"budget_id\": \"428eeaa8-f3ac-4e85-a8fb-7dc8d7aa8689\",\n        \"metadata\": {\n            \"use_case_id\": \"SNOW-54321\"\n        }\n    }'\n    ```\n    \"\"\"\n    from litellm.proxy.proxy_server import (\n        litellm_proxy_admin_name,\n        premium_user,\n        prisma_client,\n    )\n\n    try:\n        if getattr(data, \"tags\", None) is not None and not premium_user:\n            raise HTTPException(\n                status_code=403,\n                detail={\n                    \"error\": \"Only premium users can add tags to projects. \" + CommonProxyErrors.not_premium_user.value\n                },\n            )\n\n        if not premium_user:\n            raise HTTPException(\n                status_code=403,\n                detail={\n                    \"error\": \"Project management is an enterprise feature. \" + CommonProxyErrors.not_premium_user.value\n                },\n            )\n\n        # ADD METADATA FIELDS\n        for field in LiteLLM_ManagementEndpoint_MetadataFields_Premium:\n            if getattr(data, field, None) is not None:\n                _set_object_metadata_field(","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py#L319-L355","documentation":"Creating a project with a tags field is gated behind a LiteLLM Enterprise premium license. The endpoint checks the global premium_user flag (populated from the LITELLM_LICENSE env var) and, if tags are supplied without a valid license, returns HTTP 403 with upgrade/trial guidance. Project creation itself is also enterprise-only, so without a license the very next check fails too.","triggerScenarios":"POST /project/new with a \"tags\" field in the body while the proxy runs without a valid LITELLM_LICENSE, or with an expired/invalid license key.","commonSituations":"Testing enterprise endpoints on an OSS deployment, an expired trial key, or the license env var not being visible to the container running the proxy.","solutions":["Set a valid LITELLM_LICENSE in the proxy's environment and restart it","Remove the tags field from the request payload (project creation still requires a license via the next check)","Get a trial key at https://www.litellm.ai/enterprise#trial to evaluate the feature"],"exampleFix":"# before\ncurl -X POST http://0.0.0.0:4000/project/new -d '{\"project_id\":\"p1\",\"team_id\":\"t1\",\"tags\":[\"prod\"]}'\n# after (license present)\nexport LITELLM_LICENSE=sk-...\ncurl -X POST http://0.0.0.0:4000/project/new -d '{\"project_id\":\"p1\",\"team_id\":\"t1\",\"tags\":[\"prod\"]}'","handlingStrategy":"validation","validationCode":"has_license = os.environ.get('LITELLM_LICENSE') not in (None, '')\nif payload.get('tags') and not has_license:\n    payload.pop('tags')  # or fail fast locally with a clear message","typeGuard":"const canSendTags = (payload, licensePresent) =>\n  payload.tags === undefined || licensePresent;","tryCatchPattern":"catch (e) {\n  if (e.status === 403 && /Only premium users can add tags/.test(e.body?.detail?.error ?? '')) {\n    delete body.tags; return retry(body);\n  }\n  throw e;\n}","preventionTips":["Gate enterprise-only fields (tags, metadata premium fields) behind a license capability flag in client code","Log proxy premium status at client init so operators see licensing gaps before requests fail"],"tags":["litellm","enterprise","licensing","tags","http-403"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}