BoundaryML/baml · error

BAML toolchain is not installed. Installed toolchains: Run…

Error message

BAML toolchain {version} is not installed.
Installed toolchains: {}
Run: baml toolchain install {version}

What it means

Fires when the resolved concrete version is not installed locally but the selector did not come from project config (env var or global default). The wrapper reached the exec stage believing a version was active, but the toolchains directory has no such version — typically after the state file references an uninstalled version or a partial uninstall.

Solutions

  1. Install the missing version: `baml toolchain install <version>`
  2. If the version was removed intentionally, re-select a valid toolchain: `baml toolchain use canary` (or another installed version)
  3. Check `baml toolchain list` to see which versions are available locally
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at baml_language/crates/baml/src/main.rs:648 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at baml_language/crates/baml/src/main.rs:648

            )),
        };
    }
    Ok(selector.selector.clone())
}

fn missing_toolchain_error(selector: &ResolvedSelector, version: &str) -> anyhow::Error {
    let installed = installed_toolchains().join(", ");
    match &selector.source {
        SelectorSource::Project(path) => anyhow!(
            "{} [toolchain] pins version {version}, but it isn't installed.\nInstalled toolchains: {}\nRun: baml toolchain install {version}",
            path.display(),
            if installed.is_empty() {
                "(none)"
            } else {
                &installed
            }
        ),
        _ => anyhow!(
            "BAML toolchain {version} is not installed.\nInstalled toolchains: {}\nRun: baml toolchain install {version}",
            if installed.is_empty() {
                "(none)"
            } else {
                &installed
            }
        ),
    }
}

fn cli_exe_name() -> &'static str {
    if cfg!(windows) {
        "baml-cli.exe"
    } else {
        "baml-cli"
    }
}

View on GitHub (pinned to bd85ce9dee)