BerriAI/litellm · error · HTTPException

not_premium_user

not_premium_user

Error message

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

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. Pricing: https://www.litellm.ai/#pricing" thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1442

    # Always clear patch_data.model_name to prevent caller from overwriting
    # the internal UUID-based model_name in the DB with the user-supplied public name
    patch_data.model_name = None


class ModelManagementAuthChecks:
    """
    Common auth checks for model management endpoints
    """

    @staticmethod
    def can_user_make_team_model_call(
        team_id: str,
        user_api_key_dict: UserAPIKeyAuth,
        team_obj: LiteLLM_TeamTable | None = None,
        premium_user: bool = False,
    ) -> Literal[True]:
        if premium_user is False:
            raise HTTPException(
                status_code=403,
                detail={"error": CommonProxyErrors.not_premium_user.value},
            )
        if user_api_key_dict.user_role and user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN:
            return True
        elif team_obj is None or not _is_user_team_admin(user_api_key_dict=user_api_key_dict, team_obj=team_obj):
            raise HTTPException(
                status_code=403,
                detail={
                    "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."
                },
            )
        return True

    @staticmethod
    async def allow_team_model_action(
        model_params: Deployment | updateDeployment,
        user_api_key_dict: UserAPIKeyAuth,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Set LITELLM_LICENSE in the environment with a valid enterprise license key.
  2. Get a 7-day trial key at https://www.litellm.ai/enterprise#trial.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1442 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/c845a7cc7c321315. Report an issue: GitHub.