fix(responses): preserve tool images and bound inline media - #3365
Merged
Conversation
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
Preserve images returned by Responses tool outputs as multimodal model input while bounding inline image memory and removing historical inline media before replay or session caching.
Closes #3354.
Closes #3355.
Depends on #3362. This is a stacked PR; its new behavior is contained in one independent commit and the displayed diff will narrow after the prerequisite PR merges.
Changes
{ "content": ... }tool outputs.inlineDataparts.Files
src-tauri/src/proxy/handlers/openai.rssrc-tauri/src/proxy/http_session_store.rssrc-tauri/src/proxy/mappers/openai/request.rssrc-tauri/src/proxy/adapters/apply_patch_preflight.rsTests
cargo test --manifest-path src-tauri/Cargo.toml --offline --lib proxy::handlers::openai::stream_peek_testsinlineData, text-only compatibility, pure-image history placeholders, case-insensitive data-URL metadata, per-image and aggregate byte limits, 16-image limits, and pruning historical images before validating the latest user turn.git diff --checkpassed.Compatibility
data:image URLs. Remote image URL behavior is unchanged and is not claimed as directly tested here.