You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: OpenAI Responses API rejects assistant messages containing internal reasoning / step-* parts #28839
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.
Activity
github-actions commentedon May 22, 2026
This issue might be a duplicate of existing issues. Please check:
OpenAI Responses assistant messages only support text and tool-call content) #28750: Same error (OpenAI Responses assistant messages only support text and tool-call content) caused by internal reasoning/step parts not being stripped before the OpenAI Responses API path, also on v1.15.7.If your issue is distinct or the previous one did not result in a fix, please mention that so we can track it separately.
ZanzyTHEbar commentedon May 22, 2026
Closed as duplicate.