Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.87.2"
".": "4.87.3"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 4.87.3 (2025-03-11)

Full Changelog: [v4.87.2...v4.87.3](https://github.com/openai/openai-node/compare/v4.87.2...v4.87.3)

### Bug Fixes

* **responses:** correct reasoning output type ([2abef57](https://github.com/openai/openai-node/commit/2abef57d7645a96a4b9a6b91483861cd568d2d4d))

## 4.87.2 (2025-03-11)

Full Changelog: [v4.87.1...v4.87.2](https://github.com/openai/openai-node/compare/v4.87.1...v4.87.2)
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ Types:
- <code><a href="./src/resources/responses/responses.ts">ResponseOutputMessage</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseOutputRefusal</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseOutputText</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningItem</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseRefusalDeltaEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseRefusalDoneEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseStatus</a></code>
Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openai/openai",
"version": "4.87.2",
"version": "4.87.3",
"exports": {
".": "./index.ts",
"./helpers/zod": "./helpers/zod.ts",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openai",
"version": "4.87.2",
"version": "4.87.3",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
131 changes: 44 additions & 87 deletions src/resources/responses/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export type ParsedResponseOutputItem<ParsedT> =
| ResponseFileSearchToolCall
| ResponseFunctionWebSearch
| ResponseComputerToolCall
| ResponseOutputItem.Reasoning;
| ResponseReasoningItem;

export interface ParsedResponse<ParsedT> extends Response {
output: Array<ParsedResponseOutputItem<ParsedT>>;
Expand Down Expand Up @@ -1562,7 +1562,7 @@ export type ResponseInputItem =
| ResponseFunctionWebSearch
| ResponseFunctionToolCall
| ResponseInputItem.FunctionCallOutput
| ResponseInputItem.Reasoning
| ResponseReasoningItem
| ResponseInputItem.ItemReference;

export namespace ResponseInputItem {
Expand Down Expand Up @@ -1707,47 +1707,6 @@ export namespace ResponseInputItem {
status?: 'in_progress' | 'completed' | 'incomplete';
}

/**
* A description of the chain of thought used by a reasoning model while generating
* a response.
*/
export interface Reasoning {
/**
* The unique identifier of the reasoning content.
*/
id: string;

/**
* Reasoning text contents.
*/
content: Array<Reasoning.Content>;

/**
* The type of the object. Always `reasoning`.
*/
type: 'reasoning';

/**
* The status of the item. One of `in_progress`, `completed`, or `incomplete`.
* Populated when items are returned via API.
*/
status?: 'in_progress' | 'completed' | 'incomplete';
}

export namespace Reasoning {
export interface Content {
/**
* A short summary of the reasoning used by the model when generating the response.
*/
text: string;

/**
* The type of the object. Always `text`.
*/
type: 'reasoning_summary';
}
}

/**
* An internal identifier for an item to reference.
*/
Expand Down Expand Up @@ -1814,50 +1773,7 @@ export type ResponseOutputItem =
| ResponseFunctionToolCall
| ResponseFunctionWebSearch
| ResponseComputerToolCall
| ResponseOutputItem.Reasoning;

export namespace ResponseOutputItem {
/**
* A description of the chain of thought used by a reasoning model while generating
* a response.
*/
export interface Reasoning {
/**
* The unique identifier of the reasoning content.
*/
id: string;

/**
* Reasoning text contents.
*/
content: Array<Reasoning.Content>;

/**
* The type of the object. Always `reasoning`.
*/
type: 'reasoning';

/**
* The status of the item. One of `in_progress`, `completed`, or `incomplete`.
* Populated when items are returned via API.
*/
status?: 'in_progress' | 'completed' | 'incomplete';
}

export namespace Reasoning {
export interface Content {
/**
* A short summary of the reasoning used by the model when generating the response.
*/
text: string;

/**
* The type of the object. Always `text`.
*/
type: 'reasoning_summary';
}
}
}
| ResponseReasoningItem;

/**
* Emitted when a new output item is added.
Expand Down Expand Up @@ -2039,6 +1955,47 @@ export namespace ResponseOutputText {
}
}

/**
* A description of the chain of thought used by a reasoning model while generating
* a response.
*/
export interface ResponseReasoningItem {
/**
* The unique identifier of the reasoning content.
*/
id: string;

/**
* Reasoning text contents.
*/
summary: Array<ResponseReasoningItem.Summary>;

/**
* The type of the object. Always `reasoning`.
*/
type: 'reasoning';

/**
* The status of the item. One of `in_progress`, `completed`, or `incomplete`.
* Populated when items are returned via API.
*/
status?: 'in_progress' | 'completed' | 'incomplete';
}

export namespace ResponseReasoningItem {
export interface Summary {
/**
* A short summary of the reasoning used by the model when generating the response.
*/
text: string;

/**
* The type of the object. Always `summary_text`.
*/
type: 'summary_text';
}
}

/**
* Emitted when there is a partial refusal text.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '4.87.2'; // x-release-please-version
export const VERSION = '4.87.3'; // x-release-please-version