{"record":{"id":"ea3f2f728afd5d6a","repo":"BoundaryML/baml","slug":"manifest-schema-schema-is-newer-than-this-wrapper-run-baml","errorCode":null,"errorMessage":"manifest schema {schema} is newer than this wrapper; run `baml self-update`","messagePattern":"manifest schema (.+?) is newer than this wrapper; run `baml self-update`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_release/src/manifest.rs","lineNumber":129,"sourceCode":"}\n\n#[cfg(all(feature = \"self-update\", not(feature = \"no-self-update\")))]\nimpl WrapperManifest {\n    pub fn validate(&self) -> anyhow::Result<()> {\n        validate_schema(self.schema)?;\n        validate_artifacts(&self.version, &self.artifacts)\n    }\n\n    pub fn artifact_for_target(&self, target: &str) -> anyhow::Result<&Artifact> {\n        self.artifacts.get(target).ok_or_else(|| {\n            anyhow::anyhow!(\"target {target} not built for wrapper {}\", self.version)\n        })\n    }\n}\n\nfn validate_schema(schema: u32) -> anyhow::Result<()> {\n    if schema > MANIFEST_SCHEMA {\n        anyhow::bail!(\n            \"manifest schema {schema} is newer than this wrapper; run `baml self-update`\"\n        );\n    }\n    if schema != MANIFEST_SCHEMA {\n        anyhow::bail!(\"unsupported manifest schema {schema}\");\n    }\n    Ok(())\n}\n\nfn validate_artifacts(version: &str, artifacts: &BTreeMap<String, Artifact>) -> anyhow::Result<()> {\n    let expected: std::collections::BTreeSet<_> =\n        SUPPORTED_RELEASE_TARGETS.iter().copied().collect();\n    let actual: std::collections::BTreeSet<_> = artifacts.keys().map(String::as_str).collect();\n    if actual != expected {\n        anyhow::bail!(\"manifest for {version} has target set {actual:?}; expected {expected:?}\");\n    }\n    for (target, artifact) in artifacts {\n        validate_artifact(target, artifact)?;","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_release/src/manifest.rs#L111-L147","documentation":"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.","triggerScenarios":"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().","commonSituations":"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.","solutions":["Run `baml self-update` exactly as the error message says to get a wrapper that understands the new schema.","Update the wrapper binary/Pin your CI to pull the latest wrapper before reading manifests.","If self-update can't run, download the latest wrapper release manually and replace the binary.","As a stopgap, fetch the manifest from an older release version whose schema matches the wrapper."],"exampleFix":"// before\nlet manifest = wrapper_manifest_from_str(&fetched_json)?; // schema 3, wrapper knows 2\n// after\nbaml self-update;\nlet manifest = wrapper_manifest_from_str(&fetched_json)?;","handlingStrategy":"try-catch","validationCode":"if manifest.schema > KNOWN_MAX_SCHEMA {\n    eprintln!(\"manifest schema {} is newer than this wrapper; run `baml self-update`\", manifest.schema);\n}","typeGuard":null,"tryCatchPattern":"match parse_manifest(json) {\n    Err(e) if e.to_string().contains(\"newer than this wrapper\") => { self_update()?; parse_manifest(json) }\n    r => r,\n}","preventionTips":["Run `baml self-update` regularly, especially in long-lived CI images.","Don't pin wrapper binaries far behind the release channel.","Monitor upstream schema bumps and update wrappers proactively."],"tags":["manifest","schema","version-compatibility","self-update"],"backgroundTag":"schema-validation-failed","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}