Compare Versions - openai
npm / openai / Compare Versions
6.39.0 (2026-05-21)
Full Changelog: v6.38.0...v6.39.0
Features
- api: api update (33ea11f)
- api: manual updates (c210b09)
- api: manual updates (92df9dc)
- api: update OpenAPI spec or Stainless config (c7c0f52)
Bug Fixes
- types: allow runtime fetch options (8f5003d)
- typescript: upgrade tsc-multi so that it works with Node 26 (068f9c6)
Chores
6.38.0 (2026-05-13)
Full Changelog: v6.37.0...v6.38.0
Features
- api: add service_tier parameter to responses compact method (423e838)
6.37.0 (2026-05-07)
Full Changelog: v6.36.0...v6.37.0
Features
- api: add quantity field to admin organization usage responses (273a8f7)
- api: add web_search_call.results output option to responses (91c75e0)
- api: launch realtime translate + update image 2 (a296b66)
- api: manual updates (794b905)
- api: manual updates (6963729)
- api: realtime 2 (f4b7177)
Bug Fixes
- api: fix imagegen
sizeenum regression (4fe8469)
Chores
- redact api-key headers in debug logs (99c9c80)
6.36.0 (2026-05-01)
Full Changelog: v6.35.0...v6.36.0
Features
- api: add group_type/user metadata fields, update types across admin resources (cc52f97)
- api: add support for Admin API Keys per endpoint (770d187)
- api: admin API updates (ee2bd2d)
- api: manual updates (6af2b6d)
- api: manual updates (f2dceda)
Bug Fixes
Chores
6.35.0 (2026-04-28)
Full Changelog: v6.34.0...v6.35.0
Features
- api: Add detail to InputFileContent (910ec5d)
- api: add OAuthErrorCode type (f84bd1f)
- api: add prompt_cache_retention parameter to responses compact (c486d1f)
- api: add web_search_call.results to ResponseIncludable (72449a1)
- api: manual updates (b742f1f)
- client: add support for binary messages (c498cc3)
- client: add support for path parameters in websockets clients (e0aba70)
- client: add support for queuing messages when waiting for a connection (fd8868c)
- client: add support for WebSockets in the browser when using simple auth (27bda6a)
- client: support automatic reconnection for websockets (189410b)
- typescript: expose underlying WebSocket type (7e96939)
Bug Fixes
- client: allow single messages greater than the size of the websockets queue (ad19ab2)
- internal: gitignore generated
oidcdir (cf860f6) - types: correct prompt_cache_retention enum value in chat/completions and responses (5a81e1a)
- types: preserve emitted ts-ignore comments (1cde375)
Chores
- ci: remove release-doctor workflow (e5ab4d1)
- format: apply prettier output (80fa23d)
- format: ignore release-updated jsr config (f606e8b)
- formatter: run prettier and eslint separately (68a988e)
- internal: codegen related update (7673137)
- internal: fix package.json duplicate keys (5f075a8)
- internal: more robust bootstrap script (252e70a)
- internal: version bump (34c84ee)
- tests: bump steady to v0.22.1 (316bdba)
Documentation
- improve examples (6400d19)
6.34.0 (2026-04-08)
Full Changelog: v6.33.0...v6.34.0
Features
- api: add phase field to Message in conversations (eb7cbc1)
- client: add support for short-lived tokens (#839) (a72ebcf)
Bug Fixes
- api: remove web_search_call.results from ResponseIncludable in responses (1f6968e)
Chores
- internal: codegen related update (1081460)
- internal: update multipart form array serialization (3faee8d)
- tests: bump steady to v0.20.1 (b73cc6b)
Documentation
- api: add multi-file ingestion recommendations to vector-stores files/file-batches (1bc32a3)
6.33.0 (2026-03-25)
Full Changelog: v6.32.0...v6.33.0
Features
- api: add keys field to computer action types (27a850e)
- client: add async iterator and stream() to WebSocket classes (e1c16ee)
Bug Fixes
- api: align SDK response types with expanded item schemas (491cd52)
- types: make type required in ResponseInputMessageItem (2012293)
Chores
- ci: skip lint on metadata-only changes (74a917f)
- internal: refactor imports (cfe9c60)
- internal: update gitignore (71bd114)
- tests: bump steady to v0.19.4 (f2e9dea)
- tests: bump steady to v0.19.5 (37c6cf4)
- tests: bump steady to v0.19.6 (496b3af)
- tests: bump steady to v0.19.7 (8491eb6)
Refactors
- tests: switch from prism to steady (47c0581)
6.32.0 (2026-03-17)
Full Changelog: v6.31.0...v6.32.0
Features
- api: 5.4 nano and mini model slugs (068df6d)
6.31.0 (2026-03-16)
Full Changelog: v6.30.1...v6.31.0
Features
- api: add in/nin filter types to ComparisonFilter (b2eda27)
6.28.0 (2026-03-13)
Full Changelog: v6.27.0...v6.28.0
Features
- api: manual updates (d543959)
- api: manual updates (4f87840)
- api: sora api improvements: character api, video extensions/edits, higher resolution exports. (262dac2)
Bug Fixes
- types: remove detail field from ResponseInputFile and ResponseInputFileContent (8d6c0cd)
Chores
6.27.0 (2026-03-05)
Full Changelog: v6.26.0...v6.27.0
Features
- api: The GA ComputerTool now uses the CompuerTool class. The 'computer_use_preview' tool is moved to ComputerUsePreview (0206188)
Chores
- internal: improve import alias names (9cc2478)
6.26.0 (2026-03-05)
Full Changelog: v6.25.0...v6.26.0
Features
- api: gpt-5.4, tool search tool, and new computer tool (1d1e5a9)
Bug Fixes
- api: internal schema fixes (6b401ad)
- api: manual updates (2b54919)
- api: readd phase (4a0cf29)
- api: remove phase from message types, prompt_cache_key param in responses (088fca6)
Chores
6.25.0 (2026-02-24)
Full Changelog: v6.24.0...v6.25.0
Features
- api: add phase (e32b853)
Bug Fixes
Chores
- internal: refactor sse event parsing (0ea2380)
6.24.0 (2026-02-24)
Full Changelog: v6.23.0...v6.24.0
Features
- api: add gpt-realtime-1.5 and gpt-audio-1.5 models to realtime (75875bf)
6.23.0 (2026-02-23)
Full Changelog: v6.22.0...v6.23.0
Features
- api: websockets for responses api (c6b96b8)
Bug Fixes
- docs/contributing: correct pnpm link command (8a198a5)
- internal: skip tests that depend on mock server (3d88cb0)
Chores
Documentation
6.22.0 (2026-02-14)
Full Changelog: v6.21.0...v6.22.0
Features
- api: container network_policy and skills (65c1482)
Bug Fixes
- docs: restore helper methods in API reference (3a4c189)
- webhooks: restore webhook type exports (49bbf46)
Chores
- internal: avoid type checking errors with ts-reset (4b0d1f2)
Documentation
6.21.0 (2026-02-10)
Full Changelog: v6.20.0...v6.21.0
Features
- api: support for images in batch api (017ba1c)
6.20.0 (2026-02-10)
Full Changelog: v6.19.0...v6.20.0
Features
- api: skills and hosted shell (e4bdd62)
6.19.0 (2026-02-09)
Full Changelog: v6.18.0...v6.19.0
Features
- api: responses context_management (40e7671)
6.18.0 (2026-02-05)
Full Changelog: v6.17.0...v6.18.0
Features
- api: image generation actions for responses; ResponseFunctionCallArgumentsDoneEvent.name (d373c32)
Bug Fixes
- client: avoid memory leak with abort signals (b449f36)
- client: avoid removing abort listener too early (1c045f7)
- client: undo change to web search Find action (8259b45)
- client: update type for
find_in_pageaction (9aa8d98)
Chores
6.17.0 (2026-01-28)
Full Changelog: v6.16.0...v6.17.0
Features
- api: add shell_call_output status field (edf9590)
- api: api update (6a2eb80)
- api: api updates (19ca100)
Bug Fixes
- api: mark assistants as deprecated (3ae2a14)
Chores
6.16.0 (2026-01-09)
Full Changelog: v6.15.0...v6.16.0
Features
- api: add new Response completed_at prop (ca40534)
- ci: add breaking change detection workflow (a6f3dea)
Chores
6.10.0 (2025-12-04)
Full Changelog: v6.9.1...v6.10.0
Features
- api: gpt-5.1-codex-max and responses/compact (935f79e)
Chores
6.9.1 (2025-11-17)
Full Changelog: v6.9.0...v6.9.1
Bug Fixes
- api: align types of input items / output items for typescript (99adaa7)
6.9.0 (2025-11-13)
Full Changelog: v6.8.1...v6.9.0
Features
- api: gpt 5.1 (58e78a8)
Chores
- add typescript-estree dependency for jsr readme script (3759514)
6.8.1 (2025-11-05)
Full Changelog: v6.8.0...v6.8.1
Bug Fixes
- api: fix nullability of logprobs (40a403c)
6.8.0 (2025-11-03)
Full Changelog: v6.7.0...v6.8.0
Features
- api: Realtime API token_limits, Hybrid searching ranking options (6a5b48c)
- api: remove InputAudio from ResponseInputContent (9909fef)
Chores
- internal: codegen related update (3ad52aa)
6.6.0 (2025-10-20)
Full Changelog: v6.5.0...v6.6.0
Features
- api: Add responses.input_tokens.count (520c8a9)
Bug Fixes
- api: internal openapi updates (d4aaef9)
6.4.0 (2025-10-16)
Full Changelog: v6.3.0...v6.4.0
Features
- api: Add support for gpt-4o-transcribe-diarize on audio/transcriptions endpoint (2d27392)
6.3.0 (2025-10-10)
Full Changelog: v6.2.0...v6.3.0
Features
- api: comparison filter in/not in (1a733c6)
Chores
- internal: use npm pack for build uploads (a532410)
6.2.0 (2025-10-06)
Full Changelog: v6.1.0...v6.2.0
Features
- api: dev day 2025 launches (f2816db)
Chores
6.1.0 (2025-10-02)
Full Changelog: v6.0.1...v6.1.0
Features
- api: add support for realtime calls (5de9585)
6.0.1 (2025-10-01)
Full Changelog: v6.0.0...v6.0.1
Bug Fixes
- api: add status, approval_request_id to MCP tool call (498c6a5)
6.0.0 (2025-09-30)
Full Changelog: v5.23.2...v6.0.0
⚠ BREAKING CHANGES
- api:
ResponseFunctionToolCallOutputItem.outputandResponseCustomToolCallOutput.outputnow returnstring | Array<ResponseInputText | ResponseInputImage | ResponseInputFile>instead ofstringonly. This may break existing callsites that assumeoutputis always a string.
Features
- api: Support images and files for function call outputs in responses, BatchUsage (abe56f8)
Chores
5.23.1 (2025-09-26)
Full Changelog: v5.23.0...v5.23.1
Bug Fixes
- realtime: remove beta header from GA classes (a5e9e70)
Performance Improvements
- faster formatting (d56f309)
Chores
5.22.1 (2025-09-22)
Full Changelog: v5.22.0...v5.22.1
Bug Fixes
- api: fix mcp tool name (fa9f305)
Chores
5.22.0 (2025-09-19)
Full Changelog: v5.21.0...v5.22.0
Features
- api: add reasoning_text (7ff6186)
Chores
- api: manual fixes for streaming (3a2ae4c)
5.21.0 (2025-09-17)
Full Changelog: v5.20.3...v5.21.0
Features
- api: type updates for conversations, reasoning_effort and results for evals (f243f54)
5.20.3 (2025-09-15)
Full Changelog: v5.20.2...v5.20.3
Chores
- api: docs and spec refactoring (05b4498)
5.20.2 (2025-09-12)
Full Changelog: v5.20.1...v5.20.2
Bug Fixes
- coerce nullable values to undefined (836d1b4)
Chores
- api: Minor docs and type updates for realtime (ccb00dc)
5.20.0 (2025-09-08)
Full Changelog: v5.19.1...v5.20.0
Features
- api: ship the RealtimeGA API shape (4286ddd)
Chores
- ci build action (c8ce143)
5.19.0 (2025-09-03)
Full Changelog: v5.18.1...v5.19.0
Features
- api: Add gpt-realtime models (256d932)
5.18.1 (2025-09-02)
Full Changelog: v5.18.0...v5.18.1
Chores
- api: manual updates for ResponseInputAudio (570501b)
5.18.0 (2025-09-02)
Full Changelog: v5.17.0...v5.18.0
Features
Bug Fixes
- update non beta realtime websockets helpers (265a42f)
5.17.0 (2025-09-02)
Full Changelog: v5.16.0...v5.17.0
Features
- api: realtime API updates (e817255)
Chores
- internal: update global Error reference (e566ff3)
5.16.0 (2025-08-26)
Full Changelog: v5.15.0...v5.16.0
Features
- api: add web search filters (975b141)
Chores
5.15.0 (2025-08-21)
Full Changelog: v5.14.0...v5.15.0
Features
- api: Add connectors support for MCP tool (048bee3)
- api: adding support for /v1/conversations to the API (1380d17)
Chores
- add package to package.json (6748b2b)
5.13.1 (2025-08-19)
Full Changelog: v5.13.0...v5.13.1
Chores
- api: accurately represent shape for verbosity on Chat Completions (5ddac3c)
5.12.2 (2025-08-08)
Full Changelog: v5.12.1...v5.12.2
Bug Fixes
- client: fix verbosity parameter location in Responses (eaa246f)
5.12.1 (2025-08-07)
Full Changelog: v5.12.0...v5.12.1
Features
- api: adds GPT-5 and new API features: platform.openai.com/docs/guides/gpt-5 (59acd85)
Chores
- internal: move publish config (b3d02f6)
5.10.0 (2025-07-16)
Full Changelog: v5.9.2...v5.10.0
Features
- api: manual updates (35338b4)
Chores
- internal: version bump (3d9de4b)
5.9.1 (2025-07-15)
Full Changelog: v5.9.0...v5.9.1
Chores
- api: update realtime specs, build config (bb4649f)
5.9.0 (2025-07-10)
Full Changelog: v5.8.4...v5.9.0
Features
- api: add file_url, fix event ID (5f5d39e)
5.8.2 (2025-06-27)
Full Changelog: v5.8.1...v5.8.2
Bug Fixes
- client: get fetchOptions type more reliably (b3c959d)
5.8.1 (2025-06-26)
Full Changelog: v5.8.0...v5.8.1
Bug Fixes
- client: ensure addOutputText is called on responses.retrieve (d55bb64)
Chores
5.8.0 (2025-06-26)
Full Changelog: v5.7.0...v5.8.0
Features
- api: webhook and deep research support (f2b4f66)
Bug Fixes
- ci: release-doctor — report correct token name (aed2587)
Refactors
- types: replace Record with mapped types (7865910)
5.7.0 (2025-06-23)
Full Changelog: v5.6.0...v5.7.0
Features
- api: update api shapes for usage and code interpreter (f2100e8)
5.6.0 (2025-06-20)
Full Changelog: v5.5.1...v5.6.0
Features
- api: make model and inputs not required to create response (52211c0)
Bug Fixes
- client: explicitly copy fetch in withOptions (0efacae)
Chores
5.4.0 (2025-06-16)
Full Changelog: v5.3.0...v5.4.0
Features
- api: add reusable prompt IDs (c720bb3)
- client: add support for endpoint-specific base URLs (05f558b)
Bug Fixes
- publish script — handle NPM errors correctly (a803cce)
Chores
5.2.0 (2025-06-09)
Full Changelog: v5.1.1...v5.2.0
Features
- api: Add tools and structured outputs to evals (64844f1)
Bug Fixes
- changelog: remove duplicated entries (18484cc)
Chores
- avoid type error in certain environments (44ac3d9)
Documentation
5.1.1 (2025-06-05)
Full Changelog: v5.1.0...v5.1.1
Bug Fixes
- assistants: handle thread.run.incomplete while streaming (8f5e7f3)
Chores
5.1.0 (2025-06-03)
Full Changelog: v5.0.2...v5.1.0
Features
- api: add new realtime and audio models, realtime session options (1219f09)
Chores
5.0.2 (2025-06-02)
Full Changelog: v5.0.1...v5.0.2
Bug Fixes
- api: Fix evals and code interpreter interfaces (992a9d8)
Chores
5.0.0 (2025-05-29)
Full Changelog: v5.0.0-alpha.0...v5.0.0
Features
- add audio helpers (ec5067d)
- add migration guide (cfd2088)
- add SKIP_BREW env var to ./scripts/bootstrap (7ea4a24)
- api: add /v1/responses and built-in tools (91af47c)
- api: add /v1/responses and built-in tools (0612242)
- api: add
get /chat/completionsendpoint (9697139) - api: add
get /chat/completionsendpoint (16c67be) - api: add
get /responses/{response_id}/input_itemsendpoint (f2c5aba) - api: add
get /responses/{response_id}/input_itemsendpoint (3676d34) - api: add container endpoint (3ffca5c)
- api: add container endpoint (e973476)
- api: Add evalapi to sdk (70092d7)
- api: Add evalapi to sdk (#1456) (33b66f5)
- api: add gpt-4.5-preview (1d4478d)
- api: add gpt-4.5-preview (#1349) (bb269a1)
- api: add image sizes, reasoning encryption (0c25021)
- api: add image sizes, reasoning encryption (31cd88f)
- api: add o3 and o4-mini model IDs (19cda5d)
- api: add o3 and o4-mini model IDs (a0d0000)
- api: Add reinforcement fine-tuning api support (e6bbaf5)
- api: Add reinforcement fine-tuning api support (fabe6ec)
- api: add support for storing chat completions (59da177)
- api: add support for storing chat completions (#1327) (be1ca6b)
- api: adding gpt-4.1 family of model IDs (8a2a745)
- api: adding gpt-4.1 family of model IDs (840e7de)
- api: adding new image model support (a0010fd)
- api: adding new image model support (c353531)
- api: Config update for pakrym-stream-param (71c3d31)
- api: Config update for pakrym-stream-param (b4d1b46)
- api: Config update for pakrym-stream-param (469ad7b)
- api: further updates for evals API (3019a7e)
- api: further updates for evals API (3f6f248)
- api: manual updates (debe529)
- api: manual updates (e83286b)
- api: manual updates (959eace)
- api: manual updates (179a607)
- api: manual updates (0cb0c86)
- api: manual updates (678ae6b)
- api: manual updates (4560dc6)
- api: manual updates (554c3b1)
- api: manual updates (b893d81)
- api: manual updates (c1c2819)
- api: manual updates (efce6d3)
- api: manual updates (32afb00)
- api: new API tools (0cc8994)
- api: new API tools (fb4014f)
- api: new models for TTS, STT, + new audio features for Realtime (1eab9ed)
- api: new models for TTS, STT, + new audio features for Realtime (#1407) (d11b13c)
- api: new streaming helpers for background responses (c071491)
- api: new streaming helpers for background responses (1ddd6ff)
- api: o1-pro now available through the API (3540b06)
- api: o1-pro now available through the API (#1398) (aefd267)
- api: responses x eval api (b349ade)
- api: responses x eval api (ea1d56c)
- api: Updating Assistants and Evals API schemas (e68f598)
- api: Updating Assistants and Evals API schemas (8cc63d3)
- client: accept RFC6838 JSON content types (67da9ce)
- client: add Realtime API support (7737d25)
- client: add withOptions helper (7e9ea85)
- client: improve logging (ead0ba4)
- client: promote beta completions methods to GA (4c622f9)
- version 5 (855144b)
- version 5 (855144b)
Bug Fixes
- api: add missing file rank enum + more metadata (b943a0a)
- api: correct some Responses types (3ca8965)
- api: correct some Responses types (#1391) (e983d0c)
- api: improve type resolution when importing as a package (b6bf469)
- api: improve type resolution when importing as a package (#1444) (4af79dd)
- assistants: handle
thread.run.incompleteevent (a2714bb) - audio: correctly handle transcription streaming (9c7d352)
- avoid type error in certain environments (#1413) (f395e95)
- azure/audio: use model param for deployments (0eda70a)
- azure: add /images/edits to deployments endpoints (#1509) (4b18059)
- azure: add /images/edits to deployments endpoints (#1509) (84fc31a)
- azure: use correct internal method (a9c7821)
- client: always overwrite when merging headers (c160550)
- client: fix export map for index exports (#1328) (26d5868)
- client: fix export map for index exports, accept BunFile (9416c96)
- client: fix TypeError with undefined File (0e980d0)
- client: remove duplicate types (bee2ce5)
- client: remove duplicate types (#1410) (23fd3ff)
- client: return binary content from
get /containers/{container_id}/files/{file_id}/content(8502966) - client: return binary content from
get /containers/{container_id}/files/{file_id}/content(899869b) - client: return binary content from
get /containers/{container_id}/files/{file_id}/content(83129d7) - client: send
X-Stainless-Timeoutin seconds (5a272a7) - client: send
X-Stainless-Timeoutin seconds (#1442) (5e5e460) - client: send all configured auth headers (ee01414)
- compat with more runtimes (f743730)
- correct imports (21f2107)
- correctly decode multi-byte characters over multiple chunks (f3d7083)
- docs: correct docstring on responses.stream (1847673)
- ecosystem-tests/bun: bump dependencies (1e52734)
- ecosystem-tests/cloudflare-worker: ignore lib errors for now (157248a)
- ecosystem-tests: correct ecosystem tests setup (6fa0675)
- embeddings: correctly decode base64 data (#1448) (d6b99c8)
- exports: add missing type exports (a816029)
- exports: add missing type exports (#1417) (06c03d7)
- exports: ensure resource imports don't require /index (d028ad7)
- helpers/zod: error on optional + not nullable fields (6e424b5)
- internal: add mts file + crypto shim types (a06deb8)
- internal: clean up undefined File test (da43aa9)
- internal: fix file uploads in node 18 jest (abfff03)
- internal: work around https://github.com/vercel/next.js/issues/76881 (#1427) (84edc62)
- jsr: correct zod config (04e30c0)
- jsr: export realtime helpers (0ea64eb)
- jsr: export zod helpers (77e1180)
- mcp: remove unused tools.ts (752f4f1)
- mcp: remove unused tools.ts (#1445) (4ba9947)
- optimize sse chunk reading off-by-one error (a7effe8)
- optimize sse chunk reading off-by-one error (#1339) (b0b4189)
- package: add chat/completions.ts back in (#1333) (ee34833)
- package: add chat/completions.ts back in (#1333) (1f38cc1)
- parsing: remove tool_calls default empty array (#1341) (40e8dd2)
- parsing: remove tool_calls default empty array (#1341) (6d056bf)
- realtime: call .toString() on WebSocket url (#1324) (6e9444c)
- responses: correct computer use enum value (66fb815)
- responses: correct reasoning output type (1698b95)
- responses: correct reasoning output type (9cb9576)
- responses: correctly add output_text (8ae07cc)
- responses: support streaming retrieve calls (657807c)
- tests/embeddings: avoid cross-realm issue (aceaac0)
- tests: don't rely on OPENAI_API_KEY env variable (087580a)
- tests: manually reset node:buffer File (1d18ed4)
- tests: port tests to new setup (9eb9854)
- tests: stop using node:stream (317a04d)
- threads: remove unused duplicative types (0b77c7c)
- types: export AssistantStream (#1472) (bc492ba)
- types: export ParseableToolsParams (#1486) (3e7c92c)
- types: ignore missing
idin responses pagination (d2be74a) - types: improve responses type names (96ed4db)
- types: improve responses type names (#1392) (4548326)
- zod: warn on optional field usage (#1469) (aea2d12)
Performance Improvements
Chores
- add hash of OpenAPI spec/config inputs to .stats.yml (1b0a94d)
- add hash of OpenAPI spec/config inputs to .stats.yml (48921aa)
- add missing type alias exports (5d75cb9)
- add missing type alias exports (#1390) (f4647cc)
- api: updates to supported Voice IDs (28130c7)
- api: updates to supported Voice IDs (#1424) (fb0e96a)
- ci: add timeout thresholds for CI jobs (5775451)
- ci: add timeout thresholds for CI jobs (939f636)
- ci: bump node version for release workflows (bbf5d45)
- ci: only use depot for staging repos (c59c3b5)
- ci: only use depot for staging repos (214da39)
- ci: run on more branches and use depot runners (e17a4f8)
- ci: run on more branches and use depot runners (ead76fc)
- client: drop support for EOL node versions (a326944)
- client: expose headers on some streaming errors (#1423) (6c93a23)
- client: minor internal fixes (5032c28)
- client: minor internal fixes (6558b7c)
- client: more accurate streaming errors (0c21914)
- client: move misc public files to new
core/directory, deprecate old paths (38c9d54) - client: only accept standard types for file uploads (53e35c8)
- deprecate Assistants API (0be23b9)
- deprecate Assistants API (1726e6b)
- deprecate Assistants API (5b34fcd)
- docs: add missing deprecation warnings (5495529)
- docs: add missing deprecation warnings (995075b)
- docs: grammar improvements (d5d62b0)
- docs: grammar improvements (7761cfb)
- docs: improve docs for withResponse/asResponse (9f4c30b)
- docs: improve migration doc (732d870)
- docs: update zod tool call example, fix azure tests (f18ced8)
- exports: cleaner resource index imports (0da1c16)
- exports: cleaner resource index imports (#1396) (023d106)
- exports: stop using path fallbacks (09af7ff)
- exports: stop using path fallbacks (#1397) (7c3d212)
- fix example types (20f179d)
- improve publish-npm script --latest tag logic (6d3cc5c)
- improve publish-npm script --latest tag logic (1f59811)
- improve publish-npm script --latest tag logic (6207a2a)
- internal: add aliases for Record and Array (8957ff4)
- internal: add aliases for Record and Array (#1443) (1cb66b6)
- internal: add back release workflow (ca6266e)
- internal: add Bun.File ecosystem test (cb4194f)
- internal: add missing return type annotation (00ce31b)
- internal: add missing return type annotation (#1334) (13aab10)
- internal: add proxy ecosystem tests (619711a)
- internal: bump migration cli version (a899c97)
- internal: codegen related update (fa48353)
- internal: codegen related update (c735a3c)
- internal: fix devcontainers setup (873e273)
- internal: fix devcontainers setup (#1343) (9485f5d)
- internal: fix eslint ignores (ad5a9b6)
- internal: fix examples (db23ff3)
- internal: fix examples (#1457) (a100f0a)
- internal: fix format script (3e1ea40)
- internal: fix formatting (6469d53)
- internal: fix lint (45a372c)
- internal: fix release workflows (0e4b982)
- internal: fix release workflows (353349d)
- internal: fix tests failing on node v18 (c54270a)
- internal: fix tests not always being type checked (0266b41)
- internal: improve node 18 shims (ee3f483)
- internal: minor client file refactoring (d1aa00a)
- internal: only run examples workflow in main repo (#1450) (93569f3)
- internal: reduce CI branch coverage (bb39dba)
- internal: reduce CI branch coverage (77fc77f)
- internal: refactor utils (e7fbfbc)
- internal: remove CI condition (ef43345)
- internal: remove CI condition (#1381) (e905c95)
- internal: remove unnecessary todo (b55321e)
- internal: run CI on update-specs branch (9c45ef3)
- internal: run example files in CI (#1357) (1044c48)
- internal: share typescript helpers (2470933)
- internal: skip broken test (5b81f62)
- internal: skip broken test (#1458) (58f4559)
- internal: update @types/bun (d94b41a)
- internal: update release workflows (2cbf49a)
- internal: upload builds and expand CI branch coverage (3dcbe17)
- internal: upload builds and expand CI branch coverage (#1460) (2d45287)
- internal: version bump (b40e830)
- internal: version bump (5123fe0)
- internal: version bump (#1393) (2e49526)
- migration: add beta handling (3508099)
- move ChatModel type to shared (236dbf4)
- package: remove engines (500a82f)
- perf: faster base64 decoding (11b9534)
- Remove deprecated/unused remote spec feature (00bdda3)
- Remove deprecated/unused remote spec feature (71950f6)
- revert temporary version change (47a8350)
- tests: improve enum examples (0b30331)
- tests: improve enum examples (#1454) (15a86c9)
- tests: stop using node-fetch, don't directly upload FormDataFile (ebd464f)
- tests: switch proxy tests to fetchOptions (da6ed5f)
- types: improved go to definition on fetchOptions (f1712cd)
- update next to 14.2.25 for CVE-2025-29927 (1ed4288)
- workaround build errors (e4a7f67)
- workaround build errors (d6b396b)
Documentation
- add examples to tsdocs (e8d2092)
- fix "procesing" -> "processing" in realtime examples (#1406) (dfbdc65)
- migration: mention function renames (eb773ee)
- migration: mention zod helpers error (43b870d)
- readme: fix typo (c44ed98)
- readme: fix typo (0989ddc)
- update URLs from stainlessapi.com to stainless.com (e4e737d)
- update URLs from stainlessapi.com to stainless.com (#1352) (634a209)
Refactors
4.104.0 (2025-05-29)
Full Changelog: v4.103.0...v4.104.0
Features
- api: Config update for pakrym-stream-param (469ad7b)
Bug Fixes
- azure: add /images/edits to deployments endpoints (#1509) (84fc31a)
- client: return binary content from
get /containers/{container_id}/files/{file_id}/content(83129d7)
Chores
4.103.0 (2025-05-22)
Full Changelog: v4.102.0...v4.103.0
Features
- api: new streaming helpers for background responses (1ddd6ff)
4.102.0 (2025-05-21)
Full Changelog: v4.101.0...v4.102.0
Features
- api: add container endpoint (e973476)
4.101.0 (2025-05-21)
Full Changelog: v4.100.0...v4.101.0
Features
- api: new API tools (fb4014f)
Chores
4.100.0 (2025-05-16)
Full Changelog: v4.99.0...v4.100.0
Features
- api: further updates for evals API (3f6f248)
Chores
- internal: version bump (5123fe0)
4.98.0 (2025-05-08)
Full Changelog: v4.97.0...v4.98.0
Features
- api: Add reinforcement fine-tuning api support (4aa7a79)
Chores
Documentation
- add examples to tsdocs (7d841b7)
4.96.0 (2025-04-23)
Full Changelog: v4.95.1...v4.96.0
Features
- api: adding new image model support (a00d331)
Bug Fixes
Chores
- ci: add timeout thresholds for CI jobs (e465063)
4.95.0 (2025-04-16)
Full Changelog: v4.94.0...v4.95.0
Features
- api: add o3 and o4-mini model IDs (4845cd9)
4.92.0 (2025-04-07)
Full Changelog: v4.91.1...v4.92.0
Features
- api: manual updates (891754d)
- api: manual updates (01e5546)
- api: manual updates (f38dbf3)
- api: manual updates (1f12253)
Bug Fixes
- api: improve type resolution when importing as a package (#1444) (4aa46d6)
- client: send
X-Stainless-Timeoutin seconds (#1442) (aa4206c) - embeddings: correctly decode base64 data (#1448) (58128f7)
- mcp: remove unused tools.ts (#1445) (520a8fa)
Chores
4.91.1 (2025-04-01)
Full Changelog: v4.91.0...v4.91.1
Bug Fixes
- docs: correct docstring on responses.stream (1c8cd6a)
Chores
- Remove deprecated/unused remote spec feature (ce3dfa8)
4.91.0 (2025-03-31)
Full Changelog: v4.90.0...v4.91.0
Features
- api: add
get /responses/{response_id}/input_itemsendpoint (ef0e0ac)
Performance Improvements
4.90.0 (2025-03-27)
Full Changelog: v4.89.1...v4.90.0
Features
- api: add
get /chat/completionsendpoint (2d6710a)
Bug Fixes
- audio: correctly handle transcription streaming (2a9b603)
- internal: work around https://github.com/vercel/next.js/issues/76881 (#1427) (b467e94)
Chores
4.87.3 (2025-03-11)
Full Changelog: v4.87.2...v4.87.3
Bug Fixes
- responses: correct reasoning output type (2abef57)
4.87.2 (2025-03-11)
Full Changelog: v4.87.1...v4.87.2
Bug Fixes
- responses: correctly add output_text (4ceb5cc)
4.87.0 (2025-03-11)
Full Changelog: v4.86.2...v4.87.0
Features
- api: add /v1/responses and built-in tools (119b584)
4.84.0 (2025-02-12)
Full Changelog: v4.83.0...v4.84.0
Features
Bug Fixes
- api: add missing reasoning effort + model enums (#1302) (14c55c3)
- assistants: handle
thread.run.incompleteevent (7032cc4) - correctly decode multi-byte characters over multiple chunks (#1316) (dd776c4)
Chores
- internal: remove segfault-handler dependency (3521ca3)
Documentation
- readme: cleanup into multiple files (da94424)
4.76.3 (2024-12-13)
Full Changelog: v4.76.2...v4.76.3
Chores
- internal: better ecosystem test debugging (86fc0a8)
Documentation
4.73.0 (2024-11-20)
Full Changelog: v4.72.0...v4.73.0
Features
- api: add gpt-4o-2024-11-20 model (#1201) (0feeafd)
- bump model in all example snippets to gpt-4o (6961c37)
Bug Fixes
Chores
- client: drop unused devDependency (#1191) (8ee6c03)
- internal: spec update (#1195) (12f9334)
- internal: use reexports not destructuring (#1181) (f555dd6)
Documentation
4.72.0 (2024-11-12)
Full Changelog: v4.71.1...v4.72.0
Features
- add back deno runtime testing without type checks (1626cf5)
Chores
4.70.3 (2024-11-04)
Full Changelog: v4.70.2...v4.70.3
Bug Fixes
- change streaming helper imports to be relative (e73b7cf)
4.61.0 (2024-09-13)
Full Changelog: v4.60.1...v4.61.0
Bug Fixes
- client: partial parsing update to handle strings (46e8eb6)
- examples: handle usage chunk in tool call streaming (#1068) (e4188c4)
Chores
- examples: add a small delay to tool-calls example streaming (a3fc659)
Documentation
4.57.1 (2024-09-03)
Full Changelog: v4.57.0...v4.57.1
Bug Fixes
- assistants: correctly accumulate tool calls when streaming (#1031) (d935ad3)
- client: correct File construction from node-fetch Responses (#1029) (22ebdc2)
- runTools without stream should not emit user message events (#1005) (22ded4d)
Chores
- internal/tests: workaround bug in recent types/node release (3c7bdfd)
4.56.0 (2024-08-16)
Full Changelog: v4.55.9...v4.56.0
Features
- api: add chatgpt-4o-latest model (edc4398)
4.55.2 (2024-08-08)
Full Changelog: v4.55.1...v4.55.2
Bug Fixes
- helpers/zod: add
extract-to-rootref strategy (ef3c73c) - helpers/zod: add
nullableStrategyoption (ad89892) - helpers/zod: correct logic for adding root schema to definitions (e4a247a)
Chores
4.55.1 (2024-08-07)
Full Changelog: v4.55.0...v4.55.1
Bug Fixes
- helpers/zod: correct schema generation for recursive schemas (cb54d93)
Chores
- api: remove old
AssistantResponseFormattype (#967) (9fd94bf) - internal: update test snapshots (bceea60)
- vendor/zodJsonSchema: add option to duplicate top-level ref (84b8a38)
Documentation
- examples: add UI generation example script (c75c017)
4.55.0 (2024-08-06)
Full Changelog: v4.54.0...v4.55.0
Features
- api: add structured outputs support (573787c)
4.54.0 (2024-08-02)
Full Changelog: v4.53.2...v4.54.0
Features
- extract out
ImageModel,AudioModel,SpeechModel(#964) (1edf957) - make enums not nominal (#965) (0dd0cd1)
Chores
- ci: correctly tag pre-release npm packages (#963) (f1a4a68)
- internal: add constant for default timeout (#960) (55c01f4)
- internal: cleanup event stream helpers (#950) (8f49956)
Documentation
4.30.0 (2024-03-28)
Full Changelog: v4.29.2...v4.30.0
Features
Bug Fixes
- client: correctly send deno version header (#736) (b7ea175)
- example: correcting example (#739) (a819551)
- handle process.env being undefined in debug func (#733) (2baa149)
- internal: make toFile use input file's options (#727) (15880d7)
Chores
Documentation
4.28.5 (2024-03-13)
Full Changelog: v4.28.4...v4.28.5
Bug Fixes
- ChatCompletionStream: abort on async iterator break and handle errors (#699) (ac417a2)
- streaming: correctly handle trailing new lines in byte chunks (#708) (4753be2)
Chores
- api: update docs (#703) (e1db98b)
- docs: mention install from git repo (#700) (c081bdb)
- fix error handler in readme (#704) (4ff790a)
- internal: add explicit type annotation to decoder (#712) (d728e99)
- types: fix accidental exposure of Buffer type to cloudflare (#709) (0323ecb)
Documentation
4.28.4 (2024-02-28)
Full Changelog: v4.28.3...v4.28.4
Features
Chores
- ci: update actions/setup-node action to v4 (#685) (f2704d5)
- internal: fix ecosystem tests (#693) (616624d)
- types: extract run status to a named type (#686) (b3b3b8e)
- update @types/react to 18.2.58, @types/react-dom to 18.2.19 (#688) (2a0d0b1)
- update dependency @types/node to v20.11.20 (#690) (4ca005b)
- update dependency @types/ws to v8.5.10 (#683) (a617268)
- update dependency next to v13.5.6 (#689) (abb3b66)
4.27.1 (2024-02-12)
Full Changelog: v4.27.0...v4.27.1
4.26.1 (2024-02-05)
Full Changelog: v4.26.0...v4.26.1
Chores
- internal: enable building when git installed (#657) (8c80a7d)
- internal: re-order pagination import (#656) (21ae54e)
- internal: support pre-release versioning (#653) (0c3859f)
- test: add delay between ecosystem tests retry (#651) (6a4cc5c)
Documentation
4.26.0 (2024-01-25)
Full Changelog: v4.25.0...v4.26.0
Features
Chores
- internal: add internal helpers & improve build scripts (#643) (9392f50)
- internal: adjust ecosystem-tests logging in CI (#646) (156084b)
- internal: don't re-export streaming type (#648) (4c4be94)
- internal: fix binary files (#645) (e1fbc39)
- internal: minor streaming updates (#647) (2f073e4)
- internal: pin deno version (#649) (7e4b903)
4.24.2 (2024-01-08)
Full Changelog: v4.24.1...v4.24.2
Bug Fixes
- headers: always send lowercase headers and strip undefined (BREAKING in rare cases) (#608) (4ea159f)
Chores
- add .keep files for examples and custom code directories (#612) (5e0f733)
- internal: bump license (#605) (045ee74)
- internal: improve type signatures (#609) (e1ccc82)
Documentation
4.24.1 (2023-12-22)
Full Changelog: v4.24.0...v4.24.1
Bug Fixes
Documentation
- messages: improvements to helpers reference + typos (#595) (96a59b9)
- reformat README.md (#592) (8ffc7f8)
Refactors
4.24.0 (2023-12-19)
Full Changelog: v4.23.0...v4.24.0
Features
Chores
- deps: update dependency start-server-and-test to v2.0.3 (#580) (8e1aca1)
- deps: update dependency ts-jest to v29.1.1 (#578) (a6edb7b)
- deps: update jest (#582) (e49e471)
- internal: bump deps (#583) (2e07b4c)
- internal: update deps (#581) (7b690dc)
Documentation
4.21.0 (2023-12-11)
Full Changelog: v4.20.1...v4.21.0
Features
Bug Fixes
- correct some runTools behavior and deprecate runFunctions (#562) (f5cdd0f)
- prevent 400 when using runTools/runFunctions with Azure OpenAI API (#544) (735d9b8)
Documentation
Build System
4.19.1 (2023-11-20)
Full Changelog: v4.19.0...v4.19.1
4.17.3 (2023-11-09)
Full Changelog: v4.17.2...v4.17.3
4.16.2 (2023-11-08)
Full Changelog: v4.16.1...v4.16.2
Bug Fixes
- api: accidentally required params, add new models & other fixes (#463) (1cb403e)
- api: update embedding response object type (#466) (53b7e25)
- asssitant_deleted -> assistant_deleted (#452) (ef89bd7)
- types: ensure all code paths return a value (#458) (19402c3)
Chores
Documentation
4.16.0 (2023-11-06)
Full Changelog: v4.15.4...v4.16.0
Features
- api: releases from DevDay; assistants, multimodality, tools, dall-e-3, tts, and more (#433) (fb92f5e)
Bug Fixes
Documentation
4.12.2 (2023-10-16)
Full Changelog: v4.12.1...v4.12.2
Bug Fixes
- client: correctly handle errors during streaming (#377) (09233b1)
- client: correctly handle errors during streaming (#379) (9ced580)
- improve status code in error messages (#381) (68dfb17)
Chores
- add case insensitive get header function (#373) (b088998)
- internal: add debug logs for stream responses (#380) (689db0b)
- show deprecation notice on re-export (#368) (b176703)
- update comment (#376) (a06c685)
- update comment (#378) (b04031d)
Refactors
4.12.0 (2023-10-11)
Full Changelog: v4.11.1...v4.12.0
Features
- api: remove
content_filterstop_reason and update documentation (#352) (a4b401e) - re-export chat completion types at the top level, and work around webpack limitations (#365) (bb815d0)
Bug Fixes
Chores
4.11.1 (2023-10-03)
Full Changelog: v4.11.0...v4.11.1
4.11.0 (2023-09-29)
Full Changelog: v4.10.0...v4.11.0
Features
- client: handle retry-after with a date (#340) (b6dd384)
- package: export a root error type (#338) (462bcda)
Bug Fixes
Chores
4.5.0 (2023-09-06)
Full Changelog: v4.4.0...v4.5.0
Features
- client: add files.waitForProcessing() method (#292) (ef59010)
- fixes tests where an array has to have unique enum values (#290) (a10b895)
- make docs more readable by eliminating unnecessary escape sequences (#287) (a068043)
Bug Fixes
- client: fix TS errors that appear when users Go to Source in VSCode (#281) (8dc59bc), closes #249
- client: handle case where the client is instantiated with a undefined baseURL (#285) (5095cf3)
- client: use explicit file extensions in _shims imports (#276) (16fe929)
Documentation
4.4.0 (2023-09-01)
Full Changelog: v4.3.1...v4.4.0
Features
- package: add Bun export map (#269) (16f239c)
- re-export chat completion types at the top level (#268) (1a71a39)
- tests: unskip multipart form data tests (#275) (47d3e18)
- types: fix ambiguous auto-import for chat completions params (#266) (19c99fb)
Bug Fixes
Full Changelog: https://github.com/openai/openai-node/compare/v4.0.1...v4.1.0
Full Changelog: https://github.com/openai/openai-node/compare/v4.0.0...v4.0.1
Version 4 is a complete rewrite of the SDK, offering a huge set of improvements.
What's new
- Streaming support for completions and chat completions!
- Improved typescript types for responses & errors
- Support for ESM, CloudFlare Workers, Vercel edge functions, Deno, and more
- Better file upload API for Whisper, fine-tune files, & DALL·E images
- Improved error handling through automatic retries & error classes
- Improved latency through reusing TCP connections
- Simpler initialization logic
Getting started
npm install openai@4.0.0
Migration guide
Add support for function calling in the Chat Completions API
Announcement: https://openai.com/blog/function-calling-and-other-api-updates Documentation: https://platform.openai.com/docs/guides/gpt/function-calling
Added new ChatGPT and Whisper APIs.
Breaking changes in this release:
- The function signature of
createCompletion(engineId, params)changed tocreateCompletion(params). The value previously passed in as theengineIdargument should now be passed in asmodelin the params object (e.g.createCompletion({ model: "text-davinci-002, ... }))