{"record":{"id":"ad9ba61e7aa94be5","repo":"BerriAI/litellm","slug":"user-does-not-have-permission-to-make-this-model-c","errorCode":null,"errorMessage":"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.","messagePattern":"User does not have permission to make this model call\\. Your 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\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/model_management_endpoints.py","lineNumber":1529,"sourceCode":"                    raise HTTPException(\n                        status_code=403,\n                        detail={\"error\": \"Only a proxy admin can delete a model whose team has been deleted.\"},\n                    )\n                raise HTTPException(\n                    status_code=400,\n                    detail={\"error\": f\"Team id={model_params.model_info.team_id} does not exist in db\"},\n                )\n            team_obj: Final = LiteLLM_TeamTable.model_validate(team_obj_row.model_dump())\n\n            return ModelManagementAuthChecks.can_user_make_team_model_call(\n                team_id=model_params.model_info.team_id,\n                user_api_key_dict=user_api_key_dict,\n                team_obj=team_obj,\n                premium_user=premium_user,\n            )\n        ## Check non-team model auth\n        elif user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN:\n            raise HTTPException(\n                status_code=403,\n                detail={\n                    \"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.\"\n                },\n            )\n        else:\n            return True\n\n        return True\n\n\n#### [BETA] - This is a beta endpoint, format might change based on user feedback. - https://github.com/BerriAI/litellm/issues/964\n@router.post(\n    \"/model/delete\",\n    description=\"Allows deleting models in the model list in the config.yaml\",\n    tags=[\"model management\"],\n    dependencies=[Depends(user_api_key_auth)],\n)","sourceCodeStart":1511,"sourceCodeEnd":1547,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/model_management_endpoints.py#L1511-L1547","documentation":"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.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1529 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a PROXY_ADMIN key, or a team admin key with team_id specified in model_info."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}