@ai-sdk/xai 3.0.117 → 3.0.119

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,19 @@
1
1
  # @ai-sdk/xai
2
2
 
3
+ ## 3.0.119
4
+
5
+ ### Patch Changes
6
+
7
+ - 451d2c3: feat(xai): Add the Grok 4.6 model IDs and support its `xhigh` reasoning effort
8
+
9
+ ## 3.0.118
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [b2a4d5a]
14
+ - @ai-sdk/provider-utils@4.0.45
15
+ - @ai-sdk/openai-compatible@2.0.67
16
+
3
17
  ## 3.0.117
4
18
 
5
19
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -3,13 +3,14 @@ import { ProviderV3, LanguageModelV3, ImageModelV3, Experimental_VideoModelV3 }
3
3
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
4
  import { FetchFunction } from '@ai-sdk/provider-utils';
5
5
 
6
- type XaiChatModelId = 'grok-4.5' | 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-multi-agent-0309' | 'grok-build-0.1' | (string & {});
6
+ type XaiChatModelId = 'grok-4.6' | 'grok-4.5' | 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-multi-agent-0309' | 'grok-build-0.1' | (string & {});
7
7
  declare const xaiLanguageModelChatOptions: z.ZodObject<{
8
8
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
9
9
  none: "none";
10
10
  low: "low";
11
11
  medium: "medium";
12
12
  high: "high";
13
+ xhigh: "xhigh";
13
14
  }>>;
14
15
  logprobs: z.ZodOptional<z.ZodBoolean>;
15
16
  topLogprobs: z.ZodOptional<z.ZodNumber>;
@@ -72,7 +73,7 @@ declare const xaiFilePartProviderOptions: z.ZodObject<{
72
73
  }, z.core.$strip>;
73
74
  type XaiFilePartProviderOptions = z.infer<typeof xaiFilePartProviderOptions>;
74
75
 
75
- type XaiResponsesModelId = 'grok-4.5' | 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-multi-agent-0309' | 'grok-build-0.1' | (string & {});
76
+ type XaiResponsesModelId = 'grok-4.6' | 'grok-4.5' | 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-multi-agent-0309' | 'grok-build-0.1' | (string & {});
76
77
  /**
77
78
  * @see https://docs.x.ai/docs/api-reference#create-new-response
78
79
  */
@@ -82,6 +83,7 @@ declare const xaiLanguageModelResponsesOptions: z.ZodObject<{
82
83
  low: "low";
83
84
  medium: "medium";
84
85
  high: "high";
86
+ xhigh: "xhigh";
85
87
  }>>;
86
88
  logprobs: z.ZodOptional<z.ZodBoolean>;
87
89
  topLogprobs: z.ZodOptional<z.ZodNumber>;
package/dist/index.d.ts CHANGED
@@ -3,13 +3,14 @@ import { ProviderV3, LanguageModelV3, ImageModelV3, Experimental_VideoModelV3 }
3
3
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
4
  import { FetchFunction } from '@ai-sdk/provider-utils';
5
5
 
6
- type XaiChatModelId = 'grok-4.5' | 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-multi-agent-0309' | 'grok-build-0.1' | (string & {});
6
+ type XaiChatModelId = 'grok-4.6' | 'grok-4.5' | 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-multi-agent-0309' | 'grok-build-0.1' | (string & {});
7
7
  declare const xaiLanguageModelChatOptions: z.ZodObject<{
8
8
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
9
9
  none: "none";
10
10
  low: "low";
11
11
  medium: "medium";
12
12
  high: "high";
13
+ xhigh: "xhigh";
13
14
  }>>;
14
15
  logprobs: z.ZodOptional<z.ZodBoolean>;
15
16
  topLogprobs: z.ZodOptional<z.ZodNumber>;
@@ -72,7 +73,7 @@ declare const xaiFilePartProviderOptions: z.ZodObject<{
72
73
  }, z.core.$strip>;
73
74
  type XaiFilePartProviderOptions = z.infer<typeof xaiFilePartProviderOptions>;
74
75
 
75
- type XaiResponsesModelId = 'grok-4.5' | 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-multi-agent-0309' | 'grok-build-0.1' | (string & {});
76
+ type XaiResponsesModelId = 'grok-4.6' | 'grok-4.5' | 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-multi-agent-0309' | 'grok-build-0.1' | (string & {});
76
77
  /**
77
78
  * @see https://docs.x.ai/docs/api-reference#create-new-response
78
79
  */
@@ -82,6 +83,7 @@ declare const xaiLanguageModelResponsesOptions: z.ZodObject<{
82
83
  low: "low";
83
84
  medium: "medium";
84
85
  high: "high";
86
+ xhigh: "xhigh";
85
87
  }>>;
86
88
  logprobs: z.ZodOptional<z.ZodBoolean>;
87
89
  topLogprobs: z.ZodOptional<z.ZodNumber>;
package/dist/index.js CHANGED
@@ -274,7 +274,7 @@ var searchSourceSchema = import_v42.z.discriminatedUnion("type", [
274
274
  rssSourceSchema
275
275
  ]);
276
276
  var xaiLanguageModelChatOptions = import_v42.z.object({
277
- reasoningEffort: import_v42.z.enum(["none", "low", "medium", "high"]).optional(),
277
+ reasoningEffort: import_v42.z.enum(["none", "low", "medium", "high", "xhigh"]).optional(),
278
278
  logprobs: import_v42.z.boolean().optional(),
279
279
  topLogprobs: import_v42.z.number().int().min(0).max(8).optional(),
280
280
  /**
@@ -1813,10 +1813,11 @@ var xaiLanguageModelResponsesOptions = import_v48.z.object({
1813
1813
  /**
1814
1814
  * Constrains how hard a reasoning model thinks before responding.
1815
1815
  * Possible values are `none` (disables reasoning), `low` (uses fewer reasoning
1816
- * tokens), `medium` and `high` (uses more reasoning tokens). Not all models
1817
- * support reasoning effort; see xAI's docs for the values each model accepts.
1816
+ * tokens), `medium`, `high`, and `xhigh` (uses more reasoning tokens). Not all
1817
+ * models support reasoning effort; see xAI's docs for the values each model
1818
+ * accepts. `xhigh` is currently only supported by `grok-4.6`.
1818
1819
  */
1819
- reasoningEffort: import_v48.z.enum(["none", "low", "medium", "high"]).optional(),
1820
+ reasoningEffort: import_v48.z.enum(["none", "low", "medium", "high", "xhigh"]).optional(),
1820
1821
  logprobs: import_v48.z.boolean().optional(),
1821
1822
  topLogprobs: import_v48.z.number().int().min(0).max(8).optional(),
1822
1823
  /**
@@ -2933,7 +2934,7 @@ var xaiTools = {
2933
2934
  };
2934
2935
 
2935
2936
  // src/version.ts
2936
- var VERSION = true ? "3.0.117" : "0.0.0-test";
2937
+ var VERSION = true ? "3.0.119" : "0.0.0-test";
2937
2938
 
2938
2939
  // src/xai-video-model.ts
2939
2940
  var import_provider6 = require("@ai-sdk/provider");