@ai-sdk/xai 3.0.108 → 3.0.109
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 +6 -0
- package/dist/index.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -2
- package/dist/index.mjs.map +1 -1
- package/docs/01-xai.mdx +9 -0
- package/package.json +3 -3
- package/src/xai-video-model.ts +5 -0
- package/src/xai-video-options.ts +25 -5
package/dist/index.mjs
CHANGED
|
@@ -2912,7 +2912,7 @@ var xaiTools = {
|
|
|
2912
2912
|
};
|
|
2913
2913
|
|
|
2914
2914
|
// src/version.ts
|
|
2915
|
-
var VERSION = true ? "3.0.
|
|
2915
|
+
var VERSION = true ? "3.0.109" : "0.0.0-test";
|
|
2916
2916
|
|
|
2917
2917
|
// src/xai-video-model.ts
|
|
2918
2918
|
import {
|
|
@@ -2940,8 +2940,12 @@ var baseFields = {
|
|
|
2940
2940
|
pollTimeoutMs: z16.number().positive().nullish(),
|
|
2941
2941
|
resolution: resolutionSchema.nullish()
|
|
2942
2942
|
};
|
|
2943
|
+
var userField = {
|
|
2944
|
+
user: z16.string().optional()
|
|
2945
|
+
};
|
|
2943
2946
|
var editVideoSchema = z16.object({
|
|
2944
2947
|
...baseFields,
|
|
2948
|
+
...userField,
|
|
2945
2949
|
mode: z16.literal("edit-video"),
|
|
2946
2950
|
videoUrl: nonEmptyStringSchema,
|
|
2947
2951
|
referenceImageUrls: z16.undefined().optional()
|
|
@@ -2954,12 +2958,14 @@ var extendVideoSchema = z16.object({
|
|
|
2954
2958
|
});
|
|
2955
2959
|
var referenceToVideoSchema = z16.object({
|
|
2956
2960
|
...baseFields,
|
|
2961
|
+
...userField,
|
|
2957
2962
|
mode: z16.literal("reference-to-video"),
|
|
2958
2963
|
referenceImageUrls: z16.array(nonEmptyStringSchema).min(1).max(7),
|
|
2959
2964
|
videoUrl: z16.undefined().optional()
|
|
2960
2965
|
});
|
|
2961
2966
|
var autoDetectSchema = z16.object({
|
|
2962
2967
|
...baseFields,
|
|
2968
|
+
...userField,
|
|
2963
2969
|
mode: z16.undefined().optional(),
|
|
2964
2970
|
videoUrl: nonEmptyStringSchema.optional(),
|
|
2965
2971
|
referenceImageUrls: z16.array(nonEmptyStringSchema).min(1).max(7).optional()
|
|
@@ -2974,6 +2980,7 @@ var runtimeSchema = z16.object({
|
|
|
2974
2980
|
mode: modeSchema.optional(),
|
|
2975
2981
|
videoUrl: nonEmptyStringSchema.optional(),
|
|
2976
2982
|
referenceImageUrls: z16.array(nonEmptyStringSchema).min(1).max(7).optional(),
|
|
2983
|
+
user: z16.string().optional(),
|
|
2977
2984
|
...baseFields
|
|
2978
2985
|
}).passthrough();
|
|
2979
2986
|
var xaiVideoModelOptionsSchema = lazySchema5(
|
|
@@ -3197,6 +3204,9 @@ var XaiVideoModel = class {
|
|
|
3197
3204
|
details: "xAI only supports inputReferences for reference-to-video generation. The reference images were ignored."
|
|
3198
3205
|
});
|
|
3199
3206
|
}
|
|
3207
|
+
if (!isExtension && (xaiOptions == null ? void 0 : xaiOptions.user) !== void 0) {
|
|
3208
|
+
body.user = xaiOptions.user;
|
|
3209
|
+
}
|
|
3200
3210
|
if (xaiOptions != null) {
|
|
3201
3211
|
for (const [key, value] of Object.entries(xaiOptions)) {
|
|
3202
3212
|
if (![
|
|
@@ -3205,7 +3215,8 @@ var XaiVideoModel = class {
|
|
|
3205
3215
|
"pollTimeoutMs",
|
|
3206
3216
|
"resolution",
|
|
3207
3217
|
"videoUrl",
|
|
3208
|
-
"referenceImageUrls"
|
|
3218
|
+
"referenceImageUrls",
|
|
3219
|
+
"user"
|
|
3209
3220
|
].includes(key)) {
|
|
3210
3221
|
body[key] = value;
|
|
3211
3222
|
}
|