@ai-sdk/xai 5.0.7 → 5.0.10

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,27 @@
1
1
  # @ai-sdk/xai
2
2
 
3
+ ## 5.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [af9597b]
8
+ - Updated dependencies [bc49f78]
9
+ - @ai-sdk/provider-utils@5.0.49
10
+
11
+ ## 5.0.9
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [be877ff]
16
+ - @ai-sdk/provider-utils@5.0.48
17
+
18
+ ## 5.0.8
19
+
20
+ ### Patch Changes
21
+
22
+ - 5434a34: feat(xai): add missing video provider options
23
+ - 0a5dd0f: feat(xai): add missing Responses API provider options
24
+
3
25
  ## 5.0.7
4
26
 
5
27
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -46,14 +46,24 @@ declare const xaiLanguageModelResponsesOptions: z.ZodObject<{
46
46
  }>>;
47
47
  logprobs: z.ZodOptional<z.ZodBoolean>;
48
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>;
49
54
  serviceTier: z.ZodOptional<z.ZodEnum<{
50
55
  default: "default";
51
56
  priority: "priority";
52
57
  }>>;
53
58
  store: z.ZodOptional<z.ZodBoolean>;
54
59
  previousResponseId: z.ZodOptional<z.ZodString>;
60
+ user: z.ZodOptional<z.ZodString>;
55
61
  include: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
56
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";
57
67
  }>>>>;
58
68
  }, z.core.$strip>;
59
69
  type XaiLanguageModelResponsesOptions = z.infer<typeof xaiLanguageModelResponsesOptions>;
@@ -83,10 +93,25 @@ declare const resolutionSchema: z.ZodEnum<{
83
93
  "1080p": "1080p";
84
94
  }>;
85
95
  type XaiVideoResolution = z.infer<typeof resolutionSchema>;
96
+ declare const keyframeSchema: z.ZodObject<{
97
+ imageUrl: z.ZodString;
98
+ timestampSeconds: z.ZodNumber;
99
+ }, z.core.$strip>;
100
+ declare const storageOptionsSchema: z.ZodObject<{
101
+ filename: z.ZodString;
102
+ 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>]>>;
106
+ }, z.core.$strip>;
107
+ type XaiVideoKeyframe = z.infer<typeof keyframeSchema>;
108
+ type XaiVideoStorageOptions = z.infer<typeof storageOptionsSchema>;
86
109
  interface XaiVideoSharedOptions {
87
110
  pollIntervalMs?: number | null;
88
111
  pollTimeoutMs?: number | null;
89
112
  resolution?: XaiVideoResolution | null;
113
+ /** Store the generated video in the xAI Files API. */
114
+ storageOptions?: XaiVideoStorageOptions;
90
115
  }
91
116
  interface XaiVideoUserOptions {
92
117
  /**
@@ -126,6 +151,8 @@ interface XaiVideoGenerationOptions extends XaiVideoSharedOptions, XaiVideoUserO
126
151
  mode?: undefined;
127
152
  videoUrl?: undefined;
128
153
  referenceImageUrls?: undefined;
154
+ /** Mid-video image anchors (up to 4). */
155
+ keyframes?: XaiVideoKeyframe[];
129
156
  }
130
157
  interface XaiLegacyEditVideoOptions extends XaiVideoSharedOptions, XaiVideoUserOptions {
131
158
  /**