Skip to content

fix(vision): use native image input and retain uploaded originals - #941

Merged
ericleepi314 merged 1 commit into
mainfrom
fix/native-vision-upload-lifetime
Sep 17, 2026
Merged

ericleepi314 merged 1 commit into
mainfrom
fix/native-vision-upload-lifetime

Conversation

@ericleepi314

Copy link
Copy Markdown
Collaborator

Description

A web image upload was deleted immediately after attachment even though its temporary path remained in the prompt. A later Read or vision_analyze call therefore failed with “No such image file.” Vision-capable main models also received the optional analysis tool and could unnecessarily send the same image to a second model.

  • Preserve accepted uploads at their original resolution in the session's readable artifact directory before cleaning up the temporary upload. Persisted metadata points to the retained file; rejected uploads and failed writes do not leave accepted attachments.
  • Omit vision_analyze from native vision model requests, deferred-tool hints, ToolSearch results, and nano prompt tool lists. Keep the configured fallback available for text-only models, including fusion's base model.
  • If a stale conversation calls the tool after switching to a vision-capable model, return image pixels to that model without invoking another LLM.

The caption visible inside the reported preview is already present in the uploaded screenshot, along with its 09:15 timestamp. The web renderer continues to display the uploaded image bytes and a separate message bubble.

Validation

  • 707 targeted Python regression tests and 62 subtests passed across query assembly, tool discovery, image ingestion, vision analysis, nano mode, fusion, and gateway controls.
  • After adding an original-file size-limit check, all 56 image attachment control tests passed, including the new check against silent truncation.
  • The upload integration test removes the gateway temporary file, verifies the preserved original bytes, then reads it through the existing permission checks and vision loader.
  • Captured model requests verify that native vision models receive the image content without a vision-analysis tool schema or deferred-tool hint; model switching and stale-call behavior are covered.

New Feature Submissions

  • Explained the change and why it should be included.

All Submissions

Notify authors: @agentforce314, @ericleepi314

@ericleepi314
ericleepi314 merged commit 1efc170 into main Sep 17, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant