# OpenAI Responses API Changelog
This document tracks updates to the responses module to keep it in sync with the OpenAI Responses API.
## [2025-12-11] - API Sync Update
### request.rs
#### Added
- `Includable` enum for specifying additional output data (`file_search_call.results`, `message.input_image.image_url`, `computer_call_output.output.image_url`)
- `ReasoningSummary` enum with `Auto`, `Concise`, `Detailed` variants
- `Tool` is now an enum supporting multiple tool types:
- `Function(FunctionTool)` - custom function calls
- `FileSearch(FileSearchTool)` - file search in vector stores
- `WebSearchPreview(WebSearchTool)` - web search
- `WebSearchPreview20250311(WebSearchTool)` - versioned web search
- `ComputerUsePreview(ComputerUseTool)` - computer control
- `FileSearchTool` struct with `vector_store_ids`, `max_num_results`, `ranking_options`, `filters`
- `WebSearchTool` struct with `user_location`, `search_context_size`
- `ComputerUseTool` struct with `environment`, `display_width`, `display_height`
- `ComputerEnvironment` enum (`Windows`, `Mac`, `Linux`, `Ubuntu`, `Browser`)
- `SearchContextSize` enum (`Low`, `Medium`, `High`)
- `FunctionTool.strict` field for strict parameter validation
- `RequestBody.previous_response_id` for multi-turn conversations
- `RequestBody.include` for specifying additional output data
- Extended `ToolType` enum with `FileSearch`, `WebSearchPreview`, `ComputerUsePreview`
#### Changed
- `ReasoningConfig.summary` replaces deprecated `budget_tokens` field
- `WebSearchUserLocation` now has a flat structure (removed nested `approximate` field)
- Removed `Minimal` variant from `ReasoningEffort` (API only supports `low`, `medium`, `high`)
### response.rs
#### Added
- `ResponseError` struct for error information
- `ResponseReasoning` struct for reasoning configuration in responses
- `TextConfig` and `TextFormat` structs for text response format
- `IncompleteReason` enum (`MaxOutputTokens`, `ContentFilter`)
- `OutputStatus` enum (`InProgress`, `Completed`, `Incomplete`)
- `Output.status` field
- `Output.summary` for reasoning output
- `Output.name`, `Output.arguments`, `Output.call_id` for function calls
- `Response.error`, `Response.parallel_tool_calls`, `Response.previous_response_id`
- `Response.reasoning`, `Response.store`, `Response.text`, `Response.tool_choice`
- `Response.tools`, `Response.truncation`, `Response.user`, `Response.instructions`
- `Response.max_output_tokens`
- Extended `OutputType` enum: `FunctionCall`, `FileSearchCall`, `WebSearchCall`, `ComputerCall`
#### Changed
- `Response.created` renamed to `Response.created_at` (with `created` alias for compatibility)
- `Response.output_text` changed from `Vec<String>` to `Option<String>`
- `ResponseStatus.Cancelled` renamed to `Incomplete` to match API
- `IncompleteDetails.reason` now uses `IncompleteReason` enum instead of `String`
### chunk.rs
#### Added
- `StreamEventType` enum with all streaming event types:
- Response lifecycle: `ResponseCreated`, `ResponseInProgress`, `ResponseCompleted`, `ResponseFailed`, `ResponseIncomplete`
- Output items: `OutputItemAdded`, `OutputItemDone`
- Content parts: `ContentPartAdded`, `ContentPartDone`
- Text streaming: `OutputTextDelta`, `OutputTextDone`
- Function calls: `FunctionCallArgumentsDelta`, `FunctionCallArgumentsDone`
- File search: `FileSearchCallInProgress`, `FileSearchCallSearching`, `FileSearchCallCompleted`
- Web search: `WebSearchCallInProgress`, `WebSearchCallSearching`, `WebSearchCallCompleted`
- Code interpreter: `CodeInterpreterCallInProgress`, `CodeInterpreterCallInterpreting`, `CodeInterpreterCallCompleted`, `CodeInterpreterCallCodeDelta`, `CodeInterpreterCallCodeDone`
- Audio: `AudioDelta`, `AudioDone`, `AudioTranscriptDelta`, `AudioTranscriptDone`
- Refusal: `RefusalDelta`, `RefusalDone`
- Reasoning: `ReasoningSummaryPartAdded`, `ReasoningSummaryPartDone`, `ReasoningSummaryTextDelta`, `ReasoningSummaryTextDone`
- Annotations: `OutputTextAnnotationAdded`
- Error: `Error`
- `ChunkResponse.event_type` field
- `ChunkResponse.response` for complete response in `response.completed` events
- `ChunkResponse.output_index`, `ChunkResponse.content_index`, `ChunkResponse.item_id`
- `ChunkResponse.delta` (text), `ChunkResponse.text`, `ChunkResponse.item`, `ChunkResponse.part`
- `Delta.text` and `Delta.arguments` fields
### magi.rs & rmcp.rs
#### Changed
- Updated tool conversion to work with new `Tool` enum structure
- Non-function tools convert to placeholder `MagiTool`/`RmcpTool`
## [2025-12-11] - Initial Documentation
### Structure
- `request.rs` - Request parameters for creating responses
- `response.rs` - Response object structure
- `chunk.rs` - Streaming chunk structures
- `magi.rs` - Conversions to/from magi-tool types
- `rmcp.rs` - Conversions to/from RMCP types
### API Reference
- https://platform.openai.com/docs/api-reference/responses/create
- https://platform.openai.com/docs/api-reference/responses-streaming