diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a67037a34..4032c0769 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.23.0" + ".": "5.23.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 6738b41f7..aa043b64f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 5.23.1 (2025-09-26) + +Full Changelog: [v5.23.0...v5.23.1](https://github.com/openai/openai-node/compare/v5.23.0...v5.23.1) + +### Bug Fixes + +* **realtime:** remove beta header from GA classes ([a5e9e70](https://github.com/openai/openai-node/commit/a5e9e70af8691f2850ad7ccfec966e5fb0d5b56d)) + + +### Performance Improvements + +* faster formatting ([d56f309](https://github.com/openai/openai-node/commit/d56f309f359f7f4d87c95bfaaffdc463312850e4)) + + +### Chores + +* **internal:** fix incremental formatting in some cases ([166d28f](https://github.com/openai/openai-node/commit/166d28ff34edb6b1c3ef310bc825952dcb30ba4b)) +* **internal:** remove deprecated `compilerOptions.baseUrl` from tsconfig.json ([dfab408](https://github.com/openai/openai-node/commit/dfab40857547b272cdad4309baf84e43a07775ed)) + ## 5.23.0 (2025-09-23) Full Changelog: [v5.22.1...v5.23.0](https://github.com/openai/openai-node/compare/v5.22.1...v5.23.0) diff --git a/jsr.json b/jsr.json index e78453945..3c8b7db42 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@openai/openai", - "version": "5.23.0", + "version": "5.23.1", "exports": { ".": "./index.ts", "./helpers/zod": "./helpers/zod.ts", diff --git a/package.json b/package.json index 00100a47d..64e7fdf2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "5.23.0", + "version": "5.23.1", "description": "The official TypeScript library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", diff --git a/scripts/fast-format b/scripts/fast-format new file mode 100755 index 000000000..53721ac07 --- /dev/null +++ b/scripts/fast-format @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo "Script started with $# arguments" +echo "Arguments: $*" +echo "Script location: $(dirname "$0")" + +cd "$(dirname "$0")/.." +echo "Changed to directory: $(pwd)" + +if [ $# -eq 0 ]; then + echo "Usage: $0 [additional-formatter-args...]" + echo "The file should contain one file path per line" + exit 1 +fi + +FILE_LIST="$1" + +echo "Looking for file: $FILE_LIST" + +if [ ! -f "$FILE_LIST" ]; then + echo "Error: File '$FILE_LIST' not found" + exit 1 +fi + +echo "==> Running eslint --fix" +ESLINT_FILES="$(grep '\.ts$' "$FILE_LIST" || true)" +if ! [ -z "$ESLINT_FILES" ]; then + echo "$ESLINT_FILES" | xargs ./node_modules/.bin/eslint --cache --fix +fi + +echo "==> Running prettier --write" +# format things eslint didn't +PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)" +if ! [ -z "$PRETTIER_FILES" ]; then + echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \ + --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \ + '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' +fi diff --git a/src/realtime/websocket.ts b/src/realtime/websocket.ts index 70a60af41..536266192 100644 --- a/src/realtime/websocket.ts +++ b/src/realtime/websocket.ts @@ -67,7 +67,6 @@ export class OpenAIRealtimeWebSocket extends OpenAIRealtimeEmitter { this.socket = new WebSocket(this.url.toString(), [ 'realtime', ...(isAzure(client) ? [] : [`openai-insecure-api-key.${client.apiKey}`]), - 'openai-beta.realtime-v1', ]); this.socket.addEventListener('message', (websocketEvent: MessageEvent) => { diff --git a/src/realtime/ws.ts b/src/realtime/ws.ts index a407e8b43..cf79c185d 100644 --- a/src/realtime/ws.ts +++ b/src/realtime/ws.ts @@ -33,7 +33,6 @@ export class OpenAIRealtimeWS extends OpenAIRealtimeEmitter { headers: { ...props.options?.headers, ...(isAzure(client) && !props.__resolvedApiKey ? {} : { Authorization: `Bearer ${client.apiKey}` }), - 'OpenAI-Beta': 'realtime=v1', }, }); diff --git a/src/version.ts b/src/version.ts index 2196b69b7..6b53ef2f1 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '5.23.0'; // x-release-please-version +export const VERSION = '5.23.1'; // x-release-please-version diff --git a/tsconfig.build.json b/tsconfig.build.json index 57578eb44..d8320121b 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -5,8 +5,8 @@ "compilerOptions": { "rootDir": "./dist/src", "paths": { - "openai/*": ["dist/src/*"], - "openai": ["dist/src/index.ts"] + "openai/*": ["./dist/src/*"], + "openai": ["./dist/src/index.ts"] }, "noEmit": false, "declaration": true, diff --git a/tsconfig.json b/tsconfig.json index 2e1c8e421..5b2da61a7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,10 +7,9 @@ "module": "commonjs", "moduleResolution": "node", "esModuleInterop": true, - "baseUrl": "./", "paths": { - "openai/*": ["src/*"], - "openai": ["src/index.ts"] + "openai/*": ["./src/*"], + "openai": ["./src/index.ts"] }, "noEmit": true,