@ai-sdk/xai 3.0.104 → 3.0.106

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,22 @@
1
1
  # @ai-sdk/xai
2
2
 
3
+ ## 3.0.106
4
+
5
+ ### Patch Changes
6
+
7
+ - e1af05f: feat (video): support video (not just image) reference inputs in `inputReferences` for reference-to-video generation
8
+ - 1ce0d1c: feat (provider/xai): add grok-4.5 model id
9
+ - Updated dependencies [e1af05f]
10
+ - @ai-sdk/provider@3.0.14
11
+ - @ai-sdk/openai-compatible@2.0.59
12
+ - @ai-sdk/provider-utils@4.0.38
13
+
14
+ ## 3.0.105
15
+
16
+ ### Patch Changes
17
+
18
+ - c00849a: feat: support `imageDetail` provider option on image file parts to control image processing resolution
19
+
3
20
  ## 3.0.104
4
21
 
5
22
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -3,7 +3,7 @@ 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.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.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";
@@ -63,7 +63,16 @@ declare const xaiErrorDataSchema: z.ZodUnion<readonly [z.ZodObject<{
63
63
  }, z.core.$strip>]>;
64
64
  type XaiErrorData = z.infer<typeof xaiErrorDataSchema>;
65
65
 
66
- type XaiResponsesModelId = '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 & {});
66
+ declare const xaiFilePartProviderOptions: z.ZodObject<{
67
+ imageDetail: z.ZodOptional<z.ZodEnum<{
68
+ low: "low";
69
+ high: "high";
70
+ auto: "auto";
71
+ }>>;
72
+ }, z.core.$strip>;
73
+ type XaiFilePartProviderOptions = z.infer<typeof xaiFilePartProviderOptions>;
74
+
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 & {});
67
76
  /**
68
77
  * @see https://docs.x.ai/docs/api-reference#create-new-response
69
78
  */
@@ -443,4 +452,4 @@ declare const xai: XaiProvider;
443
452
 
444
453
  declare const VERSION: string;
445
454
 
446
- export { VERSION, type XaiErrorData, type XaiImageModelOptions, type XaiImageModelOptions as XaiImageProviderOptions, type XaiLanguageModelChatOptions, type XaiLanguageModelResponsesOptions, type XaiProvider, type XaiLanguageModelChatOptions as XaiProviderOptions, type XaiProviderSettings, type XaiLanguageModelResponsesOptions as XaiResponsesProviderOptions, type XaiVideoModelId, type XaiVideoModelOptions, type XaiVideoModelOptions as XaiVideoProviderOptions, codeExecution, createXai, mcpServer, viewImage, viewXVideo, webSearch, xSearch, xai, xaiTools };
455
+ export { VERSION, type XaiErrorData, type XaiFilePartProviderOptions, type XaiImageModelOptions, type XaiImageModelOptions as XaiImageProviderOptions, type XaiLanguageModelChatOptions, type XaiLanguageModelResponsesOptions, type XaiProvider, type XaiLanguageModelChatOptions as XaiProviderOptions, type XaiProviderSettings, type XaiLanguageModelResponsesOptions as XaiResponsesProviderOptions, type XaiVideoModelId, type XaiVideoModelOptions, type XaiVideoModelOptions as XaiVideoProviderOptions, codeExecution, createXai, mcpServer, viewImage, viewXVideo, webSearch, xSearch, xai, xaiTools };
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ 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.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.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";
@@ -63,7 +63,16 @@ declare const xaiErrorDataSchema: z.ZodUnion<readonly [z.ZodObject<{
63
63
  }, z.core.$strip>]>;
64
64
  type XaiErrorData = z.infer<typeof xaiErrorDataSchema>;
65
65
 
66
- type XaiResponsesModelId = '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 & {});
66
+ declare const xaiFilePartProviderOptions: z.ZodObject<{
67
+ imageDetail: z.ZodOptional<z.ZodEnum<{
68
+ low: "low";
69
+ high: "high";
70
+ auto: "auto";
71
+ }>>;
72
+ }, z.core.$strip>;
73
+ type XaiFilePartProviderOptions = z.infer<typeof xaiFilePartProviderOptions>;
74
+
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 & {});
67
76
  /**
68
77
  * @see https://docs.x.ai/docs/api-reference#create-new-response
69
78
  */
@@ -443,4 +452,4 @@ declare const xai: XaiProvider;
443
452
 
444
453
  declare const VERSION: string;
445
454
 
446
- export { VERSION, type XaiErrorData, type XaiImageModelOptions, type XaiImageModelOptions as XaiImageProviderOptions, type XaiLanguageModelChatOptions, type XaiLanguageModelResponsesOptions, type XaiProvider, type XaiLanguageModelChatOptions as XaiProviderOptions, type XaiProviderSettings, type XaiLanguageModelResponsesOptions as XaiResponsesProviderOptions, type XaiVideoModelId, type XaiVideoModelOptions, type XaiVideoModelOptions as XaiVideoProviderOptions, codeExecution, createXai, mcpServer, viewImage, viewXVideo, webSearch, xSearch, xai, xaiTools };
455
+ export { VERSION, type XaiErrorData, type XaiFilePartProviderOptions, type XaiImageModelOptions, type XaiImageModelOptions as XaiImageProviderOptions, type XaiLanguageModelChatOptions, type XaiLanguageModelResponsesOptions, type XaiProvider, type XaiLanguageModelChatOptions as XaiProviderOptions, type XaiProviderSettings, type XaiLanguageModelResponsesOptions as XaiResponsesProviderOptions, type XaiVideoModelId, type XaiVideoModelOptions, type XaiVideoModelOptions as XaiVideoProviderOptions, codeExecution, createXai, mcpServer, viewImage, viewXVideo, webSearch, xSearch, xai, xaiTools };