BoundaryML/baml · error · Error
Update to @boundaryml/baml required. Version from generators
Error message
Update to @boundaryml/baml required.
Version from generators.baml: ${generatedVersion}
Current @boundaryml/baml version: ${runtimeVersion}
Please upgrade @boundaryml/baml to version ${generatedVersion}.
$ npm install @boundaryml/baml@${generatedVersion}
$ yarn add @boundaryml/baml@${generatedVersion}
$ pnpm add @boundaryml/baml@${generatedVersion}
If nothing else works, please ask for help:
https://github.com/boundaryml/baml/issues
https://boundaryml.com/discord What it means
BAML generated client code was produced by a newer baml CLI than the installed @boundaryml/baml runtime supports. ThrowIfVersionMismatch compares the version recorded from generators.baml against the runtime version and throws when they differ, since the generated code may use FFI surfaces the runtime lacks. The error includes the exact install commands to fix it.
Source
Thrown at engine/language_client_typescript/typescript_src/safe_imports.ts:32
export function ThrowIfVersionMismatch(generatedVersion: string) {
const runtimeVersion = get_version();
if (!ensureVersionCompatibility(generatedVersion, runtimeVersion)) {
const errorMessage = `Update to @boundaryml/baml required.
Version from generators.baml: ${generatedVersion}
Current @boundaryml/baml version: ${runtimeVersion}
Please upgrade @boundaryml/baml to version ${generatedVersion}.
$ npm install @boundaryml/baml@${generatedVersion}
$ yarn add @boundaryml/baml@${generatedVersion}
$ pnpm add @boundaryml/baml@${generatedVersion}
If nothing else works, please ask for help:
https://github.com/boundaryml/baml/issues
https://boundaryml.com/discord`;
throw new Error(errorMessage.trim());
}
}
View on GitHub (pinned to bd85ce9dee)
Solutions
- Run your package manager's install command with the required version, e.g. `npm install @boundaryml/baml@<generatedVersion>` (or yarn/pnpm add).
- Commit the updated lockfile so CI and teammates get the matching version.
- If you cannot upgrade, downgrade the baml CLI and regenerate so generators.baml matches the installed runtime.
- If versions appear to match but the error persists, clear node_modules and reinstall, then report at the linked GitHub issues page.
Example fix
// package.json before
"dependencies": { "@boundaryml/baml": "^0.60.0" }
// after
"dependencies": { "@boundaryml/baml": "^0.75.0" }
// then: npm install && baml generate Defensive patterns
Strategy: validation
Validate before calling
import { version as runtimeVersion } from '@boundaryml/baml/package.json'
// read generatedVersion from generators.baml and compare before initializing the client
if (runtimeVersion !== generatedVersion) {
throw new Error(`Install @boundaryml/baml@${generatedVersion} (currently ${runtimeVersion})`)
} Prevention
- Pin @boundaryml/baml to the exact version emitted by your baml CLI.
- Regenerate and reinstall together in one CI step (baml generate && npm install).
- Commit the lockfile whenever the generator version changes.
When it happens
Trigger: Importing or initializing the generated BAML client when the version embedded in generators.baml differs from the installed @boundaryml/baml package version; regenerating with an updated CLI (`baml generate`) without upgrading the runtime package, or vice versa.
Common situations: A teammate updated baml CLI and committed regenerated code; CI cache installs an older package; pnpm/yarn lockfile not updated after a generator upgrade; monorepo where one workspace pins an old @boundaryml/baml.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- {msg} Please upgrade baml-py to the latest version. $ pip
- {msg} Please set baml-py to version "{target_version}". $
- Update to @boundaryml/baml required. Version from generators
- {kind} is not a versioned BAML artifact; {}
- {kind}: toolchain {artifact_fingerprint} / format {artifact_
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/6132bd391505c0be.
Report an issue: GitHub.