{"record":{"id":"f4000ed815b52483","repo":"BerriAI/litellm","slug":"access-group-data-access-group-already-exists","errorCode":null,"errorMessage":"Access group '{data.access_group}' already exists. Use PUT /access_group/{data.access_group}/update to modify it.","messagePattern":"Access group '(.+?)' already exists\\. Use PUT /access_group/(.+?)/update to modify it\\.","errorType":"http","errorClass":"HTTPException","httpStatus":409,"severity":"error","filePath":"litellm/proxy/management_endpoints/model_access_group_management_endpoints.py","lineNumber":416,"sourceCode":"        if not all_valid:\n            raise HTTPException(\n                status_code=400,\n                detail={\"error\": f\"Model(s) not found: {', '.join(missing_models)}\"},\n            )\n\n    # Check if database is connected\n    if prisma_client is None:\n        raise HTTPException(\n            status_code=500,\n            detail={\"error\": \"Database not connected. Cannot create access group.\"},\n        )\n\n    try:\n        # Check if access group already exists\n        existing_access_groups: Final = await get_all_access_groups_from_db(prisma_client=prisma_client)\n\n        if data.access_group in existing_access_groups:\n            raise HTTPException(\n                status_code=409,\n                detail={\n                    \"error\": f\"Access group '{data.access_group}' already exists. Use PUT /access_group/{data.access_group}/update to modify it.\"\n                },\n            )\n\n        # Update deployments using the appropriate method\n        if use_model_ids:\n            assert data.model_ids is not None\n            updated_pairs = await update_specific_deployments_with_access_group(\n                model_ids=data.model_ids,\n                access_group=data.access_group,\n                prisma_client=prisma_client,\n            )\n        else:\n            assert data.model_names is not None\n            updated_pairs = await update_deployments_with_access_group(\n                model_names=data.model_names,","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/model_access_group_management_endpoints.py#L398-L434","documentation":"Uniqueness guard on access-group creation: get_all_access_groups_from_db already contains the requested access_group name. Groups are unique; the message points to PUT /access_group/{name}/update for modification.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/model_access_group_management_endpoints.py:416 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use PUT /access_group/{name}/update to modify the existing group, or pick a new name."],"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"}