diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 09242e06f..08a8c70cf 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.9.0" + ".": "5.9.1" } diff --git a/.stats.yml b/.stats.yml index 816f05df5..12a179baf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 111 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-2d116cda53321baa3479e628512def723207a81eb1cdaebb542bd0555e563bda.yml -openapi_spec_hash: 809d958fec261a32004a4b026b718793 -config_hash: e74d6791681e3af1b548748ff47a22c2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-82fd6fcb3eea81cbbe09a6f831c82219f1251e1b76474b4c41f424bf277e6a71.yml +openapi_spec_hash: c8d54bd1ae3d704f6b6f72ffd2f876d8 +config_hash: 3315d58b60faf63b1bee251b81837cda diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bffa2bfc..641221214 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 5.9.1 (2025-07-15) + +Full Changelog: [v5.9.0...v5.9.1](https://github.com/openai/openai-node/compare/v5.9.0...v5.9.1) + +### Chores + +* **api:** update realtime specs, build config ([bb4649f](https://github.com/openai/openai-node/commit/bb4649feb69a6d91e4eea857fd6f5e8c00f2a35d)) + ## 5.9.0 (2025-07-10) Full Changelog: [v5.8.4...v5.9.0](https://github.com/openai/openai-node/compare/v5.8.4...v5.9.0) diff --git a/jsr.json b/jsr.json index da53f0b43..705b34398 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@openai/openai", - "version": "5.9.0", + "version": "5.9.1", "exports": { ".": "./index.ts", "./helpers/zod": "./helpers/zod.ts", diff --git a/package.json b/package.json index 7f13e8196..515e53826 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "5.9.0", + "version": "5.9.1", "description": "The official TypeScript library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", diff --git a/src/resources/beta/realtime/realtime.ts b/src/resources/beta/realtime/realtime.ts index b2a0397f0..b27786154 100644 --- a/src/resources/beta/realtime/realtime.ts +++ b/src/resources/beta/realtime/realtime.ts @@ -114,11 +114,11 @@ export interface ConversationItem { role?: 'user' | 'assistant' | 'system'; /** - * The status of the item (`completed`, `incomplete`). These have no effect on the - * conversation, but are accepted for consistency with the + * The status of the item (`completed`, `incomplete`, `in_progress`). These have no + * effect on the conversation, but are accepted for consistency with the * `conversation.item.created` event. */ - status?: 'completed' | 'incomplete'; + status?: 'completed' | 'incomplete' | 'in_progress'; /** * The type of the item (`message`, `function_call`, `function_call_output`). @@ -215,15 +215,16 @@ export interface ConversationItemCreatedEvent { item: ConversationItem; /** - * The ID of the preceding item in the Conversation context, allows the client to - * understand the order of the conversation. + * The event type, must be `conversation.item.created`. */ - previous_item_id: string; + type: 'conversation.item.created'; /** - * The event type, must be `conversation.item.created`. + * The ID of the preceding item in the Conversation context, allows the client to + * understand the order of the conversation. Can be `null` if the item has no + * predecessor. */ - type: 'conversation.item.created'; + previous_item_id?: string | null; } /** @@ -682,11 +683,11 @@ export interface ConversationItemWithReference { role?: 'user' | 'assistant' | 'system'; /** - * The status of the item (`completed`, `incomplete`). These have no effect on the - * conversation, but are accepted for consistency with the + * The status of the item (`completed`, `incomplete`, `in_progress`). These have no + * effect on the conversation, but are accepted for consistency with the * `conversation.item.created` event. */ - status?: 'completed' | 'incomplete'; + status?: 'completed' | 'incomplete' | 'in_progress'; /** * The type of the item (`message`, `function_call`, `function_call_output`, @@ -851,14 +852,15 @@ export interface InputAudioBufferCommittedEvent { item_id: string; /** - * The ID of the preceding item after which the new item will be inserted. + * The event type, must be `input_audio_buffer.committed`. */ - previous_item_id: string; + type: 'input_audio_buffer.committed'; /** - * The event type, must be `input_audio_buffer.committed`. + * The ID of the preceding item after which the new item will be inserted. Can be + * `null` if the item has no predecessor. */ - type: 'input_audio_buffer.committed'; + previous_item_id?: string | null; } /** @@ -1072,9 +1074,9 @@ export interface RealtimeResponse { /** * The final status of the response (`completed`, `cancelled`, `failed`, or - * `incomplete`). + * `incomplete`, `in_progress`). */ - status?: 'completed' | 'cancelled' | 'failed' | 'incomplete'; + status?: 'completed' | 'cancelled' | 'failed' | 'incomplete' | 'in_progress'; /** * Additional details about the status. diff --git a/src/resources/evals/evals.ts b/src/resources/evals/evals.ts index 4af307fc7..56109fa11 100644 --- a/src/resources/evals/evals.ts +++ b/src/resources/evals/evals.ts @@ -769,9 +769,14 @@ export namespace EvalCreateParams { */ export interface EvalItem { /** - * Text inputs to the model - can contain template strings. + * Inputs to the model - can contain template strings. */ - content: string | ResponsesAPI.ResponseInputText | EvalItem.OutputText; + content: + | string + | ResponsesAPI.ResponseInputText + | EvalItem.OutputText + | EvalItem.InputImage + | Array; /** * The role of the message input. One of `user`, `assistant`, `system`, or @@ -800,6 +805,27 @@ export namespace EvalCreateParams { */ type: 'output_text'; } + + /** + * An image input to the model. + */ + export interface InputImage { + /** + * The URL of the image input. + */ + image_url: string; + + /** + * The type of the image input. Always `input_image`. + */ + type: 'input_image'; + + /** + * The detail level of the image to be sent to the model. One of `high`, `low`, or + * `auto`. Defaults to `auto`. + */ + detail?: string; + } } } diff --git a/src/resources/evals/runs/runs.ts b/src/resources/evals/runs/runs.ts index 417b69515..dd3a94cf8 100644 --- a/src/resources/evals/runs/runs.ts +++ b/src/resources/evals/runs/runs.ts @@ -206,9 +206,14 @@ export namespace CreateEvalCompletionsRunDataSource { */ export interface Message { /** - * Text inputs to the model - can contain template strings. + * Inputs to the model - can contain template strings. */ - content: string | ResponsesAPI.ResponseInputText | Message.OutputText; + content: + | string + | ResponsesAPI.ResponseInputText + | Message.OutputText + | Message.InputImage + | Array; /** * The role of the message input. One of `user`, `assistant`, `system`, or @@ -237,6 +242,27 @@ export namespace CreateEvalCompletionsRunDataSource { */ type: 'output_text'; } + + /** + * An image input to the model. + */ + export interface InputImage { + /** + * The URL of the image input. + */ + image_url: string; + + /** + * The type of the image input. Always `input_image`. + */ + type: 'input_image'; + + /** + * The detail level of the image to be sent to the model. One of `high`, `low`, or + * `auto`. Defaults to `auto`. + */ + detail?: string; + } } } @@ -612,9 +638,14 @@ export namespace RunCreateResponse { */ export interface EvalItem { /** - * Text inputs to the model - can contain template strings. + * Inputs to the model - can contain template strings. */ - content: string | ResponsesAPI.ResponseInputText | EvalItem.OutputText; + content: + | string + | ResponsesAPI.ResponseInputText + | EvalItem.OutputText + | EvalItem.InputImage + | Array; /** * The role of the message input. One of `user`, `assistant`, `system`, or @@ -643,6 +674,27 @@ export namespace RunCreateResponse { */ type: 'output_text'; } + + /** + * An image input to the model. + */ + export interface InputImage { + /** + * The URL of the image input. + */ + image_url: string; + + /** + * The type of the image input. Always `input_image`. + */ + type: 'input_image'; + + /** + * The detail level of the image to be sent to the model. One of `high`, `low`, or + * `auto`. Defaults to `auto`. + */ + detail?: string; + } } } @@ -1059,9 +1111,14 @@ export namespace RunRetrieveResponse { */ export interface EvalItem { /** - * Text inputs to the model - can contain template strings. + * Inputs to the model - can contain template strings. */ - content: string | ResponsesAPI.ResponseInputText | EvalItem.OutputText; + content: + | string + | ResponsesAPI.ResponseInputText + | EvalItem.OutputText + | EvalItem.InputImage + | Array; /** * The role of the message input. One of `user`, `assistant`, `system`, or @@ -1090,6 +1147,27 @@ export namespace RunRetrieveResponse { */ type: 'output_text'; } + + /** + * An image input to the model. + */ + export interface InputImage { + /** + * The URL of the image input. + */ + image_url: string; + + /** + * The type of the image input. Always `input_image`. + */ + type: 'input_image'; + + /** + * The detail level of the image to be sent to the model. One of `high`, `low`, or + * `auto`. Defaults to `auto`. + */ + detail?: string; + } } } @@ -1503,9 +1581,14 @@ export namespace RunListResponse { */ export interface EvalItem { /** - * Text inputs to the model - can contain template strings. + * Inputs to the model - can contain template strings. */ - content: string | ResponsesAPI.ResponseInputText | EvalItem.OutputText; + content: + | string + | ResponsesAPI.ResponseInputText + | EvalItem.OutputText + | EvalItem.InputImage + | Array; /** * The role of the message input. One of `user`, `assistant`, `system`, or @@ -1534,6 +1617,27 @@ export namespace RunListResponse { */ type: 'output_text'; } + + /** + * An image input to the model. + */ + export interface InputImage { + /** + * The URL of the image input. + */ + image_url: string; + + /** + * The type of the image input. Always `input_image`. + */ + type: 'input_image'; + + /** + * The detail level of the image to be sent to the model. One of `high`, `low`, or + * `auto`. Defaults to `auto`. + */ + detail?: string; + } } } @@ -1958,9 +2062,14 @@ export namespace RunCancelResponse { */ export interface EvalItem { /** - * Text inputs to the model - can contain template strings. + * Inputs to the model - can contain template strings. */ - content: string | ResponsesAPI.ResponseInputText | EvalItem.OutputText; + content: + | string + | ResponsesAPI.ResponseInputText + | EvalItem.OutputText + | EvalItem.InputImage + | Array; /** * The role of the message input. One of `user`, `assistant`, `system`, or @@ -1989,6 +2098,27 @@ export namespace RunCancelResponse { */ type: 'output_text'; } + + /** + * An image input to the model. + */ + export interface InputImage { + /** + * The URL of the image input. + */ + image_url: string; + + /** + * The type of the image input. Always `input_image`. + */ + type: 'input_image'; + + /** + * The detail level of the image to be sent to the model. One of `high`, `low`, or + * `auto`. Defaults to `auto`. + */ + detail?: string; + } } } @@ -2352,9 +2482,14 @@ export namespace RunCreateParams { */ export interface EvalItem { /** - * Text inputs to the model - can contain template strings. + * Inputs to the model - can contain template strings. */ - content: string | ResponsesAPI.ResponseInputText | EvalItem.OutputText; + content: + | string + | ResponsesAPI.ResponseInputText + | EvalItem.OutputText + | EvalItem.InputImage + | Array; /** * The role of the message input. One of `user`, `assistant`, `system`, or @@ -2383,6 +2518,27 @@ export namespace RunCreateParams { */ type: 'output_text'; } + + /** + * An image input to the model. + */ + export interface InputImage { + /** + * The URL of the image input. + */ + image_url: string; + + /** + * The type of the image input. Always `input_image`. + */ + type: 'input_image'; + + /** + * The detail level of the image to be sent to the model. One of `high`, `low`, or + * `auto`. Defaults to `auto`. + */ + detail?: string; + } } } diff --git a/src/resources/graders/grader-models.ts b/src/resources/graders/grader-models.ts index 18ae60acf..7bf9b442c 100644 --- a/src/resources/graders/grader-models.ts +++ b/src/resources/graders/grader-models.ts @@ -48,9 +48,9 @@ export namespace LabelModelGrader { */ export interface Input { /** - * Text inputs to the model - can contain template strings. + * Inputs to the model - can contain template strings. */ - content: string | ResponsesAPI.ResponseInputText | Input.OutputText; + content: string | ResponsesAPI.ResponseInputText | Input.OutputText | Input.InputImage | Array; /** * The role of the message input. One of `user`, `assistant`, `system`, or @@ -79,6 +79,27 @@ export namespace LabelModelGrader { */ type: 'output_text'; } + + /** + * An image input to the model. + */ + export interface InputImage { + /** + * The URL of the image input. + */ + image_url: string; + + /** + * The type of the image input. Always `input_image`. + */ + type: 'input_image'; + + /** + * The detail level of the image to be sent to the model. One of `high`, `low`, or + * `auto`. Defaults to `auto`. + */ + detail?: string; + } } } @@ -179,9 +200,9 @@ export namespace ScoreModelGrader { */ export interface Input { /** - * Text inputs to the model - can contain template strings. + * Inputs to the model - can contain template strings. */ - content: string | ResponsesAPI.ResponseInputText | Input.OutputText; + content: string | ResponsesAPI.ResponseInputText | Input.OutputText | Input.InputImage | Array; /** * The role of the message input. One of `user`, `assistant`, `system`, or @@ -210,6 +231,27 @@ export namespace ScoreModelGrader { */ type: 'output_text'; } + + /** + * An image input to the model. + */ + export interface InputImage { + /** + * The URL of the image input. + */ + image_url: string; + + /** + * The type of the image input. Always `input_image`. + */ + type: 'input_image'; + + /** + * The detail level of the image to be sent to the model. One of `high`, `low`, or + * `auto`. Defaults to `auto`. + */ + detail?: string; + } } } diff --git a/src/version.ts b/src/version.ts index 33ac81765..66c00f739 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '5.9.0'; // x-release-please-version +export const VERSION = '5.9.1'; // x-release-please-version