BerriAI/litellm · error · HTTPException

Cannot move team to organization. Team has access to all pro

Error message

Cannot move team to organization. Team has access to all proxy models, but the organization does not.

What it means

Team-to-org move check: the team currently has access to all proxy models but the destination organization's models list is restrictive, so moving would silently shrink or conflict with the team's model access; the move is refused with 400.

Source

Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1792

    - The team's tpm/rpm limit must be less than the org's tpm/rpm limit

    Proxy admins bypass the membership check and instead trigger auto-add of
    missing members (handled by the caller). This supports SSO/Entra setups
    where org membership tables are empty but proxy admins still need to group
    teams under orgs for budget/model governance.
    """

    # If the team's organization is the same as the new organization, return True
    # Since no changes are being made
    if team.organization_id == organization.organization_id:
        return True

    # Check if the org has access to the team's models
    if len(organization.models) > 0:
        if SpecialModelNames.all_proxy_models.value in organization.models:
            pass
        elif team.models is None or len(team.models) == 0:
            raise HTTPException(
                status_code=403,
                detail={
                    "error": "Cannot move team to organization. Team has access to all proxy models, but the organization does not."
                },
            )
        else:
            for model in team.models:
                can_org_access_model(
                    model=model,
                    org_object=organization,
                    llm_router=llm_router,
                )

    # Check if the team's budget is less than the org's max_budget
    if (
        team.max_budget
        and organization.litellm_budget_table
        and organization.litellm_budget_table.max_budget

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Restrict the team's models to a subset the organization allows, or grant the org access to all models first.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1792 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/fa187eb45cd0765e. Report an issue: GitHub.