anomalyco / anomalyco/opencode
ByteDance Seed models hang due to non-standard reasoning token streaming
@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:
- Parse the
reasoningfield correctly (likereasoning_contentfor DeepSeek models) - Ignore unknown fields in the streaming delta and process
contentonly - Expose
providerOptionsin the config schema so users can passreasoning: {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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.