You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ERROR: Cannot read "X" (this model does not support image input). Inform the user. #54887
The model is not accepting image input, despite being vision capable.
Root cause: ~/.config/opencode/plugins/llama-discover.ts iterates llama.cpp's /models data[] array but checked entry.capabilities for "multimodal". That field only exists in the parallel models[] array — data[] entries never have it.
So the check is always false, and the model is always registered text-only. The correct field on data[] entries is architecture.input_modalities, which reports ["text","image","video"] on my server.
Plugins
No response
OpenCode version
v2.0.27
Steps to reproduce
1: Load up a model like unsloth/Qwen3.8-27B-GGUF that has image support.
2: Serve it with Llama.cpp.
3: Paste an image into the prompt
4: Watch the model parrot: "ERROR: Cannot read "X" (this model does not support image input). Inform the user." default from model-request.ts because it only reads the models registered capabilities.
Thanks for the report, and for finding the root cause!
It looks like the bug is in ~/.config/opencode/plugins/llama-discover.ts. That's a local plugin in your user config, not part of OpenCode itself, and OpenCode v2 has no built-in llama.cpp model discovery. The ERROR: Cannot read "X" (this model does not support image input) message is what OpenCode is meant to show when a model is registered without image input, and that's what the plugin does when it checks capabilities instead of architecture.input_modalities. Changing that check in the plugin should fix it for you.
To work out whether anything needs to change in OpenCode, could you tell us:
Where llama-discover.ts came from: did you write it, did OpenCode or another AI tool generate it, or is it from a third-party package or repo? If it's published somewhere, please link it, because the fix would go there.
Whether the error still happens with the plugin disabled and the llama.cpp model set up by hand in your OpenCode config with image input enabled. If so, please share that provider/model config (with API keys removed).
You can reply here, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.
These issues are related, ordered from most to least likely to be relevant:
Closing this for now, since we haven't heard back. The cause you found is in the local ~/.config/opencode/plugins/llama-discover.ts plugin, not in OpenCode. If the plugin reads architecture.input_modalities instead of capabilities, the model should be registered with image input.
If the error still happens with the plugin disabled and the model set up by hand with image input enabled, please comment with your OpenCode version and that provider/model config (with API keys removed). Please also say where the plugin came from. We can reopen this then. Thanks again for the detailed report!
Activity
opencode-agent commentedon Oct 12, 2026
Thanks for the report, and for finding the root cause!
It looks like the bug is in
~/.config/opencode/plugins/llama-discover.ts. That's a local plugin in your user config, not part of OpenCode itself, and OpenCode v2 has no built-in llama.cpp model discovery. TheERROR: Cannot read "X" (this model does not support image input)message is what OpenCode is meant to show when a model is registered without image input, and that's what the plugin does when it checkscapabilitiesinstead ofarchitecture.input_modalities. Changing that check in the plugin should fix it for you.To work out whether anything needs to change in OpenCode, could you tell us:
llama-discover.tscame from: did you write it, did OpenCode or another AI tool generate it, or is it from a third-party package or repo? If it's published somewhere, please link it, because the fix would go there.You can reply here, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.
These issues are related, ordered from most to least likely to be relevant:
vision: true), not a discovery plugininput_modalitiesopencode-agent commentedon Oct 15, 2026
Closing this for now, since we haven't heard back. The cause you found is in the local
~/.config/opencode/plugins/llama-discover.tsplugin, not in OpenCode. If the plugin readsarchitecture.input_modalitiesinstead ofcapabilities, the model should be registered with image input.If the error still happens with the plugin disabled and the model set up by hand with image input enabled, please comment with your OpenCode version and that provider/model config (with API keys removed). Please also say where the plugin came from. We can reopen this then. Thanks again for the detailed report!