@ai-sdk/xai 3.0.104 → 3.0.105

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.mjs CHANGED
@@ -18,18 +18,37 @@ import {
18
18
  createEventSourceResponseHandler,
19
19
  createJsonResponseHandler,
20
20
  extractResponseHeaders,
21
- parseProviderOptions,
21
+ parseProviderOptions as parseProviderOptions2,
22
22
  postJsonToApi,
23
23
  safeParseJSON
24
24
  } from "@ai-sdk/provider-utils";
25
- import { z as z3 } from "zod/v4";
25
+ import { z as z4 } from "zod/v4";
26
26
 
27
27
  // src/convert-to-xai-chat-messages.ts
28
28
  import {
29
29
  UnsupportedFunctionalityError
30
30
  } from "@ai-sdk/provider";
31
- import { convertToBase64 } from "@ai-sdk/provider-utils";
32
- function convertToXaiChatMessages(prompt) {
31
+ import { convertToBase64, parseProviderOptions } from "@ai-sdk/provider-utils";
32
+
33
+ // src/xai-file-part-options.ts
34
+ import { z } from "zod/v4";
35
+ var xaiFilePartProviderOptions = z.object({
36
+ /**
37
+ * Controls the resolution at which the model processes the image.
38
+ * `low` processes the image at reduced resolution and consumes fewer
39
+ * input tokens, `high` processes the image at full resolution, and
40
+ * `auto` lets the API decide. Defaults to full resolution when not set.
41
+ *
42
+ * Note: the xAI API silently ignores invalid values, so the value is
43
+ * validated client-side.
44
+ *
45
+ * @see https://docs.x.ai/developers/model-capabilities/images/understanding
46
+ */
47
+ imageDetail: z.enum(["low", "high", "auto"]).optional()
48
+ });
49
+
50
+ // src/convert-to-xai-chat-messages.ts
51
+ async function convertToXaiChatMessages(prompt) {
33
52
  var _a;
34
53
  const messages = [];
35
54
  const warnings = [];
@@ -44,31 +63,40 @@ function convertToXaiChatMessages(prompt) {
44
63
  messages.push({ role: "user", content: content[0].text });
45
64
  break;
46
65
  }
47
- messages.push({
48
- role: "user",
49
- content: content.map((part) => {
50
- switch (part.type) {
51
- case "text": {
52
- return { type: "text", text: part.text };
53
- }
54
- case "file": {
55
- if (part.mediaType.startsWith("image/")) {
56
- const mediaType = part.mediaType === "image/*" ? "image/jpeg" : part.mediaType;
57
- return {
58
- type: "image_url",
59
- image_url: {
60
- url: part.data instanceof URL ? part.data.toString() : `data:${mediaType};base64,${convertToBase64(part.data)}`
66
+ const userContent = [];
67
+ for (const part of content) {
68
+ switch (part.type) {
69
+ case "text": {
70
+ userContent.push({ type: "text", text: part.text });
71
+ break;
72
+ }
73
+ case "file": {
74
+ if (part.mediaType.startsWith("image/")) {
75
+ const mediaType = part.mediaType === "image/*" ? "image/jpeg" : part.mediaType;
76
+ const filePartOptions = await parseProviderOptions({
77
+ provider: "xai",
78
+ providerOptions: part.providerOptions,
79
+ schema: xaiFilePartProviderOptions
80
+ });
81
+ userContent.push({
82
+ type: "image_url",
83
+ image_url: {
84
+ url: part.data instanceof URL ? part.data.toString() : `data:${mediaType};base64,${convertToBase64(part.data)}`,
85
+ ...(filePartOptions == null ? void 0 : filePartOptions.imageDetail) != null && {
86
+ detail: filePartOptions.imageDetail
61
87
  }
62
- };
63
- } else {
64
- throw new UnsupportedFunctionalityError({
65
- functionality: `file part media type ${part.mediaType}`
66
- });
67
- }
88
+ }
89
+ });
90
+ } else {
91
+ throw new UnsupportedFunctionalityError({
92
+ functionality: `file part media type ${part.mediaType}`
93
+ });
68
94
  }
95
+ break;
69
96
  }
70
- })
71
- });
97
+ }
98
+ }
99
+ messages.push({ role: "user", content: userContent });
72
100
  break;
73
101
  }
74
102
  case "assistant": {
@@ -193,53 +221,53 @@ function mapXaiFinishReason(finishReason) {
193
221
  }
194
222
 
195
223
  // src/xai-chat-options.ts
196
- import { z } from "zod/v4";
197
- var webSourceSchema = z.object({
198
- type: z.literal("web"),
199
- country: z.string().length(2).optional(),
200
- excludedWebsites: z.array(z.string()).max(5).optional(),
201
- allowedWebsites: z.array(z.string()).max(5).optional(),
202
- safeSearch: z.boolean().optional()
224
+ import { z as z2 } from "zod/v4";
225
+ var webSourceSchema = z2.object({
226
+ type: z2.literal("web"),
227
+ country: z2.string().length(2).optional(),
228
+ excludedWebsites: z2.array(z2.string()).max(5).optional(),
229
+ allowedWebsites: z2.array(z2.string()).max(5).optional(),
230
+ safeSearch: z2.boolean().optional()
203
231
  });
204
- var xSourceSchema = z.object({
205
- type: z.literal("x"),
206
- excludedXHandles: z.array(z.string()).optional(),
207
- includedXHandles: z.array(z.string()).optional(),
208
- postFavoriteCount: z.number().int().optional(),
209
- postViewCount: z.number().int().optional(),
232
+ var xSourceSchema = z2.object({
233
+ type: z2.literal("x"),
234
+ excludedXHandles: z2.array(z2.string()).optional(),
235
+ includedXHandles: z2.array(z2.string()).optional(),
236
+ postFavoriteCount: z2.number().int().optional(),
237
+ postViewCount: z2.number().int().optional(),
210
238
  /**
211
239
  * @deprecated use `includedXHandles` instead
212
240
  */
213
- xHandles: z.array(z.string()).optional()
241
+ xHandles: z2.array(z2.string()).optional()
214
242
  });
215
- var newsSourceSchema = z.object({
216
- type: z.literal("news"),
217
- country: z.string().length(2).optional(),
218
- excludedWebsites: z.array(z.string()).max(5).optional(),
219
- safeSearch: z.boolean().optional()
243
+ var newsSourceSchema = z2.object({
244
+ type: z2.literal("news"),
245
+ country: z2.string().length(2).optional(),
246
+ excludedWebsites: z2.array(z2.string()).max(5).optional(),
247
+ safeSearch: z2.boolean().optional()
220
248
  });
221
- var rssSourceSchema = z.object({
222
- type: z.literal("rss"),
223
- links: z.array(z.string().url()).max(1)
249
+ var rssSourceSchema = z2.object({
250
+ type: z2.literal("rss"),
251
+ links: z2.array(z2.string().url()).max(1)
224
252
  // currently only supports one RSS link
225
253
  });
226
- var searchSourceSchema = z.discriminatedUnion("type", [
254
+ var searchSourceSchema = z2.discriminatedUnion("type", [
227
255
  webSourceSchema,
228
256
  xSourceSchema,
229
257
  newsSourceSchema,
230
258
  rssSourceSchema
231
259
  ]);
232
- var xaiLanguageModelChatOptions = z.object({
233
- reasoningEffort: z.enum(["none", "low", "medium", "high"]).optional(),
234
- logprobs: z.boolean().optional(),
235
- topLogprobs: z.number().int().min(0).max(8).optional(),
260
+ var xaiLanguageModelChatOptions = z2.object({
261
+ reasoningEffort: z2.enum(["none", "low", "medium", "high"]).optional(),
262
+ logprobs: z2.boolean().optional(),
263
+ topLogprobs: z2.number().int().min(0).max(8).optional(),
236
264
  /**
237
265
  * Whether to enable parallel function calling during tool use.
238
266
  * When true, the model can call multiple functions in parallel.
239
267
  * When false, the model will call functions sequentially.
240
268
  * Defaults to true.
241
269
  */
242
- parallel_function_calling: z.boolean().optional(),
270
+ parallel_function_calling: z2.boolean().optional(),
243
271
  /**
244
272
  * @deprecated xAI has deprecated Live Search (`search_parameters`) in favor
245
273
  * of the Agent Tools API. Requests using this option now return a "Live
@@ -249,32 +277,32 @@ var xaiLanguageModelChatOptions = z.object({
249
277
  *
250
278
  * @see https://docs.x.ai/docs/guides/tools/overview
251
279
  */
252
- searchParameters: z.object({
280
+ searchParameters: z2.object({
253
281
  /**
254
282
  * search mode preference
255
283
  * - "off": disables search completely
256
284
  * - "auto": model decides whether to search (default)
257
285
  * - "on": always enables search
258
286
  */
259
- mode: z.enum(["off", "auto", "on"]),
287
+ mode: z2.enum(["off", "auto", "on"]),
260
288
  /**
261
289
  * whether to return citations in the response
262
290
  * defaults to true
263
291
  */
264
- returnCitations: z.boolean().optional(),
292
+ returnCitations: z2.boolean().optional(),
265
293
  /**
266
294
  * start date for search data (ISO8601 format: YYYY-MM-DD)
267
295
  */
268
- fromDate: z.string().optional(),
296
+ fromDate: z2.string().optional(),
269
297
  /**
270
298
  * end date for search data (ISO8601 format: YYYY-MM-DD)
271
299
  */
272
- toDate: z.string().optional(),
300
+ toDate: z2.string().optional(),
273
301
  /**
274
302
  * maximum number of search results to consider
275
303
  * defaults to 20
276
304
  */
277
- maxSearchResults: z.number().min(1).max(50).optional(),
305
+ maxSearchResults: z2.number().min(1).max(50).optional(),
278
306
  /**
279
307
  * data sources to search from.
280
308
  * defaults to [{ type: 'web' }, { type: 'x' }] if not specified.
@@ -282,26 +310,26 @@ var xaiLanguageModelChatOptions = z.object({
282
310
  * @example
283
311
  * sources: [{ type: 'web', country: 'US' }, { type: 'x' }]
284
312
  */
285
- sources: z.array(searchSourceSchema).optional()
313
+ sources: z2.array(searchSourceSchema).optional()
286
314
  }).optional()
287
315
  });
288
316
 
289
317
  // src/xai-error.ts
290
318
  import { createJsonErrorResponseHandler } from "@ai-sdk/provider-utils";
291
- import { z as z2 } from "zod/v4";
292
- var chatCompletionsErrorSchema = z2.object({
293
- error: z2.object({
294
- message: z2.string(),
295
- type: z2.string().nullish(),
296
- param: z2.any().nullish(),
297
- code: z2.union([z2.string(), z2.number()]).nullish()
319
+ import { z as z3 } from "zod/v4";
320
+ var chatCompletionsErrorSchema = z3.object({
321
+ error: z3.object({
322
+ message: z3.string(),
323
+ type: z3.string().nullish(),
324
+ param: z3.any().nullish(),
325
+ code: z3.union([z3.string(), z3.number()]).nullish()
298
326
  })
299
327
  });
300
- var responsesErrorSchema = z2.object({
301
- code: z2.string(),
302
- error: z2.string()
328
+ var responsesErrorSchema = z3.object({
329
+ code: z3.string(),
330
+ error: z3.string()
303
331
  });
304
- var xaiErrorDataSchema = z2.union([
332
+ var xaiErrorDataSchema = z3.union([
305
333
  chatCompletionsErrorSchema,
306
334
  responsesErrorSchema
307
335
  ]);
@@ -420,7 +448,7 @@ var XaiChatLanguageModel = class {
420
448
  }) {
421
449
  var _a, _b, _c;
422
450
  const warnings = [];
423
- const options = (_a = await parseProviderOptions({
451
+ const options = (_a = await parseProviderOptions2({
424
452
  provider: "xai",
425
453
  providerOptions,
426
454
  schema: xaiLanguageModelChatOptions
@@ -437,7 +465,7 @@ var XaiChatLanguageModel = class {
437
465
  if (stopSequences != null) {
438
466
  warnings.push({ type: "unsupported", feature: "stopSequences" });
439
467
  }
440
- const { messages, warnings: messageWarnings } = convertToXaiChatMessages(prompt);
468
+ const { messages, warnings: messageWarnings } = await convertToXaiChatMessages(prompt);
441
469
  warnings.push(...messageWarnings);
442
470
  const {
443
471
  tools: xaiTools2,
@@ -825,85 +853,85 @@ var XaiChatLanguageModel = class {
825
853
  };
826
854
  }
827
855
  };
828
- var xaiUsageSchema = z3.object({
829
- prompt_tokens: z3.number(),
830
- completion_tokens: z3.number(),
831
- total_tokens: z3.number(),
832
- prompt_tokens_details: z3.object({
833
- text_tokens: z3.number().nullish(),
834
- audio_tokens: z3.number().nullish(),
835
- image_tokens: z3.number().nullish(),
836
- cached_tokens: z3.number().nullish()
856
+ var xaiUsageSchema = z4.object({
857
+ prompt_tokens: z4.number(),
858
+ completion_tokens: z4.number(),
859
+ total_tokens: z4.number(),
860
+ prompt_tokens_details: z4.object({
861
+ text_tokens: z4.number().nullish(),
862
+ audio_tokens: z4.number().nullish(),
863
+ image_tokens: z4.number().nullish(),
864
+ cached_tokens: z4.number().nullish()
837
865
  }).nullish(),
838
- completion_tokens_details: z3.object({
839
- reasoning_tokens: z3.number().nullish(),
840
- audio_tokens: z3.number().nullish(),
841
- accepted_prediction_tokens: z3.number().nullish(),
842
- rejected_prediction_tokens: z3.number().nullish()
866
+ completion_tokens_details: z4.object({
867
+ reasoning_tokens: z4.number().nullish(),
868
+ audio_tokens: z4.number().nullish(),
869
+ accepted_prediction_tokens: z4.number().nullish(),
870
+ rejected_prediction_tokens: z4.number().nullish()
843
871
  }).nullish()
844
872
  });
845
- var xaiChatResponseSchema = z3.object({
846
- id: z3.string().nullish(),
847
- created: z3.number().nullish(),
848
- model: z3.string().nullish(),
849
- choices: z3.array(
850
- z3.object({
851
- message: z3.object({
852
- role: z3.literal("assistant"),
853
- content: z3.string().nullish(),
854
- reasoning_content: z3.string().nullish(),
855
- tool_calls: z3.array(
856
- z3.object({
857
- id: z3.string(),
858
- type: z3.literal("function"),
859
- function: z3.object({
860
- name: z3.string(),
861
- arguments: z3.string()
873
+ var xaiChatResponseSchema = z4.object({
874
+ id: z4.string().nullish(),
875
+ created: z4.number().nullish(),
876
+ model: z4.string().nullish(),
877
+ choices: z4.array(
878
+ z4.object({
879
+ message: z4.object({
880
+ role: z4.literal("assistant"),
881
+ content: z4.string().nullish(),
882
+ reasoning_content: z4.string().nullish(),
883
+ tool_calls: z4.array(
884
+ z4.object({
885
+ id: z4.string(),
886
+ type: z4.literal("function"),
887
+ function: z4.object({
888
+ name: z4.string(),
889
+ arguments: z4.string()
862
890
  })
863
891
  })
864
892
  ).nullish()
865
893
  }),
866
- index: z3.number(),
867
- finish_reason: z3.string().nullish()
894
+ index: z4.number(),
895
+ finish_reason: z4.string().nullish()
868
896
  })
869
897
  ).nullish(),
870
- object: z3.literal("chat.completion").nullish(),
898
+ object: z4.literal("chat.completion").nullish(),
871
899
  usage: xaiUsageSchema.nullish(),
872
- citations: z3.array(z3.string().url()).nullish(),
873
- code: z3.string().nullish(),
874
- error: z3.string().nullish()
900
+ citations: z4.array(z4.string().url()).nullish(),
901
+ code: z4.string().nullish(),
902
+ error: z4.string().nullish()
875
903
  });
876
- var xaiChatChunkSchema = z3.object({
877
- id: z3.string().nullish(),
878
- created: z3.number().nullish(),
879
- model: z3.string().nullish(),
880
- choices: z3.array(
881
- z3.object({
882
- delta: z3.object({
883
- role: z3.enum(["assistant"]).optional(),
884
- content: z3.string().nullish(),
885
- reasoning_content: z3.string().nullish(),
886
- tool_calls: z3.array(
887
- z3.object({
888
- id: z3.string(),
889
- type: z3.literal("function"),
890
- function: z3.object({
891
- name: z3.string(),
892
- arguments: z3.string()
904
+ var xaiChatChunkSchema = z4.object({
905
+ id: z4.string().nullish(),
906
+ created: z4.number().nullish(),
907
+ model: z4.string().nullish(),
908
+ choices: z4.array(
909
+ z4.object({
910
+ delta: z4.object({
911
+ role: z4.enum(["assistant"]).optional(),
912
+ content: z4.string().nullish(),
913
+ reasoning_content: z4.string().nullish(),
914
+ tool_calls: z4.array(
915
+ z4.object({
916
+ id: z4.string(),
917
+ type: z4.literal("function"),
918
+ function: z4.object({
919
+ name: z4.string(),
920
+ arguments: z4.string()
893
921
  })
894
922
  })
895
923
  ).nullish()
896
924
  }),
897
- finish_reason: z3.string().nullish(),
898
- index: z3.number()
925
+ finish_reason: z4.string().nullish(),
926
+ index: z4.number()
899
927
  })
900
928
  ),
901
929
  usage: xaiUsageSchema.nullish(),
902
- citations: z3.array(z3.string().url()).nullish()
930
+ citations: z4.array(z4.string().url()).nullish()
903
931
  });
904
- var xaiStreamErrorSchema = z3.object({
905
- code: z3.string(),
906
- error: z3.string()
932
+ var xaiStreamErrorSchema = z4.object({
933
+ code: z4.string(),
934
+ error: z4.string()
907
935
  });
908
936
 
909
937
  // src/xai-image-model.ts
@@ -914,20 +942,20 @@ import {
914
942
  createJsonResponseHandler as createJsonResponseHandler2,
915
943
  createStatusCodeErrorResponseHandler,
916
944
  getFromApi,
917
- parseProviderOptions as parseProviderOptions2,
945
+ parseProviderOptions as parseProviderOptions3,
918
946
  postJsonToApi as postJsonToApi2
919
947
  } from "@ai-sdk/provider-utils";
920
- import { z as z5 } from "zod/v4";
948
+ import { z as z6 } from "zod/v4";
921
949
 
922
950
  // src/xai-image-options.ts
923
- import { z as z4 } from "zod/v4";
924
- var xaiImageModelOptions = z4.object({
925
- aspect_ratio: z4.string().optional(),
926
- output_format: z4.string().optional(),
927
- sync_mode: z4.boolean().optional(),
928
- resolution: z4.enum(["1k", "2k"]).optional(),
929
- quality: z4.enum(["low", "medium", "high"]).optional(),
930
- user: z4.string().optional()
951
+ import { z as z5 } from "zod/v4";
952
+ var xaiImageModelOptions = z5.object({
953
+ aspect_ratio: z5.string().optional(),
954
+ output_format: z5.string().optional(),
955
+ sync_mode: z5.boolean().optional(),
956
+ resolution: z5.enum(["1k", "2k"]).optional(),
957
+ quality: z5.enum(["low", "medium", "high"]).optional(),
958
+ user: z5.string().optional()
931
959
  });
932
960
 
933
961
  // src/xai-image-model.ts
@@ -974,7 +1002,7 @@ var XaiImageModel = class {
974
1002
  feature: "mask"
975
1003
  });
976
1004
  }
977
- const xaiOptions = await parseProviderOptions2({
1005
+ const xaiOptions = await parseProviderOptions3({
978
1006
  provider: "xai",
979
1007
  providerOptions,
980
1008
  schema: xaiImageModelOptions
@@ -1062,16 +1090,16 @@ var XaiImageModel = class {
1062
1090
  return value;
1063
1091
  }
1064
1092
  };
1065
- var xaiImageResponseSchema = z5.object({
1066
- data: z5.array(
1067
- z5.object({
1068
- url: z5.string().nullish(),
1069
- b64_json: z5.string().nullish(),
1070
- revised_prompt: z5.string().nullish()
1093
+ var xaiImageResponseSchema = z6.object({
1094
+ data: z6.array(
1095
+ z6.object({
1096
+ url: z6.string().nullish(),
1097
+ b64_json: z6.string().nullish(),
1098
+ revised_prompt: z6.string().nullish()
1071
1099
  })
1072
1100
  ),
1073
- usage: z5.object({
1074
- cost_in_usd_ticks: z5.number().nullish()
1101
+ usage: z6.object({
1102
+ cost_in_usd_ticks: z6.number().nullish()
1075
1103
  }).nullish()
1076
1104
  });
1077
1105
 
@@ -1080,7 +1108,7 @@ import {
1080
1108
  combineHeaders as combineHeaders3,
1081
1109
  createEventSourceResponseHandler as createEventSourceResponseHandler2,
1082
1110
  createJsonResponseHandler as createJsonResponseHandler3,
1083
- parseProviderOptions as parseProviderOptions3,
1111
+ parseProviderOptions as parseProviderOptions5,
1084
1112
  postJsonToApi as postJsonToApi3
1085
1113
  } from "@ai-sdk/provider-utils";
1086
1114
 
@@ -1088,7 +1116,7 @@ import {
1088
1116
  import {
1089
1117
  UnsupportedFunctionalityError as UnsupportedFunctionalityError3
1090
1118
  } from "@ai-sdk/provider";
1091
- import { convertToBase64 as convertToBase642 } from "@ai-sdk/provider-utils";
1119
+ import { convertToBase64 as convertToBase642, parseProviderOptions as parseProviderOptions4 } from "@ai-sdk/provider-utils";
1092
1120
  async function convertToXaiResponsesInput({
1093
1121
  prompt
1094
1122
  }) {
@@ -1116,7 +1144,18 @@ async function convertToXaiResponsesInput({
1116
1144
  if (block.mediaType.startsWith("image/")) {
1117
1145
  const mediaType = block.mediaType === "image/*" ? "image/jpeg" : block.mediaType;
1118
1146
  const imageUrl = block.data instanceof URL ? block.data.toString() : `data:${mediaType};base64,${convertToBase642(block.data)}`;
1119
- contentParts.push({ type: "input_image", image_url: imageUrl });
1147
+ const filePartOptions = await parseProviderOptions4({
1148
+ provider: "xai",
1149
+ providerOptions: block.providerOptions,
1150
+ schema: xaiFilePartProviderOptions
1151
+ });
1152
+ contentParts.push({
1153
+ type: "input_image",
1154
+ image_url: imageUrl,
1155
+ ...(filePartOptions == null ? void 0 : filePartOptions.imageDetail) != null && {
1156
+ detail: filePartOptions.imageDetail
1157
+ }
1158
+ });
1120
1159
  } else if (block.data instanceof URL) {
1121
1160
  contentParts.push({
1122
1161
  type: "input_file",
@@ -1314,461 +1353,461 @@ function mapXaiResponsesFinishReason(finishReason) {
1314
1353
  }
1315
1354
 
1316
1355
  // src/responses/xai-responses-api.ts
1317
- import { z as z6 } from "zod/v4";
1318
- var annotationSchema = z6.union([
1319
- z6.object({
1320
- type: z6.literal("url_citation"),
1321
- url: z6.string(),
1322
- title: z6.string().optional()
1356
+ import { z as z7 } from "zod/v4";
1357
+ var annotationSchema = z7.union([
1358
+ z7.object({
1359
+ type: z7.literal("url_citation"),
1360
+ url: z7.string(),
1361
+ title: z7.string().optional()
1323
1362
  }),
1324
- z6.object({
1325
- type: z6.string()
1363
+ z7.object({
1364
+ type: z7.string()
1326
1365
  })
1327
1366
  ]);
1328
- var messageContentPartSchema = z6.object({
1329
- type: z6.string(),
1330
- text: z6.string().optional(),
1331
- logprobs: z6.array(z6.any()).optional(),
1332
- annotations: z6.array(annotationSchema).optional()
1367
+ var messageContentPartSchema = z7.object({
1368
+ type: z7.string(),
1369
+ text: z7.string().optional(),
1370
+ logprobs: z7.array(z7.any()).optional(),
1371
+ annotations: z7.array(annotationSchema).optional()
1333
1372
  });
1334
- var reasoningSummaryPartSchema = z6.object({
1335
- type: z6.string(),
1336
- text: z6.string()
1373
+ var reasoningSummaryPartSchema = z7.object({
1374
+ type: z7.string(),
1375
+ text: z7.string()
1337
1376
  });
1338
- var toolCallSchema = z6.object({
1339
- name: z6.string().optional(),
1340
- arguments: z6.string().optional(),
1341
- input: z6.string().optional(),
1342
- call_id: z6.string().optional(),
1343
- id: z6.string(),
1344
- status: z6.string(),
1345
- action: z6.any().optional()
1377
+ var toolCallSchema = z7.object({
1378
+ name: z7.string().optional(),
1379
+ arguments: z7.string().optional(),
1380
+ input: z7.string().optional(),
1381
+ call_id: z7.string().optional(),
1382
+ id: z7.string(),
1383
+ status: z7.string(),
1384
+ action: z7.any().optional()
1346
1385
  });
1347
- var mcpCallSchema = z6.object({
1348
- name: z6.string().optional(),
1349
- arguments: z6.string().optional(),
1350
- output: z6.string().optional(),
1351
- error: z6.string().optional(),
1352
- id: z6.string(),
1353
- status: z6.string(),
1354
- server_label: z6.string().optional()
1386
+ var mcpCallSchema = z7.object({
1387
+ name: z7.string().optional(),
1388
+ arguments: z7.string().optional(),
1389
+ output: z7.string().optional(),
1390
+ error: z7.string().optional(),
1391
+ id: z7.string(),
1392
+ status: z7.string(),
1393
+ server_label: z7.string().optional()
1355
1394
  });
1356
- var outputItemSchema = z6.discriminatedUnion("type", [
1357
- z6.object({
1358
- type: z6.literal("web_search_call"),
1395
+ var outputItemSchema = z7.discriminatedUnion("type", [
1396
+ z7.object({
1397
+ type: z7.literal("web_search_call"),
1359
1398
  ...toolCallSchema.shape
1360
1399
  }),
1361
- z6.object({
1362
- type: z6.literal("x_search_call"),
1400
+ z7.object({
1401
+ type: z7.literal("x_search_call"),
1363
1402
  ...toolCallSchema.shape
1364
1403
  }),
1365
- z6.object({
1366
- type: z6.literal("code_interpreter_call"),
1404
+ z7.object({
1405
+ type: z7.literal("code_interpreter_call"),
1367
1406
  ...toolCallSchema.shape
1368
1407
  }),
1369
- z6.object({
1370
- type: z6.literal("code_execution_call"),
1408
+ z7.object({
1409
+ type: z7.literal("code_execution_call"),
1371
1410
  ...toolCallSchema.shape
1372
1411
  }),
1373
- z6.object({
1374
- type: z6.literal("view_image_call"),
1412
+ z7.object({
1413
+ type: z7.literal("view_image_call"),
1375
1414
  ...toolCallSchema.shape
1376
1415
  }),
1377
- z6.object({
1378
- type: z6.literal("view_x_video_call"),
1416
+ z7.object({
1417
+ type: z7.literal("view_x_video_call"),
1379
1418
  ...toolCallSchema.shape
1380
1419
  }),
1381
- z6.object({
1382
- type: z6.literal("file_search_call"),
1383
- id: z6.string(),
1384
- status: z6.string(),
1385
- queries: z6.array(z6.string()).optional(),
1386
- results: z6.array(
1387
- z6.object({
1388
- file_id: z6.string(),
1389
- filename: z6.string(),
1390
- score: z6.number(),
1391
- text: z6.string()
1420
+ z7.object({
1421
+ type: z7.literal("file_search_call"),
1422
+ id: z7.string(),
1423
+ status: z7.string(),
1424
+ queries: z7.array(z7.string()).optional(),
1425
+ results: z7.array(
1426
+ z7.object({
1427
+ file_id: z7.string(),
1428
+ filename: z7.string(),
1429
+ score: z7.number(),
1430
+ text: z7.string()
1392
1431
  })
1393
1432
  ).nullish()
1394
1433
  }),
1395
- z6.object({
1396
- type: z6.literal("custom_tool_call"),
1434
+ z7.object({
1435
+ type: z7.literal("custom_tool_call"),
1397
1436
  ...toolCallSchema.shape
1398
1437
  }),
1399
- z6.object({
1400
- type: z6.literal("mcp_call"),
1438
+ z7.object({
1439
+ type: z7.literal("mcp_call"),
1401
1440
  ...mcpCallSchema.shape
1402
1441
  }),
1403
- z6.object({
1404
- type: z6.literal("message"),
1405
- role: z6.string(),
1406
- content: z6.array(messageContentPartSchema),
1407
- id: z6.string(),
1408
- status: z6.string()
1442
+ z7.object({
1443
+ type: z7.literal("message"),
1444
+ role: z7.string(),
1445
+ content: z7.array(messageContentPartSchema),
1446
+ id: z7.string(),
1447
+ status: z7.string()
1409
1448
  }),
1410
- z6.object({
1411
- type: z6.literal("function_call"),
1412
- name: z6.string(),
1413
- arguments: z6.string(),
1414
- call_id: z6.string(),
1415
- id: z6.string()
1449
+ z7.object({
1450
+ type: z7.literal("function_call"),
1451
+ name: z7.string(),
1452
+ arguments: z7.string(),
1453
+ call_id: z7.string(),
1454
+ id: z7.string()
1416
1455
  }),
1417
- z6.object({
1418
- type: z6.literal("reasoning"),
1419
- id: z6.string(),
1420
- summary: z6.array(reasoningSummaryPartSchema),
1421
- content: z6.array(z6.object({ type: z6.string(), text: z6.string() })).nullish(),
1422
- status: z6.string(),
1423
- encrypted_content: z6.string().nullish()
1456
+ z7.object({
1457
+ type: z7.literal("reasoning"),
1458
+ id: z7.string(),
1459
+ summary: z7.array(reasoningSummaryPartSchema),
1460
+ content: z7.array(z7.object({ type: z7.string(), text: z7.string() })).nullish(),
1461
+ status: z7.string(),
1462
+ encrypted_content: z7.string().nullish()
1424
1463
  })
1425
1464
  ]);
1426
- var xaiResponsesUsageSchema = z6.object({
1427
- input_tokens: z6.number(),
1428
- output_tokens: z6.number(),
1429
- total_tokens: z6.number().optional(),
1430
- input_tokens_details: z6.object({
1431
- cached_tokens: z6.number().optional()
1465
+ var xaiResponsesUsageSchema = z7.object({
1466
+ input_tokens: z7.number(),
1467
+ output_tokens: z7.number(),
1468
+ total_tokens: z7.number().optional(),
1469
+ input_tokens_details: z7.object({
1470
+ cached_tokens: z7.number().optional()
1432
1471
  }).optional(),
1433
- output_tokens_details: z6.object({
1434
- reasoning_tokens: z6.number().optional()
1472
+ output_tokens_details: z7.object({
1473
+ reasoning_tokens: z7.number().optional()
1435
1474
  }).optional(),
1436
- num_sources_used: z6.number().optional(),
1437
- num_server_side_tools_used: z6.number().optional()
1475
+ num_sources_used: z7.number().optional(),
1476
+ num_server_side_tools_used: z7.number().optional()
1438
1477
  });
1439
- var xaiResponsesResponseSchema = z6.object({
1440
- id: z6.string().nullish(),
1441
- created_at: z6.number().nullish(),
1442
- model: z6.string().nullish(),
1443
- object: z6.literal("response"),
1444
- output: z6.array(outputItemSchema),
1478
+ var xaiResponsesResponseSchema = z7.object({
1479
+ id: z7.string().nullish(),
1480
+ created_at: z7.number().nullish(),
1481
+ model: z7.string().nullish(),
1482
+ object: z7.literal("response"),
1483
+ output: z7.array(outputItemSchema),
1445
1484
  usage: xaiResponsesUsageSchema.nullish(),
1446
- status: z6.string()
1485
+ status: z7.string()
1447
1486
  });
1448
- var xaiResponsesChunkSchema = z6.union([
1449
- z6.object({
1450
- type: z6.literal("response.created"),
1487
+ var xaiResponsesChunkSchema = z7.union([
1488
+ z7.object({
1489
+ type: z7.literal("response.created"),
1451
1490
  response: xaiResponsesResponseSchema.partial({ usage: true, status: true })
1452
1491
  }),
1453
- z6.object({
1454
- type: z6.literal("response.in_progress"),
1492
+ z7.object({
1493
+ type: z7.literal("response.in_progress"),
1455
1494
  response: xaiResponsesResponseSchema.partial({ usage: true, status: true })
1456
1495
  }),
1457
- z6.object({
1458
- type: z6.literal("response.output_item.added"),
1496
+ z7.object({
1497
+ type: z7.literal("response.output_item.added"),
1459
1498
  item: outputItemSchema,
1460
- output_index: z6.number()
1499
+ output_index: z7.number()
1461
1500
  }),
1462
- z6.object({
1463
- type: z6.literal("response.output_item.done"),
1501
+ z7.object({
1502
+ type: z7.literal("response.output_item.done"),
1464
1503
  item: outputItemSchema,
1465
- output_index: z6.number()
1504
+ output_index: z7.number()
1466
1505
  }),
1467
- z6.object({
1468
- type: z6.literal("response.content_part.added"),
1469
- item_id: z6.string(),
1470
- output_index: z6.number(),
1471
- content_index: z6.number(),
1506
+ z7.object({
1507
+ type: z7.literal("response.content_part.added"),
1508
+ item_id: z7.string(),
1509
+ output_index: z7.number(),
1510
+ content_index: z7.number(),
1472
1511
  part: messageContentPartSchema
1473
1512
  }),
1474
- z6.object({
1475
- type: z6.literal("response.content_part.done"),
1476
- item_id: z6.string(),
1477
- output_index: z6.number(),
1478
- content_index: z6.number(),
1513
+ z7.object({
1514
+ type: z7.literal("response.content_part.done"),
1515
+ item_id: z7.string(),
1516
+ output_index: z7.number(),
1517
+ content_index: z7.number(),
1479
1518
  part: messageContentPartSchema
1480
1519
  }),
1481
- z6.object({
1482
- type: z6.literal("response.output_text.delta"),
1483
- item_id: z6.string(),
1484
- output_index: z6.number(),
1485
- content_index: z6.number(),
1486
- delta: z6.string(),
1487
- logprobs: z6.array(z6.any()).optional()
1520
+ z7.object({
1521
+ type: z7.literal("response.output_text.delta"),
1522
+ item_id: z7.string(),
1523
+ output_index: z7.number(),
1524
+ content_index: z7.number(),
1525
+ delta: z7.string(),
1526
+ logprobs: z7.array(z7.any()).optional()
1488
1527
  }),
1489
- z6.object({
1490
- type: z6.literal("response.output_text.done"),
1491
- item_id: z6.string(),
1492
- output_index: z6.number(),
1493
- content_index: z6.number(),
1494
- text: z6.string(),
1495
- logprobs: z6.array(z6.any()).optional(),
1496
- annotations: z6.array(annotationSchema).optional()
1528
+ z7.object({
1529
+ type: z7.literal("response.output_text.done"),
1530
+ item_id: z7.string(),
1531
+ output_index: z7.number(),
1532
+ content_index: z7.number(),
1533
+ text: z7.string(),
1534
+ logprobs: z7.array(z7.any()).optional(),
1535
+ annotations: z7.array(annotationSchema).optional()
1497
1536
  }),
1498
- z6.object({
1499
- type: z6.literal("response.output_text.annotation.added"),
1500
- item_id: z6.string(),
1501
- output_index: z6.number(),
1502
- content_index: z6.number(),
1503
- annotation_index: z6.number(),
1537
+ z7.object({
1538
+ type: z7.literal("response.output_text.annotation.added"),
1539
+ item_id: z7.string(),
1540
+ output_index: z7.number(),
1541
+ content_index: z7.number(),
1542
+ annotation_index: z7.number(),
1504
1543
  annotation: annotationSchema
1505
1544
  }),
1506
- z6.object({
1507
- type: z6.literal("response.reasoning_summary_part.added"),
1508
- item_id: z6.string(),
1509
- output_index: z6.number(),
1510
- summary_index: z6.number(),
1545
+ z7.object({
1546
+ type: z7.literal("response.reasoning_summary_part.added"),
1547
+ item_id: z7.string(),
1548
+ output_index: z7.number(),
1549
+ summary_index: z7.number(),
1511
1550
  part: reasoningSummaryPartSchema
1512
1551
  }),
1513
- z6.object({
1514
- type: z6.literal("response.reasoning_summary_part.done"),
1515
- item_id: z6.string(),
1516
- output_index: z6.number(),
1517
- summary_index: z6.number(),
1552
+ z7.object({
1553
+ type: z7.literal("response.reasoning_summary_part.done"),
1554
+ item_id: z7.string(),
1555
+ output_index: z7.number(),
1556
+ summary_index: z7.number(),
1518
1557
  part: reasoningSummaryPartSchema
1519
1558
  }),
1520
- z6.object({
1521
- type: z6.literal("response.reasoning_summary_text.delta"),
1522
- item_id: z6.string(),
1523
- output_index: z6.number(),
1524
- summary_index: z6.number(),
1525
- delta: z6.string()
1559
+ z7.object({
1560
+ type: z7.literal("response.reasoning_summary_text.delta"),
1561
+ item_id: z7.string(),
1562
+ output_index: z7.number(),
1563
+ summary_index: z7.number(),
1564
+ delta: z7.string()
1526
1565
  }),
1527
- z6.object({
1528
- type: z6.literal("response.reasoning_summary_text.done"),
1529
- item_id: z6.string(),
1530
- output_index: z6.number(),
1531
- summary_index: z6.number(),
1532
- text: z6.string()
1566
+ z7.object({
1567
+ type: z7.literal("response.reasoning_summary_text.done"),
1568
+ item_id: z7.string(),
1569
+ output_index: z7.number(),
1570
+ summary_index: z7.number(),
1571
+ text: z7.string()
1533
1572
  }),
1534
- z6.object({
1535
- type: z6.literal("response.reasoning_text.delta"),
1536
- item_id: z6.string(),
1537
- output_index: z6.number(),
1538
- content_index: z6.number(),
1539
- delta: z6.string()
1573
+ z7.object({
1574
+ type: z7.literal("response.reasoning_text.delta"),
1575
+ item_id: z7.string(),
1576
+ output_index: z7.number(),
1577
+ content_index: z7.number(),
1578
+ delta: z7.string()
1540
1579
  }),
1541
- z6.object({
1542
- type: z6.literal("response.reasoning_text.done"),
1543
- item_id: z6.string(),
1544
- output_index: z6.number(),
1545
- content_index: z6.number(),
1546
- text: z6.string()
1580
+ z7.object({
1581
+ type: z7.literal("response.reasoning_text.done"),
1582
+ item_id: z7.string(),
1583
+ output_index: z7.number(),
1584
+ content_index: z7.number(),
1585
+ text: z7.string()
1547
1586
  }),
1548
- z6.object({
1549
- type: z6.literal("response.web_search_call.in_progress"),
1550
- item_id: z6.string(),
1551
- output_index: z6.number()
1587
+ z7.object({
1588
+ type: z7.literal("response.web_search_call.in_progress"),
1589
+ item_id: z7.string(),
1590
+ output_index: z7.number()
1552
1591
  }),
1553
- z6.object({
1554
- type: z6.literal("response.web_search_call.searching"),
1555
- item_id: z6.string(),
1556
- output_index: z6.number()
1592
+ z7.object({
1593
+ type: z7.literal("response.web_search_call.searching"),
1594
+ item_id: z7.string(),
1595
+ output_index: z7.number()
1557
1596
  }),
1558
- z6.object({
1559
- type: z6.literal("response.web_search_call.completed"),
1560
- item_id: z6.string(),
1561
- output_index: z6.number()
1597
+ z7.object({
1598
+ type: z7.literal("response.web_search_call.completed"),
1599
+ item_id: z7.string(),
1600
+ output_index: z7.number()
1562
1601
  }),
1563
- z6.object({
1564
- type: z6.literal("response.x_search_call.in_progress"),
1565
- item_id: z6.string(),
1566
- output_index: z6.number()
1602
+ z7.object({
1603
+ type: z7.literal("response.x_search_call.in_progress"),
1604
+ item_id: z7.string(),
1605
+ output_index: z7.number()
1567
1606
  }),
1568
- z6.object({
1569
- type: z6.literal("response.x_search_call.searching"),
1570
- item_id: z6.string(),
1571
- output_index: z6.number()
1607
+ z7.object({
1608
+ type: z7.literal("response.x_search_call.searching"),
1609
+ item_id: z7.string(),
1610
+ output_index: z7.number()
1572
1611
  }),
1573
- z6.object({
1574
- type: z6.literal("response.x_search_call.completed"),
1575
- item_id: z6.string(),
1576
- output_index: z6.number()
1612
+ z7.object({
1613
+ type: z7.literal("response.x_search_call.completed"),
1614
+ item_id: z7.string(),
1615
+ output_index: z7.number()
1577
1616
  }),
1578
- z6.object({
1579
- type: z6.literal("response.file_search_call.in_progress"),
1580
- item_id: z6.string(),
1581
- output_index: z6.number()
1617
+ z7.object({
1618
+ type: z7.literal("response.file_search_call.in_progress"),
1619
+ item_id: z7.string(),
1620
+ output_index: z7.number()
1582
1621
  }),
1583
- z6.object({
1584
- type: z6.literal("response.file_search_call.searching"),
1585
- item_id: z6.string(),
1586
- output_index: z6.number()
1622
+ z7.object({
1623
+ type: z7.literal("response.file_search_call.searching"),
1624
+ item_id: z7.string(),
1625
+ output_index: z7.number()
1587
1626
  }),
1588
- z6.object({
1589
- type: z6.literal("response.file_search_call.completed"),
1590
- item_id: z6.string(),
1591
- output_index: z6.number()
1627
+ z7.object({
1628
+ type: z7.literal("response.file_search_call.completed"),
1629
+ item_id: z7.string(),
1630
+ output_index: z7.number()
1592
1631
  }),
1593
- z6.object({
1594
- type: z6.literal("response.code_execution_call.in_progress"),
1595
- item_id: z6.string(),
1596
- output_index: z6.number()
1632
+ z7.object({
1633
+ type: z7.literal("response.code_execution_call.in_progress"),
1634
+ item_id: z7.string(),
1635
+ output_index: z7.number()
1597
1636
  }),
1598
- z6.object({
1599
- type: z6.literal("response.code_execution_call.executing"),
1600
- item_id: z6.string(),
1601
- output_index: z6.number()
1637
+ z7.object({
1638
+ type: z7.literal("response.code_execution_call.executing"),
1639
+ item_id: z7.string(),
1640
+ output_index: z7.number()
1602
1641
  }),
1603
- z6.object({
1604
- type: z6.literal("response.code_execution_call.completed"),
1605
- item_id: z6.string(),
1606
- output_index: z6.number()
1642
+ z7.object({
1643
+ type: z7.literal("response.code_execution_call.completed"),
1644
+ item_id: z7.string(),
1645
+ output_index: z7.number()
1607
1646
  }),
1608
- z6.object({
1609
- type: z6.literal("response.code_interpreter_call.in_progress"),
1610
- item_id: z6.string(),
1611
- output_index: z6.number()
1647
+ z7.object({
1648
+ type: z7.literal("response.code_interpreter_call.in_progress"),
1649
+ item_id: z7.string(),
1650
+ output_index: z7.number()
1612
1651
  }),
1613
- z6.object({
1614
- type: z6.literal("response.code_interpreter_call.executing"),
1615
- item_id: z6.string(),
1616
- output_index: z6.number()
1652
+ z7.object({
1653
+ type: z7.literal("response.code_interpreter_call.executing"),
1654
+ item_id: z7.string(),
1655
+ output_index: z7.number()
1617
1656
  }),
1618
- z6.object({
1619
- type: z6.literal("response.code_interpreter_call.interpreting"),
1620
- item_id: z6.string(),
1621
- output_index: z6.number()
1657
+ z7.object({
1658
+ type: z7.literal("response.code_interpreter_call.interpreting"),
1659
+ item_id: z7.string(),
1660
+ output_index: z7.number()
1622
1661
  }),
1623
- z6.object({
1624
- type: z6.literal("response.code_interpreter_call.completed"),
1625
- item_id: z6.string(),
1626
- output_index: z6.number()
1662
+ z7.object({
1663
+ type: z7.literal("response.code_interpreter_call.completed"),
1664
+ item_id: z7.string(),
1665
+ output_index: z7.number()
1627
1666
  }),
1628
1667
  // Code interpreter code streaming events
1629
- z6.object({
1630
- type: z6.literal("response.code_interpreter_call_code.delta"),
1631
- item_id: z6.string(),
1632
- output_index: z6.number(),
1633
- delta: z6.string()
1668
+ z7.object({
1669
+ type: z7.literal("response.code_interpreter_call_code.delta"),
1670
+ item_id: z7.string(),
1671
+ output_index: z7.number(),
1672
+ delta: z7.string()
1634
1673
  }),
1635
- z6.object({
1636
- type: z6.literal("response.code_interpreter_call_code.done"),
1637
- item_id: z6.string(),
1638
- output_index: z6.number(),
1639
- code: z6.string()
1674
+ z7.object({
1675
+ type: z7.literal("response.code_interpreter_call_code.done"),
1676
+ item_id: z7.string(),
1677
+ output_index: z7.number(),
1678
+ code: z7.string()
1640
1679
  }),
1641
- z6.object({
1642
- type: z6.literal("response.custom_tool_call_input.delta"),
1643
- item_id: z6.string(),
1644
- output_index: z6.number(),
1645
- delta: z6.string()
1680
+ z7.object({
1681
+ type: z7.literal("response.custom_tool_call_input.delta"),
1682
+ item_id: z7.string(),
1683
+ output_index: z7.number(),
1684
+ delta: z7.string()
1646
1685
  }),
1647
- z6.object({
1648
- type: z6.literal("response.custom_tool_call_input.done"),
1649
- item_id: z6.string(),
1650
- output_index: z6.number(),
1651
- input: z6.string()
1686
+ z7.object({
1687
+ type: z7.literal("response.custom_tool_call_input.done"),
1688
+ item_id: z7.string(),
1689
+ output_index: z7.number(),
1690
+ input: z7.string()
1652
1691
  }),
1653
1692
  // Function call arguments streaming events (standard function tools)
1654
- z6.object({
1655
- type: z6.literal("response.function_call_arguments.delta"),
1656
- item_id: z6.string(),
1657
- output_index: z6.number(),
1658
- delta: z6.string()
1693
+ z7.object({
1694
+ type: z7.literal("response.function_call_arguments.delta"),
1695
+ item_id: z7.string(),
1696
+ output_index: z7.number(),
1697
+ delta: z7.string()
1659
1698
  }),
1660
- z6.object({
1661
- type: z6.literal("response.function_call_arguments.done"),
1662
- item_id: z6.string(),
1663
- output_index: z6.number(),
1664
- arguments: z6.string()
1699
+ z7.object({
1700
+ type: z7.literal("response.function_call_arguments.done"),
1701
+ item_id: z7.string(),
1702
+ output_index: z7.number(),
1703
+ arguments: z7.string()
1665
1704
  }),
1666
- z6.object({
1667
- type: z6.literal("response.mcp_call.in_progress"),
1668
- item_id: z6.string(),
1669
- output_index: z6.number()
1705
+ z7.object({
1706
+ type: z7.literal("response.mcp_call.in_progress"),
1707
+ item_id: z7.string(),
1708
+ output_index: z7.number()
1670
1709
  }),
1671
- z6.object({
1672
- type: z6.literal("response.mcp_call.executing"),
1673
- item_id: z6.string(),
1674
- output_index: z6.number()
1710
+ z7.object({
1711
+ type: z7.literal("response.mcp_call.executing"),
1712
+ item_id: z7.string(),
1713
+ output_index: z7.number()
1675
1714
  }),
1676
- z6.object({
1677
- type: z6.literal("response.mcp_call.completed"),
1678
- item_id: z6.string(),
1679
- output_index: z6.number()
1715
+ z7.object({
1716
+ type: z7.literal("response.mcp_call.completed"),
1717
+ item_id: z7.string(),
1718
+ output_index: z7.number()
1680
1719
  }),
1681
- z6.object({
1682
- type: z6.literal("response.mcp_call.failed"),
1683
- item_id: z6.string(),
1684
- output_index: z6.number()
1720
+ z7.object({
1721
+ type: z7.literal("response.mcp_call.failed"),
1722
+ item_id: z7.string(),
1723
+ output_index: z7.number()
1685
1724
  }),
1686
- z6.object({
1687
- type: z6.literal("response.mcp_call_arguments.delta"),
1688
- item_id: z6.string(),
1689
- output_index: z6.number(),
1690
- delta: z6.string()
1725
+ z7.object({
1726
+ type: z7.literal("response.mcp_call_arguments.delta"),
1727
+ item_id: z7.string(),
1728
+ output_index: z7.number(),
1729
+ delta: z7.string()
1691
1730
  }),
1692
- z6.object({
1693
- type: z6.literal("response.mcp_call_arguments.done"),
1694
- item_id: z6.string(),
1695
- output_index: z6.number(),
1696
- arguments: z6.string().optional()
1731
+ z7.object({
1732
+ type: z7.literal("response.mcp_call_arguments.done"),
1733
+ item_id: z7.string(),
1734
+ output_index: z7.number(),
1735
+ arguments: z7.string().optional()
1697
1736
  }),
1698
- z6.object({
1699
- type: z6.literal("response.mcp_call_output.delta"),
1700
- item_id: z6.string(),
1701
- output_index: z6.number(),
1702
- delta: z6.string()
1737
+ z7.object({
1738
+ type: z7.literal("response.mcp_call_output.delta"),
1739
+ item_id: z7.string(),
1740
+ output_index: z7.number(),
1741
+ delta: z7.string()
1703
1742
  }),
1704
- z6.object({
1705
- type: z6.literal("response.mcp_call_output.done"),
1706
- item_id: z6.string(),
1707
- output_index: z6.number(),
1708
- output: z6.string().optional()
1743
+ z7.object({
1744
+ type: z7.literal("response.mcp_call_output.done"),
1745
+ item_id: z7.string(),
1746
+ output_index: z7.number(),
1747
+ output: z7.string().optional()
1709
1748
  }),
1710
- z6.object({
1711
- type: z6.literal("response.incomplete"),
1712
- response: z6.object({
1713
- incomplete_details: z6.object({ reason: z6.string() }).nullish(),
1749
+ z7.object({
1750
+ type: z7.literal("response.incomplete"),
1751
+ response: z7.object({
1752
+ incomplete_details: z7.object({ reason: z7.string() }).nullish(),
1714
1753
  usage: xaiResponsesUsageSchema.nullish()
1715
1754
  })
1716
1755
  }),
1717
- z6.object({
1718
- type: z6.literal("response.failed"),
1719
- response: z6.object({
1720
- error: z6.object({
1721
- code: z6.string().nullish(),
1722
- message: z6.string()
1756
+ z7.object({
1757
+ type: z7.literal("response.failed"),
1758
+ response: z7.object({
1759
+ error: z7.object({
1760
+ code: z7.string().nullish(),
1761
+ message: z7.string()
1723
1762
  }).nullish(),
1724
- incomplete_details: z6.object({ reason: z6.string() }).nullish(),
1763
+ incomplete_details: z7.object({ reason: z7.string() }).nullish(),
1725
1764
  usage: xaiResponsesUsageSchema.nullish()
1726
1765
  })
1727
1766
  }),
1728
- z6.object({
1729
- type: z6.literal("error"),
1730
- code: z6.string().nullish(),
1731
- message: z6.string(),
1732
- param: z6.string().nullish()
1767
+ z7.object({
1768
+ type: z7.literal("error"),
1769
+ code: z7.string().nullish(),
1770
+ message: z7.string(),
1771
+ param: z7.string().nullish()
1733
1772
  }),
1734
- z6.object({
1735
- type: z6.literal("response.done"),
1773
+ z7.object({
1774
+ type: z7.literal("response.done"),
1736
1775
  response: xaiResponsesResponseSchema
1737
1776
  }),
1738
- z6.object({
1739
- type: z6.literal("response.completed"),
1777
+ z7.object({
1778
+ type: z7.literal("response.completed"),
1740
1779
  response: xaiResponsesResponseSchema
1741
1780
  })
1742
1781
  ]);
1743
1782
 
1744
1783
  // src/responses/xai-responses-options.ts
1745
- import { z as z7 } from "zod/v4";
1746
- var xaiLanguageModelResponsesOptions = z7.object({
1784
+ import { z as z8 } from "zod/v4";
1785
+ var xaiLanguageModelResponsesOptions = z8.object({
1747
1786
  /**
1748
1787
  * Constrains how hard a reasoning model thinks before responding.
1749
1788
  * Possible values are `none` (disables reasoning), `low` (uses fewer reasoning
1750
1789
  * tokens), `medium` and `high` (uses more reasoning tokens). Not all models
1751
1790
  * support reasoning effort; see xAI's docs for the values each model accepts.
1752
1791
  */
1753
- reasoningEffort: z7.enum(["none", "low", "medium", "high"]).optional(),
1754
- logprobs: z7.boolean().optional(),
1755
- topLogprobs: z7.number().int().min(0).max(8).optional(),
1792
+ reasoningEffort: z8.enum(["none", "low", "medium", "high"]).optional(),
1793
+ logprobs: z8.boolean().optional(),
1794
+ topLogprobs: z8.number().int().min(0).max(8).optional(),
1756
1795
  /**
1757
1796
  * Whether to store the input message(s) and model response for later retrieval.
1758
1797
  * Must be set to `false` for teams with Zero Data Retention (ZDR) enabled,
1759
1798
  * otherwise the API will return an error.
1760
1799
  * @default true
1761
1800
  */
1762
- store: z7.boolean().optional(),
1801
+ store: z8.boolean().optional(),
1763
1802
  /**
1764
1803
  * The ID of the previous response from the model.
1765
1804
  */
1766
- previousResponseId: z7.string().optional(),
1805
+ previousResponseId: z8.string().optional(),
1767
1806
  /**
1768
1807
  * Specify additional output data to include in the model response.
1769
1808
  * Example values: 'file_search_call.results'.
1770
1809
  */
1771
- include: z7.array(z7.enum(["file_search_call.results"])).nullish()
1810
+ include: z8.array(z8.enum(["file_search_call.results"])).nullish()
1772
1811
  });
1773
1812
 
1774
1813
  // src/responses/xai-responses-prepare-tools.ts
@@ -1783,25 +1822,25 @@ import {
1783
1822
  lazySchema,
1784
1823
  zodSchema
1785
1824
  } from "@ai-sdk/provider-utils";
1786
- import { z as z8 } from "zod/v4";
1825
+ import { z as z9 } from "zod/v4";
1787
1826
  var fileSearchArgsSchema = lazySchema(
1788
1827
  () => zodSchema(
1789
- z8.object({
1790
- vectorStoreIds: z8.array(z8.string()),
1791
- maxNumResults: z8.number().optional()
1828
+ z9.object({
1829
+ vectorStoreIds: z9.array(z9.string()),
1830
+ maxNumResults: z9.number().optional()
1792
1831
  })
1793
1832
  )
1794
1833
  );
1795
1834
  var fileSearchOutputSchema = lazySchema(
1796
1835
  () => zodSchema(
1797
- z8.object({
1798
- queries: z8.array(z8.string()),
1799
- results: z8.array(
1800
- z8.object({
1801
- fileId: z8.string(),
1802
- filename: z8.string(),
1803
- score: z8.number().min(0).max(1),
1804
- text: z8.string()
1836
+ z9.object({
1837
+ queries: z9.array(z9.string()),
1838
+ results: z9.array(
1839
+ z9.object({
1840
+ fileId: z9.string(),
1841
+ filename: z9.string(),
1842
+ score: z9.number().min(0).max(1),
1843
+ text: z9.string()
1805
1844
  })
1806
1845
  ).nullable()
1807
1846
  })
@@ -1809,7 +1848,7 @@ var fileSearchOutputSchema = lazySchema(
1809
1848
  );
1810
1849
  var fileSearchToolFactory = createProviderToolFactoryWithOutputSchema({
1811
1850
  id: "xai.file_search",
1812
- inputSchema: lazySchema(() => zodSchema(z8.object({}))),
1851
+ inputSchema: lazySchema(() => zodSchema(z9.object({}))),
1813
1852
  outputSchema: fileSearchOutputSchema
1814
1853
  });
1815
1854
  var fileSearch = (args) => fileSearchToolFactory(args);
@@ -1820,31 +1859,31 @@ import {
1820
1859
  lazySchema as lazySchema2,
1821
1860
  zodSchema as zodSchema2
1822
1861
  } from "@ai-sdk/provider-utils";
1823
- import { z as z9 } from "zod/v4";
1862
+ import { z as z10 } from "zod/v4";
1824
1863
  var mcpServerArgsSchema = lazySchema2(
1825
1864
  () => zodSchema2(
1826
- z9.object({
1827
- serverUrl: z9.string().describe("The URL of the MCP server"),
1828
- serverLabel: z9.string().optional().describe("A label for the MCP server"),
1829
- serverDescription: z9.string().optional().describe("Description of the MCP server"),
1830
- allowedTools: z9.array(z9.string()).optional().describe("List of allowed tool names"),
1831
- headers: z9.record(z9.string(), z9.string()).optional().describe("Custom headers to send"),
1832
- authorization: z9.string().optional().describe("Authorization header value")
1865
+ z10.object({
1866
+ serverUrl: z10.string().describe("The URL of the MCP server"),
1867
+ serverLabel: z10.string().optional().describe("A label for the MCP server"),
1868
+ serverDescription: z10.string().optional().describe("Description of the MCP server"),
1869
+ allowedTools: z10.array(z10.string()).optional().describe("List of allowed tool names"),
1870
+ headers: z10.record(z10.string(), z10.string()).optional().describe("Custom headers to send"),
1871
+ authorization: z10.string().optional().describe("Authorization header value")
1833
1872
  })
1834
1873
  )
1835
1874
  );
1836
1875
  var mcpServerOutputSchema = lazySchema2(
1837
1876
  () => zodSchema2(
1838
- z9.object({
1839
- name: z9.string(),
1840
- arguments: z9.string(),
1841
- result: z9.unknown()
1877
+ z10.object({
1878
+ name: z10.string(),
1879
+ arguments: z10.string(),
1880
+ result: z10.unknown()
1842
1881
  })
1843
1882
  )
1844
1883
  );
1845
1884
  var mcpServerToolFactory = createProviderToolFactoryWithOutputSchema2({
1846
1885
  id: "xai.mcp",
1847
- inputSchema: lazySchema2(() => zodSchema2(z9.object({}))),
1886
+ inputSchema: lazySchema2(() => zodSchema2(z10.object({}))),
1848
1887
  outputSchema: mcpServerOutputSchema
1849
1888
  });
1850
1889
  var mcpServer = (args) => mcpServerToolFactory(args);
@@ -1855,26 +1894,26 @@ import {
1855
1894
  lazySchema as lazySchema3,
1856
1895
  zodSchema as zodSchema3
1857
1896
  } from "@ai-sdk/provider-utils";
1858
- import { z as z10 } from "zod/v4";
1897
+ import { z as z11 } from "zod/v4";
1859
1898
  var webSearchArgsSchema = lazySchema3(
1860
1899
  () => zodSchema3(
1861
- z10.object({
1862
- allowedDomains: z10.array(z10.string()).max(5).optional(),
1863
- excludedDomains: z10.array(z10.string()).max(5).optional(),
1864
- enableImageSearch: z10.boolean().optional(),
1865
- enableImageUnderstanding: z10.boolean().optional()
1900
+ z11.object({
1901
+ allowedDomains: z11.array(z11.string()).max(5).optional(),
1902
+ excludedDomains: z11.array(z11.string()).max(5).optional(),
1903
+ enableImageSearch: z11.boolean().optional(),
1904
+ enableImageUnderstanding: z11.boolean().optional()
1866
1905
  })
1867
1906
  )
1868
1907
  );
1869
1908
  var webSearchOutputSchema = lazySchema3(
1870
1909
  () => zodSchema3(
1871
- z10.object({
1872
- query: z10.string(),
1873
- sources: z10.array(
1874
- z10.object({
1875
- title: z10.string(),
1876
- url: z10.string(),
1877
- snippet: z10.string()
1910
+ z11.object({
1911
+ query: z11.string(),
1912
+ sources: z11.array(
1913
+ z11.object({
1914
+ title: z11.string(),
1915
+ url: z11.string(),
1916
+ snippet: z11.string()
1878
1917
  })
1879
1918
  )
1880
1919
  })
@@ -1882,7 +1921,7 @@ var webSearchOutputSchema = lazySchema3(
1882
1921
  );
1883
1922
  var webSearchToolFactory = createProviderToolFactoryWithOutputSchema3({
1884
1923
  id: "xai.web_search",
1885
- inputSchema: lazySchema3(() => zodSchema3(z10.object({}))),
1924
+ inputSchema: lazySchema3(() => zodSchema3(z11.object({}))),
1886
1925
  outputSchema: webSearchOutputSchema
1887
1926
  });
1888
1927
  var webSearch = (args = {}) => webSearchToolFactory(args);
@@ -1893,29 +1932,29 @@ import {
1893
1932
  lazySchema as lazySchema4,
1894
1933
  zodSchema as zodSchema4
1895
1934
  } from "@ai-sdk/provider-utils";
1896
- import { z as z11 } from "zod/v4";
1935
+ import { z as z12 } from "zod/v4";
1897
1936
  var xSearchArgsSchema = lazySchema4(
1898
1937
  () => zodSchema4(
1899
- z11.object({
1900
- allowedXHandles: z11.array(z11.string()).max(10).optional(),
1901
- excludedXHandles: z11.array(z11.string()).max(10).optional(),
1902
- fromDate: z11.string().optional(),
1903
- toDate: z11.string().optional(),
1904
- enableImageUnderstanding: z11.boolean().optional(),
1905
- enableVideoUnderstanding: z11.boolean().optional()
1938
+ z12.object({
1939
+ allowedXHandles: z12.array(z12.string()).max(10).optional(),
1940
+ excludedXHandles: z12.array(z12.string()).max(10).optional(),
1941
+ fromDate: z12.string().optional(),
1942
+ toDate: z12.string().optional(),
1943
+ enableImageUnderstanding: z12.boolean().optional(),
1944
+ enableVideoUnderstanding: z12.boolean().optional()
1906
1945
  })
1907
1946
  )
1908
1947
  );
1909
1948
  var xSearchOutputSchema = lazySchema4(
1910
1949
  () => zodSchema4(
1911
- z11.object({
1912
- query: z11.string(),
1913
- posts: z11.array(
1914
- z11.object({
1915
- author: z11.string(),
1916
- text: z11.string(),
1917
- url: z11.string(),
1918
- likes: z11.number()
1950
+ z12.object({
1951
+ query: z12.string(),
1952
+ posts: z12.array(
1953
+ z12.object({
1954
+ author: z12.string(),
1955
+ text: z12.string(),
1956
+ url: z12.string(),
1957
+ likes: z12.number()
1919
1958
  })
1920
1959
  )
1921
1960
  })
@@ -1923,7 +1962,7 @@ var xSearchOutputSchema = lazySchema4(
1923
1962
  );
1924
1963
  var xSearchToolFactory = createProviderToolFactoryWithOutputSchema4({
1925
1964
  id: "xai.x_search",
1926
- inputSchema: lazySchema4(() => zodSchema4(z11.object({}))),
1965
+ inputSchema: lazySchema4(() => zodSchema4(z12.object({}))),
1927
1966
  outputSchema: xSearchOutputSchema
1928
1967
  });
1929
1968
  var xSearch = (args = {}) => xSearchToolFactory(args);
@@ -2111,7 +2150,7 @@ var XaiResponsesLanguageModel = class {
2111
2150
  }) {
2112
2151
  var _a, _b, _c, _d, _e, _f, _g, _h;
2113
2152
  const warnings = [];
2114
- const options = (_a = await parseProviderOptions3({
2153
+ const options = (_a = await parseProviderOptions5({
2115
2154
  provider: "xai",
2116
2155
  providerOptions,
2117
2156
  schema: xaiLanguageModelResponsesOptions
@@ -2820,43 +2859,43 @@ var XaiResponsesLanguageModel = class {
2820
2859
 
2821
2860
  // src/tool/code-execution.ts
2822
2861
  import { createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema5 } from "@ai-sdk/provider-utils";
2823
- import { z as z12 } from "zod/v4";
2824
- var codeExecutionOutputSchema = z12.object({
2825
- output: z12.string().describe("the output of the code execution"),
2826
- error: z12.string().optional().describe("any error that occurred")
2862
+ import { z as z13 } from "zod/v4";
2863
+ var codeExecutionOutputSchema = z13.object({
2864
+ output: z13.string().describe("the output of the code execution"),
2865
+ error: z13.string().optional().describe("any error that occurred")
2827
2866
  });
2828
2867
  var codeExecutionToolFactory = createProviderToolFactoryWithOutputSchema5({
2829
2868
  id: "xai.code_execution",
2830
- inputSchema: z12.object({}).describe("no input parameters"),
2869
+ inputSchema: z13.object({}).describe("no input parameters"),
2831
2870
  outputSchema: codeExecutionOutputSchema
2832
2871
  });
2833
2872
  var codeExecution = (args = {}) => codeExecutionToolFactory(args);
2834
2873
 
2835
2874
  // src/tool/view-image.ts
2836
2875
  import { createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema6 } from "@ai-sdk/provider-utils";
2837
- import { z as z13 } from "zod/v4";
2838
- var viewImageOutputSchema = z13.object({
2839
- description: z13.string().describe("description of the image"),
2840
- objects: z13.array(z13.string()).optional().describe("objects detected in the image")
2876
+ import { z as z14 } from "zod/v4";
2877
+ var viewImageOutputSchema = z14.object({
2878
+ description: z14.string().describe("description of the image"),
2879
+ objects: z14.array(z14.string()).optional().describe("objects detected in the image")
2841
2880
  });
2842
2881
  var viewImageToolFactory = createProviderToolFactoryWithOutputSchema6({
2843
2882
  id: "xai.view_image",
2844
- inputSchema: z13.object({}).describe("no input parameters"),
2883
+ inputSchema: z14.object({}).describe("no input parameters"),
2845
2884
  outputSchema: viewImageOutputSchema
2846
2885
  });
2847
2886
  var viewImage = (args = {}) => viewImageToolFactory(args);
2848
2887
 
2849
2888
  // src/tool/view-x-video.ts
2850
2889
  import { createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema7 } from "@ai-sdk/provider-utils";
2851
- import { z as z14 } from "zod/v4";
2852
- var viewXVideoOutputSchema = z14.object({
2853
- transcript: z14.string().optional().describe("transcript of the video"),
2854
- description: z14.string().describe("description of the video content"),
2855
- duration: z14.number().optional().describe("duration in seconds")
2890
+ import { z as z15 } from "zod/v4";
2891
+ var viewXVideoOutputSchema = z15.object({
2892
+ transcript: z15.string().optional().describe("transcript of the video"),
2893
+ description: z15.string().describe("description of the video content"),
2894
+ duration: z15.number().optional().describe("duration in seconds")
2856
2895
  });
2857
2896
  var viewXVideoToolFactory = createProviderToolFactoryWithOutputSchema7({
2858
2897
  id: "xai.view_x_video",
2859
- inputSchema: z14.object({}).describe("no input parameters"),
2898
+ inputSchema: z15.object({}).describe("no input parameters"),
2860
2899
  outputSchema: viewXVideoOutputSchema
2861
2900
  });
2862
2901
  var viewXVideo = (args = {}) => viewXVideoToolFactory(args);
@@ -2873,7 +2912,7 @@ var xaiTools = {
2873
2912
  };
2874
2913
 
2875
2914
  // src/version.ts
2876
- var VERSION = true ? "3.0.104" : "0.0.0-test";
2915
+ var VERSION = true ? "3.0.105" : "0.0.0-test";
2877
2916
 
2878
2917
  // src/xai-video-model.ts
2879
2918
  import {
@@ -2885,56 +2924,56 @@ import {
2885
2924
  createJsonResponseHandler as createJsonResponseHandler4,
2886
2925
  delay,
2887
2926
  getFromApi as getFromApi2,
2888
- parseProviderOptions as parseProviderOptions4,
2927
+ parseProviderOptions as parseProviderOptions6,
2889
2928
  postJsonToApi as postJsonToApi4
2890
2929
  } from "@ai-sdk/provider-utils";
2891
- import { z as z16 } from "zod/v4";
2930
+ import { z as z17 } from "zod/v4";
2892
2931
 
2893
2932
  // src/xai-video-options.ts
2894
2933
  import { lazySchema as lazySchema5, zodSchema as zodSchema5 } from "@ai-sdk/provider-utils";
2895
- import { z as z15 } from "zod/v4";
2896
- var nonEmptyStringSchema = z15.string().min(1);
2897
- var resolutionSchema = z15.enum(["480p", "720p"]);
2898
- var modeSchema = z15.enum(["edit-video", "extend-video", "reference-to-video"]);
2934
+ import { z as z16 } from "zod/v4";
2935
+ var nonEmptyStringSchema = z16.string().min(1);
2936
+ var resolutionSchema = z16.enum(["480p", "720p"]);
2937
+ var modeSchema = z16.enum(["edit-video", "extend-video", "reference-to-video"]);
2899
2938
  var baseFields = {
2900
- pollIntervalMs: z15.number().positive().nullish(),
2901
- pollTimeoutMs: z15.number().positive().nullish(),
2939
+ pollIntervalMs: z16.number().positive().nullish(),
2940
+ pollTimeoutMs: z16.number().positive().nullish(),
2902
2941
  resolution: resolutionSchema.nullish()
2903
2942
  };
2904
- var editVideoSchema = z15.object({
2943
+ var editVideoSchema = z16.object({
2905
2944
  ...baseFields,
2906
- mode: z15.literal("edit-video"),
2945
+ mode: z16.literal("edit-video"),
2907
2946
  videoUrl: nonEmptyStringSchema,
2908
- referenceImageUrls: z15.undefined().optional()
2947
+ referenceImageUrls: z16.undefined().optional()
2909
2948
  });
2910
- var extendVideoSchema = z15.object({
2949
+ var extendVideoSchema = z16.object({
2911
2950
  ...baseFields,
2912
- mode: z15.literal("extend-video"),
2951
+ mode: z16.literal("extend-video"),
2913
2952
  videoUrl: nonEmptyStringSchema,
2914
- referenceImageUrls: z15.undefined().optional()
2953
+ referenceImageUrls: z16.undefined().optional()
2915
2954
  });
2916
- var referenceToVideoSchema = z15.object({
2955
+ var referenceToVideoSchema = z16.object({
2917
2956
  ...baseFields,
2918
- mode: z15.literal("reference-to-video"),
2919
- referenceImageUrls: z15.array(nonEmptyStringSchema).min(1).max(7),
2920
- videoUrl: z15.undefined().optional()
2957
+ mode: z16.literal("reference-to-video"),
2958
+ referenceImageUrls: z16.array(nonEmptyStringSchema).min(1).max(7),
2959
+ videoUrl: z16.undefined().optional()
2921
2960
  });
2922
- var autoDetectSchema = z15.object({
2961
+ var autoDetectSchema = z16.object({
2923
2962
  ...baseFields,
2924
- mode: z15.undefined().optional(),
2963
+ mode: z16.undefined().optional(),
2925
2964
  videoUrl: nonEmptyStringSchema.optional(),
2926
- referenceImageUrls: z15.array(nonEmptyStringSchema).min(1).max(7).optional()
2965
+ referenceImageUrls: z16.array(nonEmptyStringSchema).min(1).max(7).optional()
2927
2966
  });
2928
- var xaiVideoModelOptions = z15.union([
2967
+ var xaiVideoModelOptions = z16.union([
2929
2968
  editVideoSchema,
2930
2969
  extendVideoSchema,
2931
2970
  referenceToVideoSchema,
2932
2971
  autoDetectSchema
2933
2972
  ]);
2934
- var runtimeSchema = z15.object({
2973
+ var runtimeSchema = z16.object({
2935
2974
  mode: modeSchema.optional(),
2936
2975
  videoUrl: nonEmptyStringSchema.optional(),
2937
- referenceImageUrls: z15.array(nonEmptyStringSchema).min(1).max(7).optional(),
2976
+ referenceImageUrls: z16.array(nonEmptyStringSchema).min(1).max(7).optional(),
2938
2977
  ...baseFields
2939
2978
  }).passthrough();
2940
2979
  var xaiVideoModelOptionsSchema = lazySchema5(
@@ -3007,7 +3046,7 @@ var XaiVideoModel = class {
3007
3046
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
3008
3047
  const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();
3009
3048
  const warnings = [];
3010
- const xaiOptions = await parseProviderOptions4({
3049
+ const xaiOptions = await parseProviderOptions6({
3011
3050
  provider: "xai",
3012
3051
  providerOptions: options.providerOptions,
3013
3052
  schema: xaiVideoModelOptionsSchema
@@ -3246,24 +3285,24 @@ var XaiVideoModel = class {
3246
3285
  }
3247
3286
  }
3248
3287
  };
3249
- var xaiCreateVideoResponseSchema = z16.object({
3250
- request_id: z16.string().nullish()
3288
+ var xaiCreateVideoResponseSchema = z17.object({
3289
+ request_id: z17.string().nullish()
3251
3290
  });
3252
- var xaiVideoStatusResponseSchema = z16.object({
3253
- status: z16.string().nullish(),
3254
- video: z16.object({
3255
- url: z16.string(),
3256
- duration: z16.number().nullish(),
3257
- respect_moderation: z16.boolean().nullish()
3291
+ var xaiVideoStatusResponseSchema = z17.object({
3292
+ status: z17.string().nullish(),
3293
+ video: z17.object({
3294
+ url: z17.string(),
3295
+ duration: z17.number().nullish(),
3296
+ respect_moderation: z17.boolean().nullish()
3258
3297
  }).nullish(),
3259
- model: z16.string().nullish(),
3260
- usage: z16.object({
3261
- cost_in_usd_ticks: z16.number().nullish()
3298
+ model: z17.string().nullish(),
3299
+ usage: z17.object({
3300
+ cost_in_usd_ticks: z17.number().nullish()
3262
3301
  }).nullish(),
3263
- progress: z16.number().nullish(),
3264
- error: z16.object({
3265
- code: z16.string().nullish(),
3266
- message: z16.string().nullish()
3302
+ progress: z17.number().nullish(),
3303
+ error: z17.object({
3304
+ code: z17.string().nullish(),
3305
+ message: z17.string().nullish()
3267
3306
  }).nullish()
3268
3307
  });
3269
3308