@ai-sdk/openai 2.0.47 → 2.0.48

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