Repository navigation
docs(local): propose sending images to vision models in chat - #2031
Conversation
|
@vintcessun is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@vintcessun thanks for this proposal, we are working on this currently. |
What
A proposal,
docs/proposals/chat-images.md(status: proposed), for sending an image from chat to a local model that reportsvision. Docs only. No code, and no Known-gaps lines change yet.It settles the two decisions #1991 leaves open:
{"text", "images": [{key, mime, size_bytes, sha256}]}, with the bytes as files under the workspace's folder, one folder per thread.imagesis present only when the turn carried any, so existing rows andmessage_text()are unchanged.And the choices those two force:
Messagegains a separateimagesfield instead of wideningcontenttostr | list[Part], so Studio and every text-only path do not change.for_template()drops images whennot can_see), and a conversation without images serialises byte-identically to today.reads_imageschecks only the projector, while the runtime'scan_seealso needs the template to take typed content, which llama.cpp decides by running the template in its own Jinja engine; nothing outside it can compute that. So the provider recordscan_seewhenever it reads/props(after an install and on the first turn after a load), and the badge and the composer use the recorded answer, falling back to the prediction before the first load. A turn with images for a model that cannot see gets a409with a sentence, never a silent drop.visiontoday; the remote manifest'smodalities.inputis the follow-up.Why
#1991 asks for a proposal first, to agree on the stored turn shape before code. The four implementation PRs are listed under Ship in the proposal.
Refs #1991
How to test
High-level PR Summary
This PR proposes a design for sending images to vision-capable local models in chat. The proposal document defines how images will be stored (as files with metadata in JSON, not inline base64), how history will handle them (resending only the most recent set of images), and how the system will determine model capability (runtime detection recorded after model load, not just catalog prediction). The design prioritizes backward compatibility by adding a separate
imagesfield toMessagerather than changingcontent, ensuring text-only models and existing conversations remain unchanged. The proposal is scoped to local models initially, with remote vision support deferred to follow-up work.⏱️ Estimated Review Time: 5-15 minutes
💡 Review Order Suggestion
docs/proposals/chat-images.md