Summary
On OpenCode v2.0.20, reading a PNG with amazon-bedrock/global.openai.gpt-6-sol succeeds, but the following model request fails with an image-field error. The same PNG attached directly to a user message does not produce that error.
Environment
- opencode version: v2.0.20
- OS: macOS (Darwin 25.6.0, arm64)
- Terminal:
TERM=xterm-256color, COLORTERM=truecolor; TERM_PROGRAM unset
- Shell:
/bin/zsh
- Install/channel: v2.0.20 release
- Active plugins: None found in global configuration or the isolated reproduction directory
Reproduction
- Create a valid PNG at
/path/to/test.png.
- Run:
opencode run --standalone \
--model amazon-bedrock/global.openai.gpt-6-sol \
'Use the read tool to open /path/to/test.png and say what color it is. Do not use other tools.'
- Observe that
Read completes, then the model request fails.
Expected Behavior
Sol processes the image returned by read and answers the question.
Actual Behavior
Sanitized output (local PNG filename replaced with test.png):
> build · global.openai.gpt-6-sol
→ Read test.png
Error: This model doesn't support the image field for user messages. Remove image and try again.
The command exits with code 1. In a separate control run, supplying the same PNG with opencode run --file /path/to/test.png completed without this image-field error.
Additional Context
Summary
On OpenCode v2.0.20, reading a PNG with
amazon-bedrock/global.openai.gpt-6-solsucceeds, but the following model request fails with an image-field error. The same PNG attached directly to a user message does not produce that error.Environment
TERM=xterm-256color,COLORTERM=truecolor;TERM_PROGRAMunset/bin/zshReproduction
/path/to/test.png.opencode run --standalone \ --model amazon-bedrock/global.openai.gpt-6-sol \ 'Use the read tool to open /path/to/test.png and say what color it is. Do not use other tools.'Readcompletes, then the model request fails.Expected Behavior
Sol processes the image returned by
readand answers the question.Actual Behavior
Sanitized output (local PNG filename replaced with
test.png):The command exits with code 1. In a separate control run, supplying the same PNG with
opencode run --file /path/to/test.pngcompleted without this image-field error.Additional Context
toolResult.content: https://github.com/anomalyco/opencode/blob/v2.0.20/packages/ai/src/protocols/bedrock-converse.ts#L288-L319