BerriAI/litellm · error · HTTPException

Could not resolve the model grants for team: {team_id}. Plea

Error message

Could not resolve the model grants for team: {team_id}. Please run `lite login` again

What it means

Error "Could not resolve the model grants for team: {team_id}. Please run `lite login` again" thrown in BerriAI/litellm.

Source

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

                return poll_response

            # Validate team_id if provided
            if team_id is not None:
                if team_id not in user_teams:
                    raise HTTPException(
                        status_code=403,
                        detail=f"User does not belong to team: {team_id}. Available teams: {user_teams}",
                    )
            else:
                # If no team_id provided and user has 0 or 1 team, use first team (or None)
                team_id = user_teams[0] if len(user_teams) > 0 else None

            selected_team: Final = _selected_cli_sso_team_detail(
                team_details=user_team_details,
                team_id=team_id,
            )
            if selected_team is None:
                raise HTTPException(
                    status_code=500,
                    detail=f"Could not resolve the model grants for team: {team_id}. Please run `lite login` again",
                )

            user_info: Final = LiteLLM_UserTable(
                user_id=user_id,
                user_role=session_data["user_role"],
                models=session_data.get("models", []),
            )

            jwt_token: Final = ExperimentalUIJWTToken.get_cli_jwt_auth_token(
                user_info=user_info,
                team_id=team_id,
                team_alias=selected_team.team_alias,
                team_models=selected_team.team_models,
                team_model_aliases=selected_team.team_model_aliases,
                max_budget=None,
            )

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Run `lite login` again; if it persists, check the database connection and proxy logs.

When it happens

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