Repository navigation
[codex] Add render_null_as output format option - #3822
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new Changesrender_null_as option for output format rendering
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⏭️ Performance benchmarks were skippedPerf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to To run them on this PR, do any of the following, then push a commit (or re-run CI):
|
|
No description provided. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1299e67. Configure here.
Bump version to 0.223.0 ❌ Typescript integ tests ❌ Python integ tests Generated by bump-version script. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Mechanical version and generated-client updates; no application logic changes appear in this diff beyond release metadata. > > **Overview** > Releases **0.223.0** by aligning workspace and client package versions from **0.222.0** to **0.223.0** (Rust workspace, `Cargo.lock`, Go/Python/Ruby/TypeScript bindings, Zed extension, and integ-test generators plus regenerated `baml_client` artifacts). > > **CHANGELOG** and **fern/pages/changelog.mdx** document the user-facing addition: **`render_null_as`** output format option (BoundaryML#3822), bundled with this version bump. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 665d406. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added `render_null_as` output format option * **Chores** * Updated version to 0.223.0 <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
…ne trap Classification: version-drift + new-feature + fresh Sources: https://pypi.org/pypi/baml-py/json (0.223.0, 2026-06-23) https://registry.npmjs.org/@boundaryml/baml/latest (0.223.0) https://github.com/boundaryml/baml/blob/canary/fern/pages/changelog.mdx BoundaryML/baml#3822 - SDK 0.222.0 -> 0.223.0 across the header, GitHub, PyPI and npm rows. - ctx.output_format(render_null_as="omit") added to SKILL.md's tunables (PR #3822, shipped 0.223.0). In scope: ctx.output_format is a named trigger in the skill's own description. - Documented the two-version-line trap: the repo now cuts baml-language-0.NN.N releases (0.15.0, 2026-07-14) plus per-commit nightlies for the baml_language compiler workspace, so `gh release list` reports a 0.15.x nightly as isLatest. A future freshen reading that as "the version" would downgrade a 0.22x SDK pin. - canary-features.md reframed: the 0.221.0 set has SHIPPED, so the load rule moves from audience-based ("only inside the BAML repo") to feature-based ("project pins baml-py>=0.221"). Closes a backlog item carried since 2026-05-28. - Re-stamped 4 docs.boundaryml.com rows to 2026-07-21 (all fresh). WebFetch renders the Mintlify SPA pages, which the previous pass had recorded as impossible -- that blocker was wrong. Co-Authored-By: Claude Opus 4.8 <[email protected]>

Summary
Adds a
render_null_asoption toctx.output_format(...)so nullable schema members can render a custom marker such asomitinstead ofnull.This is wired through both output-format implementations:
engine/baml-lib/jinja-runtimefor the existing engine runtime and Jinja type checkerbaml_languagefor the newersys_llmrenderer, legacy Jinja kwargs, typedctx.output_format_with(...), and template type checkingImpact
Prompt authors can write:
{{ ctx.output_format(render_null_as='omit') }}or, in prompt tags:
${ctx.output_format_with(render_null_as = "omit")}and nullable fields render like
string or omit, which gives models an explicit omit-key instruction surface.Validation
cargo nextest run -p sys_llm output_formatcargo nextest run -p sys_jinja_types test_output_formatcargo nextest run -p bex_engine test_output_format_can_render_null_as_omitcargo nextest run -p baml_tests prompt_output_format_with_can_render_null_as_omitcargo nextest run -p baml_tests __baml_std__::test_03_hircargo nextest run -p baml_tests __baml_std__::test_06_codegencargo nextest run -p internal-baml-jinja output_formatcargo nextest run -p internal-baml-jinja-types test_output_formatNote
Low Risk
Additive, optional prompt-schema rendering change with no auth or response-parsing behavior; risk is mainly inconsistent wording if one runtime path were missed, which tests cover.
Overview
Adds optional
render_null_ason parameterized output-format rendering so nullable schema text can use a custom token (e.g.omit) instead ofnull.Exposed on
Context.output_format_with(...)and Jinjactx.output_format(render_null_as='…'), with the option threaded throughsys_llm/sys_opsand the legacyengine/baml-lib/jinja-runtimerenderer. Nullable unions, bare null types, and related media instructions now substitute the chosen label in rendered prompts.Jinja type checkers accept
none | stringfor the kwarg; new engine,baml_tests, andsys_llmtests assert schemas likenickname: string or omit,.Reviewed by Cursor Bugbot for commit 515f318. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
render_null_assupport to output-format schema rendering, letting you customize hownullis worded for nullable fields (e.g., rendering as"omit"instead of the default).render_null_asthrough template helpers and rendering APIs, with validation to accept onlynone/nullor a string value.render_null_asvalues are rejected.