openai / openai/openai-java

ResponseOutputMessage requires id and status as mandatory even for non-stored responses

Open
#585 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug spec
Dominant language
Kotlin
Stars
1.5k
Forks
264
Avg merge
9h 46m
Merged PRs (30d)
96

Description

When adding the Assistant’s response as input for the create response, the ResponseOutputText build fails, requiring id and status. However, these fields should only be mandatory when store is set to true for the responses API.

            List<ResponseOutputMessage.Content> contents = new ArrayList<>();
            ResponseOutputText build = ResponseOutputText.builder()
                            .text("Sample Text")
                            .annotations(Collections.emptyList())
                            .build();
            contents.add(ResponseOutputMessage.Content.ofOutputText(build));
            ResponseOutputMessage responseOutputMessage = ResponseOutputMessage.builder()
                    .role(JsonValue.from("assistant"))
                    .content(contents)
                    .build();
            return ResponseInputItem.ofResponseOutputMessage(responseOutputMessage);

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.

Research direction

Start by reproducing the shown ResponseOutputText and ResponseOutputMessage builder calls when creating a response input item. Trace how id and status are required for non-stored responses, then verify that the same snippet builds successfully without those fields while stored responses still enforce their requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.