Read tool sends no image content to custom ANTHROPIC_BASE_URL endpoints (clipboard-paste of the same file works)
preflight checklist
- [x] I searched existing issues. This is a distinct, isolated bug (not the broad, closed/not-planned feature request #35866) — it isolates a specific delivery-path failure with a clean discriminator.
- [x] Single bug report.
environment
- Claude Code 2.1.173 (native installer)
- macOS arm64 (Darwin 25.5)
ANTHROPIC_BASE_URL→ a local Anthropic-compatible proxy (verified with claude-code-router)- Model:
claude-opus-4-8(vision-capable)
summary
When the Read tool reads an image file, zero image content reaches the endpoint — the outgoing request carries the file only as a text filename. Pasting the same image into the prompt sends proper base64 image content blocks. Same model, same endpoint, same file — only the delivery path differs.
The model therefore receives no pixels, renders the image as blank, and frequently rationalizes the absence silently (e.g. "the screenshots are just renders of what I already have — no changes needed"). That silent-success behavior is especially dangerous for unattended/automated runs, because nothing surfaces that the image was never seen.
reproduction
- Point Claude Code at any Anthropic-compatible proxy that logs request bodies (e.g. claude-code-router).
- Ask Claude Code to
Reada.png/.jpgfile. - Inspect the outgoing request body at the proxy.
expected
The request includes a base64 image content block, e.g.:
{ "type": "image", "source": { "type": "base64", "media_type": "image/png", "data": "..." } }
actual
No image / base64 / image_url / media_type markers anywhere in the request. The file appears only as a text filename in tool args.
evidence (sanitized proxy-log grep)
Same image, same model, same endpoint — counting image markers in the outgoing request body:
# (A) image delivered via the Read tool:
$ grep -cE '"type":"image"|base64|image/png|image_url|media_type' proxy_request.log
0 # ← no image content transmitted; file is text-only
# (B) the SAME image pasted into the prompt instead:
$ grep -cE '"type":"image"|base64|image/png|image_url|media_type' proxy_request.log
3 # ← image content blocks present; routed to the vision backend, which describes it correctly
So the endpoint/model path handles vision fine (path B works end-to-end). The Read-tool path (A) is the one dropping the bytes, before the request leaves Claude Code.
impact
- Local / proxied / self-hosted vision setups can't use
Readon images at all. - Failure is silent: the model proceeds as if it saw the image and rationalizes the missing content, which can corrupt plans/output in unattended runs.
related
- #35866 — broader "read tool should reliably deliver image files" request (closed, not-planned). This report narrows it to a concrete, reproducible custom-endpoint bug with a paste-vs-Read discriminator.
- #18588 — Bedrock variant (image content not reaching the model).