Conversation
This was referenced Sep 23, 2026
Open
Draft
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.
Blocking ordinary and structured-output LLM invocations dropped provider replay snapshots and discarded content arrays between text chunks.
Preserve the last non-null
opaque_body, retain mixed text and content blocks in order, and treat assistant state or tool calls as nonempty.Each call starts with fresh state, including after an earlier call captured a snapshot.
Both invocation APIs reuse the same chunk merger while retaining structured output, tool calls, and usage.
Agent strategies now reject an exhausted context before invocation instead of reducing the configured output budget below a thinking budget.
The check uses the configured parameter, its template alias, or its schema default and preserves valid small output budgets; it does not mutate model parameters.
The Function Calling and ReAct caller update is included in official-plugins #3919.
Closes #389.
Related: langgenius/graphon#260 and langgenius/dify-official-plugins#3916.
Validation:
just check,just test(303 passed, 1 skipped), andjust buildpassed.The skipped marketplace integration test requires the Dify CLI.
New regression tests use the real Session, request serialization, response parsing, and both stream modes of ordinary and structured-output invocation, with only the HTTP transport replaced.
They cover mixed content order, per-message and per-block JSON values and types, trailing empty chunks, and consecutive calls.
No provider API or deployed Dify environment was used.
Compatibility: the existing optional field and package version remain unchanged; no release version is invented by this change.
Agent contexts that cannot fit the configured or default output budget now fail explicitly instead of silently lowering the limit.
Token counts still use the existing local estimate.
Pure text still returns a string; responses containing content arrays now retain their blocks instead of dropping them.
Provider snapshots are internal replay state and are not appended to visible text.
Pull Request Checklist
Thank you for your contribution! Before submitting your PR, please make sure you have completed the following checks:
Compatibility Check
README.mdREADME.mdREADME.md— not applicable; this restores existing message fields.README.md— no version update is required for this fix.Available Checks
just buildhas passed