BerriAI/litellm · error · HTTPException

This feature is only available for LiteLLM Enterprise users:

Error message

This feature is only available for LiteLLM Enterprise users: {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

Error "This feature is only available for LiteLLM Enterprise users: {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" thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/utils.py:6628

        code=_status_code,
    )


def _premium_user_check(feature: str | None = None):
    """
    Raises an HTTPException if the user is not a premium user
    """
    from litellm.proxy.proxy_server import premium_user

    if feature:
        detail_msg = f"This feature is only available for LiteLLM Enterprise users: {feature}. {CommonProxyErrors.not_premium_user.value}"
    else:
        detail_msg = (
            f"This feature is only available for LiteLLM Enterprise users. {CommonProxyErrors.not_premium_user.value}"
        )

    if not premium_user:
        raise HTTPException(
            status_code=403,
            detail={"error": detail_msg},
        )


def is_known_model(model: str | None, llm_router: Router | None) -> bool:
    """
    Returns True if the model is in the llm_router model names
    """
    if model is None or llm_router is None:
        return False
    model_names: Final = llm_router.get_model_names()

    model_names_set: Final = set(model_names)

    is_in_list = False
    if model in model_names_set:
        is_in_list = True

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Set LITELLM_LICENSE to a valid LiteLLM Enterprise license key in your environment, or avoid the enterprise-only feature.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/utils.py:6628 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/b57fe4fa8ec05a64. Report an issue: GitHub.