anomalyco / anomalyco/opencode
Vision: local image reads via Read tool fail with omniroute/cc provider, but same image works fine when sent directly as base64 to the proxy
@nexxeln is already working on this.
Since Aug 6, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Bug description
When using the Read tool to load a local image file, the model reports it cannot process the image ("this model does not support image input"), even though the active model (omniroute/cc/claude-sonnet-5) is registered as vision-capable.
Diagnosis performed
- Confirmed the model is registered with
"vision": truein the OmniRoute/v1/modelsendpoint. - Sent the exact same local image directly to the OmniRoute proxy as a base64-encoded
image_urldata URI viacurl, bypassing OpenCode entirely:
curl -s http://localhost:20128/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "cc/claude-sonnet-5",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "What do you see in this image?"},
{"type": "image_url", "image_url": {"url": "data:image/png;base64,<...>"}}
]
}]
}'
- Result: the proxy call succeeded and the model correctly described the image contents. Latency ~1.4s, cost ~$0.005, no errors.
Conclusion
The OmniRoute proxy and the underlying vision-capable model both work correctly. The bug is isolated to how OpenCode packages/sends the image content block when reading a local file via the Read tool with an openai-compatible custom provider (OmniRoute in this case) — the image content is either not being converted to the expected image_url/base64 format, or is being dropped before the request reaches the provider.
Environment
- OpenCode via custom
openai-compatibleprovider (OmniRoute, local proxy atlocalhost:20128) - Model:
omniroute/cc/claude-sonnet-5(registered as vision-capable by the provider) - OS: macOS (darwin)
Expected behavior
Reading a local image via the Read tool should work identically to sending the same image as a base64 image_url directly to the same provider/model, since the underlying model and proxy both support and correctly process vision input.
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.