BerriAI/litellm · error · HTTPException

CloudZero settings not found. Please initialize settings fir

Error message

CloudZero settings not found. Please initialize settings first using /cloudzero/init

What it means

Error "CloudZero settings not found. Please initialize settings first using /cloudzero/init" thrown in BerriAI/litellm.

Source

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

            request.connection_id if request.connection_id is not None else current_settings["connection_id"]
        )
        updated_timezone: Final = request.timezone if request.timezone is not None else current_settings["timezone"]

        # Store updated settings using the setter method with encryption
        await _set_cloudzero_settings(
            api_key=updated_api_key,
            connection_id=updated_connection_id,
            timezone=updated_timezone,
        )

        verbose_proxy_logger.info("CloudZero settings updated successfully")

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

    except HTTPException as e:
        if e.status_code == 400:
            # Settings not configured yet
            raise HTTPException(
                status_code=404,
                detail={
                    "error": "CloudZero settings not found. Please initialize settings first using /cloudzero/init"
                },
            )
        raise e
    except Exception as e:
        verbose_proxy_logger.error("Error updating CloudZero settings: %s", e)
        raise HTTPException(
            status_code=500,
            detail={"error": f"Failed to update CloudZero settings: {e}"},
        )


# Global variable to track if CloudZero background job has been initialized
_cloudzero_background_job_initialized: Final = False

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Initialize CloudZero settings first via POST /cloudzero/init, then retry the update.

When it happens

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