With BAML, the higher version number is the older language
v0 and v1 are separate languages, so FDEs need to settle on one before writing a client's first function.
In brief
- baml-py 0.226.3 is the v0 runtime; baml-bridge 0.26.0 belongs to the new system, so the version number does not tell you which generation is newer.
- A function that uses a model declares a client and a prompt; ctx.output_format inserts instructions from the return type, so you need not copy the schema.
- A valid type does not prove the data is right: pin the version and keep a separate evaluation set.
On PyPI, the baml-py package is at 0.226.3, while baml-bridge is only at 0.26.0. Going by the numbers, anyone might pick the first. But baml-py describes itself as the Python runtime for BAML v0, and baml-bridge is the binding for the new system.
The documentation is split too. The docs.boundaryml.com site covers v0, which Boundary itself calls the older DSL; the company describes v1 as a separate, full-featured language in public beta. For an FDE the risk is specific: following one generation’s guide while the client’s codebase runs the other.
The mix-up is worth avoiding because the idea inside BAML suits client work well. It makes you agree on the output before you argue over the wording of the prompt.
Schema first, wording second
When Vaibhav Gupta of Boundary announced BAML on November 25, 2023, he introduced a lightweight language for writing structured, type-safe prompts. The v0 README calls the approach turning prompt engineering into schema engineering. The repository’s main README has since raised its ambitions, calling BAML a programming language for agents.
To get started with BAML, you need a firm grasp of one thing: the function. According to the new documentation, a function that uses a model declares a client and a prompt. In the structured extraction tutorial, ctx.output_format inserts instructions based on the return type, so you do not have to copy the schema into the prompt.
The benefit is having only one place to make changes. If the prompt holds one copy of the schema and the application code holds another, the two will drift apart sooner or later. When you come across a long prompt with a hand-pasted JSON sample, treat it as the first candidate for conversion to a type.
One complaint email, four fields
Take a made-up delivery company that wants to read complaint emails and open tickets automatically. One email says: “Order A17 arrived two days late, the box was dented, I want a refund.” Before writing a prompt, sit down with the customer service team and settle the output contract.
The sketch below uses neutral notation to show the structure. It is neither v0 nor v1 syntax and will not run as is:
TYPE Complaint
order_id : string or null
issues : list of (late, damaged, wrong_item, other)
request : refund, replace, info, unknown
evidence : list of string
FUNCTION ExtractComplaint(email: string) RETURNS Complaint
client : the model approved by the customer
prompt : read the email, do not guess missing values
email
ctx.output_format
To run your first function, take the syntax from the official tutorial in the new documentation, then replace its type and prompt with this sketch. If the client’s codebase uses v0, follow the v0 documentation.
For the A17 email, the desired object after parsing, written as JSON for readability, is:
{
"order_id": "A17",
"issues": ["late", "damaged"],
"request": "refund",
"evidence": ["arrived two days late", "the box was dented", "I want a refund"]
}
If issues accepts only one value, the system has to drop one of the two problems. That flaw lies in the schema, so switching models will not help.
The values null and unknown also deserve careful discussion with the client. Without them, you force the model to fill in something when an email lacks an order ID or states no request. Your first job on site is to collect a few of the hardest emails and ask the people who handle tickets what they would put in each field.
As for how the application calls the function, v0 generates baml_client from the BAML files and the application goes through that layer of code. When you inherit an old codebase, look for baml_client first, then trace back to the source function. Do not patch the generated code by hand.
Readable does not mean correct
Model output can stray slightly from the required format. In a post dated July 29, 2024, Gupta set out Schema-Aligned Parsing: write a parser that reads the text liberally, then apply error-correction techniques. The method addresses the step of turning text into data; whether the order ID is right still has to be checked separately.
Back at the delivery company, say you run 200 labeled emails. All 200 results match the type, but 30 have the wrong order ID.
The parse rate is then 100%, while accuracy on this field is only 85%. Report the first figure to the client and you set yourself up for an uncomfortable call later.
So keep the labeled sample set outside BAML and score each field. For order_id, add a check against the order system. Send cases that do not match to a person, and do not open a ticket automatically.
Which generation for this project?
The syntax of the two generations is not interchangeable. Announcing the Jev model integration on September 17, 2026, Sam Lijin made clear that it was for v1 and did not follow v0’s client block syntax. Before copying a sample, check which generation it belongs to.
| Sign | v0 | New system |
|---|---|---|
| Python package | baml-py |
baml-bridge, requires Python 3.10+ |
| Documentation | docs.boundaryml.com | developer.boundaryml.com |
| Status | Older DSL | Has breaking changes |
| Use when | The codebase already runs well with baml_client |
You are starting a new trial and the team accepts making fixes with each release |
One point to verify yourself: the baml-bridge description on PyPI says only “new system” and does not mention v1. Before installing, open the package description on PyPI and compare the package name with the installation section of the new documentation. If you are still unsure, ask Boundary directly and record the answer in the project’s README.
With the new system, you have to accept changing code from release to release. The canary 0.20.1 release of September 20, 2026 contained breaking changes. In 0.26.0, released on November 20, 2026, Boundary redesigned the CLI, so any script or CI job that calls the baml command is affected as well.
The sensible choice for most FDEs is to keep v0 where it is already running, try the new system on a small task with an evaluation set, and migrate only when the client’s team takes ownership of upgrades. Whichever you choose, pin the exact version and put a review date in the handover document. For v0, also ask Boundary about its support schedule.
Skills that outlast the tool
Learn type design first, then ctx.output_format, and only then the CLI. When reading job ads, search for phrases such as “structured output,” “evals” or “document extraction,” then read the job description closely to see whether the exercise above comes near it.
On your résumé, instead of writing “knows BAML,” say which fields you extracted, across how many samples, how many were correct and how you handled missing data.
Version numbers will keep jumping. A schema the customer service team has signed off on can move to any tool.
Was this article useful?
Thanks for the feedback!
14 sources
- GitHub - BoundaryML/baml
- Announcing BAML - The typesafe interface to LLMs, with built-in testing, guardrails and observability · 2023-11-25
- BAML v0 documentation (home)
- BAML v0 documentation: Python installation
- BAML v0: Basically a Made-up Language (README.v0.md)
- BAML v0 documentation: baml_client
- baml-py (PyPI JSON metadata)
- baml-bridge (PyPI JSON metadata)
- Functions · BAML Developer
- Structured extraction tutorial · BAML Developer
- Prompting vs JSON Mode vs Function Calling vs Constrained Generation vs SAP · 2024-07-29
- TypeSafe AI's Jev model is coming to BAML v1 · 2026-09-17
- BAML 0.26.0 · 2026-11-20
- BAML 0.20.1 · 2026-09-20