anomalyco / anomalyco/opencode
@ai-sdk/openai connector does not use mandatory status field in request
@jlongster is already working on this.
Since Sep 16, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
My custom endpoint is using the openai responses schema. In the openAI API reference, for assistant messages the status field is not optional.
Opencode sends no status field for earlier messages (and azure openai or openai silently accepts that).
The status flag should be populated as per the API reference: https://developers.openai.com/api/reference/resources/responses/methods/create#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)
I have no Idea if this is an ai-sdk problem or an opencode problem
Plugins
none
OpenCode version
1.18.31
Steps to reproduce
- Configure a provider using @ai-sdk/openai
- Inspect a request including earlier messages --> Status field not present
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Opencode Desktop
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.