@ai-sdk/xai 4.0.0-canary.68 → 4.0.0-canary.69

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,14 @@
1
1
  # @ai-sdk/xai
2
2
 
3
+ ## 4.0.0-canary.69
4
+
5
+ ### Patch Changes
6
+
7
+ - 23f9d72: deprecate searchParameters (xai live search) in favor of web_search/x_search agent tools
8
+ - 1dbecd7: feat(provider/xai): add `enableImageSearch` to the xAI Web Search tool
9
+
10
+ The xAI Responses API supports `enable_image_search` on Web Search tools. `xai.tools.webSearch()` now accepts `enableImageSearch` and sends it through to the API as `enable_image_search`.
11
+
3
12
  ## 4.0.0-canary.68
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -245,6 +245,7 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolF
245
245
  }, {
246
246
  allowedDomains?: string[];
247
247
  excludedDomains?: string[];
248
+ enableImageSearch?: boolean;
248
249
  enableImageUnderstanding?: boolean;
249
250
  }, {}>;
250
251
  declare const webSearch: (args?: Parameters<typeof webSearchToolFactory>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
@@ -352,6 +353,7 @@ declare const xaiTools: {
352
353
  }, {
353
354
  allowedDomains?: string[];
354
355
  excludedDomains?: string[];
356
+ enableImageSearch?: boolean;
355
357
  enableImageUnderstanding?: boolean;
356
358
  }, {}>>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
357
359
  query: string;
package/dist/index.js CHANGED
@@ -284,6 +284,15 @@ var xaiLanguageModelChatOptions = z.object({
284
284
  * Defaults to true.
285
285
  */
286
286
  parallel_function_calling: z.boolean().optional(),
287
+ /**
288
+ * @deprecated xAI has deprecated Live Search (`search_parameters`) in favor
289
+ * of the Agent Tools API. Requests using this option now return a "Live
290
+ * search is deprecated" error. Use the `web_search` / `x_search` tools
291
+ * instead (e.g. `xai.tools.webSearch()`, `xai.tools.xSearch()`) with
292
+ * `xai.responses(modelId)`.
293
+ *
294
+ * @see https://docs.x.ai/docs/guides/tools/overview
295
+ */
287
296
  searchParameters: z.object({
288
297
  /**
289
298
  * search mode preference
@@ -1967,6 +1976,7 @@ var webSearchArgsSchema = lazySchema3(
1967
1976
  z10.object({
1968
1977
  allowedDomains: z10.array(z10.string()).max(5).optional(),
1969
1978
  excludedDomains: z10.array(z10.string()).max(5).optional(),
1979
+ enableImageSearch: z10.boolean().optional(),
1970
1980
  enableImageUnderstanding: z10.boolean().optional()
1971
1981
  })
1972
1982
  )
@@ -2058,6 +2068,7 @@ async function prepareResponsesTools({
2058
2068
  type: "web_search",
2059
2069
  allowed_domains: args.allowedDomains,
2060
2070
  excluded_domains: args.excludedDomains,
2071
+ enable_image_search: args.enableImageSearch,
2061
2072
  enable_image_understanding: args.enableImageUnderstanding
2062
2073
  });
2063
2074
  break;
@@ -3013,7 +3024,7 @@ var xaiTools = {
3013
3024
  };
3014
3025
 
3015
3026
  // src/version.ts
3016
- var VERSION = true ? "4.0.0-canary.68" : "0.0.0-test";
3027
+ var VERSION = true ? "4.0.0-canary.69" : "0.0.0-test";
3017
3028
 
3018
3029
  // src/files/xai-files.ts
3019
3030
  import {