anomalyco / anomalyco/opencode
[FEATURE]: Transcribe images to text when the selected model has no vision support
@kitlangton is already working on this.
Since Sep 10, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
When the selected model does not support image input and I paste a screenshot, the request fails with:
ERROR: Cannot read "<file>" (this model does not support image input). Inform the user.
I then have to retype the screenshot contents by hand.
Proposal: if the prompt contains an image and the selected model cannot read images, transcribe the image to text with a vision-capable model and inject that text into the request. The selected model stays unchanged, and the image stays visible in the UI. No error is shown to the user.
Fallback order:
experimental.vision_modelconfig override, if set.- A vision-capable model from the same provider as the selected model.
The image must never be sent to a different provider than the selected one. A fully local OCR fallback for providers with no vision model at all is tracked separately in #48333.
Related work: this is narrower than #46794 (which proposes switching the active model) and complements #42758 (images degrade to a placeholder).
Out of scope for the first PR: PDF/audio/video, media inside tool results, and the V2 session runner (V1 is the live path today).
I have a working prototype of the V1 path with tests and can open a PR after a design review.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.