@ai-sdk/xai 4.0.33 → 4.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @ai-sdk/xai
2
2
 
3
+ ## 4.0.35
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [7fbfc6d]
8
+ - @ai-sdk/provider-utils@5.0.27
9
+
10
+ ## 4.0.34
11
+
12
+ ### Patch Changes
13
+
14
+ - fa2c2bb: feat: add xAI image generation server-side tool for the responses API
15
+ - Updated dependencies [401a4ba]
16
+ - @ai-sdk/provider-utils@5.0.26
17
+
3
18
  ## 4.0.33
4
19
 
5
20
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -239,6 +239,36 @@ declare const codeExecution: (args?: Parameters<typeof codeExecutionToolFactory>
239
239
  error?: string | undefined;
240
240
  }, {}>;
241
241
 
242
+ declare const imageGenerationToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
243
+ /**
244
+ * The generated image encoded in base64.
245
+ */
246
+ result: string;
247
+ /**
248
+ * The prompt that the model wrote for the image model.
249
+ */
250
+ prompt?: string;
251
+ }, {
252
+ /**
253
+ * Restricts what the tool can do. Defaults to 'auto'.
254
+ *
255
+ * - 'auto': the model can generate and edit images.
256
+ * - 'generate': text-to-image generation only.
257
+ * - 'edit': image editing only.
258
+ */
259
+ action?: "auto" | "generate" | "edit";
260
+ }, {}>;
261
+ declare const imageGeneration: (args?: Parameters<typeof imageGenerationToolFactory>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
262
+ /**
263
+ * The generated image encoded in base64.
264
+ */
265
+ result: string;
266
+ /**
267
+ * The prompt that the model wrote for the image model.
268
+ */
269
+ prompt?: string;
270
+ }, {}>;
271
+
242
272
  declare const mcpServerToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
243
273
  name: string;
244
274
  arguments: string;
@@ -353,6 +383,15 @@ declare const xaiTools: {
353
383
  text: string;
354
384
  }[];
355
385
  }, {}>;
386
+ imageGeneration: (args?: Parameters<_ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
387
+ result: string;
388
+ prompt?: string;
389
+ }, {
390
+ action?: "auto" | "generate" | "edit";
391
+ }, {}>>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
392
+ result: string;
393
+ prompt?: string;
394
+ }, {}>;
356
395
  mcpServer: (args: Parameters<_ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
357
396
  name: string;
358
397
  arguments: string;
@@ -545,4 +584,4 @@ declare class XaiRealtimeModel implements Experimental_RealtimeModelV4 {
545
584
 
546
585
  declare const VERSION: string;
547
586
 
548
- export { XaiRealtimeModel as Experimental_XaiRealtimeModel, type XaiRealtimeModelConfig as Experimental_XaiRealtimeModelConfig, VERSION, type XaiErrorData, type XaiFilePartProviderOptions, type XaiFilesOptions, type XaiImageModelOptions, type XaiImageModelOptions as XaiImageProviderOptions, type XaiLanguageModelChatOptions, type XaiLanguageModelResponsesOptions, type XaiProvider, type XaiLanguageModelChatOptions as XaiProviderOptions, type XaiProviderSettings, type XaiLanguageModelResponsesOptions as XaiResponsesProviderOptions, type XaiSpeechModelOptions, type XaiTranscriptionModelOptions, type XaiVideoModelId, type XaiVideoModelOptions, type XaiVideoModelOptions as XaiVideoProviderOptions, codeExecution, createXai, mcpServer, viewImage, viewXVideo, webSearch, xSearch, xai, xaiTools };
587
+ export { XaiRealtimeModel as Experimental_XaiRealtimeModel, type XaiRealtimeModelConfig as Experimental_XaiRealtimeModelConfig, VERSION, type XaiErrorData, type XaiFilePartProviderOptions, type XaiFilesOptions, type XaiImageModelOptions, type XaiImageModelOptions as XaiImageProviderOptions, type XaiLanguageModelChatOptions, type XaiLanguageModelResponsesOptions, type XaiProvider, type XaiLanguageModelChatOptions as XaiProviderOptions, 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 };