Repository navigation
Conversation
Contributor
|
@emme1t is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Hi @emme1t, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
HaystackBot
marked this pull request as draft
October 22, 2026 17:27
HaystackBot
marked this pull request as ready for review
October 22, 2026 18:12
Contributor
|
Thanks for signing the CLA, @emme1t! 🎉 This PR is now ready for review again and the reviewer has been re-assigned. |
6 of 7 tasks
This branch has not been deployed
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
Follow-up bug fix for the structured output hook introduced in #13240.
Proposed Changes:
When an Agent declares
structured_outputaslist[str], the default state handler concatenates each write. An invalid reply followed by["Paris"]therefore returns[None, "Paris"]; exhausted retries return a list ofNonevalues. Initial state values also remain in the result.Use replacement semantics for all three structured output writes. The final state now contains the exact validated result, or
Nonewhen parsing fails or the reply is truncated. Update the documentation and add a release note covering custom state handlers.Minimal reproduction:
How did you test it?
17a0e39.hatch run test:unit test/hooks/structured_output test/components/agents/test_agent_hooks.py test/components/agents/test_state_class.py -q --no-cov: 149 passed on Python 3.14.5.hatch run test:types haystack/hooks/structured_output/hooks.py test/hooks/structured_output/test_hooks.py: passed.RootModel, retries, exhausted retries, truncated replies, existing state, and async execution.Notes for the reviewer
The hook overrides the output field's handler so its value retains the validated shape. Applications that collect multiple structured responses can accumulate the returned Agent outputs separately.
Checklist
This contribution was generated with AI assistance and validated with the checks listed above.
Astra辅助