Skip to content

release: 5.10.2 #1586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 @@
{
".": "5.10.1"
".": "5.10.2"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-670ea0d2cc44f52a87dd3cadea45632953283e0636ba30788fdbdb22a232ccac.yml
openapi_spec_hash: d8b7d38911fead545adf3e4297956410
config_hash: 5525bda35e48ea6387c6175c4d1651fa
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-b2a451656ca64d30d174391ebfd94806b4de3ab76dc55b92843cfb7f1a54ecb6.yml
openapi_spec_hash: 27d9691b400f28c17ef063a1374048b0
config_hash: e822d0c9082c8b312264403949243179
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 5.10.2 (2025-07-22)

Full Changelog: [v5.10.1...v5.10.2](https://github.com/openai/openai-node/compare/v5.10.1...v5.10.2)

### Chores

* **api:** event shapes more accurate ([78f4e1d](https://github.com/openai/openai-node/commit/78f4e1d8e7400001a7bc6a05dc9a6e52a2047523))
* **internal:** version bump ([ea885ca](https://github.com/openai/openai-node/commit/ea885cac5c4231597141e91bd454e540830deb95))


### Documentation

* fix typos in helpers and realtime ([#1592](https://github.com/openai/openai-node/issues/1592)) ([17733b7](https://github.com/openai/openai-node/commit/17733b7e4a19754c9ca2ec815cf7d246b1dc138d))

## 5.10.1 (2025-07-16)

Full Changelog: [v5.10.0...v5.10.1](https://github.com/openai/openai-node/compare/v5.10.0...v5.10.1)
Expand Down
2 changes: 0 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,6 @@ Types:
- <code><a href="./src/resources/responses/responses.ts">ResponseOutputTextAnnotationAddedEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponsePrompt</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseQueuedEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningDeltaEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningDoneEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningItem</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningSummaryDeltaEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningSummaryDoneEvent</a></code>
Expand Down
2 changes: 1 addition & 1 deletion helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provides richer integrations with TS specific types & returns a `ParsedChatCompl

## Auto-parsing response content with Zod schemas

You can pass zod schemas wrapped with `zodResponseFormat()` to the `.parse()` method and the SDK will automatically conver the model
You can pass zod schemas wrapped with `zodResponseFormat()` to the `.parse()` method and the SDK will automatically convert the model
into a JSON schema, send it to the API and parse the response content back using the given zod schema.

```ts
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": "5.10.1",
"version": "5.10.2",
"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": "5.10.1",
"version": "5.10.2",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion realtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ A full example can be found [here](https://github.com/openai/openai-node/blob/ma

When an error is encountered, either on the client side or returned from the server through the [`error` event](https://platform.openai.com/docs/guides/realtime-model-capabilities#error-handling), the `error` event listener will be fired. However, if you haven't registered an `error` event listener then an `unhandled Promise rejection` error will be thrown.

It is **highly recommended** that you register an `error` event listener and handle errors approriately as typically the underlying connection is still usable.
It is **highly recommended** that you register an `error` event listener and handle errors appropriately as typically the underlying connection is still usable.

```ts
const rt = new OpenAIRealtimeWS({ model: 'gpt-4o-realtime-preview-2024-12-17' });
Expand Down
14 changes: 1 addition & 13 deletions src/resources/audio/speech.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,7 @@ export interface SpeechCreateParams {
* `verse`. Previews of the voices are available in the
* [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
*/
voice:
| (string & {})
| 'alloy'
| 'ash'
| 'ballad'
| 'coral'
| 'echo'
| 'fable'
| 'onyx'
| 'nova'
| 'sage'
| 'shimmer'
| 'verse';
voice: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';

/**
* Control the voice of your generated audio with additional instructions. Does not
Expand Down
57 changes: 9 additions & 48 deletions src/resources/beta/realtime/realtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1130,22 +1130,9 @@ export interface RealtimeResponse {

/**
* The voice the model used to respond. Current voice options are `alloy`, `ash`,
* `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
* `verse`.
*/
voice?:
| (string & {})
| 'alloy'
| 'ash'
| 'ballad'
| 'coral'
| 'echo'
| 'fable'
| 'onyx'
| 'nova'
| 'sage'
| 'shimmer'
| 'verse';
* `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.
*/
voice?: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
}

/**
Expand Down Expand Up @@ -1832,22 +1819,9 @@ export namespace ResponseCreateEvent {
/**
* The voice the model uses to respond. Voice cannot be changed during the session
* once the model has responded with audio at least once. Current voice options are
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
* `shimmer`, and `verse`.
*/
voice?:
| (string & {})
| 'alloy'
| 'ash'
| 'ballad'
| 'coral'
| 'echo'
| 'fable'
| 'onyx'
| 'nova'
| 'sage'
| 'shimmer'
| 'verse';
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.
*/
voice?: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
}

export namespace Response {
Expand Down Expand Up @@ -2325,22 +2299,9 @@ export namespace SessionUpdateEvent {
/**
* The voice the model uses to respond. Voice cannot be changed during the session
* once the model has responded with audio at least once. Current voice options are
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
* `shimmer`, and `verse`.
*/
voice?:
| (string & {})
| 'alloy'
| 'ash'
| 'ballad'
| 'coral'
| 'echo'
| 'fable'
| 'onyx'
| 'nova'
| 'sage'
| 'shimmer'
| 'verse';
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.
*/
voice?: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
}

export namespace Session {
Expand Down
56 changes: 9 additions & 47 deletions src/resources/beta/realtime/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,9 @@ export interface Session {
/**
* The voice the model uses to respond. Voice cannot be changed during the session
* once the model has responded with audio at least once. Current voice options are
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
* `shimmer`, and `verse`.
*/
voice?:
| (string & {})
| 'alloy'
| 'ash'
| 'ballad'
| 'coral'
| 'echo'
| 'fable'
| 'onyx'
| 'nova'
| 'sage'
| 'shimmer'
| 'verse';
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.
*/
voice?: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
}

export namespace Session {
Expand Down Expand Up @@ -436,21 +423,9 @@ export interface SessionCreateResponse {
/**
* The voice the model uses to respond. Voice cannot be changed during the session
* once the model has responded with audio at least once. Current voice options are
* `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
*/
voice?:
| (string & {})
| 'alloy'
| 'ash'
| 'ballad'
| 'coral'
| 'echo'
| 'fable'
| 'onyx'
| 'nova'
| 'sage'
| 'shimmer'
| 'verse';
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.
*/
voice?: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
}

export namespace SessionCreateResponse {
Expand Down Expand Up @@ -694,22 +669,9 @@ export interface SessionCreateParams {
/**
* The voice the model uses to respond. Voice cannot be changed during the session
* once the model has responded with audio at least once. Current voice options are
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
* `shimmer`, and `verse`.
*/
voice?:
| (string & {})
| 'alloy'
| 'ash'
| 'ballad'
| 'coral'
| 'echo'
| 'fable'
| 'onyx'
| 'nova'
| 'sage'
| 'shimmer'
| 'verse';
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.
*/
voice?: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
}

export namespace SessionCreateParams {
Expand Down
20 changes: 4 additions & 16 deletions src/resources/chat/completions/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export interface ChatCompletion {
* - If set to 'auto', then the request will be processed with the service tier
* configured in the Project settings. Unless otherwise configured, the Project
* will use 'default'.
* - If set to 'default', then the requset will be processed with the standard
* - If set to 'default', then the request will be processed with the standard
* pricing and performance for the selected model.
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
* 'priority', then the request will be processed with the corresponding service
Expand Down Expand Up @@ -474,19 +474,7 @@ export interface ChatCompletionAudioParam {
* The voice the model uses to respond. Supported voices are `alloy`, `ash`,
* `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.
*/
voice:
| (string & {})
| 'alloy'
| 'ash'
| 'ballad'
| 'coral'
| 'echo'
| 'fable'
| 'onyx'
| 'nova'
| 'sage'
| 'shimmer'
| 'verse';
voice: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
}

/**
Expand Down Expand Up @@ -529,7 +517,7 @@ export interface ChatCompletionChunk {
* - If set to 'auto', then the request will be processed with the service tier
* configured in the Project settings. Unless otherwise configured, the Project
* will use 'default'.
* - If set to 'default', then the requset will be processed with the standard
* - If set to 'default', then the request will be processed with the standard
* pricing and performance for the selected model.
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
* 'priority', then the request will be processed with the corresponding service
Expand Down Expand Up @@ -1451,7 +1439,7 @@ export interface ChatCompletionCreateParamsBase {
* - If set to 'auto', then the request will be processed with the service tier
* configured in the Project settings. Unless otherwise configured, the Project
* will use 'default'.
* - If set to 'default', then the requset will be processed with the standard
* - If set to 'default', then the request will be processed with the standard
* pricing and performance for the selected model.
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
* 'priority', then the request will be processed with the corresponding service
Expand Down
8 changes: 7 additions & 1 deletion src/resources/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ export namespace ImagesResponse {
input_tokens_details: Usage.InputTokensDetails;

/**
* The number of image tokens in the output image.
* The number of output tokens generated by the model.
*/
output_tokens: number;

Expand Down Expand Up @@ -589,6 +589,9 @@ export interface ImageEditParamsBase {
* The number of partial images to generate. This parameter is used for streaming
* responses that return partial images. Value must be between 0 and 3. When set to
* 0, the response will be a single image sent in one streaming event.
*
* Note that the final image may be sent before the full number of partial images
* are generated if the full image is generated more quickly.
*/
partial_images?: number | null;

Expand Down Expand Up @@ -709,6 +712,9 @@ export interface ImageGenerateParamsBase {
* The number of partial images to generate. This parameter is used for streaming
* responses that return partial images. Value must be between 0 and 3. When set to
* 0, the response will be a single image sent in one streaming event.
*
* Note that the final image may be sent before the full number of partial images
* are generated if the full image is generated more quickly.
*/
partial_images?: number | null;

Expand Down
Loading