BoundaryML/baml · error

manifest schema {schema} is newer than this wrapper; run `ba

Error message

manifest schema {schema} is newer than this wrapper; run `baml self-update`

What it means

validate_schema rejects manifest schema versions greater than MANIFEST_SCHEMA, the maximum this wrapper binary understands, with a message directing the user to `baml self-update`. It's a forward-compatibility guard: a newer publisher wrote a manifest format this older wrapper can't safely interpret.

Source

Thrown at baml_language/crates/baml_release/src/manifest.rs:129

}

#[cfg(all(feature = "self-update", not(feature = "no-self-update")))]
impl WrapperManifest {
    pub fn validate(&self) -> anyhow::Result<()> {
        validate_schema(self.schema)?;
        validate_artifacts(&self.version, &self.artifacts)
    }

    pub fn artifact_for_target(&self, target: &str) -> anyhow::Result<&Artifact> {
        self.artifacts.get(target).ok_or_else(|| {
            anyhow::anyhow!("target {target} not built for wrapper {}", self.version)
        })
    }
}

fn validate_schema(schema: u32) -> anyhow::Result<()> {
    if schema > MANIFEST_SCHEMA {
        anyhow::bail!(
            "manifest schema {schema} is newer than this wrapper; run `baml self-update`"
        );
    }
    if schema != MANIFEST_SCHEMA {
        anyhow::bail!("unsupported manifest schema {schema}");
    }
    Ok(())
}

fn validate_artifacts(version: &str, artifacts: &BTreeMap<String, Artifact>) -> anyhow::Result<()> {
    let expected: std::collections::BTreeSet<_> =
        SUPPORTED_RELEASE_TARGETS.iter().copied().collect();
    let actual: std::collections::BTreeSet<_> = artifacts.keys().map(String::as_str).collect();
    if actual != expected {
        anyhow::bail!("manifest for {version} has target set {actual:?}; expected {expected:?}");
    }
    for (target, artifact) in artifacts {
        validate_artifact(target, artifact)?;

View on GitHub (pinned to bd85ce9dee)

Solutions

  1. Run `baml self-update` exactly as the error message says to get a wrapper that understands the new schema.
  2. Update the wrapper binary/Pin your CI to pull the latest wrapper before reading manifests.
  3. If self-update can't run, download the latest wrapper release manually and replace the binary.
  4. As a stopgap, fetch the manifest from an older release version whose schema matches the wrapper.

Example fix

// before
let manifest = wrapper_manifest_from_str(&fetched_json)?; // schema 3, wrapper knows 2
// after
baml self-update;
let manifest = wrapper_manifest_from_str(&fetched_json)?;
Defensive patterns

Strategy: try-catch

Validate before calling

if manifest.schema > KNOWN_MAX_SCHEMA {
    eprintln!("manifest schema {} is newer than this wrapper; run `baml self-update`", manifest.schema);
}

Try / catch

match parse_manifest(json) {
    Err(e) if e.to_string().contains("newer than this wrapper") => { self_update()?; parse_manifest(json) }
    r => r,
}

Prevention

When it happens

Trigger: Parsing a manifest whose `schema` field exceeds the wrapper's compiled-in MANIFEST_SCHEMA — i.e. a wrapper downloaded long before a schema bump, reading a freshly published manifest via validate() -> validate_schema().

Common situations: Pinned/old wrapper binary in CI while the release channel moved to a new manifest schema; skipping self-updates for months; vendored wrapper copies in images that never refresh.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12). Data as JSON: /api/errors/ea3f2f728afd5d6a. Report an issue: GitHub.