@ai-sdk/xai 5.0.11 → 5.0.13

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.d.ts CHANGED
@@ -1,178 +1,182 @@
1
- import { z } from 'zod/v4';
2
- import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
3
- import { InferSchema, FetchFunction, WebSocketConstructor } from '@ai-sdk/provider-utils';
4
- import { ProviderV4, LanguageModelV4, Experimental_BatchV4, ImageModelV4, Experimental_VideoModelV4, Experimental_RealtimeFactoryV4, SpeechModelV4, TranscriptionModelV4, FilesV4, Experimental_RealtimeModelV4, Experimental_RealtimeModelV4ClientSecretOptions, Experimental_RealtimeModelV4ClientSecretResult, Experimental_RealtimeModelV4ServerEvent, Experimental_RealtimeModelV4ClientEvent, Experimental_RealtimeModelV4SessionConfig } from '@ai-sdk/provider';
5
-
1
+ import { Experimental_BatchV4, Experimental_RealtimeFactoryV4, Experimental_RealtimeModelV4, Experimental_RealtimeModelV4ClientEvent, Experimental_RealtimeModelV4ClientSecretOptions, Experimental_RealtimeModelV4ClientSecretResult, Experimental_RealtimeModelV4ServerEvent, Experimental_RealtimeModelV4SessionConfig, Experimental_VideoModelV4, FilesV4, ImageModelV4, LanguageModelV4, ProviderV4, SpeechModelV4, TranscriptionModelV4 } from "@ai-sdk/provider";
2
+ import { FetchFunction, InferSchema, WebSocketConstructor } from "@ai-sdk/provider-utils";
3
+ import { z } from "zod/v4";
4
+ //#region src/xai-error.d.ts
6
5
  declare const xaiErrorDataSchema: z.ZodUnion<readonly [z.ZodObject<{
7
- error: z.ZodObject<{
8
- message: z.ZodString;
9
- type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
- param: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
11
- code: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
12
- }, z.core.$strip>;
6
+ error: z.ZodObject<{
7
+ message: z.ZodString;
8
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
+ param: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
10
+ code: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
11
+ }, z.core.$strip>;
13
12
  }, z.core.$strip>, z.ZodObject<{
14
- code: z.ZodString;
15
- error: z.ZodString;
13
+ code: z.ZodString;
14
+ error: z.ZodString;
16
15
  }, z.core.$strip>, z.ZodObject<{
17
- error: z.ZodString;
16
+ error: z.ZodString;
18
17
  }, z.core.$strip>]>;
19
18
  type XaiErrorData = z.infer<typeof xaiErrorDataSchema>;
20
-
19
+ //#endregion
20
+ //#region src/xai-file-part-options.d.ts
21
21
  declare const xaiFilePartProviderOptions: z.ZodObject<{
22
- imageDetail: z.ZodOptional<z.ZodEnum<{
23
- low: "low";
24
- high: "high";
25
- auto: "auto";
26
- }>>;
22
+ imageDetail: z.ZodOptional<z.ZodEnum<{
23
+ low: "low";
24
+ high: "high";
25
+ auto: "auto";
26
+ }>>;
27
27
  }, z.core.$strip>;
28
28
  type XaiFilePartProviderOptions = z.infer<typeof xaiFilePartProviderOptions>;
29
-
29
+ //#endregion
30
+ //#region src/responses/xai-responses-language-model-options.d.ts
30
31
  type XaiResponsesModelId = 'grok-4.20-non-reasoning' | 'grok-4.20-reasoning' | 'grok-4.3' | 'grok-4.5' | 'grok-4.6' | 'grok-4.7' | 'grok-latest' | (string & {});
31
32
  /**
32
33
  * @see https://docs.x.ai/docs/api-reference#create-new-response
33
34
  */
34
35
  declare const xaiLanguageModelResponsesOptions: z.ZodObject<{
35
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
36
- low: "low";
37
- high: "high";
38
- none: "none";
39
- medium: "medium";
40
- xhigh: "xhigh";
41
- }>>;
42
- reasoningSummary: z.ZodOptional<z.ZodEnum<{
43
- auto: "auto";
44
- concise: "concise";
45
- detailed: "detailed";
46
- }>>;
47
- logprobs: z.ZodOptional<z.ZodBoolean>;
48
- topLogprobs: z.ZodOptional<z.ZodNumber>;
49
- minP: z.ZodOptional<z.ZodNumber>;
50
- maxTurns: z.ZodOptional<z.ZodNumber>;
51
- parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
52
- promptCacheKey: z.ZodOptional<z.ZodString>;
53
- safetyIdentifier: z.ZodOptional<z.ZodString>;
54
- serviceTier: z.ZodOptional<z.ZodEnum<{
55
- default: "default";
56
- priority: "priority";
57
- }>>;
58
- store: z.ZodOptional<z.ZodBoolean>;
59
- previousResponseId: z.ZodOptional<z.ZodString>;
60
- user: z.ZodOptional<z.ZodString>;
61
- include: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
62
- "file_search_call.results": "file_search_call.results";
63
- "web_search_call.action.sources": "web_search_call.action.sources";
64
- "code_interpreter_call.outputs": "code_interpreter_call.outputs";
65
- "reasoning.encrypted_content": "reasoning.encrypted_content";
66
- no_inline_citations: "no_inline_citations";
67
- }>>>>;
36
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
37
+ low: "low";
38
+ high: "high";
39
+ none: "none";
40
+ medium: "medium";
41
+ xhigh: "xhigh";
42
+ }>>;
43
+ reasoningSummary: z.ZodOptional<z.ZodEnum<{
44
+ auto: "auto";
45
+ concise: "concise";
46
+ detailed: "detailed";
47
+ }>>;
48
+ logprobs: z.ZodOptional<z.ZodBoolean>;
49
+ topLogprobs: z.ZodOptional<z.ZodNumber>;
50
+ minP: z.ZodOptional<z.ZodNumber>;
51
+ maxTurns: z.ZodOptional<z.ZodNumber>;
52
+ parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
53
+ promptCacheKey: z.ZodOptional<z.ZodString>;
54
+ safetyIdentifier: z.ZodOptional<z.ZodString>;
55
+ serviceTier: z.ZodOptional<z.ZodEnum<{
56
+ default: "default";
57
+ priority: "priority";
58
+ }>>;
59
+ store: z.ZodOptional<z.ZodBoolean>;
60
+ previousResponseId: z.ZodOptional<z.ZodString>;
61
+ user: z.ZodOptional<z.ZodString>;
62
+ include: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
63
+ "file_search_call.results": "file_search_call.results";
64
+ "web_search_call.action.sources": "web_search_call.action.sources";
65
+ "code_interpreter_call.outputs": "code_interpreter_call.outputs";
66
+ "reasoning.encrypted_content": "reasoning.encrypted_content";
67
+ no_inline_citations: "no_inline_citations";
68
+ }>>>>;
68
69
  }, z.core.$strip>;
69
70
  type XaiLanguageModelResponsesOptions = z.infer<typeof xaiLanguageModelResponsesOptions>;
70
-
71
+ //#endregion
72
+ //#region src/xai-image-model-options.d.ts
71
73
  declare const xaiImageModelOptions: z.ZodObject<{
72
- aspect_ratio: z.ZodOptional<z.ZodString>;
73
- output_format: z.ZodOptional<z.ZodString>;
74
- sync_mode: z.ZodOptional<z.ZodBoolean>;
75
- resolution: z.ZodOptional<z.ZodEnum<{
76
- "1k": "1k";
77
- "2k": "2k";
78
- }>>;
79
- quality: z.ZodOptional<z.ZodEnum<{
80
- low: "low";
81
- high: "high";
82
- medium: "medium";
83
- }>>;
84
- user: z.ZodOptional<z.ZodString>;
74
+ aspect_ratio: z.ZodOptional<z.ZodString>;
75
+ output_format: z.ZodOptional<z.ZodString>;
76
+ sync_mode: z.ZodOptional<z.ZodBoolean>;
77
+ resolution: z.ZodOptional<z.ZodEnum<{
78
+ "1k": "1k";
79
+ "2k": "2k";
80
+ }>>;
81
+ quality: z.ZodOptional<z.ZodEnum<{
82
+ low: "low";
83
+ high: "high";
84
+ medium: "medium";
85
+ }>>;
86
+ user: z.ZodOptional<z.ZodString>;
85
87
  }, z.core.$strip>;
86
88
  type XaiImageModelOptions = z.infer<typeof xaiImageModelOptions>;
87
-
89
+ //#endregion
90
+ //#region src/xai-video-settings.d.ts
88
91
  type XaiVideoModelId = 'grok-imagine-video' | 'grok-imagine-video-1.5' | (string & {});
89
-
92
+ //#endregion
93
+ //#region src/xai-video-model-options.d.ts
90
94
  declare const resolutionSchema: z.ZodEnum<{
91
- "480p": "480p";
92
- "720p": "720p";
93
- "1080p": "1080p";
95
+ "480p": "480p";
96
+ "720p": "720p";
97
+ "1080p": "1080p";
94
98
  }>;
95
99
  type XaiVideoResolution = z.infer<typeof resolutionSchema>;
96
100
  declare const keyframeSchema: z.ZodObject<{
97
- imageUrl: z.ZodString;
98
- timestampSeconds: z.ZodNumber;
101
+ imageUrl: z.ZodString;
102
+ timestampSeconds: z.ZodNumber;
99
103
  }, z.core.$strip>;
100
104
  declare const storageOptionsSchema: z.ZodObject<{
101
- filename: z.ZodString;
105
+ filename: z.ZodString;
106
+ expiresAfter: z.ZodOptional<z.ZodNumber>;
107
+ publicUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
102
108
  expiresAfter: z.ZodOptional<z.ZodNumber>;
103
- publicUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
104
- expiresAfter: z.ZodOptional<z.ZodNumber>;
105
- }, z.core.$strip>]>>;
109
+ }, z.core.$strip>]>>;
106
110
  }, z.core.$strip>;
107
111
  type XaiVideoKeyframe = z.infer<typeof keyframeSchema>;
108
112
  type XaiVideoStorageOptions = z.infer<typeof storageOptionsSchema>;
109
113
  interface XaiVideoSharedOptions {
110
- pollIntervalMs?: number | null;
111
- pollTimeoutMs?: number | null;
112
- resolution?: XaiVideoResolution | null;
113
- /** Store the generated video in the xAI Files API. */
114
- storageOptions?: XaiVideoStorageOptions;
114
+ pollIntervalMs?: number | null;
115
+ pollTimeoutMs?: number | null;
116
+ resolution?: XaiVideoResolution | null;
117
+ /** Store the generated video in the xAI Files API. */
118
+ storageOptions?: XaiVideoStorageOptions;
115
119
  }
116
120
  interface XaiVideoUserOptions {
117
- /**
118
- * A unique identifier representing the end user, for abuse monitoring.
119
- */
120
- user?: string;
121
+ /**
122
+ * A unique identifier representing the end user, for abuse monitoring.
123
+ */
124
+ user?: string;
121
125
  }
122
126
  interface XaiVideoEditModeOptions extends XaiVideoSharedOptions, XaiVideoUserOptions {
123
- /**
124
- * Select edit-video mode explicitly for best autocomplete and narrowing.
125
- */
126
- mode: 'edit-video';
127
- /** Source video URL to edit. */
128
- videoUrl: string;
127
+ /**
128
+ * Select edit-video mode explicitly for best autocomplete and narrowing.
129
+ */
130
+ mode: 'edit-video';
131
+ /** Source video URL to edit. */
132
+ videoUrl: string;
129
133
  }
130
134
  interface XaiVideoExtendModeOptions extends XaiVideoSharedOptions {
131
- /**
132
- * Select extend-video mode explicitly for best autocomplete and narrowing.
133
- */
134
- mode: 'extend-video';
135
- /** Source video URL to extend from its last frame. */
136
- videoUrl: string;
135
+ /**
136
+ * Select extend-video mode explicitly for best autocomplete and narrowing.
137
+ */
138
+ mode: 'extend-video';
139
+ /** Source video URL to extend from its last frame. */
140
+ videoUrl: string;
137
141
  }
138
142
  interface XaiVideoReferenceToVideoOptions extends XaiVideoSharedOptions, XaiVideoUserOptions {
139
- /**
140
- * Select reference-to-video mode explicitly for best autocomplete and narrowing.
141
- */
142
- mode: 'reference-to-video';
143
- /** Reference image URLs (1-7) for R2V generation. */
144
- referenceImageUrls: string[];
145
- /**
146
- * Preset voice ids (up to 3) that give the subject a voice.
147
- */
148
- referenceVoiceIds?: string[];
143
+ /**
144
+ * Select reference-to-video mode explicitly for best autocomplete and narrowing.
145
+ */
146
+ mode: 'reference-to-video';
147
+ /** Reference image URLs (1-7) for R2V generation. */
148
+ referenceImageUrls: string[];
149
+ /**
150
+ * Preset voice ids (up to 3) that give the subject a voice.
151
+ */
152
+ referenceVoiceIds?: string[];
149
153
  }
150
154
  interface XaiVideoGenerationOptions extends XaiVideoSharedOptions, XaiVideoUserOptions {
151
- mode?: undefined;
152
- videoUrl?: undefined;
153
- referenceImageUrls?: undefined;
154
- /** Mid-video image anchors (up to 4). */
155
- keyframes?: XaiVideoKeyframe[];
155
+ mode?: undefined;
156
+ videoUrl?: undefined;
157
+ referenceImageUrls?: undefined;
158
+ /** Mid-video image anchors (up to 4). */
159
+ keyframes?: XaiVideoKeyframe[];
156
160
  }
157
161
  interface XaiLegacyEditVideoOptions extends XaiVideoSharedOptions, XaiVideoUserOptions {
158
- /**
159
- * Legacy backward-compatible shape: omitting `mode` while providing
160
- * `videoUrl` behaves like edit-video.
161
- */
162
- mode?: undefined;
163
- videoUrl: string;
162
+ /**
163
+ * Legacy backward-compatible shape: omitting `mode` while providing
164
+ * `videoUrl` behaves like edit-video.
165
+ */
166
+ mode?: undefined;
167
+ videoUrl: string;
164
168
  }
165
169
  interface XaiLegacyReferenceToVideoOptions extends XaiVideoSharedOptions, XaiVideoUserOptions {
166
- /**
167
- * Legacy backward-compatible shape: omitting `mode` while providing
168
- * `referenceImageUrls` behaves like reference-to-video.
169
- */
170
- mode?: undefined;
171
- referenceImageUrls: string[];
172
- /**
173
- * Preset voice ids (up to 3) that give the subject a voice.
174
- */
175
- referenceVoiceIds?: string[];
170
+ /**
171
+ * Legacy backward-compatible shape: omitting `mode` while providing
172
+ * `referenceImageUrls` behaves like reference-to-video.
173
+ */
174
+ mode?: undefined;
175
+ referenceImageUrls: string[];
176
+ /**
177
+ * Preset voice ids (up to 3) that give the subject a voice.
178
+ */
179
+ referenceVoiceIds?: string[];
176
180
  }
177
181
  /**
178
182
  * Provider options for xAI video generation.
@@ -189,441 +193,457 @@ interface XaiLegacyReferenceToVideoOptions extends XaiVideoSharedOptions, XaiVid
189
193
  * can suggest valid modes and flag invalid field combinations.
190
194
  */
191
195
  type XaiVideoModelOptions = XaiVideoGenerationOptions | XaiVideoEditModeOptions | XaiVideoExtendModeOptions | XaiVideoReferenceToVideoOptions | XaiLegacyEditVideoOptions | XaiLegacyReferenceToVideoOptions;
192
-
193
- declare const xaiSpeechModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
194
- sampleRate?: 8000 | 16000 | 22050 | 24000 | 44100 | 48000 | null | undefined;
195
- bitRate?: 32000 | 64000 | 96000 | 128000 | 192000 | null | undefined;
196
- optimizeStreamingLatency?: 0 | 2 | 1 | null | undefined;
197
- textNormalization?: boolean | null | undefined;
198
- withTimestamps?: boolean | null | undefined;
199
- replace?: Record<string, string> | null | undefined;
196
+ //#endregion
197
+ //#region src/xai-speech-model-options.d.ts
198
+ declare const xaiSpeechModelOptionsSchema: import("@ai-sdk/provider-utils").LazySchema<{
199
+ sampleRate?: 8000 | 16000 | 22050 | 24000 | 44100 | 48000 | null | undefined;
200
+ bitRate?: 32000 | 64000 | 96000 | 128000 | 192000 | null | undefined;
201
+ optimizeStreamingLatency?: 0 | 2 | 1 | null | undefined;
202
+ textNormalization?: boolean | null | undefined;
203
+ withTimestamps?: boolean | null | undefined;
204
+ replace?: Record<string, string> | null | undefined;
200
205
  }>;
201
206
  type XaiSpeechModelOptions = InferSchema<typeof xaiSpeechModelOptionsSchema>;
202
-
203
- declare const xaiTranscriptionModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
204
- audioFormat?: "pcm" | "mulaw" | "alaw" | null | undefined;
205
- sampleRate?: 8000 | 16000 | 22050 | 24000 | 44100 | 48000 | null | undefined;
206
- language?: string | null | undefined;
207
- format?: boolean | null | undefined;
208
- multichannel?: boolean | null | undefined;
209
- channels?: number | null | undefined;
210
- diarize?: boolean | null | undefined;
211
- keyterm?: string | string[] | null | undefined;
212
- fillerWords?: boolean | null | undefined;
213
- streaming?: {
214
- interimResults?: boolean | undefined;
215
- endpointing?: number | undefined;
216
- smartTurn?: number | undefined;
217
- smartTurnTimeout?: number | undefined;
218
- } | undefined;
207
+ //#endregion
208
+ //#region src/xai-transcription-model-options.d.ts
209
+ declare const xaiTranscriptionModelOptionsSchema: import("@ai-sdk/provider-utils").LazySchema<{
210
+ audioFormat?: "pcm" | "mulaw" | "alaw" | null | undefined;
211
+ sampleRate?: 8000 | 16000 | 22050 | 24000 | 44100 | 48000 | null | undefined;
212
+ language?: string | null | undefined;
213
+ format?: boolean | null | undefined;
214
+ multichannel?: boolean | null | undefined;
215
+ channels?: number | null | undefined;
216
+ diarize?: boolean | null | undefined;
217
+ keyterm?: string | string[] | null | undefined;
218
+ fillerWords?: boolean | null | undefined;
219
+ streaming?: {
220
+ interimResults?: boolean | undefined;
221
+ endpointing?: number | undefined;
222
+ smartTurn?: number | undefined;
223
+ smartTurnTimeout?: number | undefined;
224
+ } | undefined;
219
225
  }>;
220
226
  type XaiTranscriptionModelOptions = InferSchema<typeof xaiTranscriptionModelOptionsSchema>;
221
-
222
- declare const xaiFilesOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
223
- [x: string]: unknown;
224
- teamId?: string | undefined;
225
- filePath?: string | undefined;
226
- expiresAfter?: number | undefined;
227
+ //#endregion
228
+ //#region src/files/xai-files-options.d.ts
229
+ declare const xaiFilesOptionsSchema: import("@ai-sdk/provider-utils").LazySchema<{
230
+ [x: string]: unknown;
231
+ teamId?: string | undefined;
232
+ filePath?: string | undefined;
233
+ expiresAfter?: number | undefined;
227
234
  }>;
228
235
  type XaiFilesOptions = InferSchema<typeof xaiFilesOptionsSchema>;
229
-
236
+ //#endregion
237
+ //#region src/xai-image-settings.d.ts
230
238
  type XaiImageModelId = 'grok-imagine-image' | 'grok-imagine-image-pro' | (string & {});
231
-
232
- declare const codeExecutionToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<Record<string, never>, {
239
+ //#endregion
240
+ //#region src/tool/code-execution.d.ts
241
+ declare const codeExecutionToolFactory: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<Record<string, never>, {
242
+ output: string;
243
+ error?: string | undefined;
244
+ }, object, {}>;
245
+ export declare const codeExecution: (args?: Parameters<typeof codeExecutionToolFactory>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<Record<string, never>, {
246
+ output: string;
247
+ error?: string | undefined;
248
+ }, {}>;
249
+ //#endregion
250
+ //#region src/tool/image-generation.d.ts
251
+ declare const imageGenerationToolFactory: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
252
+ /**
253
+ * The generated image encoded in base64.
254
+ */
255
+ result: string;
256
+ /**
257
+ * The prompt that the model wrote for the image model.
258
+ */
259
+ prompt?: string;
260
+ }, {
261
+ /**
262
+ * Restricts what the tool can do. Defaults to 'auto'.
263
+ *
264
+ * - 'auto': the model can generate and edit images.
265
+ * - 'generate': text-to-image generation only.
266
+ * - 'edit': image editing only.
267
+ */
268
+ action?: "auto" | "generate" | "edit";
269
+ }, {}>;
270
+ export declare const imageGeneration: (args?: Parameters<typeof imageGenerationToolFactory>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{}, {
271
+ /**
272
+ * The generated image encoded in base64.
273
+ */
274
+ result: string;
275
+ /**
276
+ * The prompt that the model wrote for the image model.
277
+ */
278
+ prompt?: string;
279
+ }, {}>;
280
+ //#endregion
281
+ //#region src/tool/mcp-server.d.ts
282
+ declare const mcpServerToolFactory: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
283
+ name: string;
284
+ arguments: string;
285
+ result: unknown;
286
+ }, {
287
+ serverUrl: string;
288
+ serverLabel?: string;
289
+ serverDescription?: string;
290
+ allowedTools?: string[];
291
+ headers?: Record<string, string>;
292
+ authorization?: string;
293
+ }, {}>;
294
+ export declare const mcpServer: (args: Parameters<typeof mcpServerToolFactory>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{}, {
295
+ name: string;
296
+ arguments: string;
297
+ result: unknown;
298
+ }, {}>;
299
+ //#endregion
300
+ //#region src/tool/view-image.d.ts
301
+ declare const viewImageToolFactory: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<Record<string, never>, {
302
+ description: string;
303
+ objects?: string[] | undefined;
304
+ }, object, {}>;
305
+ export declare const viewImage: (args?: Parameters<typeof viewImageToolFactory>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<Record<string, never>, {
306
+ description: string;
307
+ objects?: string[] | undefined;
308
+ }, {}>;
309
+ //#endregion
310
+ //#region src/tool/view-x-video.d.ts
311
+ declare const viewXVideoToolFactory: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<Record<string, never>, {
312
+ description: string;
313
+ transcript?: string | undefined;
314
+ duration?: number | undefined;
315
+ }, object, {}>;
316
+ export declare const viewXVideo: (args?: Parameters<typeof viewXVideoToolFactory>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<Record<string, never>, {
317
+ description: string;
318
+ transcript?: string | undefined;
319
+ duration?: number | undefined;
320
+ }, {}>;
321
+ //#endregion
322
+ //#region src/tool/web-search.d.ts
323
+ declare const webSearchToolFactory: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
324
+ action?: {
325
+ type: "search";
326
+ query?: string;
327
+ queries?: string[];
328
+ } | {
329
+ type: "openPage";
330
+ url?: string | null;
331
+ } | {
332
+ type: "findInPage";
333
+ url?: string | null;
334
+ pattern?: string | null;
335
+ };
336
+ sources?: Array<{
337
+ type: "url";
338
+ url: string;
339
+ }>;
340
+ }, {
341
+ allowedDomains?: string[];
342
+ excludedDomains?: string[];
343
+ enableImageSearch?: boolean;
344
+ enableImageUnderstanding?: boolean;
345
+ }, {}>;
346
+ export declare const webSearch: (args?: Parameters<typeof webSearchToolFactory>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{}, {
347
+ action?: {
348
+ type: "search";
349
+ query?: string;
350
+ queries?: string[];
351
+ } | {
352
+ type: "openPage";
353
+ url?: string | null;
354
+ } | {
355
+ type: "findInPage";
356
+ url?: string | null;
357
+ pattern?: string | null;
358
+ };
359
+ sources?: Array<{
360
+ type: "url";
361
+ url: string;
362
+ }>;
363
+ }, {}>;
364
+ //#endregion
365
+ //#region src/tool/x-search.d.ts
366
+ declare const xSearchToolFactory: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
367
+ query: string;
368
+ posts: Array<{
369
+ author: string;
370
+ text: string;
371
+ url: string;
372
+ likes: number;
373
+ }>;
374
+ }, {
375
+ allowedXHandles?: string[];
376
+ excludedXHandles?: string[];
377
+ fromDate?: string;
378
+ toDate?: string;
379
+ enableImageUnderstanding?: boolean;
380
+ enableVideoUnderstanding?: boolean;
381
+ }, {}>;
382
+ export declare const xSearch: (args?: Parameters<typeof xSearchToolFactory>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{}, {
383
+ query: string;
384
+ posts: Array<{
385
+ author: string;
386
+ text: string;
387
+ url: string;
388
+ likes: number;
389
+ }>;
390
+ }, {}>;
391
+ //#endregion
392
+ //#region src/tool/index.d.ts
393
+ export declare const xaiTools: {
394
+ codeExecution: (args?: Parameters<import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<Record<string, never>, {
233
395
  output: string;
234
396
  error?: string | undefined;
235
- }, object, {}>;
236
- declare const codeExecution: (args?: Parameters<typeof codeExecutionToolFactory>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<Record<string, never>, {
397
+ }, object, {}>>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<Record<string, never>, {
237
398
  output: string;
238
399
  error?: string | undefined;
239
- }, {}>;
240
-
241
- declare const imageGenerationToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
242
- /**
243
- * The generated image encoded in base64.
244
- */
400
+ }, {}>;
401
+ fileSearch: (args: Parameters<import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
402
+ queries: string[];
403
+ results: null | {
404
+ fileId: string;
405
+ filename: string;
406
+ score: number;
407
+ text: string;
408
+ }[];
409
+ }, {
410
+ vectorStoreIds: string[];
411
+ maxNumResults?: number;
412
+ }, {}>>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{}, {
413
+ queries: string[];
414
+ results: null | {
415
+ fileId: string;
416
+ filename: string;
417
+ score: number;
418
+ text: string;
419
+ }[];
420
+ }, {}>;
421
+ imageGeneration: (args?: Parameters<import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
245
422
  result: string;
246
- /**
247
- * The prompt that the model wrote for the image model.
248
- */
249
423
  prompt?: string;
250
- }, {
251
- /**
252
- * Restricts what the tool can do. Defaults to 'auto'.
253
- *
254
- * - 'auto': the model can generate and edit images.
255
- * - 'generate': text-to-image generation only.
256
- * - 'edit': image editing only.
257
- */
424
+ }, {
258
425
  action?: "auto" | "generate" | "edit";
259
- }, {}>;
260
- declare const imageGeneration: (args?: Parameters<typeof imageGenerationToolFactory>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
261
- /**
262
- * The generated image encoded in base64.
263
- */
426
+ }, {}>>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{}, {
264
427
  result: string;
265
- /**
266
- * The prompt that the model wrote for the image model.
267
- */
268
428
  prompt?: string;
269
- }, {}>;
270
-
271
- declare const mcpServerToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
429
+ }, {}>;
430
+ mcpServer: (args: Parameters<import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
272
431
  name: string;
273
432
  arguments: string;
274
433
  result: unknown;
275
- }, {
434
+ }, {
276
435
  serverUrl: string;
277
436
  serverLabel?: string;
278
437
  serverDescription?: string;
279
438
  allowedTools?: string[];
280
439
  headers?: Record<string, string>;
281
440
  authorization?: string;
282
- }, {}>;
283
- declare const mcpServer: (args: Parameters<typeof mcpServerToolFactory>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
441
+ }, {}>>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{}, {
284
442
  name: string;
285
443
  arguments: string;
286
444
  result: unknown;
287
- }, {}>;
288
-
289
- declare const viewImageToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<Record<string, never>, {
445
+ }, {}>;
446
+ viewImage: (args?: Parameters<import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<Record<string, never>, {
290
447
  description: string;
291
448
  objects?: string[] | undefined;
292
- }, object, {}>;
293
- declare const viewImage: (args?: Parameters<typeof viewImageToolFactory>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<Record<string, never>, {
449
+ }, object, {}>>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<Record<string, never>, {
294
450
  description: string;
295
451
  objects?: string[] | undefined;
296
- }, {}>;
297
-
298
- declare const viewXVideoToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<Record<string, never>, {
452
+ }, {}>;
453
+ viewXVideo: (args?: Parameters<import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<Record<string, never>, {
299
454
  description: string;
300
455
  transcript?: string | undefined;
301
456
  duration?: number | undefined;
302
- }, object, {}>;
303
- declare const viewXVideo: (args?: Parameters<typeof viewXVideoToolFactory>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<Record<string, never>, {
457
+ }, object, {}>>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<Record<string, never>, {
304
458
  description: string;
305
459
  transcript?: string | undefined;
306
460
  duration?: number | undefined;
307
- }, {}>;
308
-
309
- declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
461
+ }, {}>;
462
+ webSearch: (args?: Parameters<import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
310
463
  action?: {
311
- type: "search";
312
- query?: string;
313
- queries?: string[];
464
+ type: "search";
465
+ query?: string;
466
+ queries?: string[];
314
467
  } | {
315
- type: "openPage";
316
- url?: string | null;
468
+ type: "openPage";
469
+ url?: string | null;
317
470
  } | {
318
- type: "findInPage";
319
- url?: string | null;
320
- pattern?: string | null;
471
+ type: "findInPage";
472
+ url?: string | null;
473
+ pattern?: string | null;
321
474
  };
322
475
  sources?: Array<{
323
- type: "url";
324
- url: string;
476
+ type: "url";
477
+ url: string;
325
478
  }>;
326
- }, {
479
+ }, {
327
480
  allowedDomains?: string[];
328
481
  excludedDomains?: string[];
329
482
  enableImageSearch?: boolean;
330
483
  enableImageUnderstanding?: boolean;
331
- }, {}>;
332
- declare const webSearch: (args?: Parameters<typeof webSearchToolFactory>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
484
+ }, {}>>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{}, {
333
485
  action?: {
334
- type: "search";
335
- query?: string;
336
- queries?: string[];
486
+ type: "search";
487
+ query?: string;
488
+ queries?: string[];
337
489
  } | {
338
- type: "openPage";
339
- url?: string | null;
490
+ type: "openPage";
491
+ url?: string | null;
340
492
  } | {
341
- type: "findInPage";
342
- url?: string | null;
343
- pattern?: string | null;
493
+ type: "findInPage";
494
+ url?: string | null;
495
+ pattern?: string | null;
344
496
  };
345
497
  sources?: Array<{
346
- type: "url";
347
- url: string;
498
+ type: "url";
499
+ url: string;
348
500
  }>;
349
- }, {}>;
350
-
351
- declare const xSearchToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
501
+ }, {}>;
502
+ xSearch: (args?: Parameters<import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
352
503
  query: string;
353
504
  posts: Array<{
354
- author: string;
355
- text: string;
356
- url: string;
357
- likes: number;
505
+ author: string;
506
+ text: string;
507
+ url: string;
508
+ likes: number;
358
509
  }>;
359
- }, {
510
+ }, {
360
511
  allowedXHandles?: string[];
361
512
  excludedXHandles?: string[];
362
513
  fromDate?: string;
363
514
  toDate?: string;
364
515
  enableImageUnderstanding?: boolean;
365
516
  enableVideoUnderstanding?: boolean;
366
- }, {}>;
367
- declare const xSearch: (args?: Parameters<typeof xSearchToolFactory>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
517
+ }, {}>>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{}, {
368
518
  query: string;
369
519
  posts: Array<{
370
- author: string;
371
- text: string;
372
- url: string;
373
- likes: number;
520
+ author: string;
521
+ text: string;
522
+ url: string;
523
+ likes: number;
374
524
  }>;
375
- }, {}>;
376
-
377
- declare const xaiTools: {
378
- codeExecution: (args?: Parameters<_ai_sdk_provider_utils.ProviderExecutedToolFactory<Record<string, never>, {
379
- output: string;
380
- error?: string | undefined;
381
- }, object, {}>>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<Record<string, never>, {
382
- output: string;
383
- error?: string | undefined;
384
- }, {}>;
385
- fileSearch: (args: Parameters<_ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
386
- queries: string[];
387
- results: null | {
388
- fileId: string;
389
- filename: string;
390
- score: number;
391
- text: string;
392
- }[];
393
- }, {
394
- vectorStoreIds: string[];
395
- maxNumResults?: number;
396
- }, {}>>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
397
- queries: string[];
398
- results: null | {
399
- fileId: string;
400
- filename: string;
401
- score: number;
402
- text: string;
403
- }[];
404
- }, {}>;
405
- imageGeneration: (args?: Parameters<_ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
406
- result: string;
407
- prompt?: string;
408
- }, {
409
- action?: "auto" | "generate" | "edit";
410
- }, {}>>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
411
- result: string;
412
- prompt?: string;
413
- }, {}>;
414
- mcpServer: (args: Parameters<_ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
415
- name: string;
416
- arguments: string;
417
- result: unknown;
418
- }, {
419
- serverUrl: string;
420
- serverLabel?: string;
421
- serverDescription?: string;
422
- allowedTools?: string[];
423
- headers?: Record<string, string>;
424
- authorization?: string;
425
- }, {}>>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
426
- name: string;
427
- arguments: string;
428
- result: unknown;
429
- }, {}>;
430
- viewImage: (args?: Parameters<_ai_sdk_provider_utils.ProviderExecutedToolFactory<Record<string, never>, {
431
- description: string;
432
- objects?: string[] | undefined;
433
- }, object, {}>>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<Record<string, never>, {
434
- description: string;
435
- objects?: string[] | undefined;
436
- }, {}>;
437
- viewXVideo: (args?: Parameters<_ai_sdk_provider_utils.ProviderExecutedToolFactory<Record<string, never>, {
438
- description: string;
439
- transcript?: string | undefined;
440
- duration?: number | undefined;
441
- }, object, {}>>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<Record<string, never>, {
442
- description: string;
443
- transcript?: string | undefined;
444
- duration?: number | undefined;
445
- }, {}>;
446
- webSearch: (args?: Parameters<_ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
447
- action?: {
448
- type: "search";
449
- query?: string;
450
- queries?: string[];
451
- } | {
452
- type: "openPage";
453
- url?: string | null;
454
- } | {
455
- type: "findInPage";
456
- url?: string | null;
457
- pattern?: string | null;
458
- };
459
- sources?: Array<{
460
- type: "url";
461
- url: string;
462
- }>;
463
- }, {
464
- allowedDomains?: string[];
465
- excludedDomains?: string[];
466
- enableImageSearch?: boolean;
467
- enableImageUnderstanding?: boolean;
468
- }, {}>>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
469
- action?: {
470
- type: "search";
471
- query?: string;
472
- queries?: string[];
473
- } | {
474
- type: "openPage";
475
- url?: string | null;
476
- } | {
477
- type: "findInPage";
478
- url?: string | null;
479
- pattern?: string | null;
480
- };
481
- sources?: Array<{
482
- type: "url";
483
- url: string;
484
- }>;
485
- }, {}>;
486
- xSearch: (args?: Parameters<_ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
487
- query: string;
488
- posts: Array<{
489
- author: string;
490
- text: string;
491
- url: string;
492
- likes: number;
493
- }>;
494
- }, {
495
- allowedXHandles?: string[];
496
- excludedXHandles?: string[];
497
- fromDate?: string;
498
- toDate?: string;
499
- enableImageUnderstanding?: boolean;
500
- enableVideoUnderstanding?: boolean;
501
- }, {}>>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
502
- query: string;
503
- posts: Array<{
504
- author: string;
505
- text: string;
506
- url: string;
507
- likes: number;
508
- }>;
509
- }, {}>;
525
+ }, {}>;
510
526
  };
511
-
527
+ //#endregion
528
+ //#region src/xai-provider.d.ts
512
529
  interface XaiProvider extends ProviderV4 {
513
- (modelId: XaiResponsesModelId): LanguageModelV4;
514
- /**
515
- * Creates an Xai language model for text generation.
516
- */
517
- languageModel(modelId: XaiResponsesModelId): LanguageModelV4;
518
- /**
519
- * Creates an Xai responses model for text generation.
520
- */
521
- responses: (modelId: XaiResponsesModelId) => LanguageModelV4;
522
- /**
523
- * Returns a BatchV4 interface for processing batches with xAI.
524
- */
525
- experimental_batch(): Experimental_BatchV4<{
526
- text: XaiResponsesModelId;
527
- image: XaiImageModelId;
528
- }>;
529
- /**
530
- * Creates an Xai image model for image generation.
531
- */
532
- image(modelId: XaiImageModelId): ImageModelV4;
533
- /**
534
- * Creates an Xai image model for image generation.
535
- */
536
- imageModel(modelId: XaiImageModelId): ImageModelV4;
537
- /**
538
- * Creates an Xai video model for video generation.
539
- */
540
- video(modelId: XaiVideoModelId): Experimental_VideoModelV4;
541
- /**
542
- * Creates an Xai video model for video generation.
543
- */
544
- videoModel(modelId: XaiVideoModelId): Experimental_VideoModelV4;
545
- experimental_realtime: Experimental_RealtimeFactoryV4;
546
- /**
547
- * Creates an xAI model for speech generation (text-to-speech).
548
- */
549
- speech(): SpeechModelV4;
550
- /**
551
- * Creates an xAI model for speech generation (text-to-speech).
552
- */
553
- speechModel(): SpeechModelV4;
554
- /**
555
- * Creates an xAI model for speech-to-text transcription.
556
- */
557
- transcription(): TranscriptionModelV4;
558
- /**
559
- * Creates an xAI model for speech-to-text transcription.
560
- */
561
- transcriptionModel(): TranscriptionModelV4;
562
- /**
563
- * Returns the xAI files interface for uploading files.
564
- */
565
- files(): FilesV4;
566
- /**
567
- * Server-side agentic tools for use with the responses API.
568
- */
569
- tools: typeof xaiTools;
570
- /**
571
- * @deprecated Use `embeddingModel` instead.
572
- */
573
- textEmbeddingModel(modelId: string): never;
530
+ (modelId: XaiResponsesModelId): LanguageModelV4;
531
+ /**
532
+ * Creates an Xai language model for text generation.
533
+ */
534
+ languageModel(modelId: XaiResponsesModelId): LanguageModelV4;
535
+ /**
536
+ * Creates an Xai responses model for text generation.
537
+ */
538
+ responses: (modelId: XaiResponsesModelId) => LanguageModelV4;
539
+ /**
540
+ * Returns a BatchV4 interface for processing batches with xAI.
541
+ */
542
+ experimental_batch(): Experimental_BatchV4<{
543
+ text: XaiResponsesModelId;
544
+ image: XaiImageModelId;
545
+ }>;
546
+ /**
547
+ * Creates an Xai image model for image generation.
548
+ */
549
+ image(modelId: XaiImageModelId): ImageModelV4;
550
+ /**
551
+ * Creates an Xai image model for image generation.
552
+ */
553
+ imageModel(modelId: XaiImageModelId): ImageModelV4;
554
+ /**
555
+ * Creates an Xai video model for video generation.
556
+ */
557
+ video(modelId: XaiVideoModelId): Experimental_VideoModelV4;
558
+ /**
559
+ * Creates an Xai video model for video generation.
560
+ */
561
+ videoModel(modelId: XaiVideoModelId): Experimental_VideoModelV4;
562
+ experimental_realtime: Experimental_RealtimeFactoryV4;
563
+ /**
564
+ * Creates an xAI model for speech generation (text-to-speech).
565
+ */
566
+ speech(): SpeechModelV4;
567
+ /**
568
+ * Creates an xAI model for speech generation (text-to-speech).
569
+ */
570
+ speechModel(): SpeechModelV4;
571
+ /**
572
+ * Creates an xAI model for speech-to-text transcription.
573
+ */
574
+ transcription(): TranscriptionModelV4;
575
+ /**
576
+ * Creates an xAI model for speech-to-text transcription.
577
+ */
578
+ transcriptionModel(): TranscriptionModelV4;
579
+ /**
580
+ * Returns the xAI files interface for uploading files.
581
+ */
582
+ files(): FilesV4;
583
+ /**
584
+ * Server-side agentic tools for use with the responses API.
585
+ */
586
+ tools: typeof xaiTools;
587
+ /**
588
+ * @deprecated Use `embeddingModel` instead.
589
+ */
590
+ textEmbeddingModel(modelId: string): never;
574
591
  }
575
592
  interface XaiProviderSettings {
576
- /**
577
- * Base URL for the xAI API calls.
578
- */
579
- baseURL?: string;
580
- /**
581
- * API key for authenticating requests.
582
- */
583
- apiKey?: string;
584
- /**
585
- * Custom headers to include in the requests.
586
- */
587
- headers?: Record<string, string>;
588
- /**
589
- * Custom fetch implementation. You can use it as a middleware to intercept requests,
590
- * or to provide a custom fetch implementation for e.g. testing.
591
- */
592
- fetch?: FetchFunction;
593
- /**
594
- * Custom WebSocket implementation. Required in runtimes whose native
595
- * WebSocket constructor does not support headers for xAI streaming STT.
596
- */
597
- webSocket?: WebSocketConstructor;
593
+ /**
594
+ * Base URL for the xAI API calls.
595
+ */
596
+ baseURL?: string;
597
+ /**
598
+ * API key for authenticating requests.
599
+ */
600
+ apiKey?: string;
601
+ /**
602
+ * Custom headers to include in the requests.
603
+ */
604
+ headers?: Record<string, string>;
605
+ /**
606
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
607
+ * or to provide a custom fetch implementation for e.g. testing.
608
+ */
609
+ fetch?: FetchFunction;
610
+ /**
611
+ * Custom WebSocket implementation. Required in runtimes whose native
612
+ * WebSocket constructor does not support headers for xAI streaming STT.
613
+ */
614
+ webSocket?: WebSocketConstructor;
598
615
  }
599
- declare function createXai(options?: XaiProviderSettings): XaiProvider;
600
- declare const xai: XaiProvider;
601
-
616
+ export declare function createXai(options?: XaiProviderSettings): XaiProvider;
617
+ export declare const xai: XaiProvider;
618
+ //#endregion
619
+ //#region src/realtime/xai-realtime-model.d.ts
602
620
  type XaiRealtimeModelConfig = {
603
- provider: string;
604
- baseURL: string;
605
- headers: () => Record<string, string | undefined>;
606
- fetch?: FetchFunction;
621
+ provider: string;
622
+ baseURL: string;
623
+ headers: () => Record<string, string | undefined>;
624
+ fetch?: FetchFunction;
607
625
  };
608
626
  declare class XaiRealtimeModel implements Experimental_RealtimeModelV4 {
609
- readonly specificationVersion: "v4";
610
- readonly provider: string;
611
- readonly modelId: string;
612
- private readonly config;
613
- constructor(modelId: string, config: XaiRealtimeModelConfig);
614
- doCreateClientSecret(options: Experimental_RealtimeModelV4ClientSecretOptions): Promise<Experimental_RealtimeModelV4ClientSecretResult>;
615
- getWebSocketConfig(options: {
616
- token: string;
617
- url: string;
618
- }): {
619
- url: string;
620
- protocols?: string[];
621
- };
622
- parseServerEvent(raw: unknown): Experimental_RealtimeModelV4ServerEvent;
623
- serializeClientEvent(event: Experimental_RealtimeModelV4ClientEvent): unknown;
624
- buildSessionConfig(config: Experimental_RealtimeModelV4SessionConfig): Record<string, unknown>;
627
+ readonly specificationVersion: "v4";
628
+ readonly provider: string;
629
+ readonly modelId: string;
630
+ private readonly config;
631
+ constructor(modelId: string, config: XaiRealtimeModelConfig);
632
+ doCreateClientSecret(options: Experimental_RealtimeModelV4ClientSecretOptions): Promise<Experimental_RealtimeModelV4ClientSecretResult>;
633
+ getWebSocketConfig(options: {
634
+ token: string;
635
+ url: string;
636
+ }): {
637
+ url: string;
638
+ protocols?: string[];
639
+ };
640
+ parseServerEvent(raw: unknown): Experimental_RealtimeModelV4ServerEvent;
641
+ serializeClientEvent(event: Experimental_RealtimeModelV4ClientEvent): unknown;
642
+ buildSessionConfig(config: Experimental_RealtimeModelV4SessionConfig): Record<string, unknown>;
625
643
  }
626
-
627
- declare const VERSION: string;
628
-
629
- export { XaiRealtimeModel as Experimental_XaiRealtimeModel, type XaiRealtimeModelConfig as Experimental_XaiRealtimeModelConfig, VERSION, type XaiErrorData, type XaiFilePartProviderOptions, type XaiFilesOptions, type XaiImageModelOptions, type XaiImageModelOptions as XaiImageProviderOptions, type XaiLanguageModelResponsesOptions, type XaiProvider, type XaiProviderSettings, type XaiLanguageModelResponsesOptions as XaiResponsesProviderOptions, type XaiSpeechModelOptions, type XaiTranscriptionModelOptions, type XaiVideoModelId, type XaiVideoModelOptions, type XaiVideoModelOptions as XaiVideoProviderOptions, codeExecution, createXai, imageGeneration, mcpServer, viewImage, viewXVideo, webSearch, xSearch, xai, xaiTools };
644
+ //#endregion
645
+ //#region src/version.d.ts
646
+ export declare const VERSION: string;
647
+ //#endregion
648
+ export { XaiRealtimeModel as Experimental_XaiRealtimeModel, type XaiRealtimeModelConfig as Experimental_XaiRealtimeModelConfig, type XaiErrorData, type XaiFilePartProviderOptions, type XaiFilesOptions, type XaiImageModelOptions, type XaiImageModelOptions as XaiImageProviderOptions, type XaiLanguageModelResponsesOptions, type XaiLanguageModelResponsesOptions as XaiResponsesProviderOptions, type XaiProvider, type XaiProviderSettings, type XaiSpeechModelOptions, type XaiTranscriptionModelOptions, type XaiVideoModelId, type XaiVideoModelOptions, type XaiVideoModelOptions as XaiVideoProviderOptions };
649
+ //# sourceMappingURL=index.d.ts.map