@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/dist/internal/index.mjs
CHANGED
|
@@ -3400,9 +3400,16 @@ var openaiResponsesChunkSchema = lazySchema16(
|
|
|
3400
3400
|
incomplete_details: z18.object({ reason: z18.string() }).nullish(),
|
|
3401
3401
|
usage: z18.object({
|
|
3402
3402
|
input_tokens: z18.number(),
|
|
3403
|
-
input_tokens_details: z18.object({
|
|
3403
|
+
input_tokens_details: z18.object({
|
|
3404
|
+
cached_tokens: z18.number().nullish(),
|
|
3405
|
+
orchestration_input_tokens: z18.number().nullish(),
|
|
3406
|
+
orchestration_input_cached_tokens: z18.number().nullish()
|
|
3407
|
+
}).nullish(),
|
|
3404
3408
|
output_tokens: z18.number(),
|
|
3405
|
-
output_tokens_details: z18.object({
|
|
3409
|
+
output_tokens_details: z18.object({
|
|
3410
|
+
reasoning_tokens: z18.number().nullish(),
|
|
3411
|
+
orchestration_output_tokens: z18.number().nullish()
|
|
3412
|
+
}).nullish()
|
|
3406
3413
|
}),
|
|
3407
3414
|
service_tier: z18.string().nullish()
|
|
3408
3415
|
})
|
|
@@ -3417,9 +3424,16 @@ var openaiResponsesChunkSchema = lazySchema16(
|
|
|
3417
3424
|
incomplete_details: z18.object({ reason: z18.string() }).nullish(),
|
|
3418
3425
|
usage: z18.object({
|
|
3419
3426
|
input_tokens: z18.number(),
|
|
3420
|
-
input_tokens_details: z18.object({
|
|
3427
|
+
input_tokens_details: z18.object({
|
|
3428
|
+
cached_tokens: z18.number().nullish(),
|
|
3429
|
+
orchestration_input_tokens: z18.number().nullish(),
|
|
3430
|
+
orchestration_input_cached_tokens: z18.number().nullish()
|
|
3431
|
+
}).nullish(),
|
|
3421
3432
|
output_tokens: z18.number(),
|
|
3422
|
-
output_tokens_details: z18.object({
|
|
3433
|
+
output_tokens_details: z18.object({
|
|
3434
|
+
reasoning_tokens: z18.number().nullish(),
|
|
3435
|
+
orchestration_output_tokens: z18.number().nullish()
|
|
3436
|
+
}).nullish()
|
|
3423
3437
|
}).nullish(),
|
|
3424
3438
|
service_tier: z18.string().nullish()
|
|
3425
3439
|
})
|
|
@@ -4203,9 +4217,16 @@ var openaiResponsesResponseSchema = lazySchema16(
|
|
|
4203
4217
|
incomplete_details: z18.object({ reason: z18.string() }).nullish(),
|
|
4204
4218
|
usage: z18.object({
|
|
4205
4219
|
input_tokens: z18.number(),
|
|
4206
|
-
input_tokens_details: z18.object({
|
|
4220
|
+
input_tokens_details: z18.object({
|
|
4221
|
+
cached_tokens: z18.number().nullish(),
|
|
4222
|
+
orchestration_input_tokens: z18.number().nullish(),
|
|
4223
|
+
orchestration_input_cached_tokens: z18.number().nullish()
|
|
4224
|
+
}).nullish(),
|
|
4207
4225
|
output_tokens: z18.number(),
|
|
4208
|
-
output_tokens_details: z18.object({
|
|
4226
|
+
output_tokens_details: z18.object({
|
|
4227
|
+
reasoning_tokens: z18.number().nullish(),
|
|
4228
|
+
orchestration_output_tokens: z18.number().nullish()
|
|
4229
|
+
}).nullish()
|
|
4209
4230
|
}).optional()
|
|
4210
4231
|
})
|
|
4211
4232
|
)
|