BerriAI/litellm · error · HTTPException

Failed to initialize CloudZero settings: {e}

Error message

Failed to initialize CloudZero settings: {e}

What it means

Error "Failed to initialize CloudZero settings: {e}" thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/spend_tracking/cloudzero_endpoints.py:369

            status_code=403,
            detail={"error": CommonProxyErrors.not_allowed_access.value},
        )

    try:
        # Store settings using the setter method with encryption
        await _set_cloudzero_settings(
            api_key=request.api_key,
            connection_id=request.connection_id,
            timezone=request.timezone,
        )

        verbose_proxy_logger.info("CloudZero settings initialized successfully")

        return CloudZeroInitResponse(message="CloudZero settings initialized successfully", status="success")

    except Exception as e:
        verbose_proxy_logger.error("Error initializing CloudZero settings: %s", e)
        raise HTTPException(
            status_code=500,
            detail={"error": f"Failed to initialize CloudZero settings: {e}"},
        )


@router.post(
    "/cloudzero/dry-run",
    tags=["CloudZero"],
    dependencies=[Depends(user_api_key_auth)],
    response_model=CloudZeroExportResponse,
)
async def cloudzero_dry_run_export(
    request: CloudZeroExportRequest,
    user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
    """
    Perform a dry run export using the CloudZero logger.

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Check the error detail (DB or validation failure); correct the init payload and retry.

When it happens

Trigger: Thrown at litellm/proxy/spend_tracking/cloudzero_endpoints.py:369 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/d38e54381ce0fb5f. Report an issue: GitHub.