fix: #1176 normalize compacted Responses user messages before storing them#1181
fix: #1176 normalize compacted Responses user messages before storing them#1181
Conversation
🦋 Changeset detectedLatest commit: 300c5b8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
3ac1165 to
24c389a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ac1165f6e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95006d6dc6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This pull request resolves #1176 and fixes a regression where
OpenAIResponsesCompactionSessionstored rawresponses.compactuser message payloads instead of converting them back into the SDK's canonical session format. As a result, image-bearing user messages could be compacted successfully but later fail on the nextrun()because the serializer only accepts the protocolimage/fileshape, not rawimage_url/file_id.The change normalizes compacted user
input_imageandinput_filecontent before writing session history, preserving the documented Responses API contract while keeping session storage consistent with the rest of the SDK. It also adds regression coverage for compacted image messages and updates the root build pipeline to clear stale packagedist/artifacts before rebuilding sodist:checkvalidates only current outputs.