@ai-sdk/xai 4.0.38 → 4.0.39
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/README.md +1 -1
- package/dist/index.js +19 -9
- package/dist/index.js.map +1 -1
- package/docs/01-xai.mdx +16 -16
- package/package.json +3 -3
- package/src/xai-video-model.ts +19 -8
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -3720,7 +3720,7 @@ var xaiTools = {
|
|
|
3720
3720
|
};
|
|
3721
3721
|
|
|
3722
3722
|
// src/version.ts
|
|
3723
|
-
var VERSION = true ? "4.0.
|
|
3723
|
+
var VERSION = true ? "4.0.39" : "0.0.0-test";
|
|
3724
3724
|
|
|
3725
3725
|
// src/files/xai-files.ts
|
|
3726
3726
|
import {
|
|
@@ -4218,16 +4218,26 @@ var XaiVideoModel = class {
|
|
|
4218
4218
|
}
|
|
4219
4219
|
if (statusResponse.status === "done" || statusResponse.status == null && ((_h = statusResponse.video) == null ? void 0 : _h.url)) {
|
|
4220
4220
|
if (((_i = statusResponse.video) == null ? void 0 : _i.respect_moderation) === false) {
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4221
|
+
return {
|
|
4222
|
+
status: "error",
|
|
4223
|
+
error: "Video generation was blocked due to a content policy violation.",
|
|
4224
|
+
response: {
|
|
4225
|
+
timestamp: currentDate,
|
|
4226
|
+
modelId: this.modelId,
|
|
4227
|
+
headers: responseHeaders
|
|
4228
|
+
}
|
|
4229
|
+
};
|
|
4225
4230
|
}
|
|
4226
4231
|
if (!((_j = statusResponse.video) == null ? void 0 : _j.url)) {
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4232
|
+
return {
|
|
4233
|
+
status: "error",
|
|
4234
|
+
error: "Video generation completed but no video URL was returned.",
|
|
4235
|
+
response: {
|
|
4236
|
+
timestamp: currentDate,
|
|
4237
|
+
modelId: this.modelId,
|
|
4238
|
+
headers: responseHeaders
|
|
4239
|
+
}
|
|
4240
|
+
};
|
|
4231
4241
|
}
|
|
4232
4242
|
return {
|
|
4233
4243
|
status: "completed",
|