anomalyco / anomalyco/opencode

ByteDance Seed models hang due to non-standard reasoning token streaming

Open
#40,104 0 comments 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Aug 1, 2026.

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

Description

Description

ByteDance Seed models (bytedance-seed/seed-2.0-lite, seed-2.0-mini, seed-1.6, seed-1.6-flash) via OpenRouter hang indefinitely when used with opencode run. The issue is that these models return reasoning and reasoning_details fields in their streaming response delta chunks, which opencode's parser does not handle.

Reproduction

opencode run "Reply OK" -m openrouter/bytedance-seed/seed-2.0-lite

The command hangs at > build · bytedance-seed/seed-2.0-lite and never completes.

Root Cause

The OpenRouter streaming response for ByteDance Seed models includes non-standard fields in the delta:

{
  "choices": [{
    "delta": {
      "content": "",
      "role": "assistant",
      "reasoning": "Got it, the user asked...",
      "reasoning_details": [{"type": "reasoning.text", "text": "...", "format": "unknown", "index": 0}]
    }
  }]
}

During the reasoning phase, content is "" (empty string) while reasoning carries the thinking tokens. This causes opencode's parser to hang — it sees empty content and waits indefinitely for more.

Workaround

Using include_reasoning: false in the API request body disables reasoning output and the model works via curl. However, there's no way to pass this parameter through opencode's config.

Expected Behavior

Either:

  1. Parse the reasoning field correctly (like reasoning_content for DeepSeek models)
  2. Ignore unknown fields in the streaming delta and process content only
  3. Expose providerOptions in the config schema so users can pass reasoning: {exclude: true}

Environment

  • OpenCode version: 1.18.5
  • Platform: macOS (darwin, arm64)
  • Provider: OpenRouter
  • Models: openrouter/bytedance-seed/seed-2.0-lite, seed-2.0-mini, seed-1.6, seed-1.6-flash

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.