## openai/openai-node — v7.4.0…v7.5.0

_313+ commits._

### Features
- **feat(api): Add ServiceTier and ImageDetail types (#2364)** (602d481)
- **feat: add Bedrock Runtime endpoint support (SDK-290) (#2348)** (4a199af)
- **Add shell call streaming events and improve request timeout handling (#2360)** (6eda5b1)
- **feat(api): Ultrafast tier, structured MCP and websocket errors, separate websocket events (#2332)** (a3deafb)
- **feat(api): add WebSocket stream IDs (#2314)** (156a8db)
- **feat(api): deprecate Sora video APIs (#2313)** (4424b40)
- **feat(api): add workload identity access token issued event (#2307)** (322a5b1)
- **support realtime transcription intent (#1974)** (8b1b4b6)
- **feat(api): add new Daybreak and gpt-5.6-cyber model identifiers (#2278)** (9a38e63)

### Fixes
- **fix(security): prevent Bedrock bearer credential disclosure across redirects (#2377)** (bfcccad)
- **fix(bedrock): safely sign inherited query parameter names (#2375)** (3f8d5cc)
- **fix(security): prevent streaming upload filename/header injection (#2363)** (4ba4084)
- **fix(zod): reject non-object Zod v3 strict schema roots (#2358)** (cc7dbfa)
- **Optimize streamed response text handling** — Improved the performance and correctness of how streamed API responses accumulate and maintain text output. Previously, large streaming responses would repeatedly recalculate the complete text, causing massive performance degradation; now the system maintains text incrementally while preserving the correct canonical order of messages and content, even when earlier parts receive updates. This reduces processing from millions of redundant operations down to linear work for typical streams. (6827a40)
- **Fix emoji encoding in query strings** — Fixed a bug where emoji and other special Unicode characters could be corrupted when they appeared at certain positions in query parameters (like pagination cursors). The encoder was incorrectly splitting character pairs across processing boundaries, which could silently change or lose following characters. This now preserves complete characters across all query encoding operations. (d8c4409)
- **Fix WebSocket listener memory leaks** — Fixed a bug where duplicate event listeners in WebSocket connections weren't being properly removed, causing memory leaks and callbacks to fire multiple times. The fix tracks all listener registrations per callback instead of overwriting them, ensures the most recent listener is removed first, and prevents reentrant dispatch issues. (a032b85)
- **Fix Zod schema reference escaping** — Fixed a bug where literal JSON payloads containing `$ref` fields were being incorrectly treated as schema references and rewritten. The fix now only escapes actual schema definition references while preserving caller-owned literal objects, and adds comprehensive test coverage for Zod v3, v4, frozen objects, and cyclic defaults. (8f189f4)
- **Fix ecosystem CI credential validation** — The ecosystem test CLI now properly validates API credentials only when needed for live or deploy modes, allowing help and version commands to work without a key. This fixes a CI integrity issue where missing credentials would silently pass checks instead of failing the required ecosystem test job. (a47dc75)
- **Fix workload identity package exports** — Restored the `openai/auth` package entrypoint that was documented but unavailable, allowing developers to import Kubernetes, Azure, and Google Cloud workload identity helpers as shown in the guides. The fix adds the missing export declaration so `require('openai/auth')` and `import ... from 'openai/auth'` now work correctly across CommonJS, ESM, and TypeScript consumers. (af8f14f)
- **Fix Azure credential exposure in browser** — Fixed two security issues in Azure Realtime WebSocket connections: (1) explicit browser denial settings are now properly enforced instead of being ignored, preventing credential exposure in handshake URLs, and (2) both API key and Authorization credentials are now redacted from the public connection URL in beta. The actual authorized connection remains unchanged. (a77861d)
- **Fixed Vercel test isolation bugs** — Fixed a critical issue where the Vercel Edge and Node.js test handlers were reusing test registries across multiple requests, causing stale OpenAI clients and credentials to be replayed and inflating API call counts exponentially. Tests are now isolated per request, preventing warm workers from carrying over state from previous requests, and a new regression test validates that each request gets fresh clients and that failed requests don't continue erroring in subsequent runs. (2831290)
- **Fix Zod schema name collisions** — Resolved a bug where different schema paths that flattened to the same generated definition name would silently corrupt structured output and tool schemas, causing mismatches between what the model saw and what the local parser expected. The fix ensures each distinct schema gets a unique, deterministic name while preserving readability and preventing accidental overwrites. (0844573)
- **Fix Zod v3 array schema validation** — Fixed an issue where arrays of `z.any()` in Zod v3 were missing required item schemas in strict mode, now matching Zod v4 behavior. The fix ensures strict schema validation passes while preserving existing non-strict behavior and metadata on described or named items. (4c32089)
- **Fix null literal handling in Zod v3** — Corrected how null literals are represented in JSON schemas for Zod v3, ensuring they are properly recognized as type 'null' instead of type 'object'. This fix applies to all Zod helper functions and maintains compatibility with OpenAPI 3. (ed5c5e6)
- **Fixed audio recording and playback issues** — Resolved three subprocess lifecycle bugs in audio helpers: invalid timeout values no longer spawn FFmpeg before validation, abort listeners are now properly cleaned up after recording completes to prevent resource leaks, and unused audio output pipes are now drained to prevent deadlocks during longer sessions. (1c692fe)
- **Fix AssistantStream event lifecycle bugs** — Fixed two data-attribution and event-sequencing bugs in AssistantStream where consecutive messages or tool calls would incorrectly reuse previous state, causing missing lifecycle events or cross-message data leaks. The fix properly resets internal state when messages and run steps are created and completed. (178e85f)
- **Speed up line decoding by 68×** — Optimized the internal line decoder to use an amortized-linear byte buffer with cursor tracking instead of repeatedly concatenating and rescanning the entire buffer. This fixes a severe performance issue where fragmented NDJSON streams could result in quadratic CPU consumption—now achieving 8,224× fewer bytes copied and 14× faster public streaming on 32 KiB lines. (f32e2df)
- **Speed up event stream processing** — Replaced inefficient array shifting operations with a head-indexed queue that tracks consumed entries, dramatically improving performance when handling large numbers of buffered events. This eliminates quadratic slowdowns that could block the event loop with slow consumers or large streaming responses, achieving ~1,000× faster draining in some scenarios. (57521a1)
- **Secure Bedrock credentials to endpoint origin** — Fixed a security vulnerability that could allow Bedrock API credentials (bearer tokens and AWS signatures) to be sent to unintended servers. The fix validates that all requests and WebSocket connections stay within the configured endpoint's origin, preventing credential leakage through request path manipulation or redirect attacks. (23f0575)
- **Prevent malicious error crashes** — Fixed a security vulnerability where remote WebSocket peers could send specially crafted error payloads containing non-serializable values that would crash Node.js clients. The SDK now safely converts all error fields to strings, replacing any unserializable values with a placeholder text instead of crashing. (896f021)
- **Prevent tool name injection attacks** — Fixed a security vulnerability where model-supplied tool names like `__proto__` or `constructor` could crash the chat runner or bypass tool boundaries. The fix uses a null-prototype registry to prevent inherited property lookups from resolving dangerous function names. (f4496d1)
- **Validate workload identity token expiration** — Fixed a security vulnerability where invalid or malformed token expiration values could cause expired authentication tokens to be reused indefinitely. The system now strictly validates that expiration timestamps are valid, finite, positive numbers and represent a safe future time before accepting OAuth responses. (1f0349d)
- **Prevent prototype manipulation attacks** — Fixed a security vulnerability where attackers could manipulate object prototypes in streamed chat responses by injecting `__proto__` fields, potentially causing forged tool calls or content to be executed. The fix safely handles these fields before merging server data into chat snapshots. (e81d766)
- **fix: prevent prototype manipulation in strict Structured Outputs schemas (#2341)** (838de7e)
- **fix: reject unsupported __proto__ Zod v3 object properties (#2352)** (46a8ca0)
- **fix(security): keep browser ecosystem API keys out of navigation URLs (#2353)** (1029e82)
- **fix(azure): prevent deployment path traversal (#2337)** (a9d9d41)
- **fix: parse empty chat content when present (#2331)** (53dd723)
- **fix: preserve zero retry-after-ms precedence (#2329)** (b44644e)
- **fix: configure Bash for pnpm scripts on Windows (#2330)** (f5a0ad1)
- **fix(responses): validate streaming event indices before array access (#2323)** (13eaf1d)
- **fix(streaming): eliminate quadratic SSE buffer copying (#2324)** (ebdb296)
- **fix(realtime): prevent Azure API-key disclosure across WebSocket redirects (#2325)** (d5a1a1e)
- **fix(security): bound untrusted AssistantStream delta array indices (#2326)** (afdf5ef)
- **fix(realtime): remove immutable model updates from public and Azure examples (#2327)** (08bd80a)
- **fix(azure): honor explicit browser denial for Entra token providers (#2328)** (9d47510)
- **fix(security): prevent global Array.prototype pollution in chat completion streams (#2318)** (486e191)
- **fix(azure): prevent API-key disclosure across HTTP redirects (#2320)** (f36c418)
- **fix(streaming): finish SSE streams immediately after [DONE] (#2317)** (7722171)
- **fix(security): prevent multipart upload content-type header injection (#2322)** (1c0b9ca)
- **fix(auth): reject redirects during workload identity token exchange (#2321)** (240385e)
- **fix(security): prevent process-wide prototype pollution via assistant stream snapshot IDs (#2316)** (21a0653)
- **fix: prevent prototype event names from crashing SDK streams (#2315)** (c014250)
- **fix: remove vulnerable extract-zip from browser tests (#2312)** (567ad4f)
- **fix(streaming): handle mixed SSE line endings (#2309)** (24d5ada)
- **fix: avoid TypeError in toFile for Responses without a URL (#2311)** (3313f54)
- **fix(realtime): allow overriding WebSocket connection URLs (#2308)** (7407413)
- **fix(streaming): surface mid-stream errors when iterating buffered streams (#2047)** (8cc6cac)
- **fix(chat): support custom tool calls in parser and ChatCompletionStream (#2023)** (6fa9152)
- **fix(responses): reject with OpenAIError when the stream emits an error event (#2021)** (a54014d)
- **fix(parser): recognize raw json_schema response format in auto-parsing checks (#2015)** (fbd2541)
- **fix(audio): reject ffplay spawn errors (#2012)** (6d42d4d)
- **fix(client): handle empty JSON response body without content-length (#1998)** (b6447e9)
- **fix: preserve skill upload paths without buffering native files (#2303)** (30b9c41)
- **fix: await webhook verification in README examples (#2302)** (0fe7ad0)
- **Fix webhook verification without Buffer (#1950)** (89bd799)
- **fix(azure): preserve model-to-deployment mapping for images.edit (#1918)** (6c207c6)
- **fix(deps): remediate Dependabot and fixture vulnerabilities (#2282)** (783da8f)
- **fix: preserve File-like metadata in toFile (#1883)** (ba1a781)
- **fix: honor defaultHeaders null for helper method header (#1857)** (8eab09a)
- **fix: preserve Skills upload file paths (#1856)** (e75de97)
- **fix(embedding): response type for base64 encoding format (#1554)** (ef69801)
- **fix: pass file batch helper options through (#1855)** (05ce028)
- **fix: export AzureClientOptions (#1760)** (511bf6d)
- **fix: prevent prototype pollution in assistant stream deltas (#2280)** (928fa2b)
- **fix(api): clarify audio upload metadata requirements (#2279)** (34ecf3f)

### Backend
- **release: 7.5.0 (#2087)** (5b96016)
- **Avoid rescanning SSE delimiter buffers (#1913)** (3944f0f)

### Tests
- **test: stabilize Node 22 multipart mock-server 404 checks (#2361)** (ec6bb18)
- **test: run pnpm scripts through Bash on Windows (#2310)** (b4d2891)
- **test: run Bash harness tests on Windows (#2041)** (db14a73)

### Docs
- **docs(api): describe response stream event unions (#2319)** (3f0f688)
- **docs: document all handwritten SDK surfaces (#2281)** (d9c212a)

### Chore
- **chore(deps-dev): bump oxfmt from 0.61.0 to 0.62.0 (#2373)** (16172a4)
- **chore(deps-dev): bump ts-jest from 29.4.11 to 29.4.12 (#2374)** (6320b64)
- **chore(deps-dev): bump webpack from 5.108.4 to 5.109.2 in /ecosystem-tests/ts-browser-webpack (#2368)** (b49b227)
- **chore(deps-dev): bump @aws-sdk/credential-provider-node from 3.972.77 to 3.972.78 (#2371)** (2cc57c3)
- **chore(deps-dev): bump @cloudflare/workers-types from 5.20260804.1 to 5.20260809.1 in /ecosystem-tests/cloudflare-worker (#2366)** (6983363)
- **chore(deps-dev): bump @types/node from 24.12.4 to 26.2.0 (#2370)** (50db5db)
- **chore(deps-dev): bump html-webpack-plugin from 5.6.7 to 5.6.8 in /ecosystem-tests/ts-browser-webpack (#2367)** (7259f9f)
- **chore(deps-dev): bump wrangler from 4.118.0 to 4.120.0 in /ecosystem-tests/cloudflare-worker (#2365)** (01fae5e)
- **chore(deps-dev): bump start-server-and-test from 3.0.11 to 3.0.12 in /ecosystem-tests/vercel-edge (#2369)** (9ff1aff)
- **ci: run Vitest performance benchmarks in CI (#2306)** (9066fba)
- **chore: remove Stainless attribution from legacy SDK files (#2304)** (85f7c6b)
- **chore(deps-dev): bump ultracite from 7.8.4 to 7.10.0 (#2300)** (8a7508c)
- **chore(deps-dev): bump wrangler from 4.110.0 to 4.118.0 in /ecosystem-tests/cloudflare-worker (#2286)** (1c46aad)
- **chore(deps-dev): bump iconv-lite from 0.6.3 to 0.7.3 (#2299)** (7cfb7f3)
- **chore(deps-dev): bump signal-exit from 3.0.7 to 4.1.0 (#2296)** (9dac77d)
- **chore(deps-dev): bump @aws-sdk/credential-provider-node from 3.972.47 to 3.972.77 (#2298)** (67b581a)
- **chore(deps-dev): bump ts-jest from 29.4.11 to 29.4.12 in /ecosystem-tests/node-ts-cjs (#2287)** (a4b36bd)
- **chore(deps-dev): bump @cloudflare/workers-types from 5.20260710.1 to 5.20260804.1 in /ecosystem-tests/cloudflare-worker (#2283)** (c9cdbad)
- **chore(deps-dev): bump ts-jest from 29.4.11 to 29.4.12 in /ecosystem-tests/cloudflare-worker (#2284)** (9230649)
- **chore(deps-dev): bump superstruct from 1.0.4 to 2.0.2 (#2285)** (190d58c)
- **chore(deps-dev): bump ts-jest from 29.4.11 to 29.4.12 in /ecosystem-tests/node-ts-cjs-web (#2288)** (25d94fa)
- **chore(deps-dev): bump ts-jest from 29.4.11 to 29.4.12 in /ecosystem-tests/node-ts-esm (#2290)** (9b33e5e)
- **chore(deps-dev): bump ts-jest from 29.4.11 to 29.4.12 in /ecosystem-tests/node-ts-esm-auto (#2291)** (1579ae0)
- **chore(deps-dev): bump ts-jest from 29.4.11 to 29.4.12 in /ecosystem-tests/node-ts-esm-web (#2292)** (6449a74)
- **chore(deps-dev): bump ts-jest from 29.4.11 to 29.4.12 in /ecosystem-tests/vercel-edge (#2295)** (93096e2)
- **chore(deps-dev): bump @smithy/hash-node from 4.4.15 to 4.4.16 (#2293)** (ba2fc9f)
- **chore: limit Dependabot to 10 open pull requests (#2297)** (b05dd10)
- **chore(deps-dev): bump @smithy/protocol-http from 5.4.5 to 5.5.16 (#2289)** (81cf407)
- **chore(deps-dev): bump @smithy/signature-v4 from 5.4.5 to 5.6.12 (#2294)** (c70c34f)
- **chore(lint): enable typescript/no-explicit-any (#2277)** (0eae8c6)
- **chore(lint): enable no-use-before-define (#2276)** (246cd5f)
- **chore(lint): enable curly (#2275)** (ac6d82f)
- **chore(lint): enable func-names (#2274)** (3055ccc)
- **chore(lint): enable prefer-arrow-callback (#2273)** (d430d32)
- **chore(lint): enable typescript/consistent-type-imports (#2272)** (259b978)
- **chore(lint): enable require-await (#2271)** (d687018)
- **chore(lint): enable unicorn/switch-case-braces (#2270)** (f64e5d5)
- **chore(lint): enable require-unicode-regexp (#2269)** (1299a38)
- **chore(lint): enable import/no-cycle (#2268)** (5b1f37c)
- **chore(lint): enable typescript/no-non-null-assertion (#2267)** (702cf6d)
- **chore(lint): enable prefer-template (#2266)** (84e6741)
- **chore(lint): enable import/consistent-type-specifier-style (#2265)** (559b8d0)
- **chore(lint): enable prefer-destructuring (#2264)** (afa0c8c)
- **chore(lint): enable no-inline-comments (#2263)** (3485404)
- **chore(lint): enable typescript/consistent-type-definitions (#2262)** (94445b1)
- **chore(lint): enable typescript/ban-ts-comment (#2261)** (6f395e4)
- **chore(lint): enable no-plusplus (#2260)** (570686e)
- **chore(lint): enable eqeqeq (#2259)** (8e8fb1c)
- **chore(lint): enable no-var (#2258)** (efc4c01)
- **chore(lint): enable no-unused-vars (#2257)** (d13da1d)
- **chore(lint): enable no-await-in-loop (#2256)** (40da819)
- **chore(lint): enable unicorn/consistent-function-scoping (#2255)** (09c4946)
- **chore(lint): enable unicorn/prefer-response-static-json (#2254)** (96859ed)
- **chore(lint): enable no-eq-null (#2253)** (18253be)
- **chore(lint): enable unicorn/prefer-node-protocol (#2252)** (15009d6)
- **chore(lint): enable unicorn/numeric-separators-style (#2251)** (4fa2035)
- **chore(lint): enable typescript/array-type (#2250)** (c769c3d)
- **chore(lint): enable no-bitwise (#2249)** (6ac6d6d)
- **chore(lint): enable typescript/method-signature-style (#2248)** (fd2d250)
- **chore(lint): enable typescript/prefer-ts-expect-error (#2247)** (0dd1882)
- **chore(lint): enable prefer-named-capture-group (#2246)** (3989eed)
- **chore(lint): enable promise/avoid-new (#2245)** (6d8ac0c)
- **chore(lint): enable unicorn/text-encoding-identifier-case (#2244)** (420529c)
- **chore(lint): enable unicorn/filename-case (#2243)** (fd8b09d)
- **chore(lint): enable unicorn/catch-error-name (#2242)** (0698eb4)
- **chore(lint): enable no-shadow (#2241)** (602bc22)
- **chore(lint): enable unicorn/prefer-module (#2240)** (05eaa62)

_Recap by [Repo Wrapped](https://repowrapped.com/gh/openai/openai-node?utm_source=github-action)._