BerriAI/litellm · error · HTTPException
User id doesn't exist in team table. Data={data}
Error message
User id doesn't exist in team table. Data={data} What it means
Error "User id doesn't exist in team table. Data={data}" thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/management_endpoints/team_endpoints.py:3431
team_id=data.team_id,
key_limit=None,
user_api_key_dict=user_api_key_dict,
)
team_table: Final = returned_team_info["team_info"]
## get user id
received_user_id: str | None = None
if data.user_id is not None:
received_user_id = data.user_id
elif data.user_email is not None:
for member in returned_team_info["team_info"].members_with_roles:
if member.user_email is not None and member.user_email == data.user_email:
received_user_id = member.user_id
break
if received_user_id is None:
raise HTTPException(
status_code=400,
detail={"error": f"User id doesn't exist in team table. Data={data}"},
)
## find the relevant team membership
identified_budget_id: str | None = None
for tm in returned_team_info["team_memberships"]:
if tm.user_id == received_user_id:
identified_budget_id = tm.budget_id
break
# If this membership still points at the team's shared default member
# budget, _upsert_budget_and_membership will clone-on-write so that the
# update only touches this user (not every member sharing the default).
team_default_budget_id: str | None = None
if team_table.metadata is not None:
raw_default_budget_id: Final = team_table.metadata.get("team_member_budget_id")
if isinstance(raw_default_budget_id, str):
team_default_budget_id = raw_default_budget_idView on GitHub (pinned to 77b7c6c40c)
Solutions
- Verify the user_id exists and is a member of the team; check the request data shown in the error.
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:3431 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/663b3296e911645d.
Report an issue: GitHub.