Skip to content

Commit e09a047

Browse files
committed
Merge remote-tracking branch 'origin/next' into improve-streaming-future-proofing
2 parents ca938d6 + 162b697 commit e09a047

File tree

18 files changed

+224
-249
lines changed

18 files changed

+224
-249
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "5.10.1"
2+
".": "5.10.2"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-670ea0d2cc44f52a87dd3cadea45632953283e0636ba30788fdbdb22a232ccac.yml
3-
openapi_spec_hash: d8b7d38911fead545adf3e4297956410
4-
config_hash: b2a4028fdbb27a08de89831ed310e244
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-b2a451656ca64d30d174391ebfd94806b4de3ab76dc55b92843cfb7f1a54ecb6.yml
3+
openapi_spec_hash: 27d9691b400f28c17ef063a1374048b0
4+
config_hash: e822d0c9082c8b312264403949243179

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## 5.10.2 (2025-07-22)
4+
5+
Full Changelog: [v5.10.1...v5.10.2](https://github.com/openai/openai-node/compare/v5.10.1...v5.10.2)
6+
7+
### Chores
8+
9+
* **api:** event shapes more accurate ([78f4e1d](https://github.com/openai/openai-node/commit/78f4e1d8e7400001a7bc6a05dc9a6e52a2047523))
10+
* **internal:** version bump ([ea885ca](https://github.com/openai/openai-node/commit/ea885cac5c4231597141e91bd454e540830deb95))
11+
12+
13+
### Documentation
14+
15+
* fix typos in helpers and realtime ([#1592](https://github.com/openai/openai-node/issues/1592)) ([17733b7](https://github.com/openai/openai-node/commit/17733b7e4a19754c9ca2ec815cf7d246b1dc138d))
16+
317
## 5.10.1 (2025-07-16)
418

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

api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,8 +710,6 @@ Types:
710710
- <code><a href="./src/resources/responses/responses.ts">ResponseOutputTextAnnotationAddedEvent</a></code>
711711
- <code><a href="./src/resources/responses/responses.ts">ResponsePrompt</a></code>
712712
- <code><a href="./src/resources/responses/responses.ts">ResponseQueuedEvent</a></code>
713-
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningDeltaEvent</a></code>
714-
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningDoneEvent</a></code>
715713
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningItem</a></code>
716714
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningSummaryDeltaEvent</a></code>
717715
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningSummaryDoneEvent</a></code>

helpers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ provides richer integrations with TS specific types & returns a `ParsedChatCompl
77

88
## Auto-parsing response content with Zod schemas
99

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

1313
```ts

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openai/openai",
3-
"version": "5.10.1",
3+
"version": "5.10.2",
44
"exports": {
55
".": "./index.ts",
66
"./helpers/zod": "./helpers/zod.ts",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openai",
3-
"version": "5.10.1",
3+
"version": "5.10.2",
44
"description": "The official TypeScript library for the OpenAI API",
55
"author": "OpenAI <[email protected]>",
66
"types": "dist/index.d.ts",

realtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ A full example can be found [here](https://github.com/openai/openai-node/blob/ma
7474

7575
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.
7676

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

7979
```ts
8080
const rt = new OpenAIRealtimeWS({ model: 'gpt-4o-realtime-preview-2024-12-17' });

src/_vendor/zod-to-json-schema/parsers/optional.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ import { JsonSchema7Type, parseDef } from '../parseDef';
33
import { Refs } from '../Refs';
44

55
export const parseOptionalDef = (def: ZodOptionalDef, refs: Refs): JsonSchema7Type | undefined => {
6-
if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
7-
return parseDef(def.innerType._def, refs);
6+
if (
7+
refs.propertyPath &&
8+
refs.currentPath.slice(0, refs.propertyPath.length).toString() === refs.propertyPath.toString()
9+
) {
10+
return parseDef(def.innerType._def, { ...refs, currentPath: refs.currentPath });
811
}
912

1013
const innerSchema = parseDef(def.innerType._def, {

src/resources/audio/speech.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,7 @@ export interface SpeechCreateParams {
5151
* `verse`. Previews of the voices are available in the
5252
* [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
5353
*/
54-
voice:
55-
| (string & {})
56-
| 'alloy'
57-
| 'ash'
58-
| 'ballad'
59-
| 'coral'
60-
| 'echo'
61-
| 'fable'
62-
| 'onyx'
63-
| 'nova'
64-
| 'sage'
65-
| 'shimmer'
66-
| 'verse';
54+
voice: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
6755

6856
/**
6957
* Control the voice of your generated audio with additional instructions. Does not

0 commit comments

Comments
 (0)