@ai-sdk/openai 3.0.73 → 3.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +28 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -7
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +6 -0
- package/dist/internal/index.d.ts +6 -0
- package/dist/internal/index.js +27 -6
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +27 -6
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/responses/convert-openai-responses-usage.ts +3 -0
- package/src/responses/openai-responses-api.ts +27 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.75
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1b40ac7: Publish all packages under the `@ai-v6` dist tag.
|
|
8
|
+
- Updated dependencies [1b40ac7]
|
|
9
|
+
- @ai-sdk/provider-utils@4.0.31
|
|
10
|
+
- @ai-sdk/provider@3.0.11
|
|
11
|
+
|
|
12
|
+
## 3.0.74
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 466544d: feat(openai): add orchestration token usage details to Responses API usage
|
|
17
|
+
|
|
3
18
|
## 3.0.73
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -229,9 +229,12 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
229
229
|
output_tokens: number;
|
|
230
230
|
input_tokens_details?: {
|
|
231
231
|
cached_tokens?: number | null | undefined;
|
|
232
|
+
orchestration_input_tokens?: number | null | undefined;
|
|
233
|
+
orchestration_input_cached_tokens?: number | null | undefined;
|
|
232
234
|
} | null | undefined;
|
|
233
235
|
output_tokens_details?: {
|
|
234
236
|
reasoning_tokens?: number | null | undefined;
|
|
237
|
+
orchestration_output_tokens?: number | null | undefined;
|
|
235
238
|
} | null | undefined;
|
|
236
239
|
};
|
|
237
240
|
incomplete_details?: {
|
|
@@ -254,9 +257,12 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
254
257
|
output_tokens: number;
|
|
255
258
|
input_tokens_details?: {
|
|
256
259
|
cached_tokens?: number | null | undefined;
|
|
260
|
+
orchestration_input_tokens?: number | null | undefined;
|
|
261
|
+
orchestration_input_cached_tokens?: number | null | undefined;
|
|
257
262
|
} | null | undefined;
|
|
258
263
|
output_tokens_details?: {
|
|
259
264
|
reasoning_tokens?: number | null | undefined;
|
|
265
|
+
orchestration_output_tokens?: number | null | undefined;
|
|
260
266
|
} | null | undefined;
|
|
261
267
|
} | null | undefined;
|
|
262
268
|
service_tier?: string | null | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -229,9 +229,12 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
229
229
|
output_tokens: number;
|
|
230
230
|
input_tokens_details?: {
|
|
231
231
|
cached_tokens?: number | null | undefined;
|
|
232
|
+
orchestration_input_tokens?: number | null | undefined;
|
|
233
|
+
orchestration_input_cached_tokens?: number | null | undefined;
|
|
232
234
|
} | null | undefined;
|
|
233
235
|
output_tokens_details?: {
|
|
234
236
|
reasoning_tokens?: number | null | undefined;
|
|
237
|
+
orchestration_output_tokens?: number | null | undefined;
|
|
235
238
|
} | null | undefined;
|
|
236
239
|
};
|
|
237
240
|
incomplete_details?: {
|
|
@@ -254,9 +257,12 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
254
257
|
output_tokens: number;
|
|
255
258
|
input_tokens_details?: {
|
|
256
259
|
cached_tokens?: number | null | undefined;
|
|
260
|
+
orchestration_input_tokens?: number | null | undefined;
|
|
261
|
+
orchestration_input_cached_tokens?: number | null | undefined;
|
|
257
262
|
} | null | undefined;
|
|
258
263
|
output_tokens_details?: {
|
|
259
264
|
reasoning_tokens?: number | null | undefined;
|
|
265
|
+
orchestration_output_tokens?: number | null | undefined;
|
|
260
266
|
} | null | undefined;
|
|
261
267
|
} | null | undefined;
|
|
262
268
|
service_tier?: string | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -3405,9 +3405,16 @@ var openaiResponsesChunkSchema = (0, import_provider_utils27.lazySchema)(
|
|
|
3405
3405
|
incomplete_details: import_v422.z.object({ reason: import_v422.z.string() }).nullish(),
|
|
3406
3406
|
usage: import_v422.z.object({
|
|
3407
3407
|
input_tokens: import_v422.z.number(),
|
|
3408
|
-
input_tokens_details: import_v422.z.object({
|
|
3408
|
+
input_tokens_details: import_v422.z.object({
|
|
3409
|
+
cached_tokens: import_v422.z.number().nullish(),
|
|
3410
|
+
orchestration_input_tokens: import_v422.z.number().nullish(),
|
|
3411
|
+
orchestration_input_cached_tokens: import_v422.z.number().nullish()
|
|
3412
|
+
}).nullish(),
|
|
3409
3413
|
output_tokens: import_v422.z.number(),
|
|
3410
|
-
output_tokens_details: import_v422.z.object({
|
|
3414
|
+
output_tokens_details: import_v422.z.object({
|
|
3415
|
+
reasoning_tokens: import_v422.z.number().nullish(),
|
|
3416
|
+
orchestration_output_tokens: import_v422.z.number().nullish()
|
|
3417
|
+
}).nullish()
|
|
3411
3418
|
}),
|
|
3412
3419
|
service_tier: import_v422.z.string().nullish()
|
|
3413
3420
|
})
|
|
@@ -3422,9 +3429,16 @@ var openaiResponsesChunkSchema = (0, import_provider_utils27.lazySchema)(
|
|
|
3422
3429
|
incomplete_details: import_v422.z.object({ reason: import_v422.z.string() }).nullish(),
|
|
3423
3430
|
usage: import_v422.z.object({
|
|
3424
3431
|
input_tokens: import_v422.z.number(),
|
|
3425
|
-
input_tokens_details: import_v422.z.object({
|
|
3432
|
+
input_tokens_details: import_v422.z.object({
|
|
3433
|
+
cached_tokens: import_v422.z.number().nullish(),
|
|
3434
|
+
orchestration_input_tokens: import_v422.z.number().nullish(),
|
|
3435
|
+
orchestration_input_cached_tokens: import_v422.z.number().nullish()
|
|
3436
|
+
}).nullish(),
|
|
3426
3437
|
output_tokens: import_v422.z.number(),
|
|
3427
|
-
output_tokens_details: import_v422.z.object({
|
|
3438
|
+
output_tokens_details: import_v422.z.object({
|
|
3439
|
+
reasoning_tokens: import_v422.z.number().nullish(),
|
|
3440
|
+
orchestration_output_tokens: import_v422.z.number().nullish()
|
|
3441
|
+
}).nullish()
|
|
3428
3442
|
}).nullish(),
|
|
3429
3443
|
service_tier: import_v422.z.string().nullish()
|
|
3430
3444
|
})
|
|
@@ -4208,9 +4222,16 @@ var openaiResponsesResponseSchema = (0, import_provider_utils27.lazySchema)(
|
|
|
4208
4222
|
incomplete_details: import_v422.z.object({ reason: import_v422.z.string() }).nullish(),
|
|
4209
4223
|
usage: import_v422.z.object({
|
|
4210
4224
|
input_tokens: import_v422.z.number(),
|
|
4211
|
-
input_tokens_details: import_v422.z.object({
|
|
4225
|
+
input_tokens_details: import_v422.z.object({
|
|
4226
|
+
cached_tokens: import_v422.z.number().nullish(),
|
|
4227
|
+
orchestration_input_tokens: import_v422.z.number().nullish(),
|
|
4228
|
+
orchestration_input_cached_tokens: import_v422.z.number().nullish()
|
|
4229
|
+
}).nullish(),
|
|
4212
4230
|
output_tokens: import_v422.z.number(),
|
|
4213
|
-
output_tokens_details: import_v422.z.object({
|
|
4231
|
+
output_tokens_details: import_v422.z.object({
|
|
4232
|
+
reasoning_tokens: import_v422.z.number().nullish(),
|
|
4233
|
+
orchestration_output_tokens: import_v422.z.number().nullish()
|
|
4234
|
+
}).nullish()
|
|
4214
4235
|
}).optional()
|
|
4215
4236
|
})
|
|
4216
4237
|
)
|
|
@@ -6845,7 +6866,7 @@ var OpenAITranscriptionModel = class {
|
|
|
6845
6866
|
};
|
|
6846
6867
|
|
|
6847
6868
|
// src/version.ts
|
|
6848
|
-
var VERSION = true ? "3.0.
|
|
6869
|
+
var VERSION = true ? "3.0.75" : "0.0.0-test";
|
|
6849
6870
|
|
|
6850
6871
|
// src/openai-provider.ts
|
|
6851
6872
|
function createOpenAI(options = {}) {
|