Skip to content

Commit 27f77c8

Browse files
Merge pull request #1578 from openai/release-please--branches--master--changes--next--components--openai
release: 5.9.0
2 parents 961dfa5 + d91d374 commit 27f77c8

File tree

10 files changed

+106
-18
lines changed

10 files changed

+106
-18
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "5.8.4"
2+
".": "5.9.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a473967d1766dc155994d932fbc4a5bcbd1c140a37c20d0a4065e1bf0640536d.yml
3-
openapi_spec_hash: 67cdc62b0d6c8b1de29b7dc54b265749
4-
config_hash: 7b53f96f897ca1b3407a5341a6f820db
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-2d116cda53321baa3479e628512def723207a81eb1cdaebb542bd0555e563bda.yml
3+
openapi_spec_hash: 809d958fec261a32004a4b026b718793
4+
config_hash: e74d6791681e3af1b548748ff47a22c2

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 5.9.0 (2025-07-10)
4+
5+
Full Changelog: [v5.8.4...v5.9.0](https://github.com/openai/openai-node/compare/v5.8.4...v5.9.0)
6+
7+
### Features
8+
9+
* **api:** add file_url, fix event ID ([5f5d39e](https://github.com/openai/openai-node/commit/5f5d39e9e11224bf18a0301041b69548727ed4f3))
10+
311
## 5.8.4 (2025-07-10)
412

513
Full Changelog: [v5.8.3...v5.8.4](https://github.com/openai/openai-node/compare/v5.8.3...v5.8.4)

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openai/openai",
3-
"version": "5.8.4",
3+
"version": "5.9.0",
44
"exports": {
55
".": "./index.ts",
66
"./helpers/zod": "./helpers/zod.ts",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openai",
3-
"version": "5.8.4",
3+
"version": "5.9.0",
44
"description": "The official TypeScript library for the OpenAI API",
55
"author": "OpenAI <[email protected]>",
66
"types": "dist/index.d.ts",

src/resources/audio/transcriptions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export namespace Transcription {
157157
/**
158158
* Duration of the input audio in seconds.
159159
*/
160-
duration: number;
160+
seconds: number;
161161

162162
/**
163163
* The type of the usage object. Always `duration` for this variant.
@@ -416,7 +416,7 @@ export namespace TranscriptionVerbose {
416416
/**
417417
* Duration of the input audio in seconds.
418418
*/
419-
duration: number;
419+
seconds: number;
420420

421421
/**
422422
* The type of the usage object. Always `duration` for this variant.

src/resources/beta/realtime/realtime.ts

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,82 @@ export interface ConversationItemInputAudioTranscriptionCompletedEvent {
309309
*/
310310
type: 'conversation.item.input_audio_transcription.completed';
311311

312+
/**
313+
* Usage statistics for the transcription.
314+
*/
315+
usage:
316+
| ConversationItemInputAudioTranscriptionCompletedEvent.TranscriptTextUsageTokens
317+
| ConversationItemInputAudioTranscriptionCompletedEvent.TranscriptTextUsageDuration;
318+
312319
/**
313320
* The log probabilities of the transcription.
314321
*/
315322
logprobs?: Array<ConversationItemInputAudioTranscriptionCompletedEvent.Logprob> | null;
316323
}
317324

318325
export namespace ConversationItemInputAudioTranscriptionCompletedEvent {
326+
/**
327+
* Usage statistics for models billed by token usage.
328+
*/
329+
export interface TranscriptTextUsageTokens {
330+
/**
331+
* Number of input tokens billed for this request.
332+
*/
333+
input_tokens: number;
334+
335+
/**
336+
* Number of output tokens generated.
337+
*/
338+
output_tokens: number;
339+
340+
/**
341+
* Total number of tokens used (input + output).
342+
*/
343+
total_tokens: number;
344+
345+
/**
346+
* The type of the usage object. Always `tokens` for this variant.
347+
*/
348+
type: 'tokens';
349+
350+
/**
351+
* Details about the input tokens billed for this request.
352+
*/
353+
input_token_details?: TranscriptTextUsageTokens.InputTokenDetails;
354+
}
355+
356+
export namespace TranscriptTextUsageTokens {
357+
/**
358+
* Details about the input tokens billed for this request.
359+
*/
360+
export interface InputTokenDetails {
361+
/**
362+
* Number of audio tokens billed for this request.
363+
*/
364+
audio_tokens?: number;
365+
366+
/**
367+
* Number of text tokens billed for this request.
368+
*/
369+
text_tokens?: number;
370+
}
371+
}
372+
373+
/**
374+
* Usage statistics for models billed by audio input duration.
375+
*/
376+
export interface TranscriptTextUsageDuration {
377+
/**
378+
* Duration of the input audio in seconds.
379+
*/
380+
seconds: number;
381+
382+
/**
383+
* The type of the usage object. Always `duration` for this variant.
384+
*/
385+
type: 'duration';
386+
}
387+
319388
/**
320389
* A log probability object.
321390
*/

src/resources/files.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ export interface FileObject {
144144

145145
/**
146146
* The intended purpose of the file. Supported values are `assistants`,
147-
* `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`
148-
* and `vision`.
147+
* `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`,
148+
* `vision`, and `user_data`.
149149
*/
150150
purpose:
151151
| 'assistants'
@@ -154,7 +154,8 @@ export interface FileObject {
154154
| 'batch_output'
155155
| 'fine-tune'
156156
| 'fine-tune-results'
157-
| 'vision';
157+
| 'vision'
158+
| 'user_data';
158159

159160
/**
160161
* @deprecated Deprecated. The current status of the file, which can be either

src/resources/responses/responses.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,6 +2018,11 @@ export interface ResponseInputFile {
20182018
*/
20192019
file_id?: string | null;
20202020

2021+
/**
2022+
* The URL of the file to be sent to the model.
2023+
*/
2024+
file_url?: string;
2025+
20212026
/**
20222027
* The name of the file to be sent to the model.
20232028
*/
@@ -2864,9 +2869,9 @@ export interface ResponseMcpCallArgumentsDeltaEvent {
28642869
sequence_number: number;
28652870

28662871
/**
2867-
* The type of the event. Always 'response.mcp_call.arguments_delta'.
2872+
* The type of the event. Always 'response.mcp_call_arguments.delta'.
28682873
*/
2869-
type: 'response.mcp_call.arguments_delta';
2874+
type: 'response.mcp_call_arguments.delta';
28702875
}
28712876

28722877
/**
@@ -2894,9 +2899,9 @@ export interface ResponseMcpCallArgumentsDoneEvent {
28942899
sequence_number: number;
28952900

28962901
/**
2897-
* The type of the event. Always 'response.mcp_call.arguments_done'.
2902+
* The type of the event. Always 'response.mcp_call_arguments.done'.
28982903
*/
2899-
type: 'response.mcp_call.arguments_done';
2904+
type: 'response.mcp_call_arguments.done';
29002905
}
29012906

29022907
/**
@@ -3554,9 +3559,9 @@ export interface ResponseOutputTextAnnotationAddedEvent {
35543559
sequence_number: number;
35553560

35563561
/**
3557-
* The type of the event. Always 'response.output_text_annotation.added'.
3562+
* The type of the event. Always 'response.output_text.annotation.added'.
35583563
*/
3559-
type: 'response.output_text_annotation.added';
3564+
type: 'response.output_text.annotation.added';
35603565
}
35613566

35623567
/**
@@ -4375,6 +4380,11 @@ export namespace Tool {
43754380
* Specify which of the MCP server's tools require approval.
43764381
*/
43774382
require_approval?: Mcp.McpToolApprovalFilter | 'always' | 'never' | null;
4383+
4384+
/**
4385+
* Optional description of the MCP server, used to provide more context.
4386+
*/
4387+
server_description?: string;
43784388
}
43794389

43804390
export namespace Mcp {

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '5.8.4'; // x-release-please-version
1+
export const VERSION = '5.9.0'; // x-release-please-version

0 commit comments

Comments
 (0)