Skip to content

Commit 6fbcc43

Browse files
Merge pull request #1595 from openai/release-please--branches--master--changes--next--components--openai
release: 5.10.3
2 parents 7fb3c0b + 4137011 commit 6fbcc43

File tree

8 files changed

+29
-28
lines changed

8 files changed

+29
-28
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.2"
2+
".": "5.10.3"
33
}

CHANGELOG.md

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

3+
## 5.10.3 (2025-07-30)
4+
5+
Full Changelog: [v5.10.2...v5.10.3](https://github.com/openai/openai-node/compare/v5.10.2...v5.10.3)
6+
7+
### Bug Fixes
8+
9+
* **zod:** avoid adding redundant not to optional schemas [#1593](https://github.com/openai/openai-node/issues/1593) ([162b697](https://github.com/openai/openai-node/commit/162b697d1b946dc4af213c8efcdb7a7b5317bb6e))
10+
11+
12+
### Chores
13+
14+
* **client:** refactor streaming slightly to better future proof it ([292427f](https://github.com/openai/openai-node/commit/292427f7f39f6dd64e46ba4360b0b96c8e49adc9))
15+
* **internal:** remove redundant imports config ([28dd66d](https://github.com/openai/openai-node/commit/28dd66de15032d6ee620d3cf9f3e33ba61cad4e7))
16+
* **internal:** version bump ([56e0760](https://github.com/openai/openai-node/commit/56e076090a9ce5c6b7f4ac4d84d33ca3f6522973))
17+
318
## 5.10.2 (2025-07-22)
419

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

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.2",
3+
"version": "5.10.3",
44
"exports": {
55
".": "./index.ts",
66
"./helpers/zod": "./helpers/zod.ts",

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openai",
3-
"version": "5.10.2",
3+
"version": "5.10.3",
44
"description": "The official TypeScript library for the OpenAI API",
55
"author": "OpenAI <[email protected]>",
66
"types": "dist/index.d.ts",
@@ -51,10 +51,6 @@
5151
"zod": "^3.23.8",
5252
"typescript-eslint": "8.31.1"
5353
},
54-
"imports": {
55-
"openai": ".",
56-
"openai/*": "./src/*"
57-
},
5854
"bin": {
5955
"openai": "bin/cli"
6056
},

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/core/streaming.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,7 @@ export class Stream<Item> implements AsyncIterable<Item> {
5454
continue;
5555
}
5656

57-
if (
58-
sse.event === null ||
59-
sse.event.startsWith('response.') ||
60-
sse.event.startsWith('image_edit.') ||
61-
sse.event.startsWith('image_generation.') ||
62-
sse.event.startsWith('transcript.')
63-
) {
57+
if (sse.event === null || !sse.event.startsWith('thread.')) {
6458
let data;
6559

6660
try {

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '5.10.2'; // x-release-please-version
1+
export const VERSION = '5.10.3'; // x-release-please-version

tests/helpers/zod.test.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,11 @@ describe('zodResponseFormat', () => {
7171
"units": {
7272
"anyOf": [
7373
{
74-
"anyOf": [
75-
{
76-
"not": {},
77-
},
78-
{
79-
"enum": [
80-
"c",
81-
"f",
82-
],
83-
"type": "string",
84-
},
74+
"enum": [
75+
"c",
76+
"f",
8577
],
78+
"type": "string",
8679
},
8780
{
8881
"type": "null",

0 commit comments

Comments
 (0)