@ai-sdk/xai 4.0.0 → 4.0.2
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 +14 -0
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/files/xai-files-options.ts +4 -6
- package/src/xai-video-model-options.ts +6 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/xai",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@ai-sdk/openai-compatible": "3.0.
|
|
32
|
+
"@ai-sdk/openai-compatible": "3.0.1",
|
|
33
33
|
"@ai-sdk/provider": "4.0.0",
|
|
34
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
34
|
+
"@ai-sdk/provider-utils": "5.0.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "22.19.19",
|
|
@@ -7,12 +7,10 @@ import { z } from 'zod/v4';
|
|
|
7
7
|
|
|
8
8
|
export const xaiFilesOptionsSchema = lazySchema(() =>
|
|
9
9
|
zodSchema(
|
|
10
|
-
z
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})
|
|
15
|
-
.passthrough(),
|
|
10
|
+
z.looseObject({
|
|
11
|
+
teamId: z.string().optional(),
|
|
12
|
+
filePath: z.string().optional(),
|
|
13
|
+
}),
|
|
16
14
|
),
|
|
17
15
|
);
|
|
18
16
|
|
|
@@ -129,14 +129,12 @@ export const xaiVideoModelOptions = z.union([
|
|
|
129
129
|
autoDetectSchema,
|
|
130
130
|
]);
|
|
131
131
|
|
|
132
|
-
const runtimeSchema = z
|
|
133
|
-
.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
})
|
|
139
|
-
.passthrough();
|
|
132
|
+
const runtimeSchema = z.looseObject({
|
|
133
|
+
mode: modeSchema.optional(),
|
|
134
|
+
videoUrl: nonEmptyStringSchema.optional(),
|
|
135
|
+
referenceImageUrls: z.array(nonEmptyStringSchema).min(1).max(7).optional(),
|
|
136
|
+
...baseFields,
|
|
137
|
+
});
|
|
140
138
|
|
|
141
139
|
export type XaiParsedVideoModelOptions = z.infer<typeof runtimeSchema>;
|
|
142
140
|
|