Skip to content

ERROR: Cannot read "X" (this model does not support image input). Inform the user. #54887

Closed as not planned

Description

@filson1

Description

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.

Screenshot and/or share link

No response

Operating System

CachyOS x86_64.

Terminal

Alacritty, Gnome, any old fish terminal.

Activity

  1. opencode-agent commented on Oct 12, 2026

    @opencode-agent
    Contributor

    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:

    1. 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.
    2. 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:

  2. opencode-agent commented on Oct 15, 2026

    @opencode-agent
    Contributor

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions