Repository navigation
Image relay so models without vision (DeepSeek V4 Pro, GLM 5.3) can still read images #27245
Replies: 2 comments
|
I built this so the proposal can be judged against working code: https://github.com/JanEickholt/t3code/tree/feat/image-relay-v2 (rebased on current main, It does what the proposal describes. When the active model cannot see, images attached to a turn are replaced by a vision model's transcription inside an untrusted fence, and those sessions get a It is 40 files, +1723 lines, most of it tests. The new tool adds 421 bytes to the MCP tool list budget, so it would need the Is this direction and scope OK for a PR? |
|
will use https://github.com/alfaoz/opencode-see-image till it's out in t3, because I can route both models over opencode, assume opencode supports most people needs so this is somewhat low prio |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Would you take a PR that lets models without vision work with images, by having a vision model transcribe them first? I'd like to agree on scope before opening anything.
The problem
With more people trying T3 Code right now, plenty of them will pick cheap models like DeepSeek V4.1 Flash, GLM 5.3 or GLM 5.3-flash. None of them can read images. Paste a screenshot into one of those threads today and the turn either fails (ACP throws "ACP driver did not negotiate image prompt support") or the outcome depends on what the provider does with an image its model can't see. The
t3_thread_send_attachmentsdocs already say success doesn't mean the provider read them. Switching to a vision model just to look at one screenshot is the workaround, and it's annoying.What I have locally
A working prototype, not pushed anywhere yet.
startTurn/steerTurnwrapper inProviderSessionManager, so it covers every adapter at once. If the model can't see images, each image is swapped for a transcription before the adapter gets the turn.t3_image_describe(path plus an optional question). It only shows up in sessions whose model is known to be blind, through the sameEnabledWhengate the subagent-hidden tools use, so no other agent sees it. Blind models get a one-line hint on their first turn to use it instead of reading the file.describeImageoperation on the existing text generation runner, the one thread titles already use. No new HTTP client and no extra API keys. Only the Codex and OpenCode runners actually pass image bytes today, so only those can transcribe. The other runners would describe an image they never saw.capabilities.input). T3 used to drop that field. Now it lands in the model'sModelCapabilitiesasimageInput, so DeepSeek V4.1 Flash or GLM 5.3 get flagged before a session even starts. ACP agents report it through the negotiatedpromptCapabilities.image/supportsImagePrompts(the Grok opt-in from [orchestrator-v2] fix(orchestrator): Harden Grok v2 settlement, background task lifecycle, steer visibility, and images #3578). Some models accept image blocks at the protocol level but can't actually see them, so a per-instance model list insettings.jsonstays as an override..txtsidecar (same convention asDocumentText), so you can check exactly what the model got. Existing attachment cleanup already removes it.Tests mock the vision model and
vp run check:changedpasses. I haven't done a live run against a real blind model yet. That would come with the PR.Questions before a PR
AgentContextBudgetcounts every registered tool though, hidden or not, so the committed number still goes up by 421 bytes and the PR would need theagent-context-increaselabel. Is that fine?settings.jsononly for now (an app-levelimageRelayplus one per provider instance). Settings UI in the same PR, or later?I can cut this down to whatever you'd actually merge.
Edit: the tool is now gated per session and detection reads OpenCode's catalog, so question 2 changed from "is 421 bytes per agent OK" to the budget label question.
reference
All reactions