Skip to content

release: 4.104.0 #1507

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
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.103.0"
".": "4.104.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: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-fc64d7c2c8f51f750813375356c3f3fdfc7fc1b1b34f19c20a5410279d445d37.yml
openapi_spec_hash: 618285fc70199ee32b9ebe4bf72f7e4c
config_hash: c497f6b750cc89c0bf2eefc0bc839c70
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-d4bcffecf0cdadf746faa6708ed1ec81fac451f9b857deabbab26f0a343b9314.yml
openapi_spec_hash: 7c54a18b4381248bda7cc34c52142615
config_hash: d23f847b9ebb3f427d0f198035bd3e9f
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 4.104.0 (2025-05-29)

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

### Features

* **api:** Config update for pakrym-stream-param ([469ad7b](https://github.com/openai/openai-node/commit/469ad7b9d76b674aa3fd829128a54758ab7adfbd))


### Bug Fixes

* **azure:** add /images/edits to deployments endpoints ([#1509](https://github.com/openai/openai-node/issues/1509)) ([84fc31a](https://github.com/openai/openai-node/commit/84fc31aa903eceeb80815f6b17562fc463a71cfc))
* **client:** return binary content from `get /containers/{container_id}/files/{file_id}/content` ([83129d7](https://github.com/openai/openai-node/commit/83129d7eac3dd784bb1c29fa344c5b808a59db73))


### Chores

* deprecate Assistants API ([5b34fcd](https://github.com/openai/openai-node/commit/5b34fcdd1454b8cccbaaf05ace6516afb3b09273))
* improve publish-npm script --latest tag logic ([6207a2a](https://github.com/openai/openai-node/commit/6207a2a03d3279423de594eed18c5efb4ce321af))
* **internal:** fix release workflows ([353349d](https://github.com/openai/openai-node/commit/353349de9ee10d32d3243cb5c60a8ae982c49d37))

## 4.103.0 (2025-05-22)

Full Changelog: [v4.102.0...v4.103.0](https://github.com/openai/openai-node/compare/v4.102.0...v4.103.0)
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -809,4 +809,4 @@ Methods:

Methods:

- <code title="get /containers/{container_id}/files/{file_id}/content">client.containers.files.content.<a href="./src/resources/containers/files/content.ts">retrieve</a>(containerId, fileId) -> void</code>
- <code title="get /containers/{container_id}/files/{file_id}/content">client.containers.files.content.<a href="./src/resources/containers/files/content.ts">retrieve</a>(containerId, fileId) -> Response</code>
4 changes: 4 additions & 0 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

errors=()

if [ -z "${STAINLESS_API_KEY}" ]; then
errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organization secrets on GitHub.")
fi

if [ -z "${NPM_TOKEN}" ]; then
errors+=("The OPENAI_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi
Expand Down
30 changes: 23 additions & 7 deletions bin/publish-npm
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,35 @@ set -eux

npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"

# Build the project
yarn build

# Navigate to the dist directory
cd dist

# Get the version from package.json
# Get latest version from npm
#
# If the package doesn't exist, yarn will return
# {"type":"error","data":"Received invalid response from npm."}
# where .data.version doesn't exist so LAST_VERSION will be an empty string.
LAST_VERSION="$(yarn info --json 2> /dev/null | jq -r '.data.version')"

# Get current version from package.json
VERSION="$(node -p "require('./package.json').version")"

# Extract the pre-release tag if it exists
# Check if current version is pre-release (e.g. alpha / beta / rc)
CURRENT_IS_PRERELEASE=false
if [[ "$VERSION" =~ -([a-zA-Z]+) ]]; then
# Extract the part before any dot in the pre-release identifier
TAG="${BASH_REMATCH[1]}"
CURRENT_IS_PRERELEASE=true
CURRENT_TAG="${BASH_REMATCH[1]}"
fi

# Check if last version is a stable release
LAST_IS_STABLE_RELEASE=true
if [[ -z "$LAST_VERSION" || "$LAST_VERSION" =~ -([a-zA-Z]+) ]]; then
LAST_IS_STABLE_RELEASE=false
fi

# Use a corresponding alpha/beta tag if there already is a stable release and we're publishing a prerelease.
if $CURRENT_IS_PRERELEASE && $LAST_IS_STABLE_RELEASE; then
TAG="$CURRENT_TAG"
else
TAG="latest"
fi
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.103.0",
"version": "4.104.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.103.0",
"version": "4.104.0",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ const _deployments_endpoints = new Set([
'/audio/translations',
'/audio/speech',
'/images/generations',
'/images/edits',
]);

const API_KEY_SENTINEL = '<Missing Key>';
Expand Down
68 changes: 68 additions & 0 deletions src/resources/beta/realtime/realtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2094,6 +2094,11 @@ export namespace SessionUpdateEvent {
* Realtime session object configuration.
*/
export interface Session {
/**
* Configuration options for the generated client secret.
*/
client_secret?: Session.ClientSecret;

/**
* The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. For
* `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, single channel
Expand Down Expand Up @@ -2219,6 +2224,35 @@ export namespace SessionUpdateEvent {
}

export namespace Session {
/**
* Configuration options for the generated client secret.
*/
export interface ClientSecret {
/**
* Configuration for the ephemeral token expiration.
*/
expires_at?: ClientSecret.ExpiresAt;
}

export namespace ClientSecret {
/**
* Configuration for the ephemeral token expiration.
*/
export interface ExpiresAt {
/**
* The anchor point for the ephemeral token expiration. Only `created_at` is
* currently supported.
*/
anchor?: 'created_at';

/**
* The number of seconds from the anchor point to the expiration. Select a value
* between `10` and `7200`.
*/
seconds?: number;
}
}

/**
* Configuration for input audio noise reduction. This can be set to `null` to turn
* off. Noise reduction filters audio added to the input audio buffer before it is
Expand Down Expand Up @@ -2399,6 +2433,11 @@ export namespace TranscriptionSessionUpdate {
* Realtime transcription session object configuration.
*/
export interface Session {
/**
* Configuration options for the generated client secret.
*/
client_secret?: Session.ClientSecret;

/**
* The set of items to include in the transcription. Current available items are:
*
Expand Down Expand Up @@ -2451,6 +2490,35 @@ export namespace TranscriptionSessionUpdate {
}

export namespace Session {
/**
* Configuration options for the generated client secret.
*/
export interface ClientSecret {
/**
* Configuration for the ephemeral token expiration.
*/
expires_at?: ClientSecret.ExpiresAt;
}

export namespace ClientSecret {
/**
* Configuration for the ephemeral token expiration.
*/
export interface ExpiresAt {
/**
* The anchor point for the ephemeral token expiration. Only `created_at` is
* currently supported.
*/
anchor?: 'created_at';

/**
* The number of seconds from the anchor point to the expiration. Select a value
* between `10` and `7200`.
*/
seconds?: number;
}
}

/**
* Configuration for input audio noise reduction. This can be set to `null` to turn
* off. Noise reduction filters audio added to the input audio buffer before it is
Expand Down
34 changes: 34 additions & 0 deletions src/resources/beta/realtime/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,11 @@ export namespace SessionCreateResponse {
}

export interface SessionCreateParams {
/**
* Configuration options for the generated client secret.
*/
client_secret?: SessionCreateParams.ClientSecret;

/**
* The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. For
* `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, single channel
Expand Down Expand Up @@ -610,6 +615,35 @@ export interface SessionCreateParams {
}

export namespace SessionCreateParams {
/**
* Configuration options for the generated client secret.
*/
export interface ClientSecret {
/**
* Configuration for the ephemeral token expiration.
*/
expires_at?: ClientSecret.ExpiresAt;
}

export namespace ClientSecret {
/**
* Configuration for the ephemeral token expiration.
*/
export interface ExpiresAt {
/**
* The anchor point for the ephemeral token expiration. Only `created_at` is
* currently supported.
*/
anchor?: 'created_at';

/**
* The number of seconds from the anchor point to the expiration. Select a value
* between `10` and `7200`.
*/
seconds?: number;
}
}

/**
* Configuration for input audio noise reduction. This can be set to `null` to turn
* off. Noise reduction filters audio added to the input audio buffer before it is
Expand Down
34 changes: 34 additions & 0 deletions src/resources/beta/realtime/transcription-sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ export namespace TranscriptionSession {
}

export interface TranscriptionSessionCreateParams {
/**
* Configuration options for the generated client secret.
*/
client_secret?: TranscriptionSessionCreateParams.ClientSecret;

/**
* The set of items to include in the transcription. Current available items are:
*
Expand Down Expand Up @@ -201,6 +206,35 @@ export interface TranscriptionSessionCreateParams {
}

export namespace TranscriptionSessionCreateParams {
/**
* Configuration options for the generated client secret.
*/
export interface ClientSecret {
/**
* Configuration for the ephemeral token expiration.
*/
expires_at?: ClientSecret.ExpiresAt;
}

export namespace ClientSecret {
/**
* Configuration for the ephemeral token expiration.
*/
export interface ExpiresAt {
/**
* The anchor point for the ephemeral token expiration. Only `created_at` is
* currently supported.
*/
anchor?: 'created_at';

/**
* The number of seconds from the anchor point to the expiration. Select a value
* between `10` and `7200`.
*/
seconds?: number;
}
}

/**
* Configuration for input audio noise reduction. This can be set to `null` to turn
* off. Noise reduction filters audio added to the input audio buffer before it is
Expand Down
Loading