fix: require messages input parameter in Agent component#10734
Merged
bogdankostic merged 7 commits intomainfrom Mar 5, 2026
Merged
fix: require messages input parameter in Agent component#10734bogdankostic merged 7 commits intomainfrom
messages input parameter in Agent component#10734bogdankostic merged 7 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
Author
|
Taking care of the tests, sorry for pinging too soon 🙇 |
bogdankostic
reviewed
Mar 5, 2026
julian-risch
approved these changes
Mar 5, 2026
Member
julian-risch
left a comment
There was a problem hiding this comment.
Looks good to me! We can discuss next week if we can solve the scheduling problem in a better way.
Comment on lines
-500
to
-505
| if messages is None and user_prompt is None and system_prompt is None: | ||
| raise ValueError( | ||
| "No messages provided to the Agent and neither user_prompt nor system_prompt is set. " | ||
| "Please provide at least one of these inputs." | ||
| ) | ||
|
|
Member
There was a problem hiding this comment.
No change request, just a remark: We could have still kept this to catch if a user explicitly passes messages=None but we don't need to catch that because messages = messages or [] handles that case.
Contributor
Author
There was a problem hiding this comment.
Fair, those always good to have in a dynamically typed language 😄
Will keep that in mind next time.
bogdankostic
pushed a commit
that referenced
this pull request
Mar 5, 2026
* fix: require messages in Agent component * fix: default to empty messages list in LLM component * docs: add release notes * test: add case to prove agentic pipeline execution failure * docs: update agent docstring to accurately represent requirement of messages input * tests: fix agent messages param * docs: add explicit bug reference in new test case
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
n/a
Proposed Changes:
It seems that making Agent's
messagesinput optional (see #10638) created unwarranted pipeline scheduling behavior when a static input was provided and its predecessors would fail to return any output (i.e. emptydict).As a quick fix, reverting seems like a reasonable way to go as the current behavior is faulty.
Future iterations could address the inner scheduling issue if deemed necessary and bring back optionality.
How did you test it?
Added a regression test in case we were to go that route again, making sure it passes would guarantee scheduling has no breaking behaviors in regards to Agent.
Notes for the reviewer
For a deeper explanation of the pipeline execution issues that arose, see #10728 (more specifically f4b2be4).
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.