Skip to content

fix: preserve nullable tool parameter schemas - #573

Merged
blove merged 3 commits into
mainfrom
blove/fix-nullable-tool-schema
Sep 10, 2026
Merged

blove merged 3 commits into
mainfrom
blove/fix-nullable-tool-schema

Conversation

@blove

@blove blove commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Tool parameters declared as nullable lost null during schema generation, causing valid nullable inputs to fail runtime validation. This change emits explicit null alternatives and validates them in the LangChain adapter while preserving required versus optional fields and existing non-null conversion behavior.

Includes regression coverage for nullable primitives, string literals, arrays, objects, nested fields, standalone null, and rejection of unrelated values. Updated to current B4.run contracts with a patch changeset for @b4run/core and @b4run/langchain.

Validation: workspace build passed (25 tasks); focused schema and converter tests passed (56 tests); independent diff review found no blocking regressions. Full checks are running on the refreshed branch and must pass before merge.

Existing limitation: numeric and boolean literal constraints are widened by the existing compiler/converter. This PR preserves that behavior; exact literal validation is tracked as follow-up under #605.

Part of #605.

@vercel

vercel Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
b4-run Ready Ready Preview Sep 10, 2026 6:15am UTC
dawnai Ready Ready Preview Sep 10, 2026 6:15am UTC

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@blove
blove enabled auto-merge (squash) September 10, 2026 06:32
@blove
blove merged commit 6039fd2 into main Sep 10, 2026
29 of 30 checks passed
@blove
blove deleted the blove/fix-nullable-tool-schema branch September 10, 2026 06:33

This branch was successfully deployed

1 active and 1 inactive deployments
Preview — 26ed3705 Deployed Sep 10, 2026 by vercel[bot]
vercel-preview — 26ed3705 Deployed Sep 10, 2026 by blove via vercel-native #1756
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant