New:Socket for Asana Is Now Available.Learn more
Get Started

@ai-sdk/xai

Package Overview
Dependencies
Maintainers
3
Versions
543
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/xai - npm Package Compare versions

Comparing version
4.0.38
to
4.0.39
+3
-3
package.json
{
"name": "@ai-sdk/xai",
"version": "4.0.38",
"version": "4.0.39",
"type": "module",

@@ -32,4 +32,4 @@ "license": "Apache-2.0",

"dependencies": {
"@ai-sdk/provider-utils": "5.0.27",
"@ai-sdk/provider": "4.0.7"
"@ai-sdk/provider": "4.0.7",
"@ai-sdk/provider-utils": "5.0.27"
},

@@ -36,0 +36,0 @@ "devDependencies": {

@@ -39,3 +39,3 @@ # AI SDK - xAI Grok Provider

const { text } = await generateText({
model: xai('grok-3'),
model: xai('grok-4.6'),
prompt: 'Write a vegetarian lasagna recipe for 4 people.',

@@ -42,0 +42,0 @@ });

@@ -584,15 +584,26 @@ import {

) {
// Terminal outcomes, so they are reported the same way as an upstream `failed`
if (statusResponse.video?.respect_moderation === false) {
throw new AISDKError({
name: 'XAI_VIDEO_MODERATION_ERROR',
message:
return {
status: 'error' as const,
error:
'Video generation was blocked due to a content policy violation.',
});
response: {
timestamp: currentDate,
modelId: this.modelId,
headers: responseHeaders,
},
};
}
if (!statusResponse.video?.url) {
throw new AISDKError({
name: 'XAI_VIDEO_GENERATION_ERROR',
message: 'Video generation completed but no video URL was returned.',
});
return {
status: 'error' as const,
error: 'Video generation completed but no video URL was returned.',
response: {
timestamp: currentDate,
modelId: this.modelId,
headers: responseHeaders,
},
};
}

@@ -599,0 +610,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet