Jinja Prompt Templates Not Working
Last updated: March 6, 2026
Summary
Users attempting to use Jinja templating in Braintrust prompts may notice that:
Jinja expressions are not evaluated.
Prompt logic such as conditionals, concatenation, or fallback logic does not work.
The template behaves as if only Mustache syntax is supported.
Example:
{{ input.user or (input[0].content + input[1].content) or input }}Instead of evaluating the expression, the prompt may render incorrectly or behave like plain text.
Cause
Jinja prompt templating is supported only in Braintrust data plane version 1.1.29 or later.
If your deployment is running an earlier data plane version, the renderer will behave as Mustache-only, even if Jinja is selected in the UI.
This typically occurs in self-hosted deployments that have not been upgraded recently.
Resolution
Upgrade the Braintrust data plane to version 1.1.29 or later.
After upgrading:
Ensure Jinja is selected as the prompt syntax in the UI.
Re-run the prompt using your Jinja expressions.
Example fallback logic:
{{ input.user or (input[0].content + input[1].content) or input }}Once running on a supported version, the template will evaluate correctly.