{"record":{"id":"0b8c37f638379f69","repo":"BoundaryML/baml","slug":"baml-ide-install-needs-a-managed-baml-toolchain-but-the","errorCode":null,"errorMessage":"baml ide install needs a managed BAML toolchain, but the active one is a local binary at {}.\nThe VS Code extension ships with released toolchains only.\nRun: baml toolchain use canary","messagePattern":"baml ide install needs a managed BAML toolchain, but the active one is a local binary at (.+?)\\.\nThe VS Code extension ships with released toolchains only\\.\nRun: baml toolchain use canary","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_cli/src/ide_command.rs","lineNumber":214,"sourceCode":"\n  3. Select the saved baml-vscode.vsix.\"#,\n        dir = os.example_dir(),\n        chord = os.palette_chord(),\n    )\n}\n\nfn active_toolchain_vsix() -> Result<PathBuf> {\n    let exe = env::current_exe().context(\"failed to locate baml-cli executable\")?;\n    let toolchain_root = exe\n        .parent()\n        .and_then(Path::parent)\n        .ok_or_else(|| anyhow!(\"failed to determine active BAML toolchain root\"))?;\n    let vsix = toolchain_root.join(\"assets\").join(\"baml-vscode.vsix\");\n    if !vsix.exists() {\n        // A local build has no assets/ next to it, so say that plainly rather\n        // than reporting a missing file the developer never expected to exist.\n        if let Some(local) = env::var_os(\"BAML_WRAPPER_LOCAL_TOOLCHAIN\") {\n            anyhow::bail!(\n                \"baml ide install needs a managed BAML toolchain, but the active one is a local binary at {}.\\nThe VS Code extension ships with released toolchains only.\\nRun: baml toolchain use canary\",\n                Path::new(&local).display()\n            );\n        }\n        anyhow::bail!(\n            \"active BAML toolchain does not include assets/baml-vscode.vsix at {}\",\n            vsix.display()\n        );\n    }\n    Ok(vsix)\n}\n\nfn command_on_path(command: &str) -> Option<OsString> {\n    let path = env::var_os(\"PATH\")?;\n    for dir in env::split_paths(&path) {\n        #[cfg(windows)]\n        {\n            let candidate = dir.join(format!(\"{command}.cmd\"));","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_cli/src/ide_command.rs#L196-L232","documentation":"When the toolchain root exists but assets/baml-vscode.vsix is missing, `active_toolchain_vsix` checks BAML_WRAPPER_LOCAL_TOOLCHAIN. If set, the active toolchain is a local dev build, so it errors explaining that `baml ide install` requires a managed (released) toolchain which is the only one shipping the VS Code extension.","triggerScenarios":"Running `baml ide install` while BAML_WRAPPER_LOCAL_TOOLCHAIN points at a locally built baml binary whose directory has no assets/baml-vscode.vsix.","commonSituations":"Developers testing a locally built BAML binary that attempts to install the IDE extension; local builds never bundle the vsix asset.","solutions":["Switch to a released toolchain: run `baml toolchain use canary`, then retry `baml ide install`","Unset BAML_WRAPPER_LOCAL_TOOLCHAIN if you meant to use a managed toolchain","For local development, install the extension manually by building the vsix from the vscode extension sources"],"exampleFix":"// before\n$ BAML_WRAPPER_LOCAL_TOOLCHAIN=/home/me/baml/target/debug ./baml ide install\n// after\n$ baml toolchain use canary\n$ baml ide install","handlingStrategy":"validation","validationCode":"# detect a local toolchain before attempting ide install\nif [ -n \"$BAML_WRAPPER_LOCAL_TOOLCHAIN\" ]; then\n  echo \"local build: install the extension manually; run: baml toolchain use canary\"\n  exit 1\nfi","typeGuard":null,"tryCatchPattern":"if let Err(e) = result {\n    if e.to_string().contains(\"local binary\") {\n        eprintln!(\"Switch to a managed toolchain with: baml toolchain use canary\");\n    }\n}","preventionTips":["Don't run `baml ide install` against local dev builds","Unset BAML_WRAPPER_LOCAL_TOOLCHAIN in shared/CI environments","Build the vsix separately when developing the extension locally"],"tags":["toolchain","vscode","install"],"backgroundTag":"unsupported-local-toolchain","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"}