BerriAI/litellm · error · HTTPException

Team id = {data.team_id} already exists. Please use a differ

Error message

Team id = {data.team_id} already exists. Please use a different team id.

What it means

Uniqueness check in the new-team endpoint (/team/new). The caller supplied an explicit team_id that already exists in the team table (after passing the reserved UI_TEAM_ID check), and LiteLLM uses team_id as the primary key, so creating would collide. Fires for duplicate explicit ids only — auto-generated uuids never hit this. Choose a fresh team_id or call the update endpoint instead.

Source

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

                detail="License is over limit. Please contact support@berri.ai to upgrade your license.",
            )

        if data.team_id is None:
            data.team_id = str(uuid.uuid4())
        else:
            if data.team_id == UI_TEAM_ID:
                raise HTTPException(
                    status_code=400,
                    detail={
                        "error": f"team_id '{UI_TEAM_ID}' is reserved for LiteLLM UI dashboard sessions and cannot be used for a real team. Please use a different team id."
                    },
                )
            # Check if team_id exists already
            _existing_team_id: Final = await prisma_client.get_data(
                team_id=data.team_id, table_name="team", query_type="find_unique"
            )
            if _existing_team_id is not None:
                raise HTTPException(
                    status_code=400,
                    detail={"error": f"Team id = {data.team_id} already exists. Please use a different team id."},
                )

        if data.organization_id is None:
            default_organization_id: Final = _get_default_team_param("organization_id")
            if isinstance(default_organization_id, str):
                data.organization_id = default_organization_id

        # Apply defaults from litellm.default_team_params to null fields.
        # budget_duration alone distinguishes explicit null (a deliberate
        # never-resetting budget, which the default must not override) from omitted.
        for field in (
            "max_budget",
            "budget_duration",
            "tpm_limit",
            "rpm_limit",
            "team_member_permissions",

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Use a different team id, or update the existing team.
Defensive patterns

Strategy: validation

When it happens

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