{"record":{"id":"dbe6cd52201de441","repo":"BerriAI/litellm","slug":"team-id-data-team-id-already-exists-please-us","errorCode":null,"errorMessage":"Team id = {data.team_id} already exists. Please use a different team id.","messagePattern":"Team id = (.+?) already exists\\. Please use a different team id\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_endpoints.py","lineNumber":1327,"sourceCode":"                detail=\"License is over limit. Please contact support@berri.ai to upgrade your license.\",\n            )\n\n        if data.team_id is None:\n            data.team_id = str(uuid.uuid4())\n        else:\n            if data.team_id == UI_TEAM_ID:\n                raise HTTPException(\n                    status_code=400,\n                    detail={\n                        \"error\": f\"team_id '{UI_TEAM_ID}' is reserved for LiteLLM UI dashboard sessions and cannot be used for a real team. Please use a different team id.\"\n                    },\n                )\n            # Check if team_id exists already\n            _existing_team_id: Final = await prisma_client.get_data(\n                team_id=data.team_id, table_name=\"team\", query_type=\"find_unique\"\n            )\n            if _existing_team_id is not None:\n                raise HTTPException(\n                    status_code=400,\n                    detail={\"error\": f\"Team id = {data.team_id} already exists. Please use a different team id.\"},\n                )\n\n        if data.organization_id is None:\n            default_organization_id: Final = _get_default_team_param(\"organization_id\")\n            if isinstance(default_organization_id, str):\n                data.organization_id = default_organization_id\n\n        # Apply defaults from litellm.default_team_params to null fields.\n        # budget_duration alone distinguishes explicit null (a deliberate\n        # never-resetting budget, which the default must not override) from omitted.\n        for field in (\n            \"max_budget\",\n            \"budget_duration\",\n            \"tpm_limit\",\n            \"rpm_limit\",\n            \"team_member_permissions\",","sourceCodeStart":1309,"sourceCodeEnd":1345,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_endpoints.py#L1309-L1345","documentation":"Uniqueness check in the new-team endpoint (/team/new). The caller supplied an explicit team_id that already exists in the team table (after passing the reserved UI_TEAM_ID check), and LiteLLM uses team_id as the primary key, so creating would collide. Fires for duplicate explicit ids only — auto-generated uuids never hit this. Choose a fresh team_id or call the update endpoint instead.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1327 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a different team id, or update the existing team."],"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"}