@ai-sdk/xai 4.0.0-beta.43 → 4.0.0-beta.44

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/xai",
3
- "version": "4.0.0-beta.43",
3
+ "version": "4.0.0-beta.44",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -29,17 +29,17 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@ai-sdk/openai-compatible": "3.0.0-beta.31",
32
+ "@ai-sdk/openai-compatible": "3.0.0-beta.32",
33
33
  "@ai-sdk/provider": "4.0.0-beta.12",
34
- "@ai-sdk/provider-utils": "5.0.0-beta.26"
34
+ "@ai-sdk/provider-utils": "5.0.0-beta.27"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "20.17.24",
38
38
  "tsup": "^8",
39
39
  "typescript": "5.8.3",
40
40
  "zod": "3.25.76",
41
- "@ai-sdk/test-server": "2.0.0-beta.1",
42
- "@vercel/ai-tsconfig": "0.0.0"
41
+ "@vercel/ai-tsconfig": "0.0.0",
42
+ "@ai-sdk/test-server": "2.0.0-beta.1"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "zod": "^3.25.76 || ^4.1.8"
@@ -48,7 +48,8 @@
48
48
  "node": ">=18"
49
49
  },
50
50
  "publishConfig": {
51
- "access": "public"
51
+ "access": "public",
52
+ "provenance": true
52
53
  },
53
54
  "homepage": "https://ai-sdk.dev/docs",
54
55
  "repository": {
@@ -129,7 +129,7 @@ export function convertToXaiChatMessages(prompt: LanguageModelV4Prompt): {
129
129
  contentValue = output.value;
130
130
  break;
131
131
  case 'execution-denied':
132
- contentValue = output.reason ?? 'Tool execution denied.';
132
+ contentValue = output.reason ?? 'Tool call execution denied.';
133
133
  break;
134
134
  case 'content':
135
135
  case 'json':
@@ -1,4 +1,4 @@
1
- import { createProviderToolFactoryWithOutputSchema } from '@ai-sdk/provider-utils';
1
+ import { createProviderExecutedToolFactory } from '@ai-sdk/provider-utils';
2
2
  import { z } from 'zod/v4';
3
3
 
4
4
  const codeExecutionOutputSchema = z.object({
@@ -6,7 +6,7 @@ const codeExecutionOutputSchema = z.object({
6
6
  error: z.string().optional().describe('any error that occurred'),
7
7
  });
8
8
 
9
- const codeExecutionToolFactory = createProviderToolFactoryWithOutputSchema({
9
+ const codeExecutionToolFactory = createProviderExecutedToolFactory({
10
10
  id: 'xai.code_execution',
11
11
  inputSchema: z.object({}).describe('no input parameters'),
12
12
  outputSchema: codeExecutionOutputSchema,
@@ -1,5 +1,5 @@
1
1
  import {
2
- createProviderToolFactoryWithOutputSchema,
2
+ createProviderExecutedToolFactory,
3
3
  lazySchema,
4
4
  zodSchema,
5
5
  } from '@ai-sdk/provider-utils';
@@ -36,7 +36,7 @@ const fileSearchOutputSchema = lazySchema(() =>
36
36
  ),
37
37
  );
38
38
 
39
- const fileSearchToolFactory = createProviderToolFactoryWithOutputSchema<
39
+ const fileSearchToolFactory = createProviderExecutedToolFactory<
40
40
  {},
41
41
  {
42
42
  /**
@@ -1,5 +1,5 @@
1
1
  import {
2
- createProviderToolFactoryWithOutputSchema,
2
+ createProviderExecutedToolFactory,
3
3
  lazySchema,
4
4
  zodSchema,
5
5
  } from '@ai-sdk/provider-utils';
@@ -41,7 +41,7 @@ const mcpServerOutputSchema = lazySchema(() =>
41
41
  ),
42
42
  );
43
43
 
44
- const mcpServerToolFactory = createProviderToolFactoryWithOutputSchema<
44
+ const mcpServerToolFactory = createProviderExecutedToolFactory<
45
45
  {},
46
46
  {
47
47
  name: string;
@@ -1,4 +1,4 @@
1
- import { createProviderToolFactoryWithOutputSchema } from '@ai-sdk/provider-utils';
1
+ import { createProviderExecutedToolFactory } from '@ai-sdk/provider-utils';
2
2
  import { z } from 'zod/v4';
3
3
 
4
4
  const viewImageOutputSchema = z.object({
@@ -9,7 +9,7 @@ const viewImageOutputSchema = z.object({
9
9
  .describe('objects detected in the image'),
10
10
  });
11
11
 
12
- const viewImageToolFactory = createProviderToolFactoryWithOutputSchema({
12
+ const viewImageToolFactory = createProviderExecutedToolFactory({
13
13
  id: 'xai.view_image',
14
14
  inputSchema: z.object({}).describe('no input parameters'),
15
15
  outputSchema: viewImageOutputSchema,
@@ -1,4 +1,4 @@
1
- import { createProviderToolFactoryWithOutputSchema } from '@ai-sdk/provider-utils';
1
+ import { createProviderExecutedToolFactory } from '@ai-sdk/provider-utils';
2
2
  import { z } from 'zod/v4';
3
3
 
4
4
  const viewXVideoOutputSchema = z.object({
@@ -7,7 +7,7 @@ const viewXVideoOutputSchema = z.object({
7
7
  duration: z.number().optional().describe('duration in seconds'),
8
8
  });
9
9
 
10
- const viewXVideoToolFactory = createProviderToolFactoryWithOutputSchema({
10
+ const viewXVideoToolFactory = createProviderExecutedToolFactory({
11
11
  id: 'xai.view_x_video',
12
12
  inputSchema: z.object({}).describe('no input parameters'),
13
13
  outputSchema: viewXVideoOutputSchema,
@@ -1,5 +1,5 @@
1
1
  import {
2
- createProviderToolFactoryWithOutputSchema,
2
+ createProviderExecutedToolFactory,
3
3
  lazySchema,
4
4
  zodSchema,
5
5
  } from '@ai-sdk/provider-utils';
@@ -30,7 +30,7 @@ const webSearchOutputSchema = lazySchema(() =>
30
30
  ),
31
31
  );
32
32
 
33
- const webSearchToolFactory = createProviderToolFactoryWithOutputSchema<
33
+ const webSearchToolFactory = createProviderExecutedToolFactory<
34
34
  {},
35
35
  {
36
36
  query: string;
@@ -1,5 +1,5 @@
1
1
  import {
2
- createProviderToolFactoryWithOutputSchema,
2
+ createProviderExecutedToolFactory,
3
3
  lazySchema,
4
4
  zodSchema,
5
5
  } from '@ai-sdk/provider-utils';
@@ -34,7 +34,7 @@ const xSearchOutputSchema = lazySchema(() =>
34
34
  ),
35
35
  );
36
36
 
37
- const xSearchToolFactory = createProviderToolFactoryWithOutputSchema<
37
+ const xSearchToolFactory = createProviderExecutedToolFactory<
38
38
  {},
39
39
  {
40
40
  query: string;