Description
When using models that route through the OpenAI Responses API (e.g. gpt-5.5 with provider openai), opencode fails with:
ProviderShared.request: OpenAI Responses assistant messages only support text and tool-call content for now
This happens because internal opencode scaffolding parts (reasoning, step-start, step-finish) present in assistant role messages are not being stripped before the request is sent to the Responses endpoint.
Reproduction
Use a model that triggers the Responses path (e.g. openai/gpt-5.5)
Run a long agentic session with many tool calls and internal reasoning steps (common in tech-lead or complex multi-step tasks)
After some time, attempting to continue the session triggers the above error on the next assistant turn.
The session works fine with models that use the traditional Chat Completions path.
Related
Similar message normalization work was done for Anthropic reasoning blocks in PR #23755 (src/provider/transform.ts).
Existing user demand for a Chat Completions fallback: #7793.
Expected behavior
Internal opencode parts (reasoning, step-start, step-finish, etc.) should be filtered out for any provider/API path that only accepts text + tool-call content in assistant messages, with fallback to Chat Completions API if Responses throws an error.
Plugins
dynamic-context-pruning and opencode-rules
OpenCode version
1.15.7
Steps to reproduce
Use a model that triggers the Responses path (e.g. openai/gpt-5.5)
Run a long agentic session with many tool calls and internal reasoning steps (common in tech-lead or complex multi-step tasks)
After some time, attempting to continue the session triggers the above error on the next assistant turn.
The session works fine with models that use the traditional Chat Completions path.
Screenshot and/or share link
No response
Operating System
Linux amd64
Terminal
kitty
Description
When using models that route through the OpenAI Responses API (e.g. gpt-5.5 with provider openai), opencode fails with:
This happens because internal opencode scaffolding parts (reasoning, step-start, step-finish) present in assistant role messages are not being stripped before the request is sent to the Responses endpoint.
Reproduction
Use a model that triggers the Responses path (e.g. openai/gpt-5.5)
Run a long agentic session with many tool calls and internal reasoning steps (common in tech-lead or complex multi-step tasks)
After some time, attempting to continue the session triggers the above error on the next assistant turn.
The session works fine with models that use the traditional Chat Completions path.
Related
Similar message normalization work was done for Anthropic reasoning blocks in PR #23755 (src/provider/transform.ts).
Existing user demand for a Chat Completions fallback: #7793.
Expected behavior
Internal opencode parts (reasoning, step-start, step-finish, etc.) should be filtered out for any provider/API path that only accepts text + tool-call content in assistant messages, with fallback to Chat Completions API if Responses throws an error.
Plugins
dynamic-context-pruning and opencode-rules
OpenCode version
1.15.7
Steps to reproduce
Use a model that triggers the Responses path (e.g. openai/gpt-5.5)
Run a long agentic session with many tool calls and internal reasoning steps (common in tech-lead or complex multi-step tasks)
After some time, attempting to continue the session triggers the above error on the next assistant turn.
The session works fine with models that use the traditional Chat Completions path.
Screenshot and/or share link
No response
Operating System
Linux amd64
Terminal
kitty