| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found the following related PRs that are superseded by PR #23501:
These are not duplicates in the traditional sense—rather, PR #23501 is a combined fix that supersedes these three separate PRs, as explicitly stated in the PR description ("Supersedes: #16981, #21627, #21727"). This is the intended design where the current PR consolidates three related fixes into a single comprehensive change. |
Sorry, something went wrong.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
|
I hope this can be reviewed and merged soon. Right now Qwen 3.6 models are unusable for me with OpenCode. A major deal-breaker. |
Sorry, something went wrong.
…iders Custom OpenAI-compatible providers (Ollama, longent, etc.) were unable to process image attachments because capabilities.input.image defaulted to false. Now defaults to true for @ai-sdk/openai-compatible providers. Closes anomalyco#20802
- Add SSE timeout, connection reset, abort, and stream truncation patterns to retryable() matching for automatic retry - Classify 'SSE read timed out' as APIError(isRetryable: true) - Emit error event in flush() when stream ends without finish_reason while output is still active, instead of silently accepting truncation Closes anomalyco#20466
| Back | FazBrowse Home | New Git URL |
Issue for this PR
Closes #20802
Closes #5034
Closes #20466
Supersedes #16981, #21627, #21727
Type of change
What does this PR do?
Three fixes for OpenAI-compatible providers (Ollama, local models, custom endpoints).
1. Image support for custom providers (closes #20802)
Custom OpenAI-compatible providers could not process image attachments. capabilities.input.image defaulted to false for providers without explicit modalities declaration, so transform.ts filtered out image parts before they reached the existing conversion logic in convert-to-openai-compatible-chat-messages.ts.
Fix: one-line change — for @ai-sdk/openai-compatible providers, default image to true instead of false. The existing conversion logic already handles the rest.
2. System message handling for non-Anthropic providers (closes #5034)
Local models (Qwen, Llama, Ollama, DeepSeek via oMLX) reject multiple system messages with "Chat template error: System message must be at the beginning". OpenCode sends multiple system messages (agent prompts, plugins) which breaks these providers.
Fix: added systemMessage capability ('single' | 'multiple') to the provider schema. Anthropic keeps multiple system messages (existing behavior). All other providers merge system messages into a single message joined by \n. Also added reasoning_content field support alongside existing reasoning_text for DeepSeek/oMLX reasoning output.
3. Stream interruption handling (closes #20466)
OpenAI-compatible providers can interrupt SSE streams mid-response. Previously the truncated output was silently accepted as a complete response — no retry, no error.
Fix:
How did you verify your code works?
Screenshots / recordings
N/A — backend/provider fixes, no UI changes.
Checklist