anomalyco / anomalyco/opencode

@ai-sdk/openai connector does not use mandatory status field in request

Open
#49,330 2 comments 0 reactions 1 assignee View on GitHub

@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
  1. Configure a provider using @ai-sdk/openai
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.