Skip to content

Truncated model response for OpenCode Go models #41582

Closed as not planned
Closed as not planned

Description

@99991

Description

Today, many OpenCode Go models interrupt their response mid-stream. I've observed this for DeepSeek-V4-Pro, Kimi-K3 and MiMo-V2-Pro. Other users report this issue for DeepSeek-V4-Flash.

I am using the streaming API with my own client, so this is a server issue. I did not see any suspicious streaming packages in terms of "data: ..." chat.completion.chunks. The server simply closes the HTTP connection mid-stream. This also happens in the middle of tool calls, which results in invalid JSON.

The following issues are somewhat related, but not quite the same:

Plugins

NA

OpenCode version

NA

Steps to reproduce

  1. Use any model
  2. Write a prompt that results in a long response
  3. Response stops after 3 to 5 minutes

Screenshot and/or share link

Incomplete reasoning

Image

Incomplete tool call

Image

Operating System

NA

Terminal

NA

Activity

  1. github-actions commented on Aug 10, 2026

    @github-actions
    Contributor

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

    You already linked #41528, #39393, #39582, and #39881 — those are the closest ones. The issues above are additional related threads that may provide context or be worth consolidating with.

  2. aleksmaksimovic commented on Aug 12, 2026

    @aleksmaksimovic

    Actually, this is not only the case for OpenCode Go models. We hosted qwen3.6 27B locally on our H200 GPU server, and then connected it with OpenCode.

    The outcome is basically the same; output gets truncated in the middle of the response.

  3. 99991 commented on Aug 12, 2026

    @99991
    Author

    We hosted qwen3.6 27B locally on our H200 GPU server, and then connected it with OpenCode.

    You are likely dealing with a different issue from the one I described.

    In your case, your problem lies either within your serving framework (which one are you using? SGLang/vLLM/llama.cpp/ollama/...?) or within the OpenCode agent software from this repository. Either way, you should have all the tools you need to track down the root cause of your error, since you are running all the software yourself.

    First, try reproducing the error you are observing with just the streaming API (i.e. without OpenCode application). If it still happens, you have narrowed it down to your server. and you can open an issue on their GitHub. It might help to set the random seed to a fixed value and temperature to 0 to get deterministic output. If it is a load issue, try many parallel requests (might result in non-deterministic output though). Otherwise, it might be an issue with OpenCode, where things are more difficult to reproduce.

    In my case, I am not using the OpenCode application at all. Instead, I am using the OpenCode Go API directly, and since I do not have access to their servers, I need their assistance to track down the error.

  4. RicSchonfelder commented on Aug 19, 2026

    @RicSchonfelder

    +1 — I am experiencing the exact same issue with OpenCode Go / DeepSeek (deepseek-v4-flash). The agent is coding along and then suddenly stops mid-task with no error, no retry, nothing. I have to keep sending "continue" commands to get it going again, and it stops again shortly after. It happens repeatedly within the same session.

    OpenCode version: 1.18.18, using the OpenCode Go gateway.

  5. github-actions commented on Oct 18, 2026

    @github-actions
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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