anomalyco / anomalyco/opencode

[BUG] OpenCode Go DeepSeek V4.1 Flash intermittently returns reasoning-only responses after model ID migratio

Open
#48,419 1 comment 0 reactions 1 assignee View on GitHub

@fwang is already working on this.

Since Sep 11, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

After OpenCode Go changed the DeepSeek model ID from opencode-go/deepseek-flash to opencode-go/deepseek-v4.1-flash, I started seeing intermittent empty responses in existing sessions.

I reproduced this independently on two Linux servers.

When the problem occurs, OpenCode persists a reasoning part but no text part. The reasoning sometimes contains both the internal planning and what is clearly the complete final user-facing answer, concatenated together.

The turn then ends normally with finish: stop.

For example, the persisted structure is:

step-start
reasoning
step-finish

instead of the normal:

step-start
reasoning
text
step-finish

Restarting OpenCode or the server does not reliably fix it. However, after several more messages in the same session using deepseek-v4.1-flash, responses eventually return to normal without any configuration change.

This happened on both servers specifically after switching existing sessions from deepseek-flash to deepseek-v4.1-flash.

I have not captured the raw OpenCode Go SSE response, so I cannot tell whether the final content is already missing upstream or whether it is being classified as reasoning inside the OpenCode/OpenCode Go pipeline.

Plugins

None relevant to the issue.

OpenCode version

1.18.30

Steps to reproduce
  1. Use an existing OpenCode session with opencode-go/deepseek-flash.
  2. Switch the session/agent model to opencode-go/deepseek-v4.1-flash.
  3. Continue chatting in the same session.
  4. In some of the first several turns, the response is empty.
  5. Inspect the persisted session data in ~/.local/share/opencode/opencode.db.
  6. The affected assistant message contains a reasoning part but no text part and finishes with stop.
  7. Continue sending messages without restarting or changing configuration.
  8. After several turns, normal reasoning -> text responses eventually resume.

Observed independently on two Linux servers(Ubuntu 24.04).

Screenshot and/or share link

No public share link because the affected sessions contain private conversation history.

I can provide sanitized SQLite session records if needed.

Operating System

Ubuntu 24.04

Terminal

bash

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.