feat!: Update PromptBuilder and ChatPromptBuilder to set required_variables="*" by default#11344
Merged
Conversation
…h all optional inputs
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||
julian-risch
approved these changes
May 20, 2026
Member
julian-risch
left a comment
There was a problem hiding this comment.
Looks good to me. In particular, the level of detail in the migration guide with multiple options listed is great.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes:
After discussions with @julian-risch we believe its best to avoid components that have all optional inputs by default since this can often lead to seemingly unintuitive pipeline execution logic. It's what recently caused unexpected behaviors when we made the LLM and Agent component have all optional inputs for a short period of time.
So as part of this effort we thought it would be good to change the default behavior of PromptBuilder and ChatPromptBuilder to match ConditionalRouter in the sense that all jinja2 variables are required by default, but the user can still opt-in to make some optional.
I decided to minimize the breaking change by just changing the default value of required_variables.
How did you test it?
Updated existing tests
Notes for the reviewer
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.