BoundaryML/baml · error
error: no BAML toolchain is installed. Run: baml toolchain…
Error message
error: no BAML toolchain is installed. Run: baml toolchain use canary Or: baml toolchain use nightly
What it means
The catch-all 'no toolchain installed' guard in version resolution: the selector is a channel that has no local state entry, and the selector did not come from a project baml.toml (i.e. it came from the global default or env), so there is nothing to resolve or exec. On a fresh machine with no `baml toolchain use` ever run, every invocation that needs the real toolchain hits this.
Solutions
- Install and activate a toolchain: `baml toolchain use canary` or `baml toolchain use nightly`
- Or install a specific version with `baml toolchain install <version>` then `baml toolchain use <version>`
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at baml_language/crates/baml/src/main.rs:628 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/2d9c9b497294dbd4.
Report an issue: GitHub.
Appendix: source
Thrown at baml_language/crates/baml/src/main.rs:628
.as_deref()
.is_some_and(|base| base.trim_end_matches('/') != current_base)
{
return Err(anyhow!(
"channel {} was selected from a different manifest source.\nRun: baml toolchain use {} under the current manifest source.",
selector.selector,
selector.selector
));
}
return Ok(channel.active_version.clone());
}
return match &selector.source {
SelectorSource::Project(path) => Err(anyhow!(
"baml.toml [toolchain] selects channel {}, but no active concrete version is recorded locally.\nRun: baml toolchain use {}",
selector.selector,
selector.selector
)
.context(format!("project config: {}", path.display()))),
_ => Err(anyhow!(
"error: no BAML toolchain is installed.\nRun: baml toolchain use canary\nOr: baml toolchain use nightly"
)),
};
}
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
}View on GitHub (pinned to bd85ce9dee)