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
Custom OpenAI-compatible provider via LiteLLM is incorrectly classified as text-only / no-reasoning and blocks image input #22673
When I configure a custom OpenAI-compatible provider in OpenCode using a corporate LiteLLM gateway, OpenCode immediately classifies the models as text-only and no-reasoning in the UI.
Because of that, image input is blocked in OpenCode with an error saying the model does not support image input.
However, the exact same base URL, API key, and models work correctly in Roo Code inside VS Code, including image understanding.
This suggests the problem is in OpenCode's capability/modality detection or attachment handling for custom OpenAI-compatible providers, not in the backend provider or model itself.
Environment:
OS: Windows 10
OpenCode version: OpenCode Desktop v1.4.6
Provider type: custom OpenAI-compatible provider
Backend: LiteLLM
Base URL: https://litellm.ai-portal.my_company.com
Models tested:
claude-sonnet-4-6
gpt-5.3-codex
deepseek-v3.2
What works:
authentication works
model listing works
text requests work
What fails:
OpenCode classifies the models as text-only / no-reasoning
image input is blocked in OpenCode
Important comparison:
The exact same base URL, API key, and models work correctly in Roo Code in VS Code, including image understanding.
Plugins
No response
OpenCode version
OpenCode Desktop v1.4.6
Steps to reproduce
Add a custom OpenAI-compatible provider in OpenCode.
Use base URL: https://litellm.ai-portal.my_company.com
Enter a valid API key.
Add models such as:
claude-sonnet-4-6
gpt-5.3-codex
deepseek-v3.2
Open the model picker / provider UI.
Observe that OpenCode marks these models as:
Allowed: text
No reasoning
Start a chat with one of these models.
Attach an image and ask the model to analyze it.
Screenshot and/or share link
Attached screenshots show:
OpenCode marks the custom-provider model as "Allowed: text" and "No reasoning"
OpenCode rejects image input for the same provider/model
The same provider and model work with image input in Roo Code
Thanks. I considered that, but this seems not to be only an opencode.json issue.
The same OpenAI-compatible endpoint and models accept image input in another client, while OpenCode classifies them as text-only / no-reasoning immediately after setup.
That suggests the limitation is in capability detection / provider mapping for custom LiteLLM providers, not just in user configuration.
If OpenCode expects explicit capability flags in opencode.json, could you share the exact supported fields and an example for enabling vision + reasoning for a custom provider?
If absent (the default when users register a custom model), capabilities.input.image evaluates to false and opencode strips image attachments client-side before the request is sent — which matches your "classified as text-only / blocks image input" symptom exactly.
Minimal config to unblock vision for your LiteLLM-backed models:
Activity
freelanceagent1 commentedon Apr 17, 2026
you should define those in opencode.json
no?
Promental commentedon Apr 18, 2026
Thanks. I considered that, but this seems not to be only an
opencode.jsonissue.The same OpenAI-compatible endpoint and models accept image input in another client, while OpenCode classifies them as text-only / no-reasoning immediately after setup.
That suggests the limitation is in capability detection / provider mapping for custom LiteLLM providers, not just in user configuration.
If OpenCode expects explicit capability flags in
opencode.json, could you share the exact supported fields and an example for enabling vision + reasoning for a custom provider?XIYBHK commentedon Apr 21, 2026
The field is
modalitieson each model entry. Capability detection inpackages/opencode/src/provider/provider.tsreads it as:If absent (the default when users register a custom model),
capabilities.input.imageevaluates tofalseand opencode strips image attachments client-side before the request is sent — which matches your "classified as text-only / blocks image input" symptom exactly.Minimal config to unblock vision for your LiteLLM-backed models:
Restart opencode (capability cache is built once at startup, not hot-reloaded).
See #20802 for the full root-cause writeup — this is the same gating check manifesting across every custom
@ai-sdk/openai-compatibleprovider.github-actions commentedon Jul 5, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.