BerriAI/litellm · error · HTTPException

Key requests search tools not allowed by team

Error message

Key requests search tools not allowed by team '{team_id}': {sorted(disallowed)}. Team allows: {sorted(team_tools)}.

What it means

HTTPException(403) from validate_key_search_tools_against_team: the key request includes search_tools not present in the team's non-empty allowlist. The message lists the disallowed tools and the team's allowed set so the caller can trim the request.

Solutions

  1. Remove the disallowed search tools from the key request, or ask an admin to allow them for the team.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_helpers/object_permission_utils.py:787 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/cff30b33f0ded3c0. Report an issue: GitHub.

Appendix: source

Thrown at litellm/proxy/management_helpers/object_permission_utils.py:787

                    "personal keys by non-admin callers. Disallowed search tools: "
                    f"{sorted(requested)}."
                )
            },
        )

    team_tools: list[str] = []
    if team_obj is not None and team_obj.object_permission is not None:
        st: Final = team_obj.object_permission.search_tools
        if st:
            team_tools = list(st)

    if not team_tools:
        return

    disallowed: Final = set(requested) - set(team_tools)
    if disallowed:
        team_id: Final = team_obj.team_id if team_obj is not None else "unknown"
        raise HTTPException(
            status_code=status.HTTP_403_FORBIDDEN,
            detail={
                "error": (
                    f"Key requests search tools not allowed by team '{team_id}': "
                    f"{sorted(disallowed)}. Team allows: {sorted(team_tools)}."
                )
            },
        )

View on GitHub (pinned to 77b7c6c40c)