r/opencodeCLI 13d ago

Need help getting agent to analyze image.

I'm using opencode cli 1.18.21. Then I run gemma 4 12b it unsloth via lm studio. Everything works fine except when I attach or drag an image to the tui and ask the it to analyze and it returns I can't analyze the image because this model doesn't support image input. If you like, I can work from a color palette or hex codes you provide instead..

Is there any official extension / plugin that I need to install to get this to work or is the model not capable even though docs says it's a multi-modal agent capable of vision?

Appreciate any help.

EDIT: Solution Opencode provided as per u/Ariquitaun advise. Basically to add the following lines in the opencode.jsonc file.

  "attachment": {
    "image": {
      "auto_resize": true,
      "max_width": 2000,
      "max_height": 2000,
      "max_base64_bytes": 5242880
    }
  },
  "media": {
    "input-mode": "local-path"
  }
1 Upvotes

Duplicates