BerriAI/litellm · error · HTTPException

Error searching teams: {e}

Error message

Error searching teams: {e}

What it means

Error "Error searching teams: {e}" thrown in BerriAI/litellm.

Source

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

                "contains": team_alias,
                "mode": "insensitive",  # Case-insensitive search
            }

        # Query users with pagination and filters
        teams: Final = await _team_db(prisma_client).find_many(
            where=where_conditions,
            skip=skip,
            take=page_size,
            order={"created_at": "desc"},
        )

        if not teams:
            return []

        return teams

    except Exception as e:
        raise HTTPException(status_code=500, detail=f"Error searching teams: {e}")


def add_new_models_to_team(team_obj: LiteLLM_TeamTable, new_models: list[str]) -> list[str]:
    """
    Add new models to a team's allowed model list.
    """
    current_models = team_obj.models
    if current_models is not None and len(current_models) == 0:  # implies all model access
        current_models = [SpecialModelNames.all_proxy_models.value]
    else:
        current_models = team_obj.models
    updated_models: Final = list(set(current_models + new_models))
    return updated_models


@router.post(
    "/team/model/add",
    tags=["team management"],

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Check the embedded error and proxy logs; verify the database connection and search parameters.

When it happens

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