Repository navigation
Conversation
This was referenced Oct 21, 2026
Draft
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.
Summary
Part of #41092; replaces the closed, unmerged #41095 with the joint upgrade against current main.
Agents rebuild provider responses from visible text, losing signed/encrypted state and ordered content blocks during tool turns and later history restoration.
Preserve complete messages in legacy Function Calling/CoT, workflow Agent strategies, and Agent v2; extract text only at display or text-parsing boundaries.
Legacy Agent thoughts store provider/model-scoped messages in the new nullable
model_messagescolumn.Workflow Agents store the reserved
model_historysnapshot in execution process data and remove it from public node outputs.History reads validate tenant, app, workflow run, node, provider, and model ownership.
Agent v2 retains original Dify content in its existing serialized provider details while Pydantic AI remains the owner of native tool calls.
Changed providers/models use the existing visible-message fallback, and incomplete saved tool calls receive interrupted results.
History trimming retains complete conversation turns, including tool observations and retrieval images.
Structured output accepts text contained in content blocks.
The existing Graphon result accumulator replaces duplicated stream aggregation.
Dependencies and release gates
This draft is blocked on publication of its Graphon dependency.
The API and Agent v2 locks select Graphon candidate
bfeca97726f91eab257e513357b72d456de851b2, containing merged #261, #344, and the public incremental accumulator change.That candidate is currently local: lock generation and frozen installation used a local Git mirror of the exact commit.
It must be published before a remote checkout can install these dependencies.
The current Main CI, Docker build, autofix, and both Pyrefly workflows stop at dependency installation with
upload-pack: not our ref bfeca977....The Graphon candidate must become reachable before these checks can run.
The coordinated release also needs SDK #390, daemon #828, official plugins #4034, and #4035.
Replace review Git pins with the selected published releases and set the official plugins' minimum Dify versions when the target version is confirmed.
Validation
The provider endpoints supplied controlled responses; no paid model service was called.
Vendor cryptographic signature acceptance, production deployment, and the repository-wide Dify integration suite remain release checks.
Screenshots
Not applicable: backend behavior only.
Checklist
From Codex