GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Conversations hang after first response when provider returns a reasoning field (using Ollama/Qwen3) · Issue #34798 · anomalyco/opencode

Conversations hang after first response when provider returns a reasoning field (using Ollama/Qwen3) #34798

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Conversations hang after first response when provider returns a reasoning field (using Ollama/Qwen3)#34798
Copy link
Assignees
nexxeln

Description

@fenrir-labs76
fenrir-labs76
opened on Jul 1, 2026
Issue body actions

Description

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

  1. Configure an Ollama provider with a thinking model (e.g. Qwen3.6-35b)
  2. 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."
  3. Note that opencode just ends - as if it responded to you.

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04 LTS

Terminal

Ghostty

Reacted by twhittock

Activity

  1. github-actions
    assigned
    nexxeln
    on Jul 1, 2026
  2. github-actions commented on Jul 1, 2026

    @github-actions
    github-actionsBot
    on Jul 1, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • Cerebras zai-glm-4.7 fails on follow-up turn with reasoning_content #26762: Same root cause — reasoning_content in assistant message history rejected on follow-up turns by providers that don't support it (Cerebras)
    • DeepSeek V4: reasoning_content 400 error persists on v1.14.31 — complete fix exists in unmerged PRs #25311: Same root cause — reasoning_content must/must-not be replayed in history depending on the provider; multi-turn failures with OpenAI-compatible providers
    • Bug: 400 Error (Extra inputs not permitted) when sending 'reasoning' field in chat history for kimi-k2.6 #27852: Same root cause — 400 errors when reasoning/reasoning_content fields from prior turns are sent back in history to providers that reject them

    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.

  3. fenrir-labs76
    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
  4. twhittock commented on Jul 9, 2026

    @twhittock
    twhittock
    on Jul 9, 2026
    More actions

    This breaks all usage of reasoning models in my ollama-based environment - I am running a patched build (#36068) locally to work around this.

  5. github-actions commented on Sep 8, 2026

    @github-actions
    github-actionsBot
    on Sep 8, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  6. github-actions
    closed this as not plannedon Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @nexxeln
    nexxeln

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.