BerriAI/litellm · error · HTTPException

Could not resolve team model grants for this login. Please t

Error message

Could not resolve team model grants for this login. Please try again

What it means

Error "Could not resolve team model grants for this login. Please try again" thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_endpoints/ui_sso.py:2287

        proxy_logging_obj=proxy_logging_obj,
        user_email=user_email,
        user_defined_values=user_defined_values,
        alternate_user_id=user_id,
    )
    if user_info is None:
        raise HTTPException(status_code=500, detail="Failed to retrieve user information from SSO")
    if not user_info.user_id:
        raise HTTPException(status_code=500, detail="Failed to retrieve user information from SSO")

    await retain_sso_identity_assertion_for_ema(user_id=user_info.user_id, assertion=sso_assertion)

    teams: list[str] = []
    if hasattr(user_info, "teams") and user_info.teams:
        teams = user_info.teams if isinstance(user_info.teams, list) else []

    team_details: Final = await _fetch_cli_sso_team_details(prisma_client=prisma_client, teams=teams)
    if team_details is None:
        raise HTTPException(
            status_code=500,
            detail="Could not resolve team model grants for this login. Please try again",
        )
    resolved_teams: Final = _cli_sso_session_teams(team_details)
    attribution_metadata: Final = build_cli_sso_attribution_metadata(result=result)
    if attribution_metadata:
        await _persist_cli_sso_user_metadata(
            prisma_client=prisma_client,
            user_id=cast(str, user_info.user_id),
            attribution_metadata=attribution_metadata,
        )

    flow["session_data"] = {
        "user_id": cast(str, user_info.user_id),
        "user_role": user_info.user_role,
        "models": user_info.models if hasattr(user_info, "models") else [],
        "user_email": user_email,
        "teams": resolved_teams,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Retry the login; if it persists, check the database connection and proxy logs for team model resolution errors.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/ui_sso.py:2287 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/c614e9f9b62d3cbf. Report an issue: GitHub.