anomalyco / anomalyco/opencode
[Bug] Kimi K3 via OpenCode Go returns empty responses through the Responses API (missing output_item events in SSE stream)
@MrMushrooooom is already working on this.
Since Aug 3, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
What happened
Selecting kimi-k3 through OpenCode Go (https://opencode.ai/zen/go/v1) with the Responses API produces a turn with zero visible output, zero tool calls, and no token usage. The model actually replies — the text arrives in the stream — but it is dropped because the stream never emits the item scaffolding the Responses API requires.
Environment
- Client: OpenAI Codex CLI 0.146.0 (custom provider:
wire_api = "responses",base_url = https://opencode.ai/zen/go/v1) - Model:
kimi-k3via OpenCode Go - Auth: standard bearer API key (valid; other models work)
Reproduction
codex exec --yolo -m kimi-k3 "say hi"
Expected: the model replies (e.g. "Hi!").
Actual: no assistant output at all. The session transcript shows token_count with info: None and task_complete with no error; the command exits successfully. Codex logs this for every streamed delta:
ERROR codex_core::util: OutputTextDelta without active item
Root cause evidence
The raw SSE from POST https://opencode.ai/zen/go/v1/responses for kimi-k3 contains only these event types:
response.output_text.delta (10x)
response.completed (1x)
ping (1x)
Example payload:
{"id":"chatcmpl-6a71034d30b9ed1c67db2906","type":"response.output_text.delta","delta":"Hi","response":{"id":"chatcmpl-6a71034d30b9ed1c67db2906","model":"kimi-k3"}}
There are no response.output_item.added, response.content_part.added, or response.output_item.done events. Per the Responses API spec, text deltas must be scoped to an item (via item_id/output_index) created by an output_item.added event. Without that, Responses-API clients (Codex, and likely others) cannot attach the deltas, so the whole reply is discarded.
Additional data
- The same setup with
deepseek-v4-flash,deepseek-v4-pro,gpt-5.6-luna, andglm-5.2works correctly (real output, token usage reported). - A tool-using prompt with
kimi-k3also completes with no tool calls executed and no output. - Tried with reasoning effort
lowandhigh— identical behavior.
Suggested fix
Emit proper item events in the streamed Responses response for kimi-k3 (and any other models routed through the chat-completions translator): response.output_item.added → response.content_part.added → response.output_text.delta (with item_id and output_index) → response.output_item.done → response.completed.
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.