xai-org/grok-build · error

no CLI base URLs configured

Error message

no CLI base URLs configured

What it means

fetch_gcs_version fetches the channel version pointer from each configured CLI base URL, tracking the last error; if no base URLs are configured at all it returns this fallback. It means the version-check layer had zero GCS endpoints to query, so no version could be determined.

Source

Thrown at crates/codegen/xai-grok-update/src/version.rs:292

pub(crate) async fn fetch_gcs_version(channel: &str) -> Result<String> {
    let mut last_err: Option<anyhow::Error> = None;
    let bases = cli_base_urls();
    for (i, base) in bases.iter().enumerate() {
        match fetch_gcs_version_from_base(channel, base).await {
            Ok(v) => return Ok(v),
            Err(e) => {
                if i + 1 < bases.len() {
                    tracing::warn!(
                        "channel pointer fetch from {} failed ({:#}); trying next base URL",
                        base,
                        e
                    );
                }
                last_err = Some(e);
            }
        }
    }
    Err(last_err.unwrap_or_else(|| anyhow::anyhow!("no CLI base URLs configured")))
}

/// Test-only entry point: same as [`fetch_gcs_version`] but reads from
/// `base_url` instead of the hardcoded GCS bucket.
#[doc(hidden)]
pub async fn fetch_gcs_version_from_base(channel: &str, base_url: &str) -> Result<String> {
    if channel == "alpha" {
        let (alpha_v, stable_v) = tokio::try_join!(
            fetch_gcs_channel_pointer("alpha", base_url),
            fetch_gcs_channel_pointer("stable", base_url),
        )?;
        return semver_max(&alpha_v, &stable_v);
    }
    fetch_gcs_channel_pointer(channel, base_url).await
}

async fn fetch_gcs_channel_pointer(channel: &str, base_url: &str) -> Result<String> {
    let url = format!("{}/{}", base_url, channel);

View on GitHub (pinned to bc7f02eddd)

Solutions

  1. Ensure cli_base_urls()/channel configuration yields at least one valid GCS base URL
  2. Rebuild/reinstall the CLI if the baked-in URL list is missing
  3. If calling programmatically, supply a base URL (or use fetch_gcs_version_from_base with an explicit base)
Defensive patterns

Strategy: validation

Validate before calling

let bases: Vec<String> = crate::version::cli_base_urls();
if bases.is_empty() { anyhow::bail!("no GCS bases configured for version check"); }

Try / catch

match fetch_latest_version(channel).await {
    Err(e) if e.to_string().contains("no CLI base URLs configured") => {
        eprintln!("version lookup unavailable: no endpoints configured");
    }
    result => result?,
}

Prevention

When it happens

Trigger: Calling fetch_gcs_version (via fetch_latest_version) when the configured base URL list is empty — same degenerate condition as the install-side equivalent, but during version lookup.

Common situations: A build/packaging issue that stripped the hardcoded GCS bucket list; embedding the crate with an empty base-URL configuration; tests constructing fetch_gcs_version with no bases.

Related errors


AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31). Data as JSON: /api/errors/19470671e921c8fb. Report an issue: GitHub.