Upgrading BAML / Fixing Version Mismatches
Remember that the generated baml_client
code is generated by your baml_py
/ @boundaryml/baml
package dependency (using baml-cli generate
), but can also be generated by the VSCode extension when you save a BAML file.
To upgrade BAML versions:
- Update the
generator
clause in yourgenerators.baml
file (or wherever you have it defined) to the new version. If you ranbaml-cli init
, one has already been generated for you!
generators.baml
- Update your
baml_py
/@boundaryml/baml
package dependency to the same version.
- Update VSCode BAML extension to point to the same version. Read here for how to keep VSCode in sync with your
baml_py
/@boundaryml/baml
package dependency: VSCode BAML Extension reference
You only need to do this for minor version upgrades (e.g., 0.54.0 -> 0.62.0), not patch versions (e.g., 0.62.0 -> 0.62.1).
Troubleshooting
See the VSCode BAML Extension reference for more information on how to prevent version mismatches.