ollama - 💡(How to fix) Fix Claude Code + Ollama /v1/messages?beta=true fails when Read tool reads PNG

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

API Error: 400 Input should be a valid string

RAW_BUFFERClick to expand / collapse

What is the issue?

Claude Code + Ollama /v1/messages?beta=true fails when Read tool reads PNG.

Direct top-level image content request to /v1/messages?beta=true works. Plain text Read works. PNG Read from Claude Code VS Code fails with: API Error: 400 Input should be a valid string

Ollama log: POST "/v1/messages?beta=true" 400

This looks like nested image content inside tool_result is not handled the same way as top-level user image content.

Relevant log output

OS

Windows

GPU

Other

CPU

Intel

Ollama version

0.24.0

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

ollama - 💡(How to fix) Fix Claude Code + Ollama /v1/messages?beta=true fails when Read tool reads PNG