@ai-sdk/openai 4.0.0-beta.75 → 4.0.0-beta.77
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 +14 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +28 -7
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +6 -0
- package/dist/internal/index.js +27 -6
- package/dist/internal/index.js.map +1 -1
- package/package.json +3 -3
- 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,19 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 4.0.0-beta.77
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0416e3e]
|
|
8
|
+
- @ai-sdk/provider@4.0.0-beta.20
|
|
9
|
+
- @ai-sdk/provider-utils@5.0.0-beta.50
|
|
10
|
+
|
|
11
|
+
## 4.0.0-beta.76
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 2c4767d: feat(openai): add orchestration token usage details to Responses API usage
|
|
16
|
+
|
|
3
17
|
## 4.0.0-beta.75
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -244,9 +244,12 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
244
244
|
output_tokens: number;
|
|
245
245
|
input_tokens_details?: {
|
|
246
246
|
cached_tokens?: number | null | undefined;
|
|
247
|
+
orchestration_input_tokens?: number | null | undefined;
|
|
248
|
+
orchestration_input_cached_tokens?: number | null | undefined;
|
|
247
249
|
} | null | undefined;
|
|
248
250
|
output_tokens_details?: {
|
|
249
251
|
reasoning_tokens?: number | null | undefined;
|
|
252
|
+
orchestration_output_tokens?: number | null | undefined;
|
|
250
253
|
} | null | undefined;
|
|
251
254
|
};
|
|
252
255
|
incomplete_details?: {
|
|
@@ -270,9 +273,12 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
270
273
|
output_tokens: number;
|
|
271
274
|
input_tokens_details?: {
|
|
272
275
|
cached_tokens?: number | null | undefined;
|
|
276
|
+
orchestration_input_tokens?: number | null | undefined;
|
|
277
|
+
orchestration_input_cached_tokens?: number | null | undefined;
|
|
273
278
|
} | null | undefined;
|
|
274
279
|
output_tokens_details?: {
|
|
275
280
|
reasoning_tokens?: number | null | undefined;
|
|
281
|
+
orchestration_output_tokens?: number | null | undefined;
|
|
276
282
|
} | null | undefined;
|
|
277
283
|
} | null | undefined;
|
|
278
284
|
service_tier?: string | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -4260,9 +4260,16 @@ var openaiResponsesChunkSchema = lazySchema22(
|
|
|
4260
4260
|
incomplete_details: z24.object({ reason: z24.string() }).nullish(),
|
|
4261
4261
|
usage: z24.object({
|
|
4262
4262
|
input_tokens: z24.number(),
|
|
4263
|
-
input_tokens_details: z24.object({
|
|
4263
|
+
input_tokens_details: z24.object({
|
|
4264
|
+
cached_tokens: z24.number().nullish(),
|
|
4265
|
+
orchestration_input_tokens: z24.number().nullish(),
|
|
4266
|
+
orchestration_input_cached_tokens: z24.number().nullish()
|
|
4267
|
+
}).nullish(),
|
|
4264
4268
|
output_tokens: z24.number(),
|
|
4265
|
-
output_tokens_details: z24.object({
|
|
4269
|
+
output_tokens_details: z24.object({
|
|
4270
|
+
reasoning_tokens: z24.number().nullish(),
|
|
4271
|
+
orchestration_output_tokens: z24.number().nullish()
|
|
4272
|
+
}).nullish()
|
|
4266
4273
|
}),
|
|
4267
4274
|
service_tier: z24.string().nullish()
|
|
4268
4275
|
})
|
|
@@ -4278,9 +4285,16 @@ var openaiResponsesChunkSchema = lazySchema22(
|
|
|
4278
4285
|
incomplete_details: z24.object({ reason: z24.string() }).nullish(),
|
|
4279
4286
|
usage: z24.object({
|
|
4280
4287
|
input_tokens: z24.number(),
|
|
4281
|
-
input_tokens_details: z24.object({
|
|
4288
|
+
input_tokens_details: z24.object({
|
|
4289
|
+
cached_tokens: z24.number().nullish(),
|
|
4290
|
+
orchestration_input_tokens: z24.number().nullish(),
|
|
4291
|
+
orchestration_input_cached_tokens: z24.number().nullish()
|
|
4292
|
+
}).nullish(),
|
|
4282
4293
|
output_tokens: z24.number(),
|
|
4283
|
-
output_tokens_details: z24.object({
|
|
4294
|
+
output_tokens_details: z24.object({
|
|
4295
|
+
reasoning_tokens: z24.number().nullish(),
|
|
4296
|
+
orchestration_output_tokens: z24.number().nullish()
|
|
4297
|
+
}).nullish()
|
|
4284
4298
|
}).nullish(),
|
|
4285
4299
|
service_tier: z24.string().nullish()
|
|
4286
4300
|
})
|
|
@@ -5071,9 +5085,16 @@ var openaiResponsesResponseSchema = lazySchema22(
|
|
|
5071
5085
|
incomplete_details: z24.object({ reason: z24.string() }).nullish(),
|
|
5072
5086
|
usage: z24.object({
|
|
5073
5087
|
input_tokens: z24.number(),
|
|
5074
|
-
input_tokens_details: z24.object({
|
|
5088
|
+
input_tokens_details: z24.object({
|
|
5089
|
+
cached_tokens: z24.number().nullish(),
|
|
5090
|
+
orchestration_input_tokens: z24.number().nullish(),
|
|
5091
|
+
orchestration_input_cached_tokens: z24.number().nullish()
|
|
5092
|
+
}).nullish(),
|
|
5075
5093
|
output_tokens: z24.number(),
|
|
5076
|
-
output_tokens_details: z24.object({
|
|
5094
|
+
output_tokens_details: z24.object({
|
|
5095
|
+
reasoning_tokens: z24.number().nullish(),
|
|
5096
|
+
orchestration_output_tokens: z24.number().nullish()
|
|
5097
|
+
}).nullish()
|
|
5077
5098
|
}).optional()
|
|
5078
5099
|
})
|
|
5079
5100
|
)
|
|
@@ -7939,7 +7960,7 @@ var OpenAISkills = class {
|
|
|
7939
7960
|
};
|
|
7940
7961
|
|
|
7941
7962
|
// src/version.ts
|
|
7942
|
-
var VERSION = true ? "4.0.0-beta.
|
|
7963
|
+
var VERSION = true ? "4.0.0-beta.77" : "0.0.0-test";
|
|
7943
7964
|
|
|
7944
7965
|
// src/openai-provider.ts
|
|
7945
7966
|
function createOpenAI(options = {}) {
|