BerriAI/litellm · error · HTTPException
Team not found
Error message
Team not found
What it means
Permission filter for pass-through endpoints: the team_id used to filter allowed routes has no row in the database, so its allowed_passthrough_routes metadata cannot be read and the request is rejected.
Source
Thrown at litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:3050
Filter pass-through endpoints based on team's allowed_passthrough_routes metadata.
Args:
team_id: The team ID to check permissions for
pass_through_endpoints: List of endpoints to filter
prisma_client: Database client
Returns:
Filtered list of endpoints based on team permissions
Raises:
HTTPException: If team is not found
"""
# retrieve team from db
team: Final = await TeamRepository(prisma_client).table.find_unique(
where={"team_id": team_id},
)
if team is None:
raise HTTPException(
status_code=404,
detail={"error": "Team not found"},
)
# retrieve team metadata
team_metadata: Final = team.metadata
if team_metadata is not None and team_metadata.get("allowed_passthrough_routes") is not None:
## FILTER pass_through_endpoints by allowed_passthrough_routes
pass_through_endpoints = [
endpoint
for endpoint in pass_through_endpoints
if endpoint.path in team_metadata.get("allowed_passthrough_routes")
]
return pass_through_endpoints
@router.get(View on GitHub (pinned to 77b7c6c40c)
Solutions
- Create the team first via /team/new, or correct the team_id in the request.
- Verify the team_id exists with /team/list.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:3050 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/2945f4313b2299a2.
Report an issue: GitHub.