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
Switching from an image supported model to a non-image model breaks the thread #5101
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.'
I'm also facing the same issue. @KaviiSuri As a workaround, instead of the /export workflow, you can try /compact while still on an image-capable model. This summarizes the history, and truncates old messages, letting you continue your session with lighter models without API errors
I'm also facing the same issue. @KaviiSuri As a workaround, instead of the /export workflow, you can try /compact while still on an image-capable model. This summarizes the history, and truncates old messages, letting you continue your session with lighter models without API errors
Hey @Groszczu , nice workaround, but i'd still like this to not be a hassle tbh, compacting on every mode switch kinda degrades quality.
i'm not sure how issues get assigned here, but i might come up with a PR this weekend if i have some time to help out, would really love to have this work seemlessly
Activity
github-actions commentedon Dec 5, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
Groszczu commentedon Dec 5, 2025
I'm also facing the same issue.
@KaviiSuri As a workaround, instead of the
/exportworkflow, you can try/compactwhile still on an image-capable model. This summarizes the history, and truncates old messages, letting you continue your session with lighter models without API errorsKaviiSuri commentedon Dec 6, 2025
Hey @Groszczu , nice workaround, but i'd still like this to not be a hassle tbh, compacting on every mode switch kinda degrades quality.
i'm not sure how issues get assigned here, but i might come up with a PR this weekend if i have some time to help out, would really love to have this work seemlessly
rekram1-node commentedon Dec 6, 2025
Yeah ill tix this it isnt too difficult
rekram1-node commentedon Jan 21, 2026
should be fixed