BerriAI/litellm · error · HTTPException

At least one field must be provided for update

Error message

At least one field must be provided for update

What it means

Input guard on PATCH-style update of Vantage settings: the request body contained no api_key, integration_token, or base_url, so the partial-update endpoint has nothing to apply and rejects with 400 rather than performing a no-op write.

Source

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

)
async def update_vantage_settings(
    request: VantageSettingsUpdate,
    user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
    """
    Update existing Vantage settings.

    Allows updating individual Vantage configuration fields without requiring all fields.
    Only admin users can update Vantage settings.
    """
    if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN:
        raise HTTPException(
            status_code=403,
            detail={"error": CommonProxyErrors.not_allowed_access.value},
        )

    if not any([request.api_key, request.integration_token, request.base_url]):
        raise HTTPException(
            status_code=400,
            detail={"error": "At least one field must be provided for update"},
        )

    try:
        current_settings: Final = await _get_vantage_settings()

        if not current_settings:
            raise HTTPException(
                status_code=404,
                detail={"error": "Vantage settings not found. Please initialize settings first using /vantage/init"},
            )

        updated_api_key: Final = request.api_key if request.api_key is not None else current_settings.get("api_key", "")
        updated_token: Final = (
            request.integration_token
            if request.integration_token is not None
            else current_settings.get("integration_token", "")

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Include at least one updatable field in the request body of the update call.
Defensive patterns

Strategy: validation

When it happens

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