Repository navigation
Conversation
Only close custom variable streams that actually emitted chunks so static values remain available to the response filter's variable-pool fallback.
|
All contributors on this pull request have signed the CLA. |
5 tasks done
Author
|
I have read the CLA Document and I hereby sign the CLA |
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.
Important
The contribution guidelines and existing open/closed issues and PRs were reviewed. This fixes the upstream cause of the Dify report below rather than adding a host-side workaround.
Related Issue
Fixes langgenius/dify#44141
Summary
Non-streaming custom tool variables are stored in node outputs but were also given empty stream-finalization events. ResponseStreamFilter treated those selectors as closed and skipped its variable-pool fallback, so an Answer node could have correct final graph output while its streamed/persisted reply omitted the variable value.
Track which custom variables actually emitted stream chunks, and emit final markers only for those variables. Keep standard text stream finalization and existing variable assignment/output types unchanged, including repeated assignments and empty streamed values.
Add regression tests covering:
Validation
en_core_web_smmodel; the complete suite then passed.Dify PR langgenius/dify#43986 applies the same empty-stream guard to Agent V2, but does not change ToolNode. This PR fixes the corresponding tool-node case described in langgenius/dify#44141.
Checklist
!CLA: not prompted at submission time; no signature is claimed.