Description
When an OpenAI-compatible provider streams its chain-of-thought under a reasoning delta field (instead of reasoning_content), opencode drops it entirely — no reasoning surfaces even though the provider is sending it.
The OpenAI Chat delta schema in packages/llm/src/protocols/openai-chat.ts only declares reasoning_content. Each SSE chunk is decoded with Protocol.jsonEvent → Schema.fromJsonString, which strips any key not on the struct, so reasoning is gone before step() ever runs.
I ran into this with Scaleway. It also affects self-hosted vLLM / SGLang deployments and OpenRouter's reasoning field.
Steps to reproduce
- Configure an openai-compatible provider that emits reasoning under
reasoning (e.g. Scaleway with a reasoning model).
- Send a prompt that triggers reasoning.
- The answer streams fine, but no reasoning is shown — even though the raw SSE chunks contain
delta.reasoning.
OpenCode version
1.17.12
Operating System
macOS 26 (Darwin 25.5.0)
Description
When an OpenAI-compatible provider streams its chain-of-thought under a
reasoningdelta field (instead ofreasoning_content), opencode drops it entirely — no reasoning surfaces even though the provider is sending it.The OpenAI Chat delta schema in
packages/llm/src/protocols/openai-chat.tsonly declaresreasoning_content. Each SSE chunk is decoded withProtocol.jsonEvent→Schema.fromJsonString, which strips any key not on the struct, soreasoningis gone beforestep()ever runs.I ran into this with Scaleway. It also affects self-hosted vLLM / SGLang deployments and OpenRouter's
reasoningfield.Steps to reproduce
reasoning(e.g. Scaleway with a reasoning model).delta.reasoning.OpenCode version
1.17.12
Operating System
macOS 26 (Darwin 25.5.0)