@ai-sdk/openai 2.0.0-beta.1 → 2.0.0-beta.2
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 +10 -0
- package/dist/index.d.mts +6 -25
- package/dist/index.d.ts +6 -25
- package/dist/index.js +320 -320
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -16
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +28 -203
- package/dist/internal/index.d.ts +28 -203
- package/dist/internal/index.js +320 -320
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +16 -16
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/internal/index.js
CHANGED
|
@@ -39,7 +39,7 @@ module.exports = __toCommonJS(internal_exports);
|
|
|
39
39
|
// src/openai-chat-language-model.ts
|
|
40
40
|
var import_provider3 = require("@ai-sdk/provider");
|
|
41
41
|
var import_provider_utils5 = require("@ai-sdk/provider-utils");
|
|
42
|
-
var
|
|
42
|
+
var import_v45 = require("zod/v4");
|
|
43
43
|
|
|
44
44
|
// src/convert-to-openai-chat-messages.ts
|
|
45
45
|
var import_provider = require("@ai-sdk/provider");
|
|
@@ -250,15 +250,15 @@ function mapOpenAIFinishReason(finishReason) {
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
// src/openai-chat-options.ts
|
|
253
|
-
var
|
|
254
|
-
var openaiProviderOptions =
|
|
253
|
+
var import_v4 = require("zod/v4");
|
|
254
|
+
var openaiProviderOptions = import_v4.z.object({
|
|
255
255
|
/**
|
|
256
256
|
* Modify the likelihood of specified tokens appearing in the completion.
|
|
257
257
|
*
|
|
258
258
|
* Accepts a JSON object that maps tokens (specified by their token ID in
|
|
259
259
|
* the GPT tokenizer) to an associated bias value from -100 to 100.
|
|
260
260
|
*/
|
|
261
|
-
logitBias:
|
|
261
|
+
logitBias: import_v4.z.record(import_v4.z.coerce.number(), import_v4.z.number()).optional(),
|
|
262
262
|
/**
|
|
263
263
|
* Return the log probabilities of the tokens.
|
|
264
264
|
*
|
|
@@ -268,63 +268,63 @@ var openaiProviderOptions = import_zod.z.object({
|
|
|
268
268
|
* Setting to a number will return the log probabilities of the top n
|
|
269
269
|
* tokens that were generated.
|
|
270
270
|
*/
|
|
271
|
-
logprobs:
|
|
271
|
+
logprobs: import_v4.z.union([import_v4.z.boolean(), import_v4.z.number()]).optional(),
|
|
272
272
|
/**
|
|
273
273
|
* Whether to enable parallel function calling during tool use. Default to true.
|
|
274
274
|
*/
|
|
275
|
-
parallelToolCalls:
|
|
275
|
+
parallelToolCalls: import_v4.z.boolean().optional(),
|
|
276
276
|
/**
|
|
277
277
|
* A unique identifier representing your end-user, which can help OpenAI to
|
|
278
278
|
* monitor and detect abuse.
|
|
279
279
|
*/
|
|
280
|
-
user:
|
|
280
|
+
user: import_v4.z.string().optional(),
|
|
281
281
|
/**
|
|
282
282
|
* Reasoning effort for reasoning models. Defaults to `medium`.
|
|
283
283
|
*/
|
|
284
|
-
reasoningEffort:
|
|
284
|
+
reasoningEffort: import_v4.z.enum(["low", "medium", "high"]).optional(),
|
|
285
285
|
/**
|
|
286
286
|
* Maximum number of completion tokens to generate. Useful for reasoning models.
|
|
287
287
|
*/
|
|
288
|
-
maxCompletionTokens:
|
|
288
|
+
maxCompletionTokens: import_v4.z.number().optional(),
|
|
289
289
|
/**
|
|
290
290
|
* Whether to enable persistence in responses API.
|
|
291
291
|
*/
|
|
292
|
-
store:
|
|
292
|
+
store: import_v4.z.boolean().optional(),
|
|
293
293
|
/**
|
|
294
294
|
* Metadata to associate with the request.
|
|
295
295
|
*/
|
|
296
|
-
metadata:
|
|
296
|
+
metadata: import_v4.z.record(import_v4.z.string().max(64), import_v4.z.string().max(512)).optional(),
|
|
297
297
|
/**
|
|
298
298
|
* Parameters for prediction mode.
|
|
299
299
|
*/
|
|
300
|
-
prediction:
|
|
300
|
+
prediction: import_v4.z.record(import_v4.z.string(), import_v4.z.any()).optional(),
|
|
301
301
|
/**
|
|
302
302
|
* Whether to use structured outputs.
|
|
303
303
|
*
|
|
304
304
|
* @default true
|
|
305
305
|
*/
|
|
306
|
-
structuredOutputs:
|
|
306
|
+
structuredOutputs: import_v4.z.boolean().optional(),
|
|
307
307
|
/**
|
|
308
308
|
* Service tier for the request. Set to 'flex' for 50% cheaper processing
|
|
309
309
|
* at the cost of increased latency. Only available for o3 and o4-mini models.
|
|
310
310
|
*
|
|
311
311
|
* @default 'auto'
|
|
312
312
|
*/
|
|
313
|
-
serviceTier:
|
|
313
|
+
serviceTier: import_v4.z.enum(["auto", "flex"]).optional()
|
|
314
314
|
});
|
|
315
315
|
|
|
316
316
|
// src/openai-error.ts
|
|
317
|
-
var
|
|
317
|
+
var import_v42 = require("zod/v4");
|
|
318
318
|
var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
319
|
-
var openaiErrorDataSchema =
|
|
320
|
-
error:
|
|
321
|
-
message:
|
|
319
|
+
var openaiErrorDataSchema = import_v42.z.object({
|
|
320
|
+
error: import_v42.z.object({
|
|
321
|
+
message: import_v42.z.string(),
|
|
322
322
|
// The additional information below is handled loosely to support
|
|
323
323
|
// OpenAI-compatible providers that have slightly different error
|
|
324
324
|
// responses:
|
|
325
|
-
type:
|
|
326
|
-
param:
|
|
327
|
-
code:
|
|
325
|
+
type: import_v42.z.string().nullish(),
|
|
326
|
+
param: import_v42.z.any().nullish(),
|
|
327
|
+
code: import_v42.z.union([import_v42.z.string(), import_v42.z.number()]).nullish()
|
|
328
328
|
})
|
|
329
329
|
});
|
|
330
330
|
var openaiFailedResponseHandler = (0, import_provider_utils2.createJsonErrorResponseHandler)({
|
|
@@ -337,70 +337,70 @@ var import_provider2 = require("@ai-sdk/provider");
|
|
|
337
337
|
|
|
338
338
|
// src/tool/file-search.ts
|
|
339
339
|
var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
340
|
-
var
|
|
341
|
-
var fileSearchArgsSchema =
|
|
340
|
+
var import_v43 = require("zod/v4");
|
|
341
|
+
var fileSearchArgsSchema = import_v43.z.object({
|
|
342
342
|
/**
|
|
343
343
|
* List of vector store IDs to search through. If not provided, searches all available vector stores.
|
|
344
344
|
*/
|
|
345
|
-
vectorStoreIds:
|
|
345
|
+
vectorStoreIds: import_v43.z.array(import_v43.z.string()).optional(),
|
|
346
346
|
/**
|
|
347
347
|
* Maximum number of search results to return. Defaults to 10.
|
|
348
348
|
*/
|
|
349
|
-
maxResults:
|
|
349
|
+
maxResults: import_v43.z.number().optional(),
|
|
350
350
|
/**
|
|
351
351
|
* Type of search to perform. Defaults to 'auto'.
|
|
352
352
|
*/
|
|
353
|
-
searchType:
|
|
353
|
+
searchType: import_v43.z.enum(["auto", "keyword", "semantic"]).optional()
|
|
354
354
|
});
|
|
355
355
|
var fileSearch = (0, import_provider_utils3.createProviderDefinedToolFactory)({
|
|
356
356
|
id: "openai.file_search",
|
|
357
357
|
name: "file_search",
|
|
358
|
-
inputSchema:
|
|
359
|
-
query:
|
|
358
|
+
inputSchema: import_v43.z.object({
|
|
359
|
+
query: import_v43.z.string()
|
|
360
360
|
})
|
|
361
361
|
});
|
|
362
362
|
|
|
363
363
|
// src/tool/web-search-preview.ts
|
|
364
364
|
var import_provider_utils4 = require("@ai-sdk/provider-utils");
|
|
365
|
-
var
|
|
366
|
-
var webSearchPreviewArgsSchema =
|
|
365
|
+
var import_v44 = require("zod/v4");
|
|
366
|
+
var webSearchPreviewArgsSchema = import_v44.z.object({
|
|
367
367
|
/**
|
|
368
368
|
* Search context size to use for the web search.
|
|
369
369
|
* - high: Most comprehensive context, highest cost, slower response
|
|
370
370
|
* - medium: Balanced context, cost, and latency (default)
|
|
371
371
|
* - low: Least context, lowest cost, fastest response
|
|
372
372
|
*/
|
|
373
|
-
searchContextSize:
|
|
373
|
+
searchContextSize: import_v44.z.enum(["low", "medium", "high"]).optional(),
|
|
374
374
|
/**
|
|
375
375
|
* User location information to provide geographically relevant search results.
|
|
376
376
|
*/
|
|
377
|
-
userLocation:
|
|
377
|
+
userLocation: import_v44.z.object({
|
|
378
378
|
/**
|
|
379
379
|
* Type of location (always 'approximate')
|
|
380
380
|
*/
|
|
381
|
-
type:
|
|
381
|
+
type: import_v44.z.literal("approximate"),
|
|
382
382
|
/**
|
|
383
383
|
* Two-letter ISO country code (e.g., 'US', 'GB')
|
|
384
384
|
*/
|
|
385
|
-
country:
|
|
385
|
+
country: import_v44.z.string().optional(),
|
|
386
386
|
/**
|
|
387
387
|
* City name (free text, e.g., 'Minneapolis')
|
|
388
388
|
*/
|
|
389
|
-
city:
|
|
389
|
+
city: import_v44.z.string().optional(),
|
|
390
390
|
/**
|
|
391
391
|
* Region name (free text, e.g., 'Minnesota')
|
|
392
392
|
*/
|
|
393
|
-
region:
|
|
393
|
+
region: import_v44.z.string().optional(),
|
|
394
394
|
/**
|
|
395
395
|
* IANA timezone (e.g., 'America/Chicago')
|
|
396
396
|
*/
|
|
397
|
-
timezone:
|
|
397
|
+
timezone: import_v44.z.string().optional()
|
|
398
398
|
}).optional()
|
|
399
399
|
});
|
|
400
400
|
var webSearchPreview = (0, import_provider_utils4.createProviderDefinedToolFactory)({
|
|
401
401
|
id: "openai.web_search_preview",
|
|
402
402
|
name: "web_search_preview",
|
|
403
|
-
inputSchema:
|
|
403
|
+
inputSchema: import_v44.z.object({})
|
|
404
404
|
});
|
|
405
405
|
|
|
406
406
|
// src/openai-prepare-tools.ts
|
|
@@ -951,97 +951,97 @@ var OpenAIChatLanguageModel = class {
|
|
|
951
951
|
};
|
|
952
952
|
}
|
|
953
953
|
};
|
|
954
|
-
var openaiTokenUsageSchema =
|
|
955
|
-
prompt_tokens:
|
|
956
|
-
completion_tokens:
|
|
957
|
-
total_tokens:
|
|
958
|
-
prompt_tokens_details:
|
|
959
|
-
cached_tokens:
|
|
954
|
+
var openaiTokenUsageSchema = import_v45.z.object({
|
|
955
|
+
prompt_tokens: import_v45.z.number().nullish(),
|
|
956
|
+
completion_tokens: import_v45.z.number().nullish(),
|
|
957
|
+
total_tokens: import_v45.z.number().nullish(),
|
|
958
|
+
prompt_tokens_details: import_v45.z.object({
|
|
959
|
+
cached_tokens: import_v45.z.number().nullish()
|
|
960
960
|
}).nullish(),
|
|
961
|
-
completion_tokens_details:
|
|
962
|
-
reasoning_tokens:
|
|
963
|
-
accepted_prediction_tokens:
|
|
964
|
-
rejected_prediction_tokens:
|
|
961
|
+
completion_tokens_details: import_v45.z.object({
|
|
962
|
+
reasoning_tokens: import_v45.z.number().nullish(),
|
|
963
|
+
accepted_prediction_tokens: import_v45.z.number().nullish(),
|
|
964
|
+
rejected_prediction_tokens: import_v45.z.number().nullish()
|
|
965
965
|
}).nullish()
|
|
966
966
|
}).nullish();
|
|
967
|
-
var openaiChatResponseSchema =
|
|
968
|
-
id:
|
|
969
|
-
created:
|
|
970
|
-
model:
|
|
971
|
-
choices:
|
|
972
|
-
|
|
973
|
-
message:
|
|
974
|
-
role:
|
|
975
|
-
content:
|
|
976
|
-
tool_calls:
|
|
977
|
-
|
|
978
|
-
id:
|
|
979
|
-
type:
|
|
980
|
-
function:
|
|
981
|
-
name:
|
|
982
|
-
arguments:
|
|
967
|
+
var openaiChatResponseSchema = import_v45.z.object({
|
|
968
|
+
id: import_v45.z.string().nullish(),
|
|
969
|
+
created: import_v45.z.number().nullish(),
|
|
970
|
+
model: import_v45.z.string().nullish(),
|
|
971
|
+
choices: import_v45.z.array(
|
|
972
|
+
import_v45.z.object({
|
|
973
|
+
message: import_v45.z.object({
|
|
974
|
+
role: import_v45.z.literal("assistant").nullish(),
|
|
975
|
+
content: import_v45.z.string().nullish(),
|
|
976
|
+
tool_calls: import_v45.z.array(
|
|
977
|
+
import_v45.z.object({
|
|
978
|
+
id: import_v45.z.string().nullish(),
|
|
979
|
+
type: import_v45.z.literal("function"),
|
|
980
|
+
function: import_v45.z.object({
|
|
981
|
+
name: import_v45.z.string(),
|
|
982
|
+
arguments: import_v45.z.string()
|
|
983
983
|
})
|
|
984
984
|
})
|
|
985
985
|
).nullish()
|
|
986
986
|
}),
|
|
987
|
-
index:
|
|
988
|
-
logprobs:
|
|
989
|
-
content:
|
|
990
|
-
|
|
991
|
-
token:
|
|
992
|
-
logprob:
|
|
993
|
-
top_logprobs:
|
|
994
|
-
|
|
995
|
-
token:
|
|
996
|
-
logprob:
|
|
987
|
+
index: import_v45.z.number(),
|
|
988
|
+
logprobs: import_v45.z.object({
|
|
989
|
+
content: import_v45.z.array(
|
|
990
|
+
import_v45.z.object({
|
|
991
|
+
token: import_v45.z.string(),
|
|
992
|
+
logprob: import_v45.z.number(),
|
|
993
|
+
top_logprobs: import_v45.z.array(
|
|
994
|
+
import_v45.z.object({
|
|
995
|
+
token: import_v45.z.string(),
|
|
996
|
+
logprob: import_v45.z.number()
|
|
997
997
|
})
|
|
998
998
|
)
|
|
999
999
|
})
|
|
1000
1000
|
).nullish()
|
|
1001
1001
|
}).nullish(),
|
|
1002
|
-
finish_reason:
|
|
1002
|
+
finish_reason: import_v45.z.string().nullish()
|
|
1003
1003
|
})
|
|
1004
1004
|
),
|
|
1005
1005
|
usage: openaiTokenUsageSchema
|
|
1006
1006
|
});
|
|
1007
|
-
var openaiChatChunkSchema =
|
|
1008
|
-
|
|
1009
|
-
id:
|
|
1010
|
-
created:
|
|
1011
|
-
model:
|
|
1012
|
-
choices:
|
|
1013
|
-
|
|
1014
|
-
delta:
|
|
1015
|
-
role:
|
|
1016
|
-
content:
|
|
1017
|
-
tool_calls:
|
|
1018
|
-
|
|
1019
|
-
index:
|
|
1020
|
-
id:
|
|
1021
|
-
type:
|
|
1022
|
-
function:
|
|
1023
|
-
name:
|
|
1024
|
-
arguments:
|
|
1007
|
+
var openaiChatChunkSchema = import_v45.z.union([
|
|
1008
|
+
import_v45.z.object({
|
|
1009
|
+
id: import_v45.z.string().nullish(),
|
|
1010
|
+
created: import_v45.z.number().nullish(),
|
|
1011
|
+
model: import_v45.z.string().nullish(),
|
|
1012
|
+
choices: import_v45.z.array(
|
|
1013
|
+
import_v45.z.object({
|
|
1014
|
+
delta: import_v45.z.object({
|
|
1015
|
+
role: import_v45.z.enum(["assistant"]).nullish(),
|
|
1016
|
+
content: import_v45.z.string().nullish(),
|
|
1017
|
+
tool_calls: import_v45.z.array(
|
|
1018
|
+
import_v45.z.object({
|
|
1019
|
+
index: import_v45.z.number(),
|
|
1020
|
+
id: import_v45.z.string().nullish(),
|
|
1021
|
+
type: import_v45.z.literal("function").nullish(),
|
|
1022
|
+
function: import_v45.z.object({
|
|
1023
|
+
name: import_v45.z.string().nullish(),
|
|
1024
|
+
arguments: import_v45.z.string().nullish()
|
|
1025
1025
|
})
|
|
1026
1026
|
})
|
|
1027
1027
|
).nullish()
|
|
1028
1028
|
}).nullish(),
|
|
1029
|
-
logprobs:
|
|
1030
|
-
content:
|
|
1031
|
-
|
|
1032
|
-
token:
|
|
1033
|
-
logprob:
|
|
1034
|
-
top_logprobs:
|
|
1035
|
-
|
|
1036
|
-
token:
|
|
1037
|
-
logprob:
|
|
1029
|
+
logprobs: import_v45.z.object({
|
|
1030
|
+
content: import_v45.z.array(
|
|
1031
|
+
import_v45.z.object({
|
|
1032
|
+
token: import_v45.z.string(),
|
|
1033
|
+
logprob: import_v45.z.number(),
|
|
1034
|
+
top_logprobs: import_v45.z.array(
|
|
1035
|
+
import_v45.z.object({
|
|
1036
|
+
token: import_v45.z.string(),
|
|
1037
|
+
logprob: import_v45.z.number()
|
|
1038
1038
|
})
|
|
1039
1039
|
)
|
|
1040
1040
|
})
|
|
1041
1041
|
).nullish()
|
|
1042
1042
|
}).nullish(),
|
|
1043
|
-
finish_reason:
|
|
1044
|
-
index:
|
|
1043
|
+
finish_reason: import_v45.z.string().nullish(),
|
|
1044
|
+
index: import_v45.z.number()
|
|
1045
1045
|
})
|
|
1046
1046
|
),
|
|
1047
1047
|
usage: openaiTokenUsageSchema
|
|
@@ -1096,7 +1096,7 @@ var reasoningModels = {
|
|
|
1096
1096
|
|
|
1097
1097
|
// src/openai-completion-language-model.ts
|
|
1098
1098
|
var import_provider_utils6 = require("@ai-sdk/provider-utils");
|
|
1099
|
-
var
|
|
1099
|
+
var import_v47 = require("zod/v4");
|
|
1100
1100
|
|
|
1101
1101
|
// src/convert-to-openai-completion-prompt.ts
|
|
1102
1102
|
var import_provider4 = require("@ai-sdk/provider");
|
|
@@ -1174,12 +1174,12 @@ ${user}:`]
|
|
|
1174
1174
|
}
|
|
1175
1175
|
|
|
1176
1176
|
// src/openai-completion-options.ts
|
|
1177
|
-
var
|
|
1178
|
-
var openaiCompletionProviderOptions =
|
|
1177
|
+
var import_v46 = require("zod/v4");
|
|
1178
|
+
var openaiCompletionProviderOptions = import_v46.z.object({
|
|
1179
1179
|
/**
|
|
1180
1180
|
Echo back the prompt in addition to the completion.
|
|
1181
1181
|
*/
|
|
1182
|
-
echo:
|
|
1182
|
+
echo: import_v46.z.boolean().optional(),
|
|
1183
1183
|
/**
|
|
1184
1184
|
Modify the likelihood of specified tokens appearing in the completion.
|
|
1185
1185
|
|
|
@@ -1194,16 +1194,16 @@ var openaiCompletionProviderOptions = import_zod6.z.object({
|
|
|
1194
1194
|
As an example, you can pass {"50256": -100} to prevent the <|endoftext|>
|
|
1195
1195
|
token from being generated.
|
|
1196
1196
|
*/
|
|
1197
|
-
logitBias:
|
|
1197
|
+
logitBias: import_v46.z.record(import_v46.z.string(), import_v46.z.number()).optional(),
|
|
1198
1198
|
/**
|
|
1199
1199
|
The suffix that comes after a completion of inserted text.
|
|
1200
1200
|
*/
|
|
1201
|
-
suffix:
|
|
1201
|
+
suffix: import_v46.z.string().optional(),
|
|
1202
1202
|
/**
|
|
1203
1203
|
A unique identifier representing your end-user, which can help OpenAI to
|
|
1204
1204
|
monitor and detect abuse. Learn more.
|
|
1205
1205
|
*/
|
|
1206
|
-
user:
|
|
1206
|
+
user: import_v46.z.string().optional(),
|
|
1207
1207
|
/**
|
|
1208
1208
|
Return the log probabilities of the tokens. Including logprobs will increase
|
|
1209
1209
|
the response size and can slow down response times. However, it can
|
|
@@ -1213,7 +1213,7 @@ var openaiCompletionProviderOptions = import_zod6.z.object({
|
|
|
1213
1213
|
Setting to a number will return the log probabilities of the top n
|
|
1214
1214
|
tokens that were generated.
|
|
1215
1215
|
*/
|
|
1216
|
-
logprobs:
|
|
1216
|
+
logprobs: import_v46.z.union([import_v46.z.boolean(), import_v46.z.number()]).optional()
|
|
1217
1217
|
});
|
|
1218
1218
|
|
|
1219
1219
|
// src/openai-completion-language-model.ts
|
|
@@ -1445,42 +1445,42 @@ var OpenAICompletionLanguageModel = class {
|
|
|
1445
1445
|
};
|
|
1446
1446
|
}
|
|
1447
1447
|
};
|
|
1448
|
-
var usageSchema =
|
|
1449
|
-
prompt_tokens:
|
|
1450
|
-
completion_tokens:
|
|
1451
|
-
total_tokens:
|
|
1448
|
+
var usageSchema = import_v47.z.object({
|
|
1449
|
+
prompt_tokens: import_v47.z.number(),
|
|
1450
|
+
completion_tokens: import_v47.z.number(),
|
|
1451
|
+
total_tokens: import_v47.z.number()
|
|
1452
1452
|
});
|
|
1453
|
-
var openaiCompletionResponseSchema =
|
|
1454
|
-
id:
|
|
1455
|
-
created:
|
|
1456
|
-
model:
|
|
1457
|
-
choices:
|
|
1458
|
-
|
|
1459
|
-
text:
|
|
1460
|
-
finish_reason:
|
|
1461
|
-
logprobs:
|
|
1462
|
-
tokens:
|
|
1463
|
-
token_logprobs:
|
|
1464
|
-
top_logprobs:
|
|
1453
|
+
var openaiCompletionResponseSchema = import_v47.z.object({
|
|
1454
|
+
id: import_v47.z.string().nullish(),
|
|
1455
|
+
created: import_v47.z.number().nullish(),
|
|
1456
|
+
model: import_v47.z.string().nullish(),
|
|
1457
|
+
choices: import_v47.z.array(
|
|
1458
|
+
import_v47.z.object({
|
|
1459
|
+
text: import_v47.z.string(),
|
|
1460
|
+
finish_reason: import_v47.z.string(),
|
|
1461
|
+
logprobs: import_v47.z.object({
|
|
1462
|
+
tokens: import_v47.z.array(import_v47.z.string()),
|
|
1463
|
+
token_logprobs: import_v47.z.array(import_v47.z.number()),
|
|
1464
|
+
top_logprobs: import_v47.z.array(import_v47.z.record(import_v47.z.string(), import_v47.z.number())).nullish()
|
|
1465
1465
|
}).nullish()
|
|
1466
1466
|
})
|
|
1467
1467
|
),
|
|
1468
1468
|
usage: usageSchema.nullish()
|
|
1469
1469
|
});
|
|
1470
|
-
var openaiCompletionChunkSchema =
|
|
1471
|
-
|
|
1472
|
-
id:
|
|
1473
|
-
created:
|
|
1474
|
-
model:
|
|
1475
|
-
choices:
|
|
1476
|
-
|
|
1477
|
-
text:
|
|
1478
|
-
finish_reason:
|
|
1479
|
-
index:
|
|
1480
|
-
logprobs:
|
|
1481
|
-
tokens:
|
|
1482
|
-
token_logprobs:
|
|
1483
|
-
top_logprobs:
|
|
1470
|
+
var openaiCompletionChunkSchema = import_v47.z.union([
|
|
1471
|
+
import_v47.z.object({
|
|
1472
|
+
id: import_v47.z.string().nullish(),
|
|
1473
|
+
created: import_v47.z.number().nullish(),
|
|
1474
|
+
model: import_v47.z.string().nullish(),
|
|
1475
|
+
choices: import_v47.z.array(
|
|
1476
|
+
import_v47.z.object({
|
|
1477
|
+
text: import_v47.z.string(),
|
|
1478
|
+
finish_reason: import_v47.z.string().nullish(),
|
|
1479
|
+
index: import_v47.z.number(),
|
|
1480
|
+
logprobs: import_v47.z.object({
|
|
1481
|
+
tokens: import_v47.z.array(import_v47.z.string()),
|
|
1482
|
+
token_logprobs: import_v47.z.array(import_v47.z.number()),
|
|
1483
|
+
top_logprobs: import_v47.z.array(import_v47.z.record(import_v47.z.string(), import_v47.z.number())).nullish()
|
|
1484
1484
|
}).nullish()
|
|
1485
1485
|
})
|
|
1486
1486
|
),
|
|
@@ -1492,21 +1492,21 @@ var openaiCompletionChunkSchema = import_zod7.z.union([
|
|
|
1492
1492
|
// src/openai-embedding-model.ts
|
|
1493
1493
|
var import_provider5 = require("@ai-sdk/provider");
|
|
1494
1494
|
var import_provider_utils7 = require("@ai-sdk/provider-utils");
|
|
1495
|
-
var
|
|
1495
|
+
var import_v49 = require("zod/v4");
|
|
1496
1496
|
|
|
1497
1497
|
// src/openai-embedding-options.ts
|
|
1498
|
-
var
|
|
1499
|
-
var openaiEmbeddingProviderOptions =
|
|
1498
|
+
var import_v48 = require("zod/v4");
|
|
1499
|
+
var openaiEmbeddingProviderOptions = import_v48.z.object({
|
|
1500
1500
|
/**
|
|
1501
1501
|
The number of dimensions the resulting output embeddings should have.
|
|
1502
1502
|
Only supported in text-embedding-3 and later models.
|
|
1503
1503
|
*/
|
|
1504
|
-
dimensions:
|
|
1504
|
+
dimensions: import_v48.z.number().optional(),
|
|
1505
1505
|
/**
|
|
1506
1506
|
A unique identifier representing your end-user, which can help OpenAI to
|
|
1507
1507
|
monitor and detect abuse. Learn more.
|
|
1508
1508
|
*/
|
|
1509
|
-
user:
|
|
1509
|
+
user: import_v48.z.string().optional()
|
|
1510
1510
|
});
|
|
1511
1511
|
|
|
1512
1512
|
// src/openai-embedding-model.ts
|
|
@@ -1572,14 +1572,14 @@ var OpenAIEmbeddingModel = class {
|
|
|
1572
1572
|
};
|
|
1573
1573
|
}
|
|
1574
1574
|
};
|
|
1575
|
-
var openaiTextEmbeddingResponseSchema =
|
|
1576
|
-
data:
|
|
1577
|
-
usage:
|
|
1575
|
+
var openaiTextEmbeddingResponseSchema = import_v49.z.object({
|
|
1576
|
+
data: import_v49.z.array(import_v49.z.object({ embedding: import_v49.z.array(import_v49.z.number()) })),
|
|
1577
|
+
usage: import_v49.z.object({ prompt_tokens: import_v49.z.number() }).nullish()
|
|
1578
1578
|
});
|
|
1579
1579
|
|
|
1580
1580
|
// src/openai-image-model.ts
|
|
1581
1581
|
var import_provider_utils8 = require("@ai-sdk/provider-utils");
|
|
1582
|
-
var
|
|
1582
|
+
var import_v410 = require("zod/v4");
|
|
1583
1583
|
|
|
1584
1584
|
// src/openai-image-settings.ts
|
|
1585
1585
|
var modelMaxImagesPerCall = {
|
|
@@ -1667,41 +1667,41 @@ var OpenAIImageModel = class {
|
|
|
1667
1667
|
};
|
|
1668
1668
|
}
|
|
1669
1669
|
};
|
|
1670
|
-
var openaiImageResponseSchema =
|
|
1671
|
-
data:
|
|
1672
|
-
|
|
1670
|
+
var openaiImageResponseSchema = import_v410.z.object({
|
|
1671
|
+
data: import_v410.z.array(
|
|
1672
|
+
import_v410.z.object({ b64_json: import_v410.z.string(), revised_prompt: import_v410.z.string().optional() })
|
|
1673
1673
|
)
|
|
1674
1674
|
});
|
|
1675
1675
|
|
|
1676
1676
|
// src/openai-transcription-model.ts
|
|
1677
1677
|
var import_provider_utils9 = require("@ai-sdk/provider-utils");
|
|
1678
|
-
var
|
|
1678
|
+
var import_v412 = require("zod/v4");
|
|
1679
1679
|
|
|
1680
1680
|
// src/openai-transcription-options.ts
|
|
1681
|
-
var
|
|
1682
|
-
var openAITranscriptionProviderOptions =
|
|
1681
|
+
var import_v411 = require("zod/v4");
|
|
1682
|
+
var openAITranscriptionProviderOptions = import_v411.z.object({
|
|
1683
1683
|
/**
|
|
1684
1684
|
* Additional information to include in the transcription response.
|
|
1685
1685
|
*/
|
|
1686
|
-
include:
|
|
1686
|
+
include: import_v411.z.array(import_v411.z.string()).optional(),
|
|
1687
1687
|
/**
|
|
1688
1688
|
* The language of the input audio in ISO-639-1 format.
|
|
1689
1689
|
*/
|
|
1690
|
-
language:
|
|
1690
|
+
language: import_v411.z.string().optional(),
|
|
1691
1691
|
/**
|
|
1692
1692
|
* An optional text to guide the model's style or continue a previous audio segment.
|
|
1693
1693
|
*/
|
|
1694
|
-
prompt:
|
|
1694
|
+
prompt: import_v411.z.string().optional(),
|
|
1695
1695
|
/**
|
|
1696
1696
|
* The sampling temperature, between 0 and 1.
|
|
1697
1697
|
* @default 0
|
|
1698
1698
|
*/
|
|
1699
|
-
temperature:
|
|
1699
|
+
temperature: import_v411.z.number().min(0).max(1).default(0).optional(),
|
|
1700
1700
|
/**
|
|
1701
1701
|
* The timestamp granularities to populate for this transcription.
|
|
1702
1702
|
* @default ['segment']
|
|
1703
1703
|
*/
|
|
1704
|
-
timestampGranularities:
|
|
1704
|
+
timestampGranularities: import_v411.z.array(import_v411.z.enum(["word", "segment"])).default(["segment"]).optional()
|
|
1705
1705
|
});
|
|
1706
1706
|
|
|
1707
1707
|
// src/openai-transcription-model.ts
|
|
@@ -1849,25 +1849,25 @@ var OpenAITranscriptionModel = class {
|
|
|
1849
1849
|
};
|
|
1850
1850
|
}
|
|
1851
1851
|
};
|
|
1852
|
-
var openaiTranscriptionResponseSchema =
|
|
1853
|
-
text:
|
|
1854
|
-
language:
|
|
1855
|
-
duration:
|
|
1856
|
-
words:
|
|
1857
|
-
|
|
1858
|
-
word:
|
|
1859
|
-
start:
|
|
1860
|
-
end:
|
|
1852
|
+
var openaiTranscriptionResponseSchema = import_v412.z.object({
|
|
1853
|
+
text: import_v412.z.string(),
|
|
1854
|
+
language: import_v412.z.string().nullish(),
|
|
1855
|
+
duration: import_v412.z.number().nullish(),
|
|
1856
|
+
words: import_v412.z.array(
|
|
1857
|
+
import_v412.z.object({
|
|
1858
|
+
word: import_v412.z.string(),
|
|
1859
|
+
start: import_v412.z.number(),
|
|
1860
|
+
end: import_v412.z.number()
|
|
1861
1861
|
})
|
|
1862
1862
|
).nullish()
|
|
1863
1863
|
});
|
|
1864
1864
|
|
|
1865
1865
|
// src/openai-speech-model.ts
|
|
1866
1866
|
var import_provider_utils10 = require("@ai-sdk/provider-utils");
|
|
1867
|
-
var
|
|
1868
|
-
var OpenAIProviderOptionsSchema =
|
|
1869
|
-
instructions:
|
|
1870
|
-
speed:
|
|
1867
|
+
var import_v413 = require("zod/v4");
|
|
1868
|
+
var OpenAIProviderOptionsSchema = import_v413.z.object({
|
|
1869
|
+
instructions: import_v413.z.string().nullish(),
|
|
1870
|
+
speed: import_v413.z.number().min(0.25).max(4).default(1).nullish()
|
|
1871
1871
|
});
|
|
1872
1872
|
var OpenAISpeechModel = class {
|
|
1873
1873
|
constructor(modelId, config) {
|
|
@@ -1971,7 +1971,7 @@ var OpenAISpeechModel = class {
|
|
|
1971
1971
|
|
|
1972
1972
|
// src/responses/openai-responses-language-model.ts
|
|
1973
1973
|
var import_provider_utils11 = require("@ai-sdk/provider-utils");
|
|
1974
|
-
var
|
|
1974
|
+
var import_v414 = require("zod/v4");
|
|
1975
1975
|
|
|
1976
1976
|
// src/responses/convert-to-openai-responses-messages.ts
|
|
1977
1977
|
var import_provider6 = require("@ai-sdk/provider");
|
|
@@ -2362,59 +2362,59 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2362
2362
|
body,
|
|
2363
2363
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
2364
2364
|
successfulResponseHandler: (0, import_provider_utils11.createJsonResponseHandler)(
|
|
2365
|
-
|
|
2366
|
-
id:
|
|
2367
|
-
created_at:
|
|
2368
|
-
model:
|
|
2369
|
-
output:
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
type:
|
|
2373
|
-
role:
|
|
2374
|
-
content:
|
|
2375
|
-
|
|
2376
|
-
type:
|
|
2377
|
-
text:
|
|
2378
|
-
annotations:
|
|
2379
|
-
|
|
2380
|
-
type:
|
|
2381
|
-
start_index:
|
|
2382
|
-
end_index:
|
|
2383
|
-
url:
|
|
2384
|
-
title:
|
|
2365
|
+
import_v414.z.object({
|
|
2366
|
+
id: import_v414.z.string(),
|
|
2367
|
+
created_at: import_v414.z.number(),
|
|
2368
|
+
model: import_v414.z.string(),
|
|
2369
|
+
output: import_v414.z.array(
|
|
2370
|
+
import_v414.z.discriminatedUnion("type", [
|
|
2371
|
+
import_v414.z.object({
|
|
2372
|
+
type: import_v414.z.literal("message"),
|
|
2373
|
+
role: import_v414.z.literal("assistant"),
|
|
2374
|
+
content: import_v414.z.array(
|
|
2375
|
+
import_v414.z.object({
|
|
2376
|
+
type: import_v414.z.literal("output_text"),
|
|
2377
|
+
text: import_v414.z.string(),
|
|
2378
|
+
annotations: import_v414.z.array(
|
|
2379
|
+
import_v414.z.object({
|
|
2380
|
+
type: import_v414.z.literal("url_citation"),
|
|
2381
|
+
start_index: import_v414.z.number(),
|
|
2382
|
+
end_index: import_v414.z.number(),
|
|
2383
|
+
url: import_v414.z.string(),
|
|
2384
|
+
title: import_v414.z.string()
|
|
2385
2385
|
})
|
|
2386
2386
|
)
|
|
2387
2387
|
})
|
|
2388
2388
|
)
|
|
2389
2389
|
}),
|
|
2390
|
-
|
|
2391
|
-
type:
|
|
2392
|
-
call_id:
|
|
2393
|
-
name:
|
|
2394
|
-
arguments:
|
|
2390
|
+
import_v414.z.object({
|
|
2391
|
+
type: import_v414.z.literal("function_call"),
|
|
2392
|
+
call_id: import_v414.z.string(),
|
|
2393
|
+
name: import_v414.z.string(),
|
|
2394
|
+
arguments: import_v414.z.string()
|
|
2395
2395
|
}),
|
|
2396
|
-
|
|
2397
|
-
type:
|
|
2398
|
-
id:
|
|
2399
|
-
status:
|
|
2396
|
+
import_v414.z.object({
|
|
2397
|
+
type: import_v414.z.literal("web_search_call"),
|
|
2398
|
+
id: import_v414.z.string(),
|
|
2399
|
+
status: import_v414.z.string().optional()
|
|
2400
2400
|
}),
|
|
2401
|
-
|
|
2402
|
-
type:
|
|
2403
|
-
id:
|
|
2404
|
-
status:
|
|
2401
|
+
import_v414.z.object({
|
|
2402
|
+
type: import_v414.z.literal("computer_call"),
|
|
2403
|
+
id: import_v414.z.string(),
|
|
2404
|
+
status: import_v414.z.string().optional()
|
|
2405
2405
|
}),
|
|
2406
|
-
|
|
2407
|
-
type:
|
|
2408
|
-
summary:
|
|
2409
|
-
|
|
2410
|
-
type:
|
|
2411
|
-
text:
|
|
2406
|
+
import_v414.z.object({
|
|
2407
|
+
type: import_v414.z.literal("reasoning"),
|
|
2408
|
+
summary: import_v414.z.array(
|
|
2409
|
+
import_v414.z.object({
|
|
2410
|
+
type: import_v414.z.literal("summary_text"),
|
|
2411
|
+
text: import_v414.z.string()
|
|
2412
2412
|
})
|
|
2413
2413
|
)
|
|
2414
2414
|
})
|
|
2415
2415
|
])
|
|
2416
2416
|
),
|
|
2417
|
-
incomplete_details:
|
|
2417
|
+
incomplete_details: import_v414.z.object({ reason: import_v414.z.string() }).nullable(),
|
|
2418
2418
|
usage: usageSchema2
|
|
2419
2419
|
})
|
|
2420
2420
|
),
|
|
@@ -2755,124 +2755,124 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2755
2755
|
};
|
|
2756
2756
|
}
|
|
2757
2757
|
};
|
|
2758
|
-
var usageSchema2 =
|
|
2759
|
-
input_tokens:
|
|
2760
|
-
input_tokens_details:
|
|
2761
|
-
output_tokens:
|
|
2762
|
-
output_tokens_details:
|
|
2758
|
+
var usageSchema2 = import_v414.z.object({
|
|
2759
|
+
input_tokens: import_v414.z.number(),
|
|
2760
|
+
input_tokens_details: import_v414.z.object({ cached_tokens: import_v414.z.number().nullish() }).nullish(),
|
|
2761
|
+
output_tokens: import_v414.z.number(),
|
|
2762
|
+
output_tokens_details: import_v414.z.object({ reasoning_tokens: import_v414.z.number().nullish() }).nullish()
|
|
2763
2763
|
});
|
|
2764
|
-
var textDeltaChunkSchema =
|
|
2765
|
-
type:
|
|
2766
|
-
item_id:
|
|
2767
|
-
delta:
|
|
2764
|
+
var textDeltaChunkSchema = import_v414.z.object({
|
|
2765
|
+
type: import_v414.z.literal("response.output_text.delta"),
|
|
2766
|
+
item_id: import_v414.z.string(),
|
|
2767
|
+
delta: import_v414.z.string()
|
|
2768
2768
|
});
|
|
2769
|
-
var responseFinishedChunkSchema =
|
|
2770
|
-
type:
|
|
2771
|
-
response:
|
|
2772
|
-
incomplete_details:
|
|
2769
|
+
var responseFinishedChunkSchema = import_v414.z.object({
|
|
2770
|
+
type: import_v414.z.enum(["response.completed", "response.incomplete"]),
|
|
2771
|
+
response: import_v414.z.object({
|
|
2772
|
+
incomplete_details: import_v414.z.object({ reason: import_v414.z.string() }).nullish(),
|
|
2773
2773
|
usage: usageSchema2
|
|
2774
2774
|
})
|
|
2775
2775
|
});
|
|
2776
|
-
var responseCreatedChunkSchema =
|
|
2777
|
-
type:
|
|
2778
|
-
response:
|
|
2779
|
-
id:
|
|
2780
|
-
created_at:
|
|
2781
|
-
model:
|
|
2776
|
+
var responseCreatedChunkSchema = import_v414.z.object({
|
|
2777
|
+
type: import_v414.z.literal("response.created"),
|
|
2778
|
+
response: import_v414.z.object({
|
|
2779
|
+
id: import_v414.z.string(),
|
|
2780
|
+
created_at: import_v414.z.number(),
|
|
2781
|
+
model: import_v414.z.string()
|
|
2782
2782
|
})
|
|
2783
2783
|
});
|
|
2784
|
-
var responseOutputItemAddedSchema =
|
|
2785
|
-
type:
|
|
2786
|
-
output_index:
|
|
2787
|
-
item:
|
|
2788
|
-
|
|
2789
|
-
type:
|
|
2790
|
-
id:
|
|
2784
|
+
var responseOutputItemAddedSchema = import_v414.z.object({
|
|
2785
|
+
type: import_v414.z.literal("response.output_item.added"),
|
|
2786
|
+
output_index: import_v414.z.number(),
|
|
2787
|
+
item: import_v414.z.discriminatedUnion("type", [
|
|
2788
|
+
import_v414.z.object({
|
|
2789
|
+
type: import_v414.z.literal("message"),
|
|
2790
|
+
id: import_v414.z.string()
|
|
2791
2791
|
}),
|
|
2792
|
-
|
|
2793
|
-
type:
|
|
2794
|
-
id:
|
|
2792
|
+
import_v414.z.object({
|
|
2793
|
+
type: import_v414.z.literal("reasoning"),
|
|
2794
|
+
id: import_v414.z.string()
|
|
2795
2795
|
}),
|
|
2796
|
-
|
|
2797
|
-
type:
|
|
2798
|
-
id:
|
|
2799
|
-
call_id:
|
|
2800
|
-
name:
|
|
2801
|
-
arguments:
|
|
2796
|
+
import_v414.z.object({
|
|
2797
|
+
type: import_v414.z.literal("function_call"),
|
|
2798
|
+
id: import_v414.z.string(),
|
|
2799
|
+
call_id: import_v414.z.string(),
|
|
2800
|
+
name: import_v414.z.string(),
|
|
2801
|
+
arguments: import_v414.z.string()
|
|
2802
2802
|
}),
|
|
2803
|
-
|
|
2804
|
-
type:
|
|
2805
|
-
id:
|
|
2806
|
-
status:
|
|
2803
|
+
import_v414.z.object({
|
|
2804
|
+
type: import_v414.z.literal("web_search_call"),
|
|
2805
|
+
id: import_v414.z.string(),
|
|
2806
|
+
status: import_v414.z.string()
|
|
2807
2807
|
}),
|
|
2808
|
-
|
|
2809
|
-
type:
|
|
2810
|
-
id:
|
|
2811
|
-
status:
|
|
2808
|
+
import_v414.z.object({
|
|
2809
|
+
type: import_v414.z.literal("computer_call"),
|
|
2810
|
+
id: import_v414.z.string(),
|
|
2811
|
+
status: import_v414.z.string()
|
|
2812
2812
|
})
|
|
2813
2813
|
])
|
|
2814
2814
|
});
|
|
2815
|
-
var responseOutputItemDoneSchema =
|
|
2816
|
-
type:
|
|
2817
|
-
output_index:
|
|
2818
|
-
item:
|
|
2819
|
-
|
|
2820
|
-
type:
|
|
2821
|
-
id:
|
|
2815
|
+
var responseOutputItemDoneSchema = import_v414.z.object({
|
|
2816
|
+
type: import_v414.z.literal("response.output_item.done"),
|
|
2817
|
+
output_index: import_v414.z.number(),
|
|
2818
|
+
item: import_v414.z.discriminatedUnion("type", [
|
|
2819
|
+
import_v414.z.object({
|
|
2820
|
+
type: import_v414.z.literal("message"),
|
|
2821
|
+
id: import_v414.z.string()
|
|
2822
2822
|
}),
|
|
2823
|
-
|
|
2824
|
-
type:
|
|
2825
|
-
id:
|
|
2823
|
+
import_v414.z.object({
|
|
2824
|
+
type: import_v414.z.literal("reasoning"),
|
|
2825
|
+
id: import_v414.z.string()
|
|
2826
2826
|
}),
|
|
2827
|
-
|
|
2828
|
-
type:
|
|
2829
|
-
id:
|
|
2830
|
-
call_id:
|
|
2831
|
-
name:
|
|
2832
|
-
arguments:
|
|
2833
|
-
status:
|
|
2827
|
+
import_v414.z.object({
|
|
2828
|
+
type: import_v414.z.literal("function_call"),
|
|
2829
|
+
id: import_v414.z.string(),
|
|
2830
|
+
call_id: import_v414.z.string(),
|
|
2831
|
+
name: import_v414.z.string(),
|
|
2832
|
+
arguments: import_v414.z.string(),
|
|
2833
|
+
status: import_v414.z.literal("completed")
|
|
2834
2834
|
}),
|
|
2835
|
-
|
|
2836
|
-
type:
|
|
2837
|
-
id:
|
|
2838
|
-
status:
|
|
2835
|
+
import_v414.z.object({
|
|
2836
|
+
type: import_v414.z.literal("web_search_call"),
|
|
2837
|
+
id: import_v414.z.string(),
|
|
2838
|
+
status: import_v414.z.literal("completed")
|
|
2839
2839
|
}),
|
|
2840
|
-
|
|
2841
|
-
type:
|
|
2842
|
-
id:
|
|
2843
|
-
status:
|
|
2840
|
+
import_v414.z.object({
|
|
2841
|
+
type: import_v414.z.literal("computer_call"),
|
|
2842
|
+
id: import_v414.z.string(),
|
|
2843
|
+
status: import_v414.z.literal("completed")
|
|
2844
2844
|
})
|
|
2845
2845
|
])
|
|
2846
2846
|
});
|
|
2847
|
-
var responseFunctionCallArgumentsDeltaSchema =
|
|
2848
|
-
type:
|
|
2849
|
-
item_id:
|
|
2850
|
-
output_index:
|
|
2851
|
-
delta:
|
|
2847
|
+
var responseFunctionCallArgumentsDeltaSchema = import_v414.z.object({
|
|
2848
|
+
type: import_v414.z.literal("response.function_call_arguments.delta"),
|
|
2849
|
+
item_id: import_v414.z.string(),
|
|
2850
|
+
output_index: import_v414.z.number(),
|
|
2851
|
+
delta: import_v414.z.string()
|
|
2852
2852
|
});
|
|
2853
|
-
var responseAnnotationAddedSchema =
|
|
2854
|
-
type:
|
|
2855
|
-
annotation:
|
|
2856
|
-
type:
|
|
2857
|
-
url:
|
|
2858
|
-
title:
|
|
2853
|
+
var responseAnnotationAddedSchema = import_v414.z.object({
|
|
2854
|
+
type: import_v414.z.literal("response.output_text.annotation.added"),
|
|
2855
|
+
annotation: import_v414.z.object({
|
|
2856
|
+
type: import_v414.z.literal("url_citation"),
|
|
2857
|
+
url: import_v414.z.string(),
|
|
2858
|
+
title: import_v414.z.string()
|
|
2859
2859
|
})
|
|
2860
2860
|
});
|
|
2861
|
-
var responseReasoningSummaryTextDeltaSchema =
|
|
2862
|
-
type:
|
|
2863
|
-
item_id:
|
|
2864
|
-
output_index:
|
|
2865
|
-
summary_index:
|
|
2866
|
-
delta:
|
|
2861
|
+
var responseReasoningSummaryTextDeltaSchema = import_v414.z.object({
|
|
2862
|
+
type: import_v414.z.literal("response.reasoning_summary_text.delta"),
|
|
2863
|
+
item_id: import_v414.z.string(),
|
|
2864
|
+
output_index: import_v414.z.number(),
|
|
2865
|
+
summary_index: import_v414.z.number(),
|
|
2866
|
+
delta: import_v414.z.string()
|
|
2867
2867
|
});
|
|
2868
|
-
var responseReasoningSummaryPartDoneSchema =
|
|
2869
|
-
type:
|
|
2870
|
-
item_id:
|
|
2871
|
-
output_index:
|
|
2872
|
-
summary_index:
|
|
2873
|
-
part:
|
|
2868
|
+
var responseReasoningSummaryPartDoneSchema = import_v414.z.object({
|
|
2869
|
+
type: import_v414.z.literal("response.reasoning_summary_part.done"),
|
|
2870
|
+
item_id: import_v414.z.string(),
|
|
2871
|
+
output_index: import_v414.z.number(),
|
|
2872
|
+
summary_index: import_v414.z.number(),
|
|
2873
|
+
part: import_v414.z.unknown().nullish()
|
|
2874
2874
|
});
|
|
2875
|
-
var openaiResponsesChunkSchema =
|
|
2875
|
+
var openaiResponsesChunkSchema = import_v414.z.union([
|
|
2876
2876
|
textDeltaChunkSchema,
|
|
2877
2877
|
responseFinishedChunkSchema,
|
|
2878
2878
|
responseCreatedChunkSchema,
|
|
@@ -2882,7 +2882,7 @@ var openaiResponsesChunkSchema = import_zod14.z.union([
|
|
|
2882
2882
|
responseAnnotationAddedSchema,
|
|
2883
2883
|
responseReasoningSummaryTextDeltaSchema,
|
|
2884
2884
|
responseReasoningSummaryPartDoneSchema,
|
|
2885
|
-
|
|
2885
|
+
import_v414.z.object({ type: import_v414.z.string() }).passthrough()
|
|
2886
2886
|
// fallback for unknown chunks
|
|
2887
2887
|
]);
|
|
2888
2888
|
function isTextDeltaChunk(chunk) {
|
|
@@ -2933,17 +2933,17 @@ function getResponsesModelConfig(modelId) {
|
|
|
2933
2933
|
function supportsFlexProcessing2(modelId) {
|
|
2934
2934
|
return modelId.startsWith("o3") || modelId.startsWith("o4-mini");
|
|
2935
2935
|
}
|
|
2936
|
-
var openaiResponsesProviderOptionsSchema =
|
|
2937
|
-
metadata:
|
|
2938
|
-
parallelToolCalls:
|
|
2939
|
-
previousResponseId:
|
|
2940
|
-
store:
|
|
2941
|
-
user:
|
|
2942
|
-
reasoningEffort:
|
|
2943
|
-
strictSchemas:
|
|
2944
|
-
instructions:
|
|
2945
|
-
reasoningSummary:
|
|
2946
|
-
serviceTier:
|
|
2936
|
+
var openaiResponsesProviderOptionsSchema = import_v414.z.object({
|
|
2937
|
+
metadata: import_v414.z.any().nullish(),
|
|
2938
|
+
parallelToolCalls: import_v414.z.boolean().nullish(),
|
|
2939
|
+
previousResponseId: import_v414.z.string().nullish(),
|
|
2940
|
+
store: import_v414.z.boolean().nullish(),
|
|
2941
|
+
user: import_v414.z.string().nullish(),
|
|
2942
|
+
reasoningEffort: import_v414.z.string().nullish(),
|
|
2943
|
+
strictSchemas: import_v414.z.boolean().nullish(),
|
|
2944
|
+
instructions: import_v414.z.string().nullish(),
|
|
2945
|
+
reasoningSummary: import_v414.z.string().nullish(),
|
|
2946
|
+
serviceTier: import_v414.z.enum(["auto", "flex"]).nullish()
|
|
2947
2947
|
});
|
|
2948
2948
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2949
2949
|
0 && (module.exports = {
|