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
[FEATURE]: Add supportsAttachments/vision capability for custom providers #8875
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem
Custom providers using @ai-sdk/openai-compatible cannot send image attachments to vision-capable models. Attachments
are silently stripped before the request is sent.
Root Cause
In internal/llm/models/, SupportsAttachments is hardcoded per-model for built-in providers only. Custom provider
models return empty from SupportedModels, defaulting SupportsAttachments to false.
The stripping happens in the agent code:
go
if !a.provider.Model().SupportsAttachments && attachments != nil {
attachments = nil
}
Use Case
I'm running a local OpenAI-compatible proxy (kiro-gateway) that supports vision. The proxy correctly handles images (
verified via curl), but opencode strips them before sending because it doesn't know the custom model supports
attachments.
Proposed Solution
Add a supportsAttachments (or capabilities.vision) option to custom provider model config:
The feature already exists in opencode - it's just not documented! closing this issue for now
The modalities config option is already supported.
"modalities": {
"input": ["text", "image"],
"output": ["text"]
}
The implementation is in provider.ts lines 760-764:
image: model.modalities?.input?.includes("image") ?? existingModel?.capabilities.input.image ?? false,
Add this to the custom provider section at https://opencode.ai/docs/providers/#custom-provider to make the users figure this easily 👍
Does this also work with "audio"?
(for Gemma4 models and others ...)
Activity
github-actions commentedon Jan 16, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
karthick-kk commentedon Jan 16, 2026
The feature already exists in opencode - it's just not documented! closing this issue for now
The modalities config option is already supported.
The implementation is in provider.ts lines 760-764:
Add this to the custom provider section at https://opencode.ai/docs/providers/#custom-provider to make the users figure this easily 👍
1saifj commentedon Feb 1, 2026
@karthick-kk worked thank you!
roadmap: #220 filed — Image/vision input is structurally impossible a…
roadmap: #220 filed — Image/vision input is structurally impossible a…
roadmap: #220 filed — Image/vision input is structurally impossible a…
roadmap: #220 filed — Image/vision input is structurally impossible a…
roadmap: #220 filed — Image/vision input is structurally impossible a…
roadmap: ultraworkers#220 filed — Image/vision input is structurally …
roadmap: ultraworkers#220 filed — Image/vision input is structurally …
roadmap: #220 filed — Image/vision input is structurally impossible a…
schoenid commentedon Jun 5, 2026
Does this also work with "audio"?
(for Gemma4 models and others ...)