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
Conversations hang after first response when provider returns a reasoning field (using Ollama/Qwen3) #34798
When using local thinking models on Ollama (e.g. Qwen3.6-35b), the model appears
to think but then stops and returns no response.
The @ai-sdk/openai-compatible SDK extracts the reasoning field from the response and re-sends it as reasoning_content in message history on the next turn. Ollama does not accept reasoning_content in
message history, causing the conversation to hang with no output returned to the user.
Plugins
None
OpenCode version
1.17.13
Steps to reproduce
Configure an Ollama provider with a thinking model (e.g. Qwen3.6-35b)
Start a session and send a message, like: "Explain in detail how distributed consensus algorithms work. Compare PBFT, Tendermint, and Raft protocols, their tradeoffs, fault tolerance models, and real-world applications. Walk through a concrete example of message ordering in each protocol."
Note that opencode just ends - as if it responded to you.
The underlying issue (the AI SDK's @ai-sdk/openai-compatible re-injecting reasoning_content into subsequent message history for providers that don't accept it) appears to be the same problem described in those issues, just observed with Ollama instead of Cerebras/DeepSeek/Kimi.
changed the title [-]Multi-turn conversations fail with Openai-compatible providers that return a reasoning field (e.g. Ollama/Qwen3)[/-][+]Conversations hang after first response when provider returns a reasoning field (using Ollama/Qwen3)[/+]on Jul 1, 2026
Activity
github-actions commentedon Jul 1, 2026
This issue might be a duplicate of existing issues. Please check:
reasoning_contentin assistant message history rejected on follow-up turns by providers that don't support it (Cerebras)reasoning_contentmust/must-not be replayed in history depending on the provider; multi-turn failures with OpenAI-compatible providersreasoning/reasoning_contentfields from prior turns are sent back in history to providers that reject themThe underlying issue (the AI SDK's
@ai-sdk/openai-compatiblere-injectingreasoning_contentinto subsequent message history for providers that don't accept it) appears to be the same problem described in those issues, just observed with Ollama instead of Cerebras/DeepSeek/Kimi.[-]Multi-turn conversations fail with Openai-compatible providers that return a reasoning field (e.g. Ollama/Qwen3)[/-][+]Conversations hang after first response when provider returns a reasoning field (using Ollama/Qwen3)[/+]twhittock commentedon Jul 9, 2026
This breaks all usage of reasoning models in my ollama-based environment - I am running a patched build (#36068) locally to work around this.
github-actions commentedon Sep 8, 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.