opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Switching from an image supported model to a non-image model breaks the thread

Open KaviiSuri opened this issue 1 month ago • 4 comments

Description

When i plan out a project with something like Gemini 3.0 Pro or Opus 4.5, i send images to provide context around the UI or the wireframes. To 'build', i often switch to a cheaper model like GLM 4.6 or Kimi K2, which doesn't support image inputs.

OpenCode just throws 'Invalid API parameter, please check the documentation.' Error instead of ignoring images with a warning or generating a text description for those images and putting them in the context.

This makes the thread unusable with non-image models, and requires me to:

  1. do an /export
  2. copy paste the context into a new thread (that won't include images)
  3. start building with the lighter models

Would be amazing if we could handle this difference in modalities. would be happy to contribute/help out on this :).

Thank you so much for the work on OpencCode, it's my daily driver at this point.

OpenCode version

1.0.132

Steps to reproduce

  1. Use an image capable model like 'Gemini 3.0 Pro' or 'Claude Opus 4.5' in plan mode
  2. send images (wireframes/designs or just screenshot for inspirations) while planning
  3. switch to 'build' mode and select 'GLM 4.6' or any other non-image support model
  4. send any message
  5. observe that it throws 'Invalid API parameter, please check the documentation.'

Screenshot and/or share link

Image

Operating System

macOS 15.3.1

Terminal

Wezterm

KaviiSuri avatar Dec 05 '25 05:12 KaviiSuri