Troubleshooting · opencode
opencode: This Model Does Not Support Image Input — Fix
opencode silently replaces attached images with a note when the model's modalities are not declared. The one-line opencode.json declaration that turns image input on.
What you see
this model does not support image inputWhy it happens
- Custom provider models are not in the models.dev catalog, so opencode assigns them text-only default capabilities — regardless of what the model can actually do.
- With text-only capabilities, opencode replaces attached images with an in-band "this model does not support image input" note; the provider never receives the image at all.
- The modalities were declared but opencode was not restarted afterwards.
How to fix it
- Declare the image modality explicitly for the model in opencode.json and restart opencode.
- Once "image" is in modalities.input, pasted and attached images go out as standard Chat Completions image parts, which this gateway accepts.
Declare image input for the model
{
"provider": {
"apitoken": {
"models": {
"gpt-5.6-sol": {
"name": "GPT-5.6 Sol",
"attachment": true,
"modalities": {
"input": ["text", "image"],
"output": ["text"]
}
}
}
}
}
}Related searches
opencode image not sentopencode attachment ignored
FAQ
Why does the model answer as if it never saw my image?+
It never did. Without a declared image modality, opencode strips the attachment and sends a text note in its place — the request that reaches the provider is text-only.
Is this a provider limitation?+
No — it is a client-side capability gate. The same model accepts images as soon as the modality is declared in opencode.json.
Do other tools need this declaration?+
Only capability-gated clients. The wire contract is plain Chat Completions image parts, so ungated clients like the OpenAI SDKs need nothing extra.