Skip to content

release: 4.96.0 #1473

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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ubuntu-latest
steps:
Expand All @@ -27,6 +28,7 @@ jobs:
run: ./scripts/lint

build:
timeout-minutes: 5
name: build
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -61,6 +63,7 @@ jobs:
SHA: ${{ github.sha }}
run: ./scripts/utils/upload-artifact.sh
test:
timeout-minutes: 10
name: test
runs-on: ubuntu-latest
steps:
Expand All @@ -78,6 +81,7 @@ jobs:
run: ./scripts/test

examples:
timeout-minutes: 10
name: examples
runs-on: ubuntu-latest
if: github.repository == 'openai/openai-node'
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.95.1"
".": "4.96.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 97
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-5633633cc38734869cf7d993f7b549bb8e4d10e0ec45381ec2cd91507cd8eb8f.yml
openapi_spec_hash: c855121b2b2324b99499c9244c21d24d
config_hash: d20837393b73efdb19cd08e04c1cc9a1
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-8b68ae6b807dca92e914da1dd9e835a20f69b075e79102a264367fd7fddddb33.yml
openapi_spec_hash: b6ade5b1a6327339e6669e1134de2d03
config_hash: b597cd9a31e9e5ec709e2eefb4c54122
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 4.96.0 (2025-04-23)

Full Changelog: [v4.95.1...v4.96.0](https://github.com/openai/openai-node/compare/v4.95.1...v4.96.0)

### Features

* **api:** adding new image model support ([a00d331](https://github.com/openai/openai-node/commit/a00d33190edd08df7d9c088c00ab7b77673f88ba))


### Bug Fixes

* **types:** export AssistantStream ([#1472](https://github.com/openai/openai-node/issues/1472)) ([626c844](https://github.com/openai/openai-node/commit/626c844a758a68ffbff48873d4773be2e3868952))


### Chores

* **ci:** add timeout thresholds for CI jobs ([e465063](https://github.com/openai/openai-node/commit/e46506351097f1de39c866c28b6ec20fa724fc36))

## 4.95.1 (2025-04-18)

Full Changelog: [v4.95.0...v4.95.1](https://github.com/openai/openai-node/compare/v4.95.0...v4.95.1)
Expand Down
6 changes: 5 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Methods:

- <code title="post /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fineTuning.checkpoints.permissions.<a href="./src/resources/fine-tuning/checkpoints/permissions.ts">create</a>(fineTunedModelCheckpoint, { ...params }) -> PermissionCreateResponsesPage</code>
- <code title="get /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fineTuning.checkpoints.permissions.<a href="./src/resources/fine-tuning/checkpoints/permissions.ts">retrieve</a>(fineTunedModelCheckpoint, { ...params }) -> PermissionRetrieveResponse</code>
- <code title="delete /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fineTuning.checkpoints.permissions.<a href="./src/resources/fine-tuning/checkpoints/permissions.ts">del</a>(fineTunedModelCheckpoint) -> PermissionDeleteResponse</code>
- <code title="delete /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}">client.fineTuning.checkpoints.permissions.<a href="./src/resources/fine-tuning/checkpoints/permissions.ts">del</a>(fineTunedModelCheckpoint, permissionId) -> PermissionDeleteResponse</code>

# VectorStores

Expand Down Expand Up @@ -626,6 +626,10 @@ Types:
- <code><a href="./src/resources/responses/responses.ts">ResponseOutputRefusal</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseOutputText</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningItem</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningSummaryPartAddedEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningSummaryPartDoneEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningSummaryTextDeltaEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseReasoningSummaryTextDoneEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseRefusalDeltaEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseRefusalDoneEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseStatus</a></code>
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": "4.95.1",
"version": "4.96.0",
"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": "4.95.1",
"version": "4.96.0",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/beta/assistants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import * as ThreadsAPI from './threads/threads';
import * as RunsAPI from './threads/runs/runs';
import * as StepsAPI from './threads/runs/steps';
import { CursorPage, type CursorPageParams } from '../../pagination';
import { AssistantStream } from '../../lib/AssistantStream';

export class Assistants extends APIResource {
/**
Expand Down Expand Up @@ -1517,4 +1518,6 @@ export declare namespace Assistants {
type AssistantUpdateParams as AssistantUpdateParams,
type AssistantListParams as AssistantListParams,
};

export { AssistantStream };
}
98 changes: 97 additions & 1 deletion src/resources/beta/realtime/realtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -915,12 +915,34 @@ export type RealtimeClientEvent =
| ConversationItemTruncateEvent
| InputAudioBufferAppendEvent
| InputAudioBufferClearEvent
| RealtimeClientEvent.OutputAudioBufferClear
| InputAudioBufferCommitEvent
| ResponseCancelEvent
| ResponseCreateEvent
| SessionUpdateEvent
| TranscriptionSessionUpdate;

export namespace RealtimeClientEvent {
/**
* **WebRTC Only:** Emit to cut off the current audio response. This will trigger
* the server to stop generating audio and emit a `output_audio_buffer.cleared`
* event. This event should be preceded by a `response.cancel` client event to stop
* the generation of the current response.
* [Learn more](https://platform.openai.com/docs/guides/realtime-model-capabilities#client-and-server-events-for-audio-in-webrtc).
*/
export interface OutputAudioBufferClear {
/**
* The event type, must be `output_audio_buffer.clear`.
*/
type: 'output_audio_buffer.clear';

/**
* The unique ID of the client event used for error handling.
*/
event_id?: string;
}
}

/**
* The response resource.
*/
Expand Down Expand Up @@ -1174,7 +1196,10 @@ export type RealtimeServerEvent =
| ResponseTextDoneEvent
| SessionCreatedEvent
| SessionUpdatedEvent
| TranscriptionSessionUpdatedEvent;
| TranscriptionSessionUpdatedEvent
| RealtimeServerEvent.OutputAudioBufferStarted
| RealtimeServerEvent.OutputAudioBufferStopped
| RealtimeServerEvent.OutputAudioBufferCleared;

export namespace RealtimeServerEvent {
/**
Expand All @@ -1197,6 +1222,77 @@ export namespace RealtimeServerEvent {
*/
type: 'conversation.item.retrieved';
}

/**
* **WebRTC Only:** Emitted when the server begins streaming audio to the client.
* This event is emitted after an audio content part has been added
* (`response.content_part.added`) to the response.
* [Learn more](https://platform.openai.com/docs/guides/realtime-model-capabilities#client-and-server-events-for-audio-in-webrtc).
*/
export interface OutputAudioBufferStarted {
/**
* The unique ID of the server event.
*/
event_id: string;

/**
* The unique ID of the response that produced the audio.
*/
response_id: string;

/**
* The event type, must be `output_audio_buffer.started`.
*/
type: 'output_audio_buffer.started';
}

/**
* **WebRTC Only:** Emitted when the output audio buffer has been completely
* drained on the server, and no more audio is forthcoming. This event is emitted
* after the full response data has been sent to the client (`response.done`).
* [Learn more](https://platform.openai.com/docs/guides/realtime-model-capabilities#client-and-server-events-for-audio-in-webrtc).
*/
export interface OutputAudioBufferStopped {
/**
* The unique ID of the server event.
*/
event_id: string;

/**
* The unique ID of the response that produced the audio.
*/
response_id: string;

/**
* The event type, must be `output_audio_buffer.stopped`.
*/
type: 'output_audio_buffer.stopped';
}

/**
* **WebRTC Only:** Emitted when the output audio buffer is cleared. This happens
* either in VAD mode when the user has interrupted
* (`input_audio_buffer.speech_started`), or when the client has emitted the
* `output_audio_buffer.clear` event to manually cut off the current audio
* response.
* [Learn more](https://platform.openai.com/docs/guides/realtime-model-capabilities#client-and-server-events-for-audio-in-webrtc).
*/
export interface OutputAudioBufferCleared {
/**
* The unique ID of the server event.
*/
event_id: string;

/**
* The unique ID of the response that produced the audio.
*/
response_id: string;

/**
* The event type, must be `output_audio_buffer.cleared`.
*/
type: 'output_audio_buffer.cleared';
}
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/resources/beta/threads/threads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,7 @@ export interface ThreadCreateAndRunParamsBase {
* Override the tools the assistant can use for this run. This is useful for
* modifying the behavior on a per-run basis.
*/
tools?: Array<
AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool | AssistantsAPI.FunctionTool
> | null;
tools?: Array<AssistantsAPI.AssistantTool> | null;

/**
* An alternative to sampling with temperature, called nucleus sampling, where the
Expand Down Expand Up @@ -1718,4 +1716,6 @@ export declare namespace Threads {
type MessageUpdateParams as MessageUpdateParams,
type MessageListParams as MessageListParams,
};

export { AssistantStream };
}
Loading