{"record":{"id":"c845a7cc7c321315","repo":"BerriAI/litellm","slug":"not-premium-user","errorCode":"not_premium_user","errorMessage":"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":"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":"litellm/proxy/management_endpoints/model_management_endpoints.py","lineNumber":1442,"sourceCode":"    # Always clear patch_data.model_name to prevent caller from overwriting\n    # the internal UUID-based model_name in the DB with the user-supplied public name\n    patch_data.model_name = None\n\n\nclass ModelManagementAuthChecks:\n    \"\"\"\n    Common auth checks for model management endpoints\n    \"\"\"\n\n    @staticmethod\n    def can_user_make_team_model_call(\n        team_id: str,\n        user_api_key_dict: UserAPIKeyAuth,\n        team_obj: LiteLLM_TeamTable | None = None,\n        premium_user: bool = False,\n    ) -> Literal[True]:\n        if premium_user is False:\n            raise HTTPException(\n                status_code=403,\n                detail={\"error\": CommonProxyErrors.not_premium_user.value},\n            )\n        if user_api_key_dict.user_role and user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN:\n            return True\n        elif team_obj is None or not _is_user_team_admin(user_api_key_dict=user_api_key_dict, team_obj=team_obj):\n            raise HTTPException(\n                status_code=403,\n                detail={\n                    \"error\": f\"Team ID={team_id} does not match the API key's team ID={user_api_key_dict.team_id}, OR you are not the admin for this team. Check `/user/info` to verify your team admin status.\"\n                },\n            )\n        return True\n\n    @staticmethod\n    async def allow_team_model_action(\n        model_params: Deployment | updateDeployment,\n        user_api_key_dict: UserAPIKeyAuth,","sourceCodeStart":1424,"sourceCodeEnd":1460,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/model_management_endpoints.py#L1424-L1460","documentation":"Error \"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\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1442 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set LITELLM_LICENSE in the environment with a valid enterprise license key.","Get a 7-day trial key at https://www.litellm.ai/enterprise#trial."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}