Switching from an image supported model to a non-image model breaks the thread
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:
- do an /export
- copy paste the context into a new thread (that won't include images)
- 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
- Use an image capable model like 'Gemini 3.0 Pro' or 'Claude Opus 4.5' in plan mode
- send images (wireframes/designs or just screenshot for inspirations) while planning
- switch to 'build' mode and select 'GLM 4.6' or any other non-image support model
- send any message
- observe that it throws 'Invalid API parameter, please check the documentation.'
Screenshot and/or share link
Operating System
macOS 15.3.1
Terminal
Wezterm