BerriAI/litellm · error · HTTPException

Access group '{data.access_group}' already exists. Use PUT /

Error message

Access group '{data.access_group}' already exists. Use PUT /access_group/{data.access_group}/update to modify it.

What it means

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.

Source

Thrown at litellm/proxy/management_endpoints/model_access_group_management_endpoints.py:416

        if not all_valid:
            raise HTTPException(
                status_code=400,
                detail={"error": f"Model(s) not found: {', '.join(missing_models)}"},
            )

    # Check if database is connected
    if prisma_client is None:
        raise HTTPException(
            status_code=500,
            detail={"error": "Database not connected. Cannot create access group."},
        )

    try:
        # Check if access group already exists
        existing_access_groups: Final = await get_all_access_groups_from_db(prisma_client=prisma_client)

        if data.access_group in existing_access_groups:
            raise HTTPException(
                status_code=409,
                detail={
                    "error": f"Access group '{data.access_group}' already exists. Use PUT /access_group/{data.access_group}/update to modify it."
                },
            )

        # Update deployments using the appropriate method
        if use_model_ids:
            assert data.model_ids is not None
            updated_pairs = await update_specific_deployments_with_access_group(
                model_ids=data.model_ids,
                access_group=data.access_group,
                prisma_client=prisma_client,
            )
        else:
            assert data.model_names is not None
            updated_pairs = await update_deployments_with_access_group(
                model_names=data.model_names,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Use PUT /access_group/{name}/update to modify the existing group, or pick a new name.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/model_access_group_management_endpoints.py:416 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/f4000ed815b52483. Report an issue: GitHub.