Skip to content

Conversation

@joseharriaga
Copy link
Collaborator

@joseharriaga joseharriaga commented Nov 24, 2025

ResponseItem and its derived classes are both, inputs and outputs. As such, their properties must have setters.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds public setters to the Id property on ResponseItem and the Status properties on various ResponseItem subclasses to support their use in both input and output scenarios. Previously, these properties were read-only, but they need to be settable when constructing request objects for the OpenAI API.

  • Added public setter to ResponseItem.Id property (changed from internal set)
  • Added public setters to Status properties across 10 ResponseItem subclasses (changed from get-only)
  • Updated CUSTOM comments to use consistent multi-line bullet-point format explaining the reasons for customizations

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Custom/Responses/Items/ResponseItem.cs Changed Id property from internal set to public set to support optional input scenarios
src/Custom/Responses/Items/Message/MessageResponseItem.cs Added public setter to Status property and updated comment format
src/Custom/Responses/Items/Reasoning/ReasoningResponseItem.cs Added public setter to Status property, updated comment format, and minor line wrap formatting change
src/Custom/Responses/Items/Reference/ReferenceResponseItem.cs Updated comment to clarify that Id is required in both input and output scenarios
src/Custom/Responses/Items/CodeInterpreterTool/CodeInterpreterCallResponseItem.cs Added public setter to Status property and updated comment format
src/Custom/Responses/Items/ComputerTool/ComputerCallResponseItem.cs Added public setter to Status property and updated comment format
src/Custom/Responses/Items/ComputerTool/ComputerCallOutputResponseItem.cs Added public setter to Status property and updated comment format
src/Custom/Responses/Items/FileSearchTool/FileSearchCallResponseItem.cs Added public setter to Status property, updated comment format, and removed unused imports
src/Custom/Responses/Items/FunctionTool/FunctionCallResponseItem.cs Added public setter to Status property and updated comment format
src/Custom/Responses/Items/FunctionTool/FunctionCallOutputResponseItem.cs Added public setter to Status property and updated comment format
src/Custom/Responses/Items/ImageGenerationTool/ImageGenerationCallResponseItem.cs Added public setter to Status property and updated comment format
src/Custom/Responses/Items/WebSearchTool/WebSearchCallResponseItem.cs Added public setter to Status property and updated comment format
api/OpenAI.netstandard2.0.cs Updated public API surface to reflect property setter changes
api/OpenAI.net8.0.cs Updated public API surface to reflect property setter changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@joseharriaga joseharriaga merged commit 172f5da into main Nov 26, 2025
8 checks passed
@joseharriaga joseharriaga deleted the joseharriaga/ResponseItemId branch November 26, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants