Repository navigation
fix: retain bounded tool images across later tool batches - #609
Draft
ldavis9000aws wants to merge 1 commit into
Draft
ldavis9000aws wants to merge 1 commit into
ldavis9000aws wants to merge 1 commit into
Conversation
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.
After an image-producing tool call, a later tool-call batch drops the earlier image from the next model request even though its artifact remains in graph state. OpenAI/Google artifact projection now replays validated URL-backed images from completed calls in the current user turn.
The current batch consumes the existing character budget first; earlier batches fill the remaining capacity newest-first and are emitted in chronological order. Replay preserves tool-source provenance, excludes orphan results and computer-call outputs, and leaves source messages unchanged. If context pressure prevents replay, the graph retries the latest batch alone before omitting artifact expansion, including final-format and fallback-provider checks.
Validation: 243 focused message/context tests and 205 tracing tests passed; TypeScript, scoped ESLint, import sorting, and the CJS/ESM/type build passed. Regression fixtures contain synthetic image content and generic read calls, including 20 preliminary tool batches, multiple images, bounded capacity, malformed and oversized inputs, serialization hooks, and preservation of the current image under context pressure.
Draft: managed-app live acceptance remains pending because MCP connection failures prevented a valid completed trial. No live vision acceptance or restored-session image rehydration is claimed. Large inline-image counting is an independent change in #603; this PR does not modify that repair or raise image allowances.