BerriAI/litellm · error · HTTPException

Failed to create access group

Error message

Failed to create access group: {e}

What it means

Catch-all wrapper around the access-group creation transaction. Validation errors (HTTPException) are re-raised unchanged; any other exception from DB reads/writes or router upserts is logged with the group name and re-raised as this 500.

Solutions

  1. Check proxy server logs for the underlying exception details.
  2. Verify database connectivity and that referenced models exist.
Defensive patterns

Strategy: try-catch

When it happens

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

Appendix: source

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

            access_group=data.access_group,
        )

        verbose_proxy_logger.info(
            "Successfully created access group '%s' with %s models updated", data.access_group, models_updated
        )

        return NewModelGroupResponse(
            access_group=data.access_group,
            model_names=data.model_names,
            model_ids=data.model_ids,
            models_updated=models_updated,
        )

    except HTTPException:
        raise
    except Exception as e:
        verbose_proxy_logger.exception("Error creating access group '%s': %s", data.access_group, e)
        raise HTTPException(
            status_code=500,
            detail={"error": f"Failed to create access group: {e}"},
        )


@router.get(
    "/access_group/list",
    tags=["model management"],
    dependencies=[Depends(user_api_key_auth)],
    response_model=ListAccessGroupsResponse,
)
async def list_access_groups(
    user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
    """
    List all access groups.
    
    Returns a list of all access groups with their model names and deployment counts.

View on GitHub (pinned to 77b7c6c40c)