[PR #3093] feat: guard unsupported attachments #10532

Closed
opened 2026-02-16 18:15:12 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3093

State: closed
Merged: No


Motivation

Sometimes, I switch between Grok 4 Fast and Grok Code Fast 1. If the planning part had images or I accidentally added an image, the session gets botched and I have to start from fresh.

Summary

  • align provider schema with models.dev to expose modalities and related metadata
  • skip unsupported binary attachments before hitting models and annotate chat history
  • warn TUI users when current model cannot consume attached media and update SDK types
Before After
Screenshot 2025-10-11 at 15 14 46 Screenshot 2025-10-11 at 15 17 42
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3093 **State:** closed **Merged:** No --- ## Motivation Sometimes, I switch between Grok 4 Fast and Grok Code Fast 1. If the planning part had images or I accidentally added an image, the session gets botched and I have to start from fresh. ## Summary - align provider schema with models.dev to expose modalities and related metadata - skip unsupported binary attachments before hitting models and annotate chat history - warn TUI users when current model cannot consume attached media and update SDK types | Before | After | |--------------|--------------| | ![Screenshot 2025-10-11 at 15 14 46](https://github.com/user-attachments/assets/1cdf1ec5-d02f-4204-b71f-62af974f0a19) | ![Screenshot 2025-10-11 at 15 17 42](https://github.com/user-attachments/assets/ed7afdb6-96e1-44df-a728-dc78342e4c69) |
yindo added the pull-request label 2026-02-16 18:15:12 -05:00
yindo closed this issue 2026-02-16 18:15:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10532