ai 7.0.156 → 7.0.158

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.
@@ -143,7 +143,7 @@ It also contains the following helper functions:
143
143
  href: '/docs/reference/ai-sdk-core/sandbox',
144
144
  },
145
145
  {
146
- title: 'experimental_filterActiveTools()',
146
+ title: 'filterActiveTools()',
147
147
  description: 'Filters a tool set to only the currently active tools.',
148
148
  href: '/docs/reference/ai-sdk-core/filter-active-tools',
149
149
  },
@@ -1,23 +1,18 @@
1
1
  ---
2
- title: experimental_MCPAppRenderer
2
+ title: MCPAppRenderer
3
3
  description: API reference for rendering MCP Apps with @ai-sdk/react.
4
4
  ---
5
5
 
6
- # `experimental_MCPAppRenderer`
6
+ # `MCPAppRenderer`
7
7
 
8
- <Note type="warning">
9
- `experimental_MCPAppRenderer` is experimental and may change in a future
10
- release.
11
- </Note>
12
-
13
- `experimental_MCPAppRenderer` renders an MCP App for an AI SDK tool UI part. It detects MCP App metadata on the tool part, loads the app resource, renders the app in a sandbox proxy iframe, and bridges MCP Apps JSON-RPC messages between the iframe and your host application.
8
+ `MCPAppRenderer` renders an MCP App for an AI SDK tool UI part. It detects MCP App metadata on the tool part, loads the app resource, renders the app in a sandbox proxy iframe, and bridges MCP Apps JSON-RPC messages between the iframe and your host application.
14
9
 
15
10
  For tool parts without MCP App metadata, the component renders the `fallback`.
16
11
 
17
12
  ## Import
18
13
 
19
14
  <Snippet
20
- text={`import { experimental_MCPAppRenderer as MCPAppRenderer } from "@ai-sdk/react"`}
15
+ text={`import { MCPAppRenderer } from "@ai-sdk/react"`}
21
16
  prompt={false}
22
17
  />
23
18
 
@@ -27,7 +22,7 @@ For tool parts without MCP App metadata, the component renders the `fallback`.
27
22
  'use client';
28
23
 
29
24
  import {
30
- experimental_MCPAppRenderer as MCPAppRenderer,
25
+ MCPAppRenderer,
31
26
  type MCPAppBridgeHandlers,
32
27
  type MCPAppMetadata,
33
28
  type MCPAppResource,
@@ -198,7 +193,7 @@ export function MessagePart({ part }: { part: unknown }) {
198
193
 
199
194
  ## Bridge Handlers
200
195
 
201
- `experimental_MCPAppRenderer` uses these handlers to respond to iframe requests. In production, server-backed handlers should validate authorization and MCP Apps tool visibility before calling the MCP server.
196
+ `MCPAppRenderer` uses these handlers to respond to iframe requests. In production, server-backed handlers should validate authorization and MCP Apps tool visibility before calling the MCP server.
202
197
 
203
198
  <PropertiesTable
204
199
  content={[
@@ -77,7 +77,7 @@ AI SDK UI contains the following hooks:
77
77
  href: '/docs/reference/ai-sdk-ui/websocket-chat-transport',
78
78
  },
79
79
  {
80
- title: 'experimental_MCPAppRenderer',
80
+ title: 'MCPAppRenderer',
81
81
  description: 'Render interactive MCP App tool UIs in React.',
82
82
  href: '/docs/reference/ai-sdk-ui/mcp-app-renderer',
83
83
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "7.0.156",
3
+ "version": "7.0.158",
4
4
  "type": "module",
5
5
  "description": "AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.",
6
6
  "license": "Apache-2.0",
@@ -42,20 +42,20 @@
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "@ai-sdk/gateway": "4.0.129",
46
- "@ai-sdk/provider": "4.0.34",
47
- "@ai-sdk/provider-utils": "5.0.70"
45
+ "@ai-sdk/gateway": "4.0.131",
46
+ "@ai-sdk/provider": "4.0.35",
47
+ "@ai-sdk/provider-utils": "5.0.72"
48
48
  },
49
49
  "devDependencies": {
50
- "@ai-sdk/amazon-bedrock": "5.0.127",
51
- "@ai-sdk/deepseek": "3.0.75",
52
- "@ai-sdk/google": "4.0.107",
53
- "@ai-sdk/groq": "4.0.72",
54
- "@ai-sdk/huggingface": "2.0.80",
55
- "@ai-sdk/moonshotai": "3.0.80",
56
- "@ai-sdk/openai": "4.0.104",
50
+ "@ai-sdk/amazon-bedrock": "5.0.129",
51
+ "@ai-sdk/deepseek": "3.0.77",
52
+ "@ai-sdk/google": "4.0.109",
53
+ "@ai-sdk/groq": "4.0.74",
54
+ "@ai-sdk/huggingface": "2.0.82",
55
+ "@ai-sdk/moonshotai": "3.0.82",
56
+ "@ai-sdk/openai": "4.0.106",
57
57
  "@ai-sdk/test-server": "2.0.4",
58
- "@ai-sdk/xai": "5.0.32",
58
+ "@ai-sdk/xai": "5.0.34",
59
59
  "@edge-runtime/vm": "^5.0.0",
60
60
  "@smithy/eventstream-codec": "^4.3.3",
61
61
  "@smithy/util-utf8": "^4.3.3",
@@ -1,6 +1,13 @@
1
1
  export type { ActiveTools } from './active-tools';
2
2
  export type { ContentPart } from './content-part';
3
- export { filterActiveTools as experimental_filterActiveTools } from './filter-active-tools';
3
+ export {
4
+ filterActiveTools,
5
+
6
+ /**
7
+ * @deprecated Use `filterActiveTools` instead.
8
+ */
9
+ filterActiveTools as experimental_filterActiveTools,
10
+ } from './filter-active-tools';
4
11
  export { generateText, type GenerateTextInclude } from './generate-text';
5
12
  export type {
6
13
  GenerateTextAbortEvent,
@@ -69,6 +76,11 @@ export {
69
76
  } from './stop-condition';
70
77
  export {
71
78
  streamLanguageModelCall as experimental_streamLanguageModelCall,
79
+ type LanguageModelStreamPart,
80
+
81
+ /**
82
+ * @deprecated Use `LanguageModelStreamPart` instead. This alias will be removed in v8.
83
+ */
72
84
  type LanguageModelStreamPart as Experimental_LanguageModelStreamPart,
73
85
  } from './stream-language-model-call';
74
86
  export {
package/src/index.ts CHANGED
@@ -26,6 +26,8 @@ export {
26
26
  type InferToolOutput,
27
27
  type Experimental_SandboxSession,
28
28
  type Experimental_SandboxProcess,
29
+ type Experimental_SandboxFileStat,
30
+ type Experimental_SandboxDirectoryEntry,
29
31
  type Experimental_ToolCallerTool,
30
32
  type Schema,
31
33
  type Tool,
@@ -1,7 +1,7 @@
1
1
  import type { Experimental_SandboxSession } from '@ai-sdk/provider-utils';
2
2
 
3
3
  /**
4
- * File stubs and an unimplemented spawn method on `Experimental_SandboxSession`,
4
+ * File and path stubs and an unimplemented spawn method on `Experimental_SandboxSession`,
5
5
  * intended to be spread into test fixtures that only care about `run`.
6
6
  */
7
7
  export const mockSandboxSessionFileStubs: Pick<
@@ -12,6 +12,9 @@ export const mockSandboxSessionFileStubs: Pick<
12
12
  | 'writeFile'
13
13
  | 'writeBinaryFile'
14
14
  | 'writeTextFile'
15
+ | 'stat'
16
+ | 'listDirectory'
17
+ | 'deleteFile'
15
18
  | 'spawn'
16
19
  > = {
17
20
  readFile: async () => null,
@@ -20,6 +23,9 @@ export const mockSandboxSessionFileStubs: Pick<
20
23
  writeFile: async () => {},
21
24
  writeBinaryFile: async () => {},
22
25
  writeTextFile: async () => {},
26
+ stat: async () => null,
27
+ listDirectory: async () => null,
28
+ deleteFile: async () => false,
23
29
  spawn: async () => {
24
30
  throw new Error('spawn is not implemented in this mock.');
25
31
  },
@@ -232,7 +232,6 @@ export function fixJson(input: string): string {
232
232
  }
233
233
 
234
234
  default: {
235
- lastValidIndex = i;
236
235
  processValueStart(char, i, 'INSIDE_ARRAY_AFTER_VALUE');
237
236
  break;
238
237
  }
@@ -1,3 +1,5 @@
1
1
  export function isNodeRuntime(): boolean {
2
- return typeof process !== 'undefined' && process.release?.name === 'node';
2
+ // Access the optional global directly so Edge bundlers do not treat this
3
+ // runtime check as an unsupported use of the Node.js process API.
4
+ return globalThis.process?.release?.name === 'node';
3
5
  }