BerriAI/litellm · error · HTTPException
User does not have permission to make this model call. Your
Error message
User does not have permission to make this model call. Your role={user_api_key_dict.user_role}. You can only make model calls if you are a PROXY_ADMIN or if you are a team admin, by specifying a team_id in the model_info. What it means
Error "User does not have permission to make this model call. Your role={user_api_key_dict.user_role}. You can only make model calls if you are a PROXY_ADMIN or if you are a team admin, by specifying a team_id in the model_info." thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1529
raise HTTPException(
status_code=403,
detail={"error": "Only a proxy admin can delete a model whose team has been deleted."},
)
raise HTTPException(
status_code=400,
detail={"error": f"Team id={model_params.model_info.team_id} does not exist in db"},
)
team_obj: Final = LiteLLM_TeamTable.model_validate(team_obj_row.model_dump())
return ModelManagementAuthChecks.can_user_make_team_model_call(
team_id=model_params.model_info.team_id,
user_api_key_dict=user_api_key_dict,
team_obj=team_obj,
premium_user=premium_user,
)
## Check non-team model auth
elif user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN:
raise HTTPException(
status_code=403,
detail={
"error": f"User does not have permission to make this model call. Your role={user_api_key_dict.user_role}. You can only make model calls if you are a PROXY_ADMIN or if you are a team admin, by specifying a team_id in the model_info."
},
)
else:
return True
return True
#### [BETA] - This is a beta endpoint, format might change based on user feedback. - https://github.com/BerriAI/litellm/issues/964
@router.post(
"/model/delete",
description="Allows deleting models in the model list in the config.yaml",
tags=["model management"],
dependencies=[Depends(user_api_key_auth)],
)View on GitHub (pinned to 77b7c6c40c)
Solutions
- Use a PROXY_ADMIN key, or a team admin key with team_id specified in model_info.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1529 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/ad9ba61e7aa94be5.
Report an issue: GitHub.