{"record":{"id":"bb14baf635d710c7","repo":"BerriAI/litellm","slug":"license-is-over-limit-please-contact-support-berr","errorCode":null,"errorMessage":"License is over limit. Please contact support@berri.ai to upgrade your license.","messagePattern":"License is over limit\\. Please contact support@berri\\.ai to upgrade your license\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/internal_user_endpoints.py","lineNumber":529,"sourceCode":"\n        if prisma_client is None:\n            raise HTTPException(status_code=400, detail=CommonProxyErrors.db_not_connected_error.value)\n\n        if prisma_client is None:\n            raise HTTPException(\n                status_code=500,\n                detail=CommonProxyErrors.db_not_connected_error.value,\n            )\n        validate_budget_duration(data.budget_duration)\n\n        # Check for duplicate user_id or email\n        await _check_duplicate_user_id(data.user_id, prisma_client)\n        await _check_duplicate_user_email(data.user_email, prisma_client)\n\n        # Check if license is over limit\n        billable_users: Final = await UserRepository(prisma_client).count_billable_users()\n        if billable_users and _license_check.is_over_limit(total_users=billable_users):\n            raise HTTPException(\n                status_code=403,\n                detail=\"License is over limit. Please contact support@berri.ai to upgrade your license.\",\n            )\n\n        # Only proxy admins can create administrative users\n        # Check if user_api_key_dict is actually a UserAPIKeyAuth instance (not a Depends object)\n        # This can happen when the function is called directly in tests\n        if (\n            data.user_role in [LitellmUserRoles.PROXY_ADMIN, LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY]\n            and isinstance(user_api_key_dict, UserAPIKeyAuth)\n            and user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN\n        ):\n            raise HTTPException(\n                status_code=403,\n                detail=f\"Only proxy admins can create administrative users (proxy_admin, proxy_admin_viewer). Attempted to create user with role: {data.user_role}. Your role: {user_api_key_dict.user_role}\",\n            )\n\n        _check_permissions_caller_permission(","sourceCodeStart":511,"sourceCodeEnd":547,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/internal_user_endpoints.py#L511-L547","documentation":"LiteLLM's proxy enforces enterprise license seat limits when creating internal users. Before inserting a new user, POST /user/new counts billable users via UserRepository.count_billable_users() and checks _license_check.is_over_limit(total_users=...). When the deployment's user count is at or beyond the licensed seats, creation is refused with HTTP 403 and a pointer to support@berri.ai. This is a licensing gate, not a malfunction: creation succeeds again once seats are freed or the license is upgraded.","triggerScenarios":"POST /user/new (or any UI flow that creates users) once the billable user count reaches the licensed seat count - e.g. onboarding the N+1st user on an N-seat license, or running with an expired/downgraded license key that reports fewer seats than users already stored in LiteLLM_UserTable.","commonSituations":"Team grew past the seats on a trial or paid plan; license key expired or was swapped for a smaller one; SSO/SCIM auto-provisioning kept creating users past the limit; stale or unused users still counting as billable.","solutions":["Free seats first: delete unused users via POST /user/delete (or the admin UI), confirm the count via GET /user/list, then retry the create","Contact support@berri.ai to upgrade the license / raise the seat count","Verify the enterprise license key in general_settings.litellm_license_api_key (or the premium env var) is the correct, current one - an expired key lowers the ceiling","Audit which users count as billable and clean up deactivated or service accounts before buying more seats"],"exampleFix":"# before: license at seat limit\ncurl -X POST http://localhost:4000/user/new -H 'Authorization: Bearer sk-admin' -d '{\"user_id\": \"new-user\"}'\n# HTTP 403 License is over limit...\n\n# after: free a seat, then create\ncurl -X POST http://localhost:4000/user/delete -H 'Authorization: Bearer sk-admin' -d '{\"user_ids\": [\"stale-user\"]}'\ncurl -X POST http://localhost:4000/user/new -H 'Authorization: Bearer sk-admin' -d '{\"user_id\": \"new-user\"}'  # 200","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    resp = requests.post(f\"{BASE}/user/new\", json=payload, headers=hdrs, timeout=10)\n    resp.raise_for_status()\nexcept requests.HTTPError as e:\n    if e.response is not None and e.response.status_code == 403 and \"over limit\" in e.response.text:\n        raise SeatLimitReached(\"License seats exhausted: upgrade via support@berri.ai or delete unused users\") from e\n    raise","preventionTips":["Track billable user count against purchased seats as part of onboarding automation","Periodically delete deactivated/unused users so seats are freed","Keep the enterprise license key current and alert on license-check warnings in proxy logs"],"tags":["litellm","license","user-management","seats","enterprise"],"backgroundTag":"license-seat-limit-exceeded","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}