{"record":{"id":"7b2f85616c5ed1ee","repo":"BerriAI/litellm","slug":"team-id-team-id-does-not-match-the-api-key-s-tea","errorCode":null,"errorMessage":"Team ID={team_id} does not match the API key's team ID={user_api_key_dict.team_id}, OR you are not the admin for this team. Check `/user/info` to verify your team admin status.","messagePattern":"Team ID=(.+?) does not match the API key's team ID=(.+?), OR you are not the admin for this team\\. Check `/user/info` to verify your team admin status\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/model_management_endpoints.py","lineNumber":1449,"sourceCode":"    Common auth checks for model management endpoints\n    \"\"\"\n\n    @staticmethod\n    def can_user_make_team_model_call(\n        team_id: str,\n        user_api_key_dict: UserAPIKeyAuth,\n        team_obj: LiteLLM_TeamTable | None = None,\n        premium_user: bool = False,\n    ) -> Literal[True]:\n        if premium_user is False:\n            raise HTTPException(\n                status_code=403,\n                detail={\"error\": CommonProxyErrors.not_premium_user.value},\n            )\n        if user_api_key_dict.user_role and user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN:\n            return True\n        elif team_obj is None or not _is_user_team_admin(user_api_key_dict=user_api_key_dict, team_obj=team_obj):\n            raise HTTPException(\n                status_code=403,\n                detail={\n                    \"error\": f\"Team ID={team_id} does not match the API key's team ID={user_api_key_dict.team_id}, OR you are not the admin for this team. Check `/user/info` to verify your team admin status.\"\n                },\n            )\n        return True\n\n    @staticmethod\n    async def allow_team_model_action(\n        model_params: Deployment | updateDeployment,\n        user_api_key_dict: UserAPIKeyAuth,\n        prisma_client: PrismaClient,\n        premium_user: bool,\n    ) -> Literal[True]:\n        if model_params.model_info is None or model_params.model_info.team_id is None:\n            return True\n        if model_params.model_info.team_id is not None and premium_user is not True:\n            raise HTTPException(","sourceCodeStart":1431,"sourceCodeEnd":1467,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/model_management_endpoints.py#L1431-L1467","documentation":"Error \"Team ID={team_id} does not match the API key's team ID={user_api_key_dict.team_id}, OR you are not the admin for this team. Check `/user/info` to verify your team admin status.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1449 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an API key belonging to the same team, or a team admin key.","Check /user/info to verify team admin status."],"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"}