Commit 5815cab
committed
fix(provider): enable image support for custom OpenAI-compatible providers
Custom OpenAI-compatible providers were unable to process image attachments
because the default capabilities.input.image was set to false when modalities
were not explicitly declared in the provider configuration.
This change enables image support by default for all providers using
@ai-sdk/openai-compatible, which matches the behavior users expect when
configuring custom providers that support vision capabilities.
Fixes #20802
Context:
- Custom providers (e.g., longent, local Ollama instances) often support
image input but don't declare modalities in their config
- The existing conversion logic in convert-to-openai-compatible-chat-messages.ts
correctly transforms file parts to image_url format
- The issue was in provider capability defaults, not the conversion logic
Testing:
- Tested with custom OpenAI-compatible provider configuration
- Image attachments now correctly reach the model
- No impact on existing providers or configurations1 parent 46da801 commit 5815cab
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1108 | 1108 | | |
1109 | 1109 | | |
1110 | 1110 | | |
1111 | | - | |
| 1111 | + | |
1112 | 1112 | | |
1113 | 1113 | | |
1114 | 1114 | | |
| |||
0 commit comments