BerriAI/litellm · error · HTTPException

Admin-only endpoint. Not allowed to access this.

Error message

Admin-only endpoint. Not allowed to access this.

What it means

Standard admin gate for GET /vantage/settings: the caller's authenticated key lacks proxy-admin or admin-viewer role, so the read-parity check _user_has_admin_view returned False. Fires whenever a non-admin virtual key tries to view Vantage configuration.

Source

Thrown at litellm/proxy/spend_tracking/vantage_endpoints.py:142

@router.get(
    "/vantage/settings",
    tags=["Vantage"],
    dependencies=[Depends(user_api_key_auth)],
    response_model=VantageSettingsView,
)
async def get_vantage_settings(
    user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
    """
    View current Vantage settings.

    Returns the current Vantage configuration with the API key masked for security.
    Only admin users (Proxy Admin or Admin Viewer) can view Vantage settings.
    """
    # Admin Viewer follows the read-parity rule.
    if not _user_has_admin_view(user_api_key_dict):
        raise HTTPException(
            status_code=403,
            detail={"error": CommonProxyErrors.not_allowed_access.value},
        )

    try:
        settings: Final = await _get_vantage_settings()

        if not settings:
            return VantageSettingsView(
                api_key_masked=None,
                integration_token_masked=None,
                base_url=None,
                status=None,
            )

        masked_settings: Final = _sensitive_masker.mask_dict(settings)

        return VantageSettingsView(

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Call this endpoint with a proxy admin (master) key instead of a regular virtual key.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/spend_tracking/vantage_endpoints.py:142 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/338652968e4e8398. Report an issue: GitHub.