@ai-sdk/openai 3.0.0-beta.22 → 3.0.0-beta.24

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/dist/index.js CHANGED
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/index.ts
@@ -44,17 +34,17 @@ var import_provider3 = require("@ai-sdk/provider");
44
34
  var import_provider_utils5 = require("@ai-sdk/provider-utils");
45
35
 
46
36
  // src/openai-error.ts
47
- var z = __toESM(require("zod/v4"));
37
+ var import_v4 = require("zod/v4");
48
38
  var import_provider_utils = require("@ai-sdk/provider-utils");
49
- var openaiErrorDataSchema = z.object({
50
- error: z.object({
51
- message: z.string(),
39
+ var openaiErrorDataSchema = import_v4.z.object({
40
+ error: import_v4.z.object({
41
+ message: import_v4.z.string(),
52
42
  // The additional information below is handled loosely to support
53
43
  // OpenAI-compatible providers that have slightly different error
54
44
  // responses:
55
- type: z.string().nullish(),
56
- param: z.any().nullish(),
57
- code: z.union([z.string(), z.number()]).nullish()
45
+ type: import_v4.z.string().nullish(),
46
+ param: import_v4.z.any().nullish(),
47
+ code: import_v4.z.union([import_v4.z.string(), import_v4.z.number()]).nullish()
58
48
  })
59
49
  });
60
50
  var openaiFailedResponseHandler = (0, import_provider_utils.createJsonErrorResponseHandler)({
@@ -276,67 +266,67 @@ function mapOpenAIFinishReason(finishReason) {
276
266
 
277
267
  // src/chat/openai-chat-api.ts
278
268
  var import_provider_utils3 = require("@ai-sdk/provider-utils");
279
- var z2 = __toESM(require("zod/v4"));
269
+ var import_v42 = require("zod/v4");
280
270
  var openaiChatResponseSchema = (0, import_provider_utils3.lazyValidator)(
281
271
  () => (0, import_provider_utils3.zodSchema)(
282
- z2.object({
283
- id: z2.string().nullish(),
284
- created: z2.number().nullish(),
285
- model: z2.string().nullish(),
286
- choices: z2.array(
287
- z2.object({
288
- message: z2.object({
289
- role: z2.literal("assistant").nullish(),
290
- content: z2.string().nullish(),
291
- tool_calls: z2.array(
292
- z2.object({
293
- id: z2.string().nullish(),
294
- type: z2.literal("function"),
295
- function: z2.object({
296
- name: z2.string(),
297
- arguments: z2.string()
272
+ import_v42.z.object({
273
+ id: import_v42.z.string().nullish(),
274
+ created: import_v42.z.number().nullish(),
275
+ model: import_v42.z.string().nullish(),
276
+ choices: import_v42.z.array(
277
+ import_v42.z.object({
278
+ message: import_v42.z.object({
279
+ role: import_v42.z.literal("assistant").nullish(),
280
+ content: import_v42.z.string().nullish(),
281
+ tool_calls: import_v42.z.array(
282
+ import_v42.z.object({
283
+ id: import_v42.z.string().nullish(),
284
+ type: import_v42.z.literal("function"),
285
+ function: import_v42.z.object({
286
+ name: import_v42.z.string(),
287
+ arguments: import_v42.z.string()
298
288
  })
299
289
  })
300
290
  ).nullish(),
301
- annotations: z2.array(
302
- z2.object({
303
- type: z2.literal("url_citation"),
304
- start_index: z2.number(),
305
- end_index: z2.number(),
306
- url: z2.string(),
307
- title: z2.string()
291
+ annotations: import_v42.z.array(
292
+ import_v42.z.object({
293
+ type: import_v42.z.literal("url_citation"),
294
+ start_index: import_v42.z.number(),
295
+ end_index: import_v42.z.number(),
296
+ url: import_v42.z.string(),
297
+ title: import_v42.z.string()
308
298
  })
309
299
  ).nullish()
310
300
  }),
311
- index: z2.number(),
312
- logprobs: z2.object({
313
- content: z2.array(
314
- z2.object({
315
- token: z2.string(),
316
- logprob: z2.number(),
317
- top_logprobs: z2.array(
318
- z2.object({
319
- token: z2.string(),
320
- logprob: z2.number()
301
+ index: import_v42.z.number(),
302
+ logprobs: import_v42.z.object({
303
+ content: import_v42.z.array(
304
+ import_v42.z.object({
305
+ token: import_v42.z.string(),
306
+ logprob: import_v42.z.number(),
307
+ top_logprobs: import_v42.z.array(
308
+ import_v42.z.object({
309
+ token: import_v42.z.string(),
310
+ logprob: import_v42.z.number()
321
311
  })
322
312
  )
323
313
  })
324
314
  ).nullish()
325
315
  }).nullish(),
326
- finish_reason: z2.string().nullish()
316
+ finish_reason: import_v42.z.string().nullish()
327
317
  })
328
318
  ),
329
- usage: z2.object({
330
- prompt_tokens: z2.number().nullish(),
331
- completion_tokens: z2.number().nullish(),
332
- total_tokens: z2.number().nullish(),
333
- prompt_tokens_details: z2.object({
334
- cached_tokens: z2.number().nullish()
319
+ usage: import_v42.z.object({
320
+ prompt_tokens: import_v42.z.number().nullish(),
321
+ completion_tokens: import_v42.z.number().nullish(),
322
+ total_tokens: import_v42.z.number().nullish(),
323
+ prompt_tokens_details: import_v42.z.object({
324
+ cached_tokens: import_v42.z.number().nullish()
335
325
  }).nullish(),
336
- completion_tokens_details: z2.object({
337
- reasoning_tokens: z2.number().nullish(),
338
- accepted_prediction_tokens: z2.number().nullish(),
339
- rejected_prediction_tokens: z2.number().nullish()
326
+ completion_tokens_details: import_v42.z.object({
327
+ reasoning_tokens: import_v42.z.number().nullish(),
328
+ accepted_prediction_tokens: import_v42.z.number().nullish(),
329
+ rejected_prediction_tokens: import_v42.z.number().nullish()
340
330
  }).nullish()
341
331
  }).nullish()
342
332
  })
@@ -344,66 +334,66 @@ var openaiChatResponseSchema = (0, import_provider_utils3.lazyValidator)(
344
334
  );
345
335
  var openaiChatChunkSchema = (0, import_provider_utils3.lazyValidator)(
346
336
  () => (0, import_provider_utils3.zodSchema)(
347
- z2.union([
348
- z2.object({
349
- id: z2.string().nullish(),
350
- created: z2.number().nullish(),
351
- model: z2.string().nullish(),
352
- choices: z2.array(
353
- z2.object({
354
- delta: z2.object({
355
- role: z2.enum(["assistant"]).nullish(),
356
- content: z2.string().nullish(),
357
- tool_calls: z2.array(
358
- z2.object({
359
- index: z2.number(),
360
- id: z2.string().nullish(),
361
- type: z2.literal("function").nullish(),
362
- function: z2.object({
363
- name: z2.string().nullish(),
364
- arguments: z2.string().nullish()
337
+ import_v42.z.union([
338
+ import_v42.z.object({
339
+ id: import_v42.z.string().nullish(),
340
+ created: import_v42.z.number().nullish(),
341
+ model: import_v42.z.string().nullish(),
342
+ choices: import_v42.z.array(
343
+ import_v42.z.object({
344
+ delta: import_v42.z.object({
345
+ role: import_v42.z.enum(["assistant"]).nullish(),
346
+ content: import_v42.z.string().nullish(),
347
+ tool_calls: import_v42.z.array(
348
+ import_v42.z.object({
349
+ index: import_v42.z.number(),
350
+ id: import_v42.z.string().nullish(),
351
+ type: import_v42.z.literal("function").nullish(),
352
+ function: import_v42.z.object({
353
+ name: import_v42.z.string().nullish(),
354
+ arguments: import_v42.z.string().nullish()
365
355
  })
366
356
  })
367
357
  ).nullish(),
368
- annotations: z2.array(
369
- z2.object({
370
- type: z2.literal("url_citation"),
371
- start_index: z2.number(),
372
- end_index: z2.number(),
373
- url: z2.string(),
374
- title: z2.string()
358
+ annotations: import_v42.z.array(
359
+ import_v42.z.object({
360
+ type: import_v42.z.literal("url_citation"),
361
+ start_index: import_v42.z.number(),
362
+ end_index: import_v42.z.number(),
363
+ url: import_v42.z.string(),
364
+ title: import_v42.z.string()
375
365
  })
376
366
  ).nullish()
377
367
  }).nullish(),
378
- logprobs: z2.object({
379
- content: z2.array(
380
- z2.object({
381
- token: z2.string(),
382
- logprob: z2.number(),
383
- top_logprobs: z2.array(
384
- z2.object({
385
- token: z2.string(),
386
- logprob: z2.number()
368
+ logprobs: import_v42.z.object({
369
+ content: import_v42.z.array(
370
+ import_v42.z.object({
371
+ token: import_v42.z.string(),
372
+ logprob: import_v42.z.number(),
373
+ top_logprobs: import_v42.z.array(
374
+ import_v42.z.object({
375
+ token: import_v42.z.string(),
376
+ logprob: import_v42.z.number()
387
377
  })
388
378
  )
389
379
  })
390
380
  ).nullish()
391
381
  }).nullish(),
392
- finish_reason: z2.string().nullish(),
393
- index: z2.number()
382
+ finish_reason: import_v42.z.string().nullish(),
383
+ index: import_v42.z.number()
394
384
  })
395
385
  ),
396
- usage: z2.object({
397
- prompt_tokens: z2.number().nullish(),
398
- completion_tokens: z2.number().nullish(),
399
- total_tokens: z2.number().nullish(),
400
- prompt_tokens_details: z2.object({
401
- cached_tokens: z2.number().nullish()
386
+ usage: import_v42.z.object({
387
+ prompt_tokens: import_v42.z.number().nullish(),
388
+ completion_tokens: import_v42.z.number().nullish(),
389
+ total_tokens: import_v42.z.number().nullish(),
390
+ prompt_tokens_details: import_v42.z.object({
391
+ cached_tokens: import_v42.z.number().nullish()
402
392
  }).nullish(),
403
- completion_tokens_details: z2.object({
404
- reasoning_tokens: z2.number().nullish(),
405
- accepted_prediction_tokens: z2.number().nullish(),
406
- rejected_prediction_tokens: z2.number().nullish()
393
+ completion_tokens_details: import_v42.z.object({
394
+ reasoning_tokens: import_v42.z.number().nullish(),
395
+ accepted_prediction_tokens: import_v42.z.number().nullish(),
396
+ rejected_prediction_tokens: import_v42.z.number().nullish()
407
397
  }).nullish()
408
398
  }).nullish()
409
399
  }),
@@ -414,17 +404,17 @@ var openaiChatChunkSchema = (0, import_provider_utils3.lazyValidator)(
414
404
 
415
405
  // src/chat/openai-chat-options.ts
416
406
  var import_provider_utils4 = require("@ai-sdk/provider-utils");
417
- var z3 = __toESM(require("zod/v4"));
407
+ var import_v43 = require("zod/v4");
418
408
  var openaiChatLanguageModelOptions = (0, import_provider_utils4.lazyValidator)(
419
409
  () => (0, import_provider_utils4.zodSchema)(
420
- z3.object({
410
+ import_v43.z.object({
421
411
  /**
422
412
  * Modify the likelihood of specified tokens appearing in the completion.
423
413
  *
424
414
  * Accepts a JSON object that maps tokens (specified by their token ID in
425
415
  * the GPT tokenizer) to an associated bias value from -100 to 100.
426
416
  */
427
- logitBias: z3.record(z3.coerce.number(), z3.number()).optional(),
417
+ logitBias: import_v43.z.record(import_v43.z.coerce.number(), import_v43.z.number()).optional(),
428
418
  /**
429
419
  * Return the log probabilities of the tokens.
430
420
  *
@@ -434,42 +424,42 @@ var openaiChatLanguageModelOptions = (0, import_provider_utils4.lazyValidator)(
434
424
  * Setting to a number will return the log probabilities of the top n
435
425
  * tokens that were generated.
436
426
  */
437
- logprobs: z3.union([z3.boolean(), z3.number()]).optional(),
427
+ logprobs: import_v43.z.union([import_v43.z.boolean(), import_v43.z.number()]).optional(),
438
428
  /**
439
429
  * Whether to enable parallel function calling during tool use. Default to true.
440
430
  */
441
- parallelToolCalls: z3.boolean().optional(),
431
+ parallelToolCalls: import_v43.z.boolean().optional(),
442
432
  /**
443
433
  * A unique identifier representing your end-user, which can help OpenAI to
444
434
  * monitor and detect abuse.
445
435
  */
446
- user: z3.string().optional(),
436
+ user: import_v43.z.string().optional(),
447
437
  /**
448
438
  * Reasoning effort for reasoning models. Defaults to `medium`.
449
439
  */
450
- reasoningEffort: z3.enum(["minimal", "low", "medium", "high"]).optional(),
440
+ reasoningEffort: import_v43.z.enum(["minimal", "low", "medium", "high"]).optional(),
451
441
  /**
452
442
  * Maximum number of completion tokens to generate. Useful for reasoning models.
453
443
  */
454
- maxCompletionTokens: z3.number().optional(),
444
+ maxCompletionTokens: import_v43.z.number().optional(),
455
445
  /**
456
446
  * Whether to enable persistence in responses API.
457
447
  */
458
- store: z3.boolean().optional(),
448
+ store: import_v43.z.boolean().optional(),
459
449
  /**
460
450
  * Metadata to associate with the request.
461
451
  */
462
- metadata: z3.record(z3.string().max(64), z3.string().max(512)).optional(),
452
+ metadata: import_v43.z.record(import_v43.z.string().max(64), import_v43.z.string().max(512)).optional(),
463
453
  /**
464
454
  * Parameters for prediction mode.
465
455
  */
466
- prediction: z3.record(z3.string(), z3.any()).optional(),
456
+ prediction: import_v43.z.record(import_v43.z.string(), import_v43.z.any()).optional(),
467
457
  /**
468
458
  * Whether to use structured outputs.
469
459
  *
470
460
  * @default true
471
461
  */
472
- structuredOutputs: z3.boolean().optional(),
462
+ structuredOutputs: import_v43.z.boolean().optional(),
473
463
  /**
474
464
  * Service tier for the request.
475
465
  * - 'auto': Default service tier. The request will be processed with the service tier configured in the
@@ -480,23 +470,23 @@ var openaiChatLanguageModelOptions = (0, import_provider_utils4.lazyValidator)(
480
470
  *
481
471
  * @default 'auto'
482
472
  */
483
- serviceTier: z3.enum(["auto", "flex", "priority", "default"]).optional(),
473
+ serviceTier: import_v43.z.enum(["auto", "flex", "priority", "default"]).optional(),
484
474
  /**
485
475
  * Whether to use strict JSON schema validation.
486
476
  *
487
477
  * @default false
488
478
  */
489
- strictJsonSchema: z3.boolean().optional(),
479
+ strictJsonSchema: import_v43.z.boolean().optional(),
490
480
  /**
491
481
  * Controls the verbosity of the model's responses.
492
482
  * Lower values will result in more concise responses, while higher values will result in more verbose responses.
493
483
  */
494
- textVerbosity: z3.enum(["low", "medium", "high"]).optional(),
484
+ textVerbosity: import_v43.z.enum(["low", "medium", "high"]).optional(),
495
485
  /**
496
486
  * A cache key for prompt caching. Allows manual control over prompt caching behavior.
497
487
  * Useful for improving cache hit rates and working around automatic caching issues.
498
488
  */
499
- promptCacheKey: z3.string().optional(),
489
+ promptCacheKey: import_v43.z.string().optional(),
500
490
  /**
501
491
  * A stable identifier used to help detect users of your application
502
492
  * that may be violating OpenAI's usage policies. The IDs should be a
@@ -504,7 +494,7 @@ var openaiChatLanguageModelOptions = (0, import_provider_utils4.lazyValidator)(
504
494
  * username or email address, in order to avoid sending us any identifying
505
495
  * information.
506
496
  */
507
- safetyIdentifier: z3.string().optional()
497
+ safetyIdentifier: import_v43.z.string().optional()
508
498
  })
509
499
  )
510
500
  );
@@ -1221,56 +1211,56 @@ function mapOpenAIFinishReason2(finishReason) {
1221
1211
  }
1222
1212
 
1223
1213
  // src/completion/openai-completion-api.ts
1224
- var z4 = __toESM(require("zod/v4"));
1214
+ var import_v44 = require("zod/v4");
1225
1215
  var import_provider_utils6 = require("@ai-sdk/provider-utils");
1226
1216
  var openaiCompletionResponseSchema = (0, import_provider_utils6.lazyValidator)(
1227
1217
  () => (0, import_provider_utils6.zodSchema)(
1228
- z4.object({
1229
- id: z4.string().nullish(),
1230
- created: z4.number().nullish(),
1231
- model: z4.string().nullish(),
1232
- choices: z4.array(
1233
- z4.object({
1234
- text: z4.string(),
1235
- finish_reason: z4.string(),
1236
- logprobs: z4.object({
1237
- tokens: z4.array(z4.string()),
1238
- token_logprobs: z4.array(z4.number()),
1239
- top_logprobs: z4.array(z4.record(z4.string(), z4.number())).nullish()
1218
+ import_v44.z.object({
1219
+ id: import_v44.z.string().nullish(),
1220
+ created: import_v44.z.number().nullish(),
1221
+ model: import_v44.z.string().nullish(),
1222
+ choices: import_v44.z.array(
1223
+ import_v44.z.object({
1224
+ text: import_v44.z.string(),
1225
+ finish_reason: import_v44.z.string(),
1226
+ logprobs: import_v44.z.object({
1227
+ tokens: import_v44.z.array(import_v44.z.string()),
1228
+ token_logprobs: import_v44.z.array(import_v44.z.number()),
1229
+ top_logprobs: import_v44.z.array(import_v44.z.record(import_v44.z.string(), import_v44.z.number())).nullish()
1240
1230
  }).nullish()
1241
1231
  })
1242
1232
  ),
1243
- usage: z4.object({
1244
- prompt_tokens: z4.number(),
1245
- completion_tokens: z4.number(),
1246
- total_tokens: z4.number()
1233
+ usage: import_v44.z.object({
1234
+ prompt_tokens: import_v44.z.number(),
1235
+ completion_tokens: import_v44.z.number(),
1236
+ total_tokens: import_v44.z.number()
1247
1237
  }).nullish()
1248
1238
  })
1249
1239
  )
1250
1240
  );
1251
1241
  var openaiCompletionChunkSchema = (0, import_provider_utils6.lazyValidator)(
1252
1242
  () => (0, import_provider_utils6.zodSchema)(
1253
- z4.union([
1254
- z4.object({
1255
- id: z4.string().nullish(),
1256
- created: z4.number().nullish(),
1257
- model: z4.string().nullish(),
1258
- choices: z4.array(
1259
- z4.object({
1260
- text: z4.string(),
1261
- finish_reason: z4.string().nullish(),
1262
- index: z4.number(),
1263
- logprobs: z4.object({
1264
- tokens: z4.array(z4.string()),
1265
- token_logprobs: z4.array(z4.number()),
1266
- top_logprobs: z4.array(z4.record(z4.string(), z4.number())).nullish()
1243
+ import_v44.z.union([
1244
+ import_v44.z.object({
1245
+ id: import_v44.z.string().nullish(),
1246
+ created: import_v44.z.number().nullish(),
1247
+ model: import_v44.z.string().nullish(),
1248
+ choices: import_v44.z.array(
1249
+ import_v44.z.object({
1250
+ text: import_v44.z.string(),
1251
+ finish_reason: import_v44.z.string().nullish(),
1252
+ index: import_v44.z.number(),
1253
+ logprobs: import_v44.z.object({
1254
+ tokens: import_v44.z.array(import_v44.z.string()),
1255
+ token_logprobs: import_v44.z.array(import_v44.z.number()),
1256
+ top_logprobs: import_v44.z.array(import_v44.z.record(import_v44.z.string(), import_v44.z.number())).nullish()
1267
1257
  }).nullish()
1268
1258
  })
1269
1259
  ),
1270
- usage: z4.object({
1271
- prompt_tokens: z4.number(),
1272
- completion_tokens: z4.number(),
1273
- total_tokens: z4.number()
1260
+ usage: import_v44.z.object({
1261
+ prompt_tokens: import_v44.z.number(),
1262
+ completion_tokens: import_v44.z.number(),
1263
+ total_tokens: import_v44.z.number()
1274
1264
  }).nullish()
1275
1265
  }),
1276
1266
  openaiErrorDataSchema
@@ -1280,14 +1270,14 @@ var openaiCompletionChunkSchema = (0, import_provider_utils6.lazyValidator)(
1280
1270
 
1281
1271
  // src/completion/openai-completion-options.ts
1282
1272
  var import_provider_utils7 = require("@ai-sdk/provider-utils");
1283
- var z5 = __toESM(require("zod/v4"));
1273
+ var import_v45 = require("zod/v4");
1284
1274
  var openaiCompletionProviderOptions = (0, import_provider_utils7.lazyValidator)(
1285
1275
  () => (0, import_provider_utils7.zodSchema)(
1286
- z5.object({
1276
+ import_v45.z.object({
1287
1277
  /**
1288
1278
  Echo back the prompt in addition to the completion.
1289
1279
  */
1290
- echo: z5.boolean().optional(),
1280
+ echo: import_v45.z.boolean().optional(),
1291
1281
  /**
1292
1282
  Modify the likelihood of specified tokens appearing in the completion.
1293
1283
 
@@ -1302,16 +1292,16 @@ var openaiCompletionProviderOptions = (0, import_provider_utils7.lazyValidator)(
1302
1292
  As an example, you can pass {"50256": -100} to prevent the <|endoftext|>
1303
1293
  token from being generated.
1304
1294
  */
1305
- logitBias: z5.record(z5.string(), z5.number()).optional(),
1295
+ logitBias: import_v45.z.record(import_v45.z.string(), import_v45.z.number()).optional(),
1306
1296
  /**
1307
1297
  The suffix that comes after a completion of inserted text.
1308
1298
  */
1309
- suffix: z5.string().optional(),
1299
+ suffix: import_v45.z.string().optional(),
1310
1300
  /**
1311
1301
  A unique identifier representing your end-user, which can help OpenAI to
1312
1302
  monitor and detect abuse. Learn more.
1313
1303
  */
1314
- user: z5.string().optional(),
1304
+ user: import_v45.z.string().optional(),
1315
1305
  /**
1316
1306
  Return the log probabilities of the tokens. Including logprobs will increase
1317
1307
  the response size and can slow down response times. However, it can
@@ -1321,7 +1311,7 @@ var openaiCompletionProviderOptions = (0, import_provider_utils7.lazyValidator)(
1321
1311
  Setting to a number will return the log probabilities of the top n
1322
1312
  tokens that were generated.
1323
1313
  */
1324
- logprobs: z5.union([z5.boolean(), z5.number()]).optional()
1314
+ logprobs: import_v45.z.union([import_v45.z.boolean(), import_v45.z.number()]).optional()
1325
1315
  })
1326
1316
  )
1327
1317
  );
@@ -1562,32 +1552,32 @@ var import_provider_utils11 = require("@ai-sdk/provider-utils");
1562
1552
 
1563
1553
  // src/embedding/openai-embedding-options.ts
1564
1554
  var import_provider_utils9 = require("@ai-sdk/provider-utils");
1565
- var z6 = __toESM(require("zod/v4"));
1555
+ var import_v46 = require("zod/v4");
1566
1556
  var openaiEmbeddingProviderOptions = (0, import_provider_utils9.lazyValidator)(
1567
1557
  () => (0, import_provider_utils9.zodSchema)(
1568
- z6.object({
1558
+ import_v46.z.object({
1569
1559
  /**
1570
1560
  The number of dimensions the resulting output embeddings should have.
1571
1561
  Only supported in text-embedding-3 and later models.
1572
1562
  */
1573
- dimensions: z6.number().optional(),
1563
+ dimensions: import_v46.z.number().optional(),
1574
1564
  /**
1575
1565
  A unique identifier representing your end-user, which can help OpenAI to
1576
1566
  monitor and detect abuse. Learn more.
1577
1567
  */
1578
- user: z6.string().optional()
1568
+ user: import_v46.z.string().optional()
1579
1569
  })
1580
1570
  )
1581
1571
  );
1582
1572
 
1583
1573
  // src/embedding/openai-embedding-api.ts
1584
1574
  var import_provider_utils10 = require("@ai-sdk/provider-utils");
1585
- var z7 = __toESM(require("zod/v4"));
1575
+ var import_v47 = require("zod/v4");
1586
1576
  var openaiTextEmbeddingResponseSchema = (0, import_provider_utils10.lazyValidator)(
1587
1577
  () => (0, import_provider_utils10.zodSchema)(
1588
- z7.object({
1589
- data: z7.array(z7.object({ embedding: z7.array(z7.number()) })),
1590
- usage: z7.object({ prompt_tokens: z7.number() }).nullish()
1578
+ import_v47.z.object({
1579
+ data: import_v47.z.array(import_v47.z.object({ embedding: import_v47.z.array(import_v47.z.number()) })),
1580
+ usage: import_v47.z.object({ prompt_tokens: import_v47.z.number() }).nullish()
1591
1581
  })
1592
1582
  )
1593
1583
  );
@@ -1661,14 +1651,14 @@ var import_provider_utils13 = require("@ai-sdk/provider-utils");
1661
1651
 
1662
1652
  // src/image/openai-image-api.ts
1663
1653
  var import_provider_utils12 = require("@ai-sdk/provider-utils");
1664
- var z8 = __toESM(require("zod/v4"));
1654
+ var import_v48 = require("zod/v4");
1665
1655
  var openaiImageResponseSchema = (0, import_provider_utils12.lazyValidator)(
1666
1656
  () => (0, import_provider_utils12.zodSchema)(
1667
- z8.object({
1668
- data: z8.array(
1669
- z8.object({
1670
- b64_json: z8.string(),
1671
- revised_prompt: z8.string().optional()
1657
+ import_v48.z.object({
1658
+ data: import_v48.z.array(
1659
+ import_v48.z.object({
1660
+ b64_json: import_v48.z.string(),
1661
+ revised_prompt: import_v48.z.string().optional()
1672
1662
  })
1673
1663
  )
1674
1664
  })
@@ -1768,22 +1758,22 @@ var OpenAIImageModel = class {
1768
1758
 
1769
1759
  // src/tool/code-interpreter.ts
1770
1760
  var import_provider_utils14 = require("@ai-sdk/provider-utils");
1771
- var z9 = __toESM(require("zod/v4"));
1761
+ var import_v49 = require("zod/v4");
1772
1762
  var codeInterpreterInputSchema = (0, import_provider_utils14.lazySchema)(
1773
1763
  () => (0, import_provider_utils14.zodSchema)(
1774
- z9.object({
1775
- code: z9.string().nullish(),
1776
- containerId: z9.string()
1764
+ import_v49.z.object({
1765
+ code: import_v49.z.string().nullish(),
1766
+ containerId: import_v49.z.string()
1777
1767
  })
1778
1768
  )
1779
1769
  );
1780
1770
  var codeInterpreterOutputSchema = (0, import_provider_utils14.lazySchema)(
1781
1771
  () => (0, import_provider_utils14.zodSchema)(
1782
- z9.object({
1783
- outputs: z9.array(
1784
- z9.discriminatedUnion("type", [
1785
- z9.object({ type: z9.literal("logs"), logs: z9.string() }),
1786
- z9.object({ type: z9.literal("image"), url: z9.string() })
1772
+ import_v49.z.object({
1773
+ outputs: import_v49.z.array(
1774
+ import_v49.z.discriminatedUnion("type", [
1775
+ import_v49.z.object({ type: import_v49.z.literal("logs"), logs: import_v49.z.string() }),
1776
+ import_v49.z.object({ type: import_v49.z.literal("image"), url: import_v49.z.string() })
1787
1777
  ])
1788
1778
  ).nullish()
1789
1779
  })
@@ -1791,11 +1781,11 @@ var codeInterpreterOutputSchema = (0, import_provider_utils14.lazySchema)(
1791
1781
  );
1792
1782
  var codeInterpreterArgsSchema = (0, import_provider_utils14.lazySchema)(
1793
1783
  () => (0, import_provider_utils14.zodSchema)(
1794
- z9.object({
1795
- container: z9.union([
1796
- z9.string(),
1797
- z9.object({
1798
- fileIds: z9.array(z9.string()).optional()
1784
+ import_v49.z.object({
1785
+ container: import_v49.z.union([
1786
+ import_v49.z.string(),
1787
+ import_v49.z.object({
1788
+ fileIds: import_v49.z.array(import_v49.z.string()).optional()
1799
1789
  })
1800
1790
  ]).optional()
1801
1791
  })
@@ -1813,42 +1803,42 @@ var codeInterpreter = (args = {}) => {
1813
1803
 
1814
1804
  // src/tool/file-search.ts
1815
1805
  var import_provider_utils15 = require("@ai-sdk/provider-utils");
1816
- var z10 = __toESM(require("zod/v4"));
1817
- var comparisonFilterSchema = z10.object({
1818
- key: z10.string(),
1819
- type: z10.enum(["eq", "ne", "gt", "gte", "lt", "lte"]),
1820
- value: z10.union([z10.string(), z10.number(), z10.boolean()])
1806
+ var import_v410 = require("zod/v4");
1807
+ var comparisonFilterSchema = import_v410.z.object({
1808
+ key: import_v410.z.string(),
1809
+ type: import_v410.z.enum(["eq", "ne", "gt", "gte", "lt", "lte"]),
1810
+ value: import_v410.z.union([import_v410.z.string(), import_v410.z.number(), import_v410.z.boolean()])
1821
1811
  });
1822
- var compoundFilterSchema = z10.object({
1823
- type: z10.enum(["and", "or"]),
1824
- filters: z10.array(
1825
- z10.union([comparisonFilterSchema, z10.lazy(() => compoundFilterSchema)])
1812
+ var compoundFilterSchema = import_v410.z.object({
1813
+ type: import_v410.z.enum(["and", "or"]),
1814
+ filters: import_v410.z.array(
1815
+ import_v410.z.union([comparisonFilterSchema, import_v410.z.lazy(() => compoundFilterSchema)])
1826
1816
  )
1827
1817
  });
1828
1818
  var fileSearchArgsSchema = (0, import_provider_utils15.lazySchema)(
1829
1819
  () => (0, import_provider_utils15.zodSchema)(
1830
- z10.object({
1831
- vectorStoreIds: z10.array(z10.string()),
1832
- maxNumResults: z10.number().optional(),
1833
- ranking: z10.object({
1834
- ranker: z10.string().optional(),
1835
- scoreThreshold: z10.number().optional()
1820
+ import_v410.z.object({
1821
+ vectorStoreIds: import_v410.z.array(import_v410.z.string()),
1822
+ maxNumResults: import_v410.z.number().optional(),
1823
+ ranking: import_v410.z.object({
1824
+ ranker: import_v410.z.string().optional(),
1825
+ scoreThreshold: import_v410.z.number().optional()
1836
1826
  }).optional(),
1837
- filters: z10.union([comparisonFilterSchema, compoundFilterSchema]).optional()
1827
+ filters: import_v410.z.union([comparisonFilterSchema, compoundFilterSchema]).optional()
1838
1828
  })
1839
1829
  )
1840
1830
  );
1841
1831
  var fileSearchOutputSchema = (0, import_provider_utils15.lazySchema)(
1842
1832
  () => (0, import_provider_utils15.zodSchema)(
1843
- z10.object({
1844
- queries: z10.array(z10.string()),
1845
- results: z10.array(
1846
- z10.object({
1847
- attributes: z10.record(z10.string(), z10.unknown()),
1848
- fileId: z10.string(),
1849
- filename: z10.string(),
1850
- score: z10.number(),
1851
- text: z10.string()
1833
+ import_v410.z.object({
1834
+ queries: import_v410.z.array(import_v410.z.string()),
1835
+ results: import_v410.z.array(
1836
+ import_v410.z.object({
1837
+ attributes: import_v410.z.record(import_v410.z.string(), import_v410.z.unknown()),
1838
+ fileId: import_v410.z.string(),
1839
+ filename: import_v410.z.string(),
1840
+ score: import_v410.z.number(),
1841
+ text: import_v410.z.string()
1852
1842
  })
1853
1843
  ).nullable()
1854
1844
  })
@@ -1857,35 +1847,35 @@ var fileSearchOutputSchema = (0, import_provider_utils15.lazySchema)(
1857
1847
  var fileSearch = (0, import_provider_utils15.createProviderDefinedToolFactoryWithOutputSchema)({
1858
1848
  id: "openai.file_search",
1859
1849
  name: "file_search",
1860
- inputSchema: z10.object({}),
1850
+ inputSchema: import_v410.z.object({}),
1861
1851
  outputSchema: fileSearchOutputSchema
1862
1852
  });
1863
1853
 
1864
1854
  // src/tool/image-generation.ts
1865
1855
  var import_provider_utils16 = require("@ai-sdk/provider-utils");
1866
- var z11 = __toESM(require("zod/v4"));
1856
+ var import_v411 = require("zod/v4");
1867
1857
  var imageGenerationArgsSchema = (0, import_provider_utils16.lazySchema)(
1868
1858
  () => (0, import_provider_utils16.zodSchema)(
1869
- z11.object({
1870
- background: z11.enum(["auto", "opaque", "transparent"]).optional(),
1871
- inputFidelity: z11.enum(["low", "high"]).optional(),
1872
- inputImageMask: z11.object({
1873
- fileId: z11.string().optional(),
1874
- imageUrl: z11.string().optional()
1859
+ import_v411.z.object({
1860
+ background: import_v411.z.enum(["auto", "opaque", "transparent"]).optional(),
1861
+ inputFidelity: import_v411.z.enum(["low", "high"]).optional(),
1862
+ inputImageMask: import_v411.z.object({
1863
+ fileId: import_v411.z.string().optional(),
1864
+ imageUrl: import_v411.z.string().optional()
1875
1865
  }).optional(),
1876
- model: z11.string().optional(),
1877
- moderation: z11.enum(["auto"]).optional(),
1878
- outputCompression: z11.number().int().min(0).max(100).optional(),
1879
- outputFormat: z11.enum(["png", "jpeg", "webp"]).optional(),
1880
- partialImages: z11.number().int().min(0).max(3).optional(),
1881
- quality: z11.enum(["auto", "low", "medium", "high"]).optional(),
1882
- size: z11.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
1866
+ model: import_v411.z.string().optional(),
1867
+ moderation: import_v411.z.enum(["auto"]).optional(),
1868
+ outputCompression: import_v411.z.number().int().min(0).max(100).optional(),
1869
+ outputFormat: import_v411.z.enum(["png", "jpeg", "webp"]).optional(),
1870
+ partialImages: import_v411.z.number().int().min(0).max(3).optional(),
1871
+ quality: import_v411.z.enum(["auto", "low", "medium", "high"]).optional(),
1872
+ size: import_v411.z.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
1883
1873
  }).strict()
1884
1874
  )
1885
1875
  );
1886
- var imageGenerationInputSchema = (0, import_provider_utils16.lazySchema)(() => (0, import_provider_utils16.zodSchema)(z11.object({})));
1876
+ var imageGenerationInputSchema = (0, import_provider_utils16.lazySchema)(() => (0, import_provider_utils16.zodSchema)(import_v411.z.object({})));
1887
1877
  var imageGenerationOutputSchema = (0, import_provider_utils16.lazySchema)(
1888
- () => (0, import_provider_utils16.zodSchema)(z11.object({ result: z11.string() }))
1878
+ () => (0, import_provider_utils16.zodSchema)(import_v411.z.object({ result: import_v411.z.string() }))
1889
1879
  );
1890
1880
  var imageGenerationToolFactory = (0, import_provider_utils16.createProviderDefinedToolFactoryWithOutputSchema)({
1891
1881
  id: "openai.image_generation",
@@ -1899,23 +1889,23 @@ var imageGeneration = (args = {}) => {
1899
1889
 
1900
1890
  // src/tool/local-shell.ts
1901
1891
  var import_provider_utils17 = require("@ai-sdk/provider-utils");
1902
- var z12 = __toESM(require("zod/v4"));
1892
+ var import_v412 = require("zod/v4");
1903
1893
  var localShellInputSchema = (0, import_provider_utils17.lazySchema)(
1904
1894
  () => (0, import_provider_utils17.zodSchema)(
1905
- z12.object({
1906
- action: z12.object({
1907
- type: z12.literal("exec"),
1908
- command: z12.array(z12.string()),
1909
- timeoutMs: z12.number().optional(),
1910
- user: z12.string().optional(),
1911
- workingDirectory: z12.string().optional(),
1912
- env: z12.record(z12.string(), z12.string()).optional()
1895
+ import_v412.z.object({
1896
+ action: import_v412.z.object({
1897
+ type: import_v412.z.literal("exec"),
1898
+ command: import_v412.z.array(import_v412.z.string()),
1899
+ timeoutMs: import_v412.z.number().optional(),
1900
+ user: import_v412.z.string().optional(),
1901
+ workingDirectory: import_v412.z.string().optional(),
1902
+ env: import_v412.z.record(import_v412.z.string(), import_v412.z.string()).optional()
1913
1903
  })
1914
1904
  })
1915
1905
  )
1916
1906
  );
1917
1907
  var localShellOutputSchema = (0, import_provider_utils17.lazySchema)(
1918
- () => (0, import_provider_utils17.zodSchema)(z12.object({ output: z12.string() }))
1908
+ () => (0, import_provider_utils17.zodSchema)(import_v412.z.object({ output: import_v412.z.string() }))
1919
1909
  );
1920
1910
  var localShell = (0, import_provider_utils17.createProviderDefinedToolFactoryWithOutputSchema)({
1921
1911
  id: "openai.local_shell",
@@ -1926,40 +1916,40 @@ var localShell = (0, import_provider_utils17.createProviderDefinedToolFactoryWit
1926
1916
 
1927
1917
  // src/tool/web-search.ts
1928
1918
  var import_provider_utils18 = require("@ai-sdk/provider-utils");
1929
- var z13 = __toESM(require("zod/v4"));
1919
+ var import_v413 = require("zod/v4");
1930
1920
  var webSearchArgsSchema = (0, import_provider_utils18.lazySchema)(
1931
1921
  () => (0, import_provider_utils18.zodSchema)(
1932
- z13.object({
1933
- filters: z13.object({
1934
- allowedDomains: z13.array(z13.string()).optional()
1922
+ import_v413.z.object({
1923
+ filters: import_v413.z.object({
1924
+ allowedDomains: import_v413.z.array(import_v413.z.string()).optional()
1935
1925
  }).optional(),
1936
- searchContextSize: z13.enum(["low", "medium", "high"]).optional(),
1937
- userLocation: z13.object({
1938
- type: z13.literal("approximate"),
1939
- country: z13.string().optional(),
1940
- city: z13.string().optional(),
1941
- region: z13.string().optional(),
1942
- timezone: z13.string().optional()
1926
+ searchContextSize: import_v413.z.enum(["low", "medium", "high"]).optional(),
1927
+ userLocation: import_v413.z.object({
1928
+ type: import_v413.z.literal("approximate"),
1929
+ country: import_v413.z.string().optional(),
1930
+ city: import_v413.z.string().optional(),
1931
+ region: import_v413.z.string().optional(),
1932
+ timezone: import_v413.z.string().optional()
1943
1933
  }).optional()
1944
1934
  })
1945
1935
  )
1946
1936
  );
1947
1937
  var webSearchInputSchema = (0, import_provider_utils18.lazySchema)(
1948
1938
  () => (0, import_provider_utils18.zodSchema)(
1949
- z13.object({
1950
- action: z13.discriminatedUnion("type", [
1951
- z13.object({
1952
- type: z13.literal("search"),
1953
- query: z13.string().nullish()
1939
+ import_v413.z.object({
1940
+ action: import_v413.z.discriminatedUnion("type", [
1941
+ import_v413.z.object({
1942
+ type: import_v413.z.literal("search"),
1943
+ query: import_v413.z.string().nullish()
1954
1944
  }),
1955
- z13.object({
1956
- type: z13.literal("open_page"),
1957
- url: z13.string()
1945
+ import_v413.z.object({
1946
+ type: import_v413.z.literal("open_page"),
1947
+ url: import_v413.z.string()
1958
1948
  }),
1959
- z13.object({
1960
- type: z13.literal("find"),
1961
- url: z13.string(),
1962
- pattern: z13.string()
1949
+ import_v413.z.object({
1950
+ type: import_v413.z.literal("find"),
1951
+ url: import_v413.z.string(),
1952
+ pattern: import_v413.z.string()
1963
1953
  })
1964
1954
  ]).nullish()
1965
1955
  })
@@ -1976,61 +1966,61 @@ var webSearch = (args = {}) => {
1976
1966
 
1977
1967
  // src/tool/web-search-preview.ts
1978
1968
  var import_provider_utils19 = require("@ai-sdk/provider-utils");
1979
- var z14 = __toESM(require("zod/v4"));
1969
+ var import_v414 = require("zod/v4");
1980
1970
  var webSearchPreviewArgsSchema = (0, import_provider_utils19.lazySchema)(
1981
1971
  () => (0, import_provider_utils19.zodSchema)(
1982
- z14.object({
1972
+ import_v414.z.object({
1983
1973
  /**
1984
1974
  * Search context size to use for the web search.
1985
1975
  * - high: Most comprehensive context, highest cost, slower response
1986
1976
  * - medium: Balanced context, cost, and latency (default)
1987
1977
  * - low: Least context, lowest cost, fastest response
1988
1978
  */
1989
- searchContextSize: z14.enum(["low", "medium", "high"]).optional(),
1979
+ searchContextSize: import_v414.z.enum(["low", "medium", "high"]).optional(),
1990
1980
  /**
1991
1981
  * User location information to provide geographically relevant search results.
1992
1982
  */
1993
- userLocation: z14.object({
1983
+ userLocation: import_v414.z.object({
1994
1984
  /**
1995
1985
  * Type of location (always 'approximate')
1996
1986
  */
1997
- type: z14.literal("approximate"),
1987
+ type: import_v414.z.literal("approximate"),
1998
1988
  /**
1999
1989
  * Two-letter ISO country code (e.g., 'US', 'GB')
2000
1990
  */
2001
- country: z14.string().optional(),
1991
+ country: import_v414.z.string().optional(),
2002
1992
  /**
2003
1993
  * City name (free text, e.g., 'Minneapolis')
2004
1994
  */
2005
- city: z14.string().optional(),
1995
+ city: import_v414.z.string().optional(),
2006
1996
  /**
2007
1997
  * Region name (free text, e.g., 'Minnesota')
2008
1998
  */
2009
- region: z14.string().optional(),
1999
+ region: import_v414.z.string().optional(),
2010
2000
  /**
2011
2001
  * IANA timezone (e.g., 'America/Chicago')
2012
2002
  */
2013
- timezone: z14.string().optional()
2003
+ timezone: import_v414.z.string().optional()
2014
2004
  }).optional()
2015
2005
  })
2016
2006
  )
2017
2007
  );
2018
2008
  var webSearchPreviewInputSchema = (0, import_provider_utils19.lazySchema)(
2019
2009
  () => (0, import_provider_utils19.zodSchema)(
2020
- z14.object({
2021
- action: z14.discriminatedUnion("type", [
2022
- z14.object({
2023
- type: z14.literal("search"),
2024
- query: z14.string().nullish()
2010
+ import_v414.z.object({
2011
+ action: import_v414.z.discriminatedUnion("type", [
2012
+ import_v414.z.object({
2013
+ type: import_v414.z.literal("search"),
2014
+ query: import_v414.z.string().nullish()
2025
2015
  }),
2026
- z14.object({
2027
- type: z14.literal("open_page"),
2028
- url: z14.string()
2016
+ import_v414.z.object({
2017
+ type: import_v414.z.literal("open_page"),
2018
+ url: import_v414.z.string()
2029
2019
  }),
2030
- z14.object({
2031
- type: z14.literal("find"),
2032
- url: z14.string(),
2033
- pattern: z14.string()
2020
+ import_v414.z.object({
2021
+ type: import_v414.z.literal("find"),
2022
+ url: import_v414.z.string(),
2023
+ pattern: import_v414.z.string()
2034
2024
  })
2035
2025
  ]).nullish()
2036
2026
  })
@@ -2127,7 +2117,7 @@ var import_provider_utils24 = require("@ai-sdk/provider-utils");
2127
2117
  // src/responses/convert-to-openai-responses-input.ts
2128
2118
  var import_provider6 = require("@ai-sdk/provider");
2129
2119
  var import_provider_utils20 = require("@ai-sdk/provider-utils");
2130
- var z15 = __toESM(require("zod/v4"));
2120
+ var import_v415 = require("zod/v4");
2131
2121
  function isFileId(data, prefixes) {
2132
2122
  if (!prefixes) return false;
2133
2123
  return prefixes.some((prefix) => data.startsWith(prefix));
@@ -2392,9 +2382,9 @@ async function convertToOpenAIResponsesInput({
2392
2382
  }
2393
2383
  return { input, warnings };
2394
2384
  }
2395
- var openaiResponsesReasoningProviderOptionsSchema = z15.object({
2396
- itemId: z15.string().nullish(),
2397
- reasoningEncryptedContent: z15.string().nullish()
2385
+ var openaiResponsesReasoningProviderOptionsSchema = import_v415.z.object({
2386
+ itemId: import_v415.z.string().nullish(),
2387
+ reasoningEncryptedContent: import_v415.z.string().nullish()
2398
2388
  });
2399
2389
 
2400
2390
  // src/responses/map-openai-responses-finish-reason.ts
@@ -2417,260 +2407,260 @@ function mapOpenAIResponseFinishReason({
2417
2407
 
2418
2408
  // src/responses/openai-responses-api.ts
2419
2409
  var import_provider_utils21 = require("@ai-sdk/provider-utils");
2420
- var z16 = __toESM(require("zod/v4"));
2410
+ var import_v416 = require("zod/v4");
2421
2411
  var openaiResponsesChunkSchema = (0, import_provider_utils21.lazyValidator)(
2422
2412
  () => (0, import_provider_utils21.zodSchema)(
2423
- z16.union([
2424
- z16.object({
2425
- type: z16.literal("response.output_text.delta"),
2426
- item_id: z16.string(),
2427
- delta: z16.string(),
2428
- logprobs: z16.array(
2429
- z16.object({
2430
- token: z16.string(),
2431
- logprob: z16.number(),
2432
- top_logprobs: z16.array(
2433
- z16.object({
2434
- token: z16.string(),
2435
- logprob: z16.number()
2413
+ import_v416.z.union([
2414
+ import_v416.z.object({
2415
+ type: import_v416.z.literal("response.output_text.delta"),
2416
+ item_id: import_v416.z.string(),
2417
+ delta: import_v416.z.string(),
2418
+ logprobs: import_v416.z.array(
2419
+ import_v416.z.object({
2420
+ token: import_v416.z.string(),
2421
+ logprob: import_v416.z.number(),
2422
+ top_logprobs: import_v416.z.array(
2423
+ import_v416.z.object({
2424
+ token: import_v416.z.string(),
2425
+ logprob: import_v416.z.number()
2436
2426
  })
2437
2427
  )
2438
2428
  })
2439
2429
  ).nullish()
2440
2430
  }),
2441
- z16.object({
2442
- type: z16.enum(["response.completed", "response.incomplete"]),
2443
- response: z16.object({
2444
- incomplete_details: z16.object({ reason: z16.string() }).nullish(),
2445
- usage: z16.object({
2446
- input_tokens: z16.number(),
2447
- input_tokens_details: z16.object({ cached_tokens: z16.number().nullish() }).nullish(),
2448
- output_tokens: z16.number(),
2449
- output_tokens_details: z16.object({ reasoning_tokens: z16.number().nullish() }).nullish()
2431
+ import_v416.z.object({
2432
+ type: import_v416.z.enum(["response.completed", "response.incomplete"]),
2433
+ response: import_v416.z.object({
2434
+ incomplete_details: import_v416.z.object({ reason: import_v416.z.string() }).nullish(),
2435
+ usage: import_v416.z.object({
2436
+ input_tokens: import_v416.z.number(),
2437
+ input_tokens_details: import_v416.z.object({ cached_tokens: import_v416.z.number().nullish() }).nullish(),
2438
+ output_tokens: import_v416.z.number(),
2439
+ output_tokens_details: import_v416.z.object({ reasoning_tokens: import_v416.z.number().nullish() }).nullish()
2450
2440
  }),
2451
- service_tier: z16.string().nullish()
2441
+ service_tier: import_v416.z.string().nullish()
2452
2442
  })
2453
2443
  }),
2454
- z16.object({
2455
- type: z16.literal("response.created"),
2456
- response: z16.object({
2457
- id: z16.string(),
2458
- created_at: z16.number(),
2459
- model: z16.string(),
2460
- service_tier: z16.string().nullish()
2444
+ import_v416.z.object({
2445
+ type: import_v416.z.literal("response.created"),
2446
+ response: import_v416.z.object({
2447
+ id: import_v416.z.string(),
2448
+ created_at: import_v416.z.number(),
2449
+ model: import_v416.z.string(),
2450
+ service_tier: import_v416.z.string().nullish()
2461
2451
  })
2462
2452
  }),
2463
- z16.object({
2464
- type: z16.literal("response.output_item.added"),
2465
- output_index: z16.number(),
2466
- item: z16.discriminatedUnion("type", [
2467
- z16.object({
2468
- type: z16.literal("message"),
2469
- id: z16.string()
2453
+ import_v416.z.object({
2454
+ type: import_v416.z.literal("response.output_item.added"),
2455
+ output_index: import_v416.z.number(),
2456
+ item: import_v416.z.discriminatedUnion("type", [
2457
+ import_v416.z.object({
2458
+ type: import_v416.z.literal("message"),
2459
+ id: import_v416.z.string()
2470
2460
  }),
2471
- z16.object({
2472
- type: z16.literal("reasoning"),
2473
- id: z16.string(),
2474
- encrypted_content: z16.string().nullish()
2461
+ import_v416.z.object({
2462
+ type: import_v416.z.literal("reasoning"),
2463
+ id: import_v416.z.string(),
2464
+ encrypted_content: import_v416.z.string().nullish()
2475
2465
  }),
2476
- z16.object({
2477
- type: z16.literal("function_call"),
2478
- id: z16.string(),
2479
- call_id: z16.string(),
2480
- name: z16.string(),
2481
- arguments: z16.string()
2466
+ import_v416.z.object({
2467
+ type: import_v416.z.literal("function_call"),
2468
+ id: import_v416.z.string(),
2469
+ call_id: import_v416.z.string(),
2470
+ name: import_v416.z.string(),
2471
+ arguments: import_v416.z.string()
2482
2472
  }),
2483
- z16.object({
2484
- type: z16.literal("web_search_call"),
2485
- id: z16.string(),
2486
- status: z16.string(),
2487
- action: z16.object({
2488
- type: z16.literal("search"),
2489
- query: z16.string().optional()
2473
+ import_v416.z.object({
2474
+ type: import_v416.z.literal("web_search_call"),
2475
+ id: import_v416.z.string(),
2476
+ status: import_v416.z.string(),
2477
+ action: import_v416.z.object({
2478
+ type: import_v416.z.literal("search"),
2479
+ query: import_v416.z.string().optional()
2490
2480
  }).nullish()
2491
2481
  }),
2492
- z16.object({
2493
- type: z16.literal("computer_call"),
2494
- id: z16.string(),
2495
- status: z16.string()
2482
+ import_v416.z.object({
2483
+ type: import_v416.z.literal("computer_call"),
2484
+ id: import_v416.z.string(),
2485
+ status: import_v416.z.string()
2496
2486
  }),
2497
- z16.object({
2498
- type: z16.literal("file_search_call"),
2499
- id: z16.string()
2487
+ import_v416.z.object({
2488
+ type: import_v416.z.literal("file_search_call"),
2489
+ id: import_v416.z.string()
2500
2490
  }),
2501
- z16.object({
2502
- type: z16.literal("image_generation_call"),
2503
- id: z16.string()
2491
+ import_v416.z.object({
2492
+ type: import_v416.z.literal("image_generation_call"),
2493
+ id: import_v416.z.string()
2504
2494
  }),
2505
- z16.object({
2506
- type: z16.literal("code_interpreter_call"),
2507
- id: z16.string(),
2508
- container_id: z16.string(),
2509
- code: z16.string().nullable(),
2510
- outputs: z16.array(
2511
- z16.discriminatedUnion("type", [
2512
- z16.object({ type: z16.literal("logs"), logs: z16.string() }),
2513
- z16.object({ type: z16.literal("image"), url: z16.string() })
2495
+ import_v416.z.object({
2496
+ type: import_v416.z.literal("code_interpreter_call"),
2497
+ id: import_v416.z.string(),
2498
+ container_id: import_v416.z.string(),
2499
+ code: import_v416.z.string().nullable(),
2500
+ outputs: import_v416.z.array(
2501
+ import_v416.z.discriminatedUnion("type", [
2502
+ import_v416.z.object({ type: import_v416.z.literal("logs"), logs: import_v416.z.string() }),
2503
+ import_v416.z.object({ type: import_v416.z.literal("image"), url: import_v416.z.string() })
2514
2504
  ])
2515
2505
  ).nullable(),
2516
- status: z16.string()
2506
+ status: import_v416.z.string()
2517
2507
  })
2518
2508
  ])
2519
2509
  }),
2520
- z16.object({
2521
- type: z16.literal("response.output_item.done"),
2522
- output_index: z16.number(),
2523
- item: z16.discriminatedUnion("type", [
2524
- z16.object({
2525
- type: z16.literal("message"),
2526
- id: z16.string()
2510
+ import_v416.z.object({
2511
+ type: import_v416.z.literal("response.output_item.done"),
2512
+ output_index: import_v416.z.number(),
2513
+ item: import_v416.z.discriminatedUnion("type", [
2514
+ import_v416.z.object({
2515
+ type: import_v416.z.literal("message"),
2516
+ id: import_v416.z.string()
2527
2517
  }),
2528
- z16.object({
2529
- type: z16.literal("reasoning"),
2530
- id: z16.string(),
2531
- encrypted_content: z16.string().nullish()
2518
+ import_v416.z.object({
2519
+ type: import_v416.z.literal("reasoning"),
2520
+ id: import_v416.z.string(),
2521
+ encrypted_content: import_v416.z.string().nullish()
2532
2522
  }),
2533
- z16.object({
2534
- type: z16.literal("function_call"),
2535
- id: z16.string(),
2536
- call_id: z16.string(),
2537
- name: z16.string(),
2538
- arguments: z16.string(),
2539
- status: z16.literal("completed")
2523
+ import_v416.z.object({
2524
+ type: import_v416.z.literal("function_call"),
2525
+ id: import_v416.z.string(),
2526
+ call_id: import_v416.z.string(),
2527
+ name: import_v416.z.string(),
2528
+ arguments: import_v416.z.string(),
2529
+ status: import_v416.z.literal("completed")
2540
2530
  }),
2541
- z16.object({
2542
- type: z16.literal("code_interpreter_call"),
2543
- id: z16.string(),
2544
- code: z16.string().nullable(),
2545
- container_id: z16.string(),
2546
- outputs: z16.array(
2547
- z16.discriminatedUnion("type", [
2548
- z16.object({ type: z16.literal("logs"), logs: z16.string() }),
2549
- z16.object({ type: z16.literal("image"), url: z16.string() })
2531
+ import_v416.z.object({
2532
+ type: import_v416.z.literal("code_interpreter_call"),
2533
+ id: import_v416.z.string(),
2534
+ code: import_v416.z.string().nullable(),
2535
+ container_id: import_v416.z.string(),
2536
+ outputs: import_v416.z.array(
2537
+ import_v416.z.discriminatedUnion("type", [
2538
+ import_v416.z.object({ type: import_v416.z.literal("logs"), logs: import_v416.z.string() }),
2539
+ import_v416.z.object({ type: import_v416.z.literal("image"), url: import_v416.z.string() })
2550
2540
  ])
2551
2541
  ).nullable()
2552
2542
  }),
2553
- z16.object({
2554
- type: z16.literal("image_generation_call"),
2555
- id: z16.string(),
2556
- result: z16.string()
2543
+ import_v416.z.object({
2544
+ type: import_v416.z.literal("image_generation_call"),
2545
+ id: import_v416.z.string(),
2546
+ result: import_v416.z.string()
2557
2547
  }),
2558
- z16.object({
2559
- type: z16.literal("web_search_call"),
2560
- id: z16.string(),
2561
- status: z16.string(),
2562
- action: z16.discriminatedUnion("type", [
2563
- z16.object({
2564
- type: z16.literal("search"),
2565
- query: z16.string().nullish()
2548
+ import_v416.z.object({
2549
+ type: import_v416.z.literal("web_search_call"),
2550
+ id: import_v416.z.string(),
2551
+ status: import_v416.z.string(),
2552
+ action: import_v416.z.discriminatedUnion("type", [
2553
+ import_v416.z.object({
2554
+ type: import_v416.z.literal("search"),
2555
+ query: import_v416.z.string().nullish()
2566
2556
  }),
2567
- z16.object({
2568
- type: z16.literal("open_page"),
2569
- url: z16.string()
2557
+ import_v416.z.object({
2558
+ type: import_v416.z.literal("open_page"),
2559
+ url: import_v416.z.string()
2570
2560
  }),
2571
- z16.object({
2572
- type: z16.literal("find"),
2573
- url: z16.string(),
2574
- pattern: z16.string()
2561
+ import_v416.z.object({
2562
+ type: import_v416.z.literal("find"),
2563
+ url: import_v416.z.string(),
2564
+ pattern: import_v416.z.string()
2575
2565
  })
2576
2566
  ]).nullish()
2577
2567
  }),
2578
- z16.object({
2579
- type: z16.literal("file_search_call"),
2580
- id: z16.string(),
2581
- queries: z16.array(z16.string()),
2582
- results: z16.array(
2583
- z16.object({
2584
- attributes: z16.record(z16.string(), z16.unknown()),
2585
- file_id: z16.string(),
2586
- filename: z16.string(),
2587
- score: z16.number(),
2588
- text: z16.string()
2568
+ import_v416.z.object({
2569
+ type: import_v416.z.literal("file_search_call"),
2570
+ id: import_v416.z.string(),
2571
+ queries: import_v416.z.array(import_v416.z.string()),
2572
+ results: import_v416.z.array(
2573
+ import_v416.z.object({
2574
+ attributes: import_v416.z.record(import_v416.z.string(), import_v416.z.unknown()),
2575
+ file_id: import_v416.z.string(),
2576
+ filename: import_v416.z.string(),
2577
+ score: import_v416.z.number(),
2578
+ text: import_v416.z.string()
2589
2579
  })
2590
2580
  ).nullish()
2591
2581
  }),
2592
- z16.object({
2593
- type: z16.literal("local_shell_call"),
2594
- id: z16.string(),
2595
- call_id: z16.string(),
2596
- action: z16.object({
2597
- type: z16.literal("exec"),
2598
- command: z16.array(z16.string()),
2599
- timeout_ms: z16.number().optional(),
2600
- user: z16.string().optional(),
2601
- working_directory: z16.string().optional(),
2602
- env: z16.record(z16.string(), z16.string()).optional()
2582
+ import_v416.z.object({
2583
+ type: import_v416.z.literal("local_shell_call"),
2584
+ id: import_v416.z.string(),
2585
+ call_id: import_v416.z.string(),
2586
+ action: import_v416.z.object({
2587
+ type: import_v416.z.literal("exec"),
2588
+ command: import_v416.z.array(import_v416.z.string()),
2589
+ timeout_ms: import_v416.z.number().optional(),
2590
+ user: import_v416.z.string().optional(),
2591
+ working_directory: import_v416.z.string().optional(),
2592
+ env: import_v416.z.record(import_v416.z.string(), import_v416.z.string()).optional()
2603
2593
  })
2604
2594
  }),
2605
- z16.object({
2606
- type: z16.literal("computer_call"),
2607
- id: z16.string(),
2608
- status: z16.literal("completed")
2595
+ import_v416.z.object({
2596
+ type: import_v416.z.literal("computer_call"),
2597
+ id: import_v416.z.string(),
2598
+ status: import_v416.z.literal("completed")
2609
2599
  })
2610
2600
  ])
2611
2601
  }),
2612
- z16.object({
2613
- type: z16.literal("response.function_call_arguments.delta"),
2614
- item_id: z16.string(),
2615
- output_index: z16.number(),
2616
- delta: z16.string()
2602
+ import_v416.z.object({
2603
+ type: import_v416.z.literal("response.function_call_arguments.delta"),
2604
+ item_id: import_v416.z.string(),
2605
+ output_index: import_v416.z.number(),
2606
+ delta: import_v416.z.string()
2617
2607
  }),
2618
- z16.object({
2619
- type: z16.literal("response.image_generation_call.partial_image"),
2620
- item_id: z16.string(),
2621
- output_index: z16.number(),
2622
- partial_image_b64: z16.string()
2608
+ import_v416.z.object({
2609
+ type: import_v416.z.literal("response.image_generation_call.partial_image"),
2610
+ item_id: import_v416.z.string(),
2611
+ output_index: import_v416.z.number(),
2612
+ partial_image_b64: import_v416.z.string()
2623
2613
  }),
2624
- z16.object({
2625
- type: z16.literal("response.code_interpreter_call_code.delta"),
2626
- item_id: z16.string(),
2627
- output_index: z16.number(),
2628
- delta: z16.string()
2614
+ import_v416.z.object({
2615
+ type: import_v416.z.literal("response.code_interpreter_call_code.delta"),
2616
+ item_id: import_v416.z.string(),
2617
+ output_index: import_v416.z.number(),
2618
+ delta: import_v416.z.string()
2629
2619
  }),
2630
- z16.object({
2631
- type: z16.literal("response.code_interpreter_call_code.done"),
2632
- item_id: z16.string(),
2633
- output_index: z16.number(),
2634
- code: z16.string()
2620
+ import_v416.z.object({
2621
+ type: import_v416.z.literal("response.code_interpreter_call_code.done"),
2622
+ item_id: import_v416.z.string(),
2623
+ output_index: import_v416.z.number(),
2624
+ code: import_v416.z.string()
2635
2625
  }),
2636
- z16.object({
2637
- type: z16.literal("response.output_text.annotation.added"),
2638
- annotation: z16.discriminatedUnion("type", [
2639
- z16.object({
2640
- type: z16.literal("url_citation"),
2641
- url: z16.string(),
2642
- title: z16.string()
2626
+ import_v416.z.object({
2627
+ type: import_v416.z.literal("response.output_text.annotation.added"),
2628
+ annotation: import_v416.z.discriminatedUnion("type", [
2629
+ import_v416.z.object({
2630
+ type: import_v416.z.literal("url_citation"),
2631
+ url: import_v416.z.string(),
2632
+ title: import_v416.z.string()
2643
2633
  }),
2644
- z16.object({
2645
- type: z16.literal("file_citation"),
2646
- file_id: z16.string(),
2647
- filename: z16.string().nullish(),
2648
- index: z16.number().nullish(),
2649
- start_index: z16.number().nullish(),
2650
- end_index: z16.number().nullish(),
2651
- quote: z16.string().nullish()
2634
+ import_v416.z.object({
2635
+ type: import_v416.z.literal("file_citation"),
2636
+ file_id: import_v416.z.string(),
2637
+ filename: import_v416.z.string().nullish(),
2638
+ index: import_v416.z.number().nullish(),
2639
+ start_index: import_v416.z.number().nullish(),
2640
+ end_index: import_v416.z.number().nullish(),
2641
+ quote: import_v416.z.string().nullish()
2652
2642
  })
2653
2643
  ])
2654
2644
  }),
2655
- z16.object({
2656
- type: z16.literal("response.reasoning_summary_part.added"),
2657
- item_id: z16.string(),
2658
- summary_index: z16.number()
2645
+ import_v416.z.object({
2646
+ type: import_v416.z.literal("response.reasoning_summary_part.added"),
2647
+ item_id: import_v416.z.string(),
2648
+ summary_index: import_v416.z.number()
2659
2649
  }),
2660
- z16.object({
2661
- type: z16.literal("response.reasoning_summary_text.delta"),
2662
- item_id: z16.string(),
2663
- summary_index: z16.number(),
2664
- delta: z16.string()
2650
+ import_v416.z.object({
2651
+ type: import_v416.z.literal("response.reasoning_summary_text.delta"),
2652
+ item_id: import_v416.z.string(),
2653
+ summary_index: import_v416.z.number(),
2654
+ delta: import_v416.z.string()
2665
2655
  }),
2666
- z16.object({
2667
- type: z16.literal("error"),
2668
- code: z16.string(),
2669
- message: z16.string(),
2670
- param: z16.string().nullish(),
2671
- sequence_number: z16.number()
2656
+ import_v416.z.object({
2657
+ type: import_v416.z.literal("error"),
2658
+ code: import_v416.z.string(),
2659
+ message: import_v416.z.string(),
2660
+ param: import_v416.z.string().nullish(),
2661
+ sequence_number: import_v416.z.number()
2672
2662
  }),
2673
- z16.object({ type: z16.string() }).loose().transform((value) => ({
2663
+ import_v416.z.object({ type: import_v416.z.string() }).loose().transform((value) => ({
2674
2664
  type: "unknown_chunk",
2675
2665
  message: value.type
2676
2666
  }))
@@ -2680,158 +2670,158 @@ var openaiResponsesChunkSchema = (0, import_provider_utils21.lazyValidator)(
2680
2670
  );
2681
2671
  var openaiResponsesResponseSchema = (0, import_provider_utils21.lazyValidator)(
2682
2672
  () => (0, import_provider_utils21.zodSchema)(
2683
- z16.object({
2684
- id: z16.string(),
2685
- created_at: z16.number(),
2686
- error: z16.object({
2687
- code: z16.string(),
2688
- message: z16.string()
2673
+ import_v416.z.object({
2674
+ id: import_v416.z.string(),
2675
+ created_at: import_v416.z.number(),
2676
+ error: import_v416.z.object({
2677
+ code: import_v416.z.string(),
2678
+ message: import_v416.z.string()
2689
2679
  }).nullish(),
2690
- model: z16.string(),
2691
- output: z16.array(
2692
- z16.discriminatedUnion("type", [
2693
- z16.object({
2694
- type: z16.literal("message"),
2695
- role: z16.literal("assistant"),
2696
- id: z16.string(),
2697
- content: z16.array(
2698
- z16.object({
2699
- type: z16.literal("output_text"),
2700
- text: z16.string(),
2701
- logprobs: z16.array(
2702
- z16.object({
2703
- token: z16.string(),
2704
- logprob: z16.number(),
2705
- top_logprobs: z16.array(
2706
- z16.object({
2707
- token: z16.string(),
2708
- logprob: z16.number()
2680
+ model: import_v416.z.string(),
2681
+ output: import_v416.z.array(
2682
+ import_v416.z.discriminatedUnion("type", [
2683
+ import_v416.z.object({
2684
+ type: import_v416.z.literal("message"),
2685
+ role: import_v416.z.literal("assistant"),
2686
+ id: import_v416.z.string(),
2687
+ content: import_v416.z.array(
2688
+ import_v416.z.object({
2689
+ type: import_v416.z.literal("output_text"),
2690
+ text: import_v416.z.string(),
2691
+ logprobs: import_v416.z.array(
2692
+ import_v416.z.object({
2693
+ token: import_v416.z.string(),
2694
+ logprob: import_v416.z.number(),
2695
+ top_logprobs: import_v416.z.array(
2696
+ import_v416.z.object({
2697
+ token: import_v416.z.string(),
2698
+ logprob: import_v416.z.number()
2709
2699
  })
2710
2700
  )
2711
2701
  })
2712
2702
  ).nullish(),
2713
- annotations: z16.array(
2714
- z16.discriminatedUnion("type", [
2715
- z16.object({
2716
- type: z16.literal("url_citation"),
2717
- start_index: z16.number(),
2718
- end_index: z16.number(),
2719
- url: z16.string(),
2720
- title: z16.string()
2703
+ annotations: import_v416.z.array(
2704
+ import_v416.z.discriminatedUnion("type", [
2705
+ import_v416.z.object({
2706
+ type: import_v416.z.literal("url_citation"),
2707
+ start_index: import_v416.z.number(),
2708
+ end_index: import_v416.z.number(),
2709
+ url: import_v416.z.string(),
2710
+ title: import_v416.z.string()
2721
2711
  }),
2722
- z16.object({
2723
- type: z16.literal("file_citation"),
2724
- file_id: z16.string(),
2725
- filename: z16.string().nullish(),
2726
- index: z16.number().nullish(),
2727
- start_index: z16.number().nullish(),
2728
- end_index: z16.number().nullish(),
2729
- quote: z16.string().nullish()
2712
+ import_v416.z.object({
2713
+ type: import_v416.z.literal("file_citation"),
2714
+ file_id: import_v416.z.string(),
2715
+ filename: import_v416.z.string().nullish(),
2716
+ index: import_v416.z.number().nullish(),
2717
+ start_index: import_v416.z.number().nullish(),
2718
+ end_index: import_v416.z.number().nullish(),
2719
+ quote: import_v416.z.string().nullish()
2730
2720
  }),
2731
- z16.object({
2732
- type: z16.literal("container_file_citation")
2721
+ import_v416.z.object({
2722
+ type: import_v416.z.literal("container_file_citation")
2733
2723
  })
2734
2724
  ])
2735
2725
  )
2736
2726
  })
2737
2727
  )
2738
2728
  }),
2739
- z16.object({
2740
- type: z16.literal("web_search_call"),
2741
- id: z16.string(),
2742
- status: z16.string(),
2743
- action: z16.discriminatedUnion("type", [
2744
- z16.object({
2745
- type: z16.literal("search"),
2746
- query: z16.string().nullish()
2729
+ import_v416.z.object({
2730
+ type: import_v416.z.literal("web_search_call"),
2731
+ id: import_v416.z.string(),
2732
+ status: import_v416.z.string(),
2733
+ action: import_v416.z.discriminatedUnion("type", [
2734
+ import_v416.z.object({
2735
+ type: import_v416.z.literal("search"),
2736
+ query: import_v416.z.string().nullish()
2747
2737
  }),
2748
- z16.object({
2749
- type: z16.literal("open_page"),
2750
- url: z16.string()
2738
+ import_v416.z.object({
2739
+ type: import_v416.z.literal("open_page"),
2740
+ url: import_v416.z.string()
2751
2741
  }),
2752
- z16.object({
2753
- type: z16.literal("find"),
2754
- url: z16.string(),
2755
- pattern: z16.string()
2742
+ import_v416.z.object({
2743
+ type: import_v416.z.literal("find"),
2744
+ url: import_v416.z.string(),
2745
+ pattern: import_v416.z.string()
2756
2746
  })
2757
2747
  ]).nullish()
2758
2748
  }),
2759
- z16.object({
2760
- type: z16.literal("file_search_call"),
2761
- id: z16.string(),
2762
- queries: z16.array(z16.string()),
2763
- results: z16.array(
2764
- z16.object({
2765
- attributes: z16.record(z16.string(), z16.unknown()),
2766
- file_id: z16.string(),
2767
- filename: z16.string(),
2768
- score: z16.number(),
2769
- text: z16.string()
2749
+ import_v416.z.object({
2750
+ type: import_v416.z.literal("file_search_call"),
2751
+ id: import_v416.z.string(),
2752
+ queries: import_v416.z.array(import_v416.z.string()),
2753
+ results: import_v416.z.array(
2754
+ import_v416.z.object({
2755
+ attributes: import_v416.z.record(import_v416.z.string(), import_v416.z.unknown()),
2756
+ file_id: import_v416.z.string(),
2757
+ filename: import_v416.z.string(),
2758
+ score: import_v416.z.number(),
2759
+ text: import_v416.z.string()
2770
2760
  })
2771
2761
  ).nullish()
2772
2762
  }),
2773
- z16.object({
2774
- type: z16.literal("code_interpreter_call"),
2775
- id: z16.string(),
2776
- code: z16.string().nullable(),
2777
- container_id: z16.string(),
2778
- outputs: z16.array(
2779
- z16.discriminatedUnion("type", [
2780
- z16.object({ type: z16.literal("logs"), logs: z16.string() }),
2781
- z16.object({ type: z16.literal("image"), url: z16.string() })
2763
+ import_v416.z.object({
2764
+ type: import_v416.z.literal("code_interpreter_call"),
2765
+ id: import_v416.z.string(),
2766
+ code: import_v416.z.string().nullable(),
2767
+ container_id: import_v416.z.string(),
2768
+ outputs: import_v416.z.array(
2769
+ import_v416.z.discriminatedUnion("type", [
2770
+ import_v416.z.object({ type: import_v416.z.literal("logs"), logs: import_v416.z.string() }),
2771
+ import_v416.z.object({ type: import_v416.z.literal("image"), url: import_v416.z.string() })
2782
2772
  ])
2783
2773
  ).nullable()
2784
2774
  }),
2785
- z16.object({
2786
- type: z16.literal("image_generation_call"),
2787
- id: z16.string(),
2788
- result: z16.string()
2775
+ import_v416.z.object({
2776
+ type: import_v416.z.literal("image_generation_call"),
2777
+ id: import_v416.z.string(),
2778
+ result: import_v416.z.string()
2789
2779
  }),
2790
- z16.object({
2791
- type: z16.literal("local_shell_call"),
2792
- id: z16.string(),
2793
- call_id: z16.string(),
2794
- action: z16.object({
2795
- type: z16.literal("exec"),
2796
- command: z16.array(z16.string()),
2797
- timeout_ms: z16.number().optional(),
2798
- user: z16.string().optional(),
2799
- working_directory: z16.string().optional(),
2800
- env: z16.record(z16.string(), z16.string()).optional()
2780
+ import_v416.z.object({
2781
+ type: import_v416.z.literal("local_shell_call"),
2782
+ id: import_v416.z.string(),
2783
+ call_id: import_v416.z.string(),
2784
+ action: import_v416.z.object({
2785
+ type: import_v416.z.literal("exec"),
2786
+ command: import_v416.z.array(import_v416.z.string()),
2787
+ timeout_ms: import_v416.z.number().optional(),
2788
+ user: import_v416.z.string().optional(),
2789
+ working_directory: import_v416.z.string().optional(),
2790
+ env: import_v416.z.record(import_v416.z.string(), import_v416.z.string()).optional()
2801
2791
  })
2802
2792
  }),
2803
- z16.object({
2804
- type: z16.literal("function_call"),
2805
- call_id: z16.string(),
2806
- name: z16.string(),
2807
- arguments: z16.string(),
2808
- id: z16.string()
2793
+ import_v416.z.object({
2794
+ type: import_v416.z.literal("function_call"),
2795
+ call_id: import_v416.z.string(),
2796
+ name: import_v416.z.string(),
2797
+ arguments: import_v416.z.string(),
2798
+ id: import_v416.z.string()
2809
2799
  }),
2810
- z16.object({
2811
- type: z16.literal("computer_call"),
2812
- id: z16.string(),
2813
- status: z16.string().optional()
2800
+ import_v416.z.object({
2801
+ type: import_v416.z.literal("computer_call"),
2802
+ id: import_v416.z.string(),
2803
+ status: import_v416.z.string().optional()
2814
2804
  }),
2815
- z16.object({
2816
- type: z16.literal("reasoning"),
2817
- id: z16.string(),
2818
- encrypted_content: z16.string().nullish(),
2819
- summary: z16.array(
2820
- z16.object({
2821
- type: z16.literal("summary_text"),
2822
- text: z16.string()
2805
+ import_v416.z.object({
2806
+ type: import_v416.z.literal("reasoning"),
2807
+ id: import_v416.z.string(),
2808
+ encrypted_content: import_v416.z.string().nullish(),
2809
+ summary: import_v416.z.array(
2810
+ import_v416.z.object({
2811
+ type: import_v416.z.literal("summary_text"),
2812
+ text: import_v416.z.string()
2823
2813
  })
2824
2814
  )
2825
2815
  })
2826
2816
  ])
2827
2817
  ),
2828
- service_tier: z16.string().nullish(),
2829
- incomplete_details: z16.object({ reason: z16.string() }).nullish(),
2830
- usage: z16.object({
2831
- input_tokens: z16.number(),
2832
- input_tokens_details: z16.object({ cached_tokens: z16.number().nullish() }).nullish(),
2833
- output_tokens: z16.number(),
2834
- output_tokens_details: z16.object({ reasoning_tokens: z16.number().nullish() }).nullish()
2818
+ service_tier: import_v416.z.string().nullish(),
2819
+ incomplete_details: import_v416.z.object({ reason: import_v416.z.string() }).nullish(),
2820
+ usage: import_v416.z.object({
2821
+ input_tokens: import_v416.z.number(),
2822
+ input_tokens_details: import_v416.z.object({ cached_tokens: import_v416.z.number().nullish() }).nullish(),
2823
+ output_tokens: import_v416.z.number(),
2824
+ output_tokens_details: import_v416.z.object({ reasoning_tokens: import_v416.z.number().nullish() }).nullish()
2835
2825
  })
2836
2826
  })
2837
2827
  )
@@ -2839,7 +2829,7 @@ var openaiResponsesResponseSchema = (0, import_provider_utils21.lazyValidator)(
2839
2829
 
2840
2830
  // src/responses/openai-responses-options.ts
2841
2831
  var import_provider_utils22 = require("@ai-sdk/provider-utils");
2842
- var z17 = __toESM(require("zod/v4"));
2832
+ var import_v417 = require("zod/v4");
2843
2833
  var TOP_LOGPROBS_MAX = 20;
2844
2834
  var openaiResponsesReasoningModelIds = [
2845
2835
  "o1",
@@ -2900,15 +2890,15 @@ var openaiResponsesModelIds = [
2900
2890
  ];
2901
2891
  var openaiResponsesProviderOptionsSchema = (0, import_provider_utils22.lazyValidator)(
2902
2892
  () => (0, import_provider_utils22.zodSchema)(
2903
- z17.object({
2904
- include: z17.array(
2905
- z17.enum([
2893
+ import_v417.z.object({
2894
+ include: import_v417.z.array(
2895
+ import_v417.z.enum([
2906
2896
  "reasoning.encrypted_content",
2907
2897
  "file_search_call.results",
2908
2898
  "message.output_text.logprobs"
2909
2899
  ])
2910
2900
  ).nullish(),
2911
- instructions: z17.string().nullish(),
2901
+ instructions: import_v417.z.string().nullish(),
2912
2902
  /**
2913
2903
  * Return the log probabilities of the tokens.
2914
2904
  *
@@ -2921,25 +2911,25 @@ var openaiResponsesProviderOptionsSchema = (0, import_provider_utils22.lazyValid
2921
2911
  * @see https://platform.openai.com/docs/api-reference/responses/create
2922
2912
  * @see https://cookbook.openai.com/examples/using_logprobs
2923
2913
  */
2924
- logprobs: z17.union([z17.boolean(), z17.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
2914
+ logprobs: import_v417.z.union([import_v417.z.boolean(), import_v417.z.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
2925
2915
  /**
2926
2916
  * The maximum number of total calls to built-in tools that can be processed in a response.
2927
2917
  * This maximum number applies across all built-in tool calls, not per individual tool.
2928
2918
  * Any further attempts to call a tool by the model will be ignored.
2929
2919
  */
2930
- maxToolCalls: z17.number().nullish(),
2931
- metadata: z17.any().nullish(),
2932
- parallelToolCalls: z17.boolean().nullish(),
2933
- previousResponseId: z17.string().nullish(),
2934
- promptCacheKey: z17.string().nullish(),
2935
- reasoningEffort: z17.string().nullish(),
2936
- reasoningSummary: z17.string().nullish(),
2937
- safetyIdentifier: z17.string().nullish(),
2938
- serviceTier: z17.enum(["auto", "flex", "priority", "default"]).nullish(),
2939
- store: z17.boolean().nullish(),
2940
- strictJsonSchema: z17.boolean().nullish(),
2941
- textVerbosity: z17.enum(["low", "medium", "high"]).nullish(),
2942
- user: z17.string().nullish()
2920
+ maxToolCalls: import_v417.z.number().nullish(),
2921
+ metadata: import_v417.z.any().nullish(),
2922
+ parallelToolCalls: import_v417.z.boolean().nullish(),
2923
+ previousResponseId: import_v417.z.string().nullish(),
2924
+ promptCacheKey: import_v417.z.string().nullish(),
2925
+ reasoningEffort: import_v417.z.string().nullish(),
2926
+ reasoningSummary: import_v417.z.string().nullish(),
2927
+ safetyIdentifier: import_v417.z.string().nullish(),
2928
+ serviceTier: import_v417.z.enum(["auto", "flex", "priority", "default"]).nullish(),
2929
+ store: import_v417.z.boolean().nullish(),
2930
+ strictJsonSchema: import_v417.z.boolean().nullish(),
2931
+ textVerbosity: import_v417.z.enum(["low", "medium", "high"]).nullish(),
2932
+ user: import_v417.z.string().nullish()
2943
2933
  })
2944
2934
  )
2945
2935
  );
@@ -4094,12 +4084,12 @@ var import_provider_utils26 = require("@ai-sdk/provider-utils");
4094
4084
 
4095
4085
  // src/speech/openai-speech-options.ts
4096
4086
  var import_provider_utils25 = require("@ai-sdk/provider-utils");
4097
- var z18 = __toESM(require("zod/v4"));
4087
+ var import_v418 = require("zod/v4");
4098
4088
  var openaiSpeechProviderOptionsSchema = (0, import_provider_utils25.lazyValidator)(
4099
4089
  () => (0, import_provider_utils25.zodSchema)(
4100
- z18.object({
4101
- instructions: z18.string().nullish(),
4102
- speed: z18.number().min(0.25).max(4).default(1).nullish()
4090
+ import_v418.z.object({
4091
+ instructions: import_v418.z.string().nullish(),
4092
+ speed: import_v418.z.number().min(0.25).max(4).default(1).nullish()
4103
4093
  })
4104
4094
  )
4105
4095
  );
@@ -4210,32 +4200,32 @@ var import_provider_utils29 = require("@ai-sdk/provider-utils");
4210
4200
 
4211
4201
  // src/transcription/openai-transcription-api.ts
4212
4202
  var import_provider_utils27 = require("@ai-sdk/provider-utils");
4213
- var z19 = __toESM(require("zod/v4"));
4203
+ var import_v419 = require("zod/v4");
4214
4204
  var openaiTranscriptionResponseSchema = (0, import_provider_utils27.lazyValidator)(
4215
4205
  () => (0, import_provider_utils27.zodSchema)(
4216
- z19.object({
4217
- text: z19.string(),
4218
- language: z19.string().nullish(),
4219
- duration: z19.number().nullish(),
4220
- words: z19.array(
4221
- z19.object({
4222
- word: z19.string(),
4223
- start: z19.number(),
4224
- end: z19.number()
4206
+ import_v419.z.object({
4207
+ text: import_v419.z.string(),
4208
+ language: import_v419.z.string().nullish(),
4209
+ duration: import_v419.z.number().nullish(),
4210
+ words: import_v419.z.array(
4211
+ import_v419.z.object({
4212
+ word: import_v419.z.string(),
4213
+ start: import_v419.z.number(),
4214
+ end: import_v419.z.number()
4225
4215
  })
4226
4216
  ).nullish(),
4227
- segments: z19.array(
4228
- z19.object({
4229
- id: z19.number(),
4230
- seek: z19.number(),
4231
- start: z19.number(),
4232
- end: z19.number(),
4233
- text: z19.string(),
4234
- tokens: z19.array(z19.number()),
4235
- temperature: z19.number(),
4236
- avg_logprob: z19.number(),
4237
- compression_ratio: z19.number(),
4238
- no_speech_prob: z19.number()
4217
+ segments: import_v419.z.array(
4218
+ import_v419.z.object({
4219
+ id: import_v419.z.number(),
4220
+ seek: import_v419.z.number(),
4221
+ start: import_v419.z.number(),
4222
+ end: import_v419.z.number(),
4223
+ text: import_v419.z.string(),
4224
+ tokens: import_v419.z.array(import_v419.z.number()),
4225
+ temperature: import_v419.z.number(),
4226
+ avg_logprob: import_v419.z.number(),
4227
+ compression_ratio: import_v419.z.number(),
4228
+ no_speech_prob: import_v419.z.number()
4239
4229
  })
4240
4230
  ).nullish()
4241
4231
  })
@@ -4244,32 +4234,32 @@ var openaiTranscriptionResponseSchema = (0, import_provider_utils27.lazyValidato
4244
4234
 
4245
4235
  // src/transcription/openai-transcription-options.ts
4246
4236
  var import_provider_utils28 = require("@ai-sdk/provider-utils");
4247
- var z20 = __toESM(require("zod/v4"));
4237
+ var import_v420 = require("zod/v4");
4248
4238
  var openAITranscriptionProviderOptions = (0, import_provider_utils28.lazyValidator)(
4249
4239
  () => (0, import_provider_utils28.zodSchema)(
4250
- z20.object({
4240
+ import_v420.z.object({
4251
4241
  /**
4252
4242
  * Additional information to include in the transcription response.
4253
4243
  */
4254
- include: z20.array(z20.string()).optional(),
4244
+ include: import_v420.z.array(import_v420.z.string()).optional(),
4255
4245
  /**
4256
4246
  * The language of the input audio in ISO-639-1 format.
4257
4247
  */
4258
- language: z20.string().optional(),
4248
+ language: import_v420.z.string().optional(),
4259
4249
  /**
4260
4250
  * An optional text to guide the model's style or continue a previous audio segment.
4261
4251
  */
4262
- prompt: z20.string().optional(),
4252
+ prompt: import_v420.z.string().optional(),
4263
4253
  /**
4264
4254
  * The sampling temperature, between 0 and 1.
4265
4255
  * @default 0
4266
4256
  */
4267
- temperature: z20.number().min(0).max(1).default(0).optional(),
4257
+ temperature: import_v420.z.number().min(0).max(1).default(0).optional(),
4268
4258
  /**
4269
4259
  * The timestamp granularities to populate for this transcription.
4270
4260
  * @default ['segment']
4271
4261
  */
4272
- timestampGranularities: z20.array(z20.enum(["word", "segment"])).default(["segment"]).optional()
4262
+ timestampGranularities: import_v420.z.array(import_v420.z.enum(["word", "segment"])).default(["segment"]).optional()
4273
4263
  })
4274
4264
  )
4275
4265
  );
@@ -4442,7 +4432,7 @@ var OpenAITranscriptionModel = class {
4442
4432
  };
4443
4433
 
4444
4434
  // src/version.ts
4445
- var VERSION = true ? "3.0.0-beta.22" : "0.0.0-test";
4435
+ var VERSION = true ? "3.0.0-beta.24" : "0.0.0-test";
4446
4436
 
4447
4437
  // src/openai-provider.ts
4448
4438
  function createOpenAI(options = {}) {