diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7c53a1b7c..dc9637221 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "6.9.0" + ".": "6.9.1" } diff --git a/.stats.yml b/.stats.yml index 38f260dd9..d15659c79 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 135 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ca24bc4d8125b5153514ce643c4e3220f25971b7d67ca384d56d493c72c0d977.yml -openapi_spec_hash: c6f048c7b3d29f4de48fde0e845ba33f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a7e92d12ebe89ca019a7ac5b29759064eefa2c38fe08d03516f2620e66abb32b.yml +openapi_spec_hash: acbc703b2739447abc6312b2d753631c config_hash: b876221dfb213df9f0a999e75d38a65e diff --git a/CHANGELOG.md b/CHANGELOG.md index 027db0155..4ab65dc65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 6.9.1 (2025-11-17) + +Full Changelog: [v6.9.0...v6.9.1](https://github.com/openai/openai-node/compare/v6.9.0...v6.9.1) + +### Bug Fixes + +* **api:** align types of input items / output items for typescript ([99adaa7](https://github.com/openai/openai-node/commit/99adaa70dc31d07d5c7fa4d67194ac4de375c98f)) + ## 6.9.0 (2025-11-13) Full Changelog: [v6.8.1...v6.9.0](https://github.com/openai/openai-node/compare/v6.8.1...v6.9.0) diff --git a/jsr.json b/jsr.json index eb46274a9..e7d50a492 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@openai/openai", - "version": "6.9.0", + "version": "6.9.1", "exports": { ".": "./index.ts", "./helpers/zod": "./helpers/zod.ts", diff --git a/package.json b/package.json index 5a7ef2e68..e34815dd0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "6.9.0", + "version": "6.9.1", "description": "The official TypeScript library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", diff --git a/src/helpers/zod.ts b/src/helpers/zod.ts index 4225e0759..400b448fd 100644 --- a/src/helpers/zod.ts +++ b/src/helpers/zod.ts @@ -1,6 +1,6 @@ import { ResponseFormatJSONSchema } from '../resources/index'; -import { z as z3 } from 'zod/v3'; -import { z as z4 } from 'zod/v4'; +import * as z3 from 'zod/v3'; +import * as z4 from 'zod/v4'; import { AutoParseableResponseFormat, AutoParseableTextFormat, diff --git a/src/resources/responses/responses.ts b/src/resources/responses/responses.ts index 374744cbc..c60c2cce9 100644 --- a/src/resources/responses/responses.ts +++ b/src/resources/responses/responses.ts @@ -709,6 +709,15 @@ export interface ResponseApplyPatchToolCall { */ call_id: string; + /** + * One of the create_file, delete_file, or update_file operations applied via + * apply_patch. + */ + operation: + | ResponseApplyPatchToolCall.CreateFile + | ResponseApplyPatchToolCall.DeleteFile + | ResponseApplyPatchToolCall.UpdateFile; + /** * The status of the apply patch tool call. One of `in_progress` or `completed`. */ @@ -723,15 +732,6 @@ export interface ResponseApplyPatchToolCall { * The ID of the entity that created this tool call. */ created_by?: string; - - /** - * One of the create_file, delete_file, or update_file operations applied via - * apply_patch. - */ - operation?: - | ResponseApplyPatchToolCall.CreateFile - | ResponseApplyPatchToolCall.DeleteFile - | ResponseApplyPatchToolCall.UpdateFile; } export namespace ResponseApplyPatchToolCall { @@ -806,11 +806,6 @@ export interface ResponseApplyPatchToolCallOutput { */ call_id: string; - /** - * Optional textual output returned by the apply patch tool. - */ - output: string | null; - /** * The status of the apply patch tool call output. One of `completed` or `failed`. */ @@ -825,6 +820,11 @@ export interface ResponseApplyPatchToolCallOutput { * The ID of the entity that created this tool call output. */ created_by?: string; + + /** + * Optional textual output returned by the apply patch tool. + */ + output?: string | null; } /** @@ -3275,7 +3275,7 @@ export namespace ResponseInputItem { * Optional human-readable log text from the apply patch tool (e.g., patch results * or errors). */ - output?: string; + output?: string | null; } /** diff --git a/src/version.ts b/src/version.ts index a56dd5aa4..5f4659264 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '6.9.0'; // x-release-please-version +export const VERSION = '6.9.1'; // x-release-please-version diff --git a/tests/responsesItems.test.ts b/tests/responsesItems.test.ts new file mode 100644 index 000000000..84853fcf3 --- /dev/null +++ b/tests/responsesItems.test.ts @@ -0,0 +1,21 @@ +import OpenAI from 'openai/index'; +const openai = new OpenAI({ apiKey: 'example-api-key' }); + +describe('responses item types', () => { + test('response output items are compatible with input items', async () => { + expect(true).toBe(true); + }); +}); + +const unused = async () => { + const response = await openai.responses.create({ + model: 'gpt-5.1', + input: 'You are a helpful assistant.', + }); + await openai.responses.create({ + model: 'gpt-5.1', + // check type compatibility + input: response.output, + }); + expect(true).toBe(true); +};