Preserve supplied Responses fields in saved trajectories - #938
Merged
Merged
Conversation
bradhilton
force-pushed
the
thanos/responses-wire-serialization-20260922
branch
from
September 22, 2026 20:58
a138bf2 to
9236132
Compare
bradhilton
changed the base branch from
main
to
thanos/tinker-inference-lazy-20260922
September 22, 2026 21:00
bradhilton
force-pushed
the
thanos/tinker-inference-lazy-20260922
branch
from
September 22, 2026 23:45
51d071b to
aaf7410
Compare
bradhilton
force-pushed
the
thanos/responses-wire-serialization-20260922
branch
from
September 22, 2026 23:46
9236132 to
3bad3d9
Compare
bradhilton
changed the base branch from
thanos/tinker-inference-lazy-20260922
to
main
September 23, 2026 13:58
bradhilton
marked this pull request as ready for review
September 23, 2026 13:59
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.
Saving and reloading a Responses trajectory currently materializes SDK defaults that were absent from the provider response. A reasoning item without
statuscan therefore return asstatus: null, causing the next tool follow-up to be rejected. Serialize only supplied Responses fields while preserving explicitly supplied nulls, extra metadata, tool IDs, and encrypted reasoning content.The serializer is scoped to
ResponsesExchange; existing Chat serialization and the adopted Dynamo response validator remain intact. This PR is stacked on #937 (aaf74102) over current ART mainb66b3d67, preserving the adopted inference and planner changes.Validation: Python 3.12 AST and exact source-parity checks passed on
3bad3d90. The 28 focused cases cover compact/full Python and JSON persistence, nested include/exclude, explicit nulls, legacy tapes, and unchanged Chat output. Their source is unchanged from its previously qualified version; CI is pending on this new head. No native or provider execution was used for this rebase.