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

Open
#40,894 1 comment 0 reactions 1 assignee View on GitHub

@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

  1. Confirmed the model is registered with "vision": true in the OmniRoute /v1/models endpoint.
  2. Sent the exact same local image directly to the OmniRoute proxy as a base64-encoded image_url data URI via curl, 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,<...>"}}
      ]
    }]
  }'
  1. 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-compatible provider (OmniRoute, local proxy at localhost: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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.