ai 7.0.0-beta.81 → 7.0.0-beta.83
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 +13 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/docs/02-getting-started/09-coding-agents.mdx +9 -11
- package/docs/03-ai-sdk-core/60-telemetry.mdx +3 -3
- package/docs/03-ai-sdk-core/65-devtools.mdx +30 -16
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 7.0.0-beta.83
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [6b0a40d]
|
|
8
|
+
- @ai-sdk/gateway@4.0.0-beta.46
|
|
9
|
+
|
|
10
|
+
## 7.0.0-beta.82
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- e27ed76: feat(devtools): add new devtools integration for telemetry
|
|
15
|
+
|
|
3
16
|
## 7.0.0-beta.81
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1401,7 +1401,7 @@ var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
|
1401
1401
|
var import_provider_utils4 = require("@ai-sdk/provider-utils");
|
|
1402
1402
|
|
|
1403
1403
|
// src/version.ts
|
|
1404
|
-
var VERSION = true ? "7.0.0-beta.
|
|
1404
|
+
var VERSION = true ? "7.0.0-beta.83" : "0.0.0-test";
|
|
1405
1405
|
|
|
1406
1406
|
// src/util/download/download.ts
|
|
1407
1407
|
var download = async ({
|
package/dist/index.mjs
CHANGED
|
@@ -1285,7 +1285,7 @@ import {
|
|
|
1285
1285
|
} from "@ai-sdk/provider-utils";
|
|
1286
1286
|
|
|
1287
1287
|
// src/version.ts
|
|
1288
|
-
var VERSION = true ? "7.0.0-beta.
|
|
1288
|
+
var VERSION = true ? "7.0.0-beta.83" : "0.0.0-test";
|
|
1289
1289
|
|
|
1290
1290
|
// src/util/download/download.ts
|
|
1291
1291
|
var download = async ({
|
package/dist/internal/index.js
CHANGED
|
@@ -154,7 +154,7 @@ var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
|
154
154
|
var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
155
155
|
|
|
156
156
|
// src/version.ts
|
|
157
|
-
var VERSION = true ? "7.0.0-beta.
|
|
157
|
+
var VERSION = true ? "7.0.0-beta.83" : "0.0.0-test";
|
|
158
158
|
|
|
159
159
|
// src/util/download/download.ts
|
|
160
160
|
var download = async ({
|
package/dist/internal/index.mjs
CHANGED
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
} from "@ai-sdk/provider-utils";
|
|
135
135
|
|
|
136
136
|
// src/version.ts
|
|
137
|
-
var VERSION = true ? "7.0.0-beta.
|
|
137
|
+
var VERSION = true ? "7.0.0-beta.83" : "0.0.0-test";
|
|
138
138
|
|
|
139
139
|
// src/util/download/download.ts
|
|
140
140
|
var download = async ({
|
|
@@ -87,28 +87,26 @@ Install the DevTools package:
|
|
|
87
87
|
</Tabs>
|
|
88
88
|
</div>
|
|
89
89
|
|
|
90
|
-
###
|
|
90
|
+
### Register the integration
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
Register `DevToolsTelemetry` globally so it captures all AI SDK calls:
|
|
93
93
|
|
|
94
94
|
```ts
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
95
|
+
import { registerTelemetryIntegration } from 'ai';
|
|
96
|
+
import { DevToolsTelemetry } from '@ai-sdk/devtools';
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
model: gateway('anthropic/claude-sonnet-4.5'),
|
|
100
|
-
middleware: devToolsMiddleware(),
|
|
101
|
-
});
|
|
98
|
+
registerTelemetryIntegration(DevToolsTelemetry());
|
|
102
99
|
```
|
|
103
100
|
|
|
104
|
-
|
|
101
|
+
Then enable [telemetry](/docs/ai-sdk-core/telemetry) on your AI SDK calls:
|
|
105
102
|
|
|
106
|
-
```ts
|
|
103
|
+
```ts highlight="5"
|
|
107
104
|
import { generateText } from 'ai';
|
|
108
105
|
|
|
109
106
|
const result = await generateText({
|
|
110
|
-
model,
|
|
107
|
+
model: openai('gpt-4o'),
|
|
111
108
|
prompt: 'What cities are in the United States?',
|
|
109
|
+
experimental_telemetry: { isEnabled: true },
|
|
112
110
|
});
|
|
113
111
|
```
|
|
114
112
|
|
|
@@ -116,14 +116,14 @@ You can also pass one or more integrations to individual `generateText` or `stre
|
|
|
116
116
|
|
|
117
117
|
```ts highlight="6-8"
|
|
118
118
|
import { streamText } from 'ai';
|
|
119
|
-
import {
|
|
119
|
+
import { DevToolsTelemetry } from '@ai-sdk/devtools';
|
|
120
120
|
|
|
121
121
|
const result = streamText({
|
|
122
122
|
model: openai('gpt-4o'),
|
|
123
123
|
prompt: 'Hello!',
|
|
124
124
|
experimental_telemetry: {
|
|
125
125
|
isEnabled: true,
|
|
126
|
-
integrations: [
|
|
126
|
+
integrations: [DevToolsTelemetry()],
|
|
127
127
|
},
|
|
128
128
|
});
|
|
129
129
|
```
|
|
@@ -133,7 +133,7 @@ You can combine multiple integrations — they all receive the same lifecycle ev
|
|
|
133
133
|
```ts
|
|
134
134
|
experimental_telemetry: {
|
|
135
135
|
isEnabled: true,
|
|
136
|
-
integrations: [
|
|
136
|
+
integrations: [DevToolsTelemetry(), customLogger()],
|
|
137
137
|
},
|
|
138
138
|
```
|
|
139
139
|
|
|
@@ -14,7 +14,7 @@ AI SDK DevTools gives you full visibility over your AI SDK calls with [`generate
|
|
|
14
14
|
|
|
15
15
|
DevTools is composed of two parts:
|
|
16
16
|
|
|
17
|
-
1. **
|
|
17
|
+
1. **Telemetry Integration**: Captures runs and steps from your AI SDK calls via the [telemetry](/docs/ai-sdk-core/telemetry) system
|
|
18
18
|
2. **Viewer**: A web UI to inspect the captured data
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
@@ -32,28 +32,42 @@ pnpm add @ai-sdk/devtools
|
|
|
32
32
|
|
|
33
33
|
## Using DevTools
|
|
34
34
|
|
|
35
|
-
###
|
|
35
|
+
### Register the integration
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Register `DevToolsTelemetry` globally so it captures all AI SDK calls:
|
|
38
38
|
|
|
39
39
|
```ts
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
40
|
+
import { registerTelemetryIntegration } from 'ai';
|
|
41
|
+
import { DevToolsTelemetry } from '@ai-sdk/devtools';
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
model: gateway('anthropic/claude-sonnet-4.5'),
|
|
45
|
-
middleware: devToolsMiddleware(),
|
|
46
|
-
});
|
|
43
|
+
registerTelemetryIntegration(DevToolsTelemetry());
|
|
47
44
|
```
|
|
48
45
|
|
|
49
|
-
|
|
46
|
+
Then enable telemetry on your AI SDK calls:
|
|
50
47
|
|
|
51
|
-
```ts highlight="
|
|
48
|
+
```ts highlight="5"
|
|
52
49
|
import { generateText } from 'ai';
|
|
53
50
|
|
|
54
51
|
const result = await generateText({
|
|
55
|
-
model,
|
|
52
|
+
model: openai('gpt-4o'),
|
|
56
53
|
prompt: 'What cities are in the United States?',
|
|
54
|
+
experimental_telemetry: { isEnabled: true },
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
You can also pass the integration to individual calls instead of registering it globally:
|
|
59
|
+
|
|
60
|
+
```ts highlight="7-9"
|
|
61
|
+
import { streamText } from 'ai';
|
|
62
|
+
import { DevToolsTelemetry } from '@ai-sdk/devtools';
|
|
63
|
+
|
|
64
|
+
const result = streamText({
|
|
65
|
+
model: openai('gpt-4o'),
|
|
66
|
+
prompt: 'Hello!',
|
|
67
|
+
experimental_telemetry: {
|
|
68
|
+
isEnabled: true,
|
|
69
|
+
integrations: [DevToolsTelemetry()],
|
|
70
|
+
},
|
|
57
71
|
});
|
|
58
72
|
```
|
|
59
73
|
|
|
@@ -80,7 +94,7 @@ npx @ai-sdk/devtools
|
|
|
80
94
|
|
|
81
95
|
## Captured data
|
|
82
96
|
|
|
83
|
-
|
|
97
|
+
DevTools captures the following information from your AI SDK calls:
|
|
84
98
|
|
|
85
99
|
- **Input parameters and prompts**: View the complete input sent to your LLM
|
|
86
100
|
- **Output content and tool calls**: Inspect generated text and tool invocations
|
|
@@ -94,14 +108,14 @@ DevTools organizes captured data into runs and steps:
|
|
|
94
108
|
- **Run**: A complete multi-step AI interaction, grouped by the initial prompt
|
|
95
109
|
- **Step**: A single LLM call within a run (e.g., one `generateText` or `streamText` call)
|
|
96
110
|
|
|
97
|
-
Multi-step interactions, such as those created by tool calling or agent loops, are grouped together as a single run with multiple steps.
|
|
111
|
+
Multi-step interactions, such as those created by tool calling or agent loops, are grouped together as a single run with multiple steps. Nested sub-agent calls are linked to their parent run, making it easy to trace the full execution tree.
|
|
98
112
|
|
|
99
113
|
## How it works
|
|
100
114
|
|
|
101
|
-
The
|
|
115
|
+
The `DevToolsTelemetry` integration hooks into the AI SDK [telemetry](/docs/ai-sdk-core/telemetry) lifecycle to capture all `generateText`, `streamText`, `generateObject`, and `streamObject` calls. Captured data is stored locally in a JSON file (`.devtools/generations.json`) and served through a web UI built with Hono and React.
|
|
102
116
|
|
|
103
117
|
<Note type="warning">
|
|
104
|
-
The
|
|
118
|
+
The integration automatically adds `.devtools` to your `.gitignore` file.
|
|
105
119
|
Verify that `.devtools` is in your `.gitignore` to ensure you don't commit
|
|
106
120
|
sensitive AI interaction data to your repository.
|
|
107
121
|
</Note>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.83",
|
|
4
4
|
"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.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@ai-sdk/gateway": "4.0.0-beta.
|
|
47
|
+
"@ai-sdk/gateway": "4.0.0-beta.46",
|
|
48
48
|
"@ai-sdk/provider": "4.0.0-beta.10",
|
|
49
49
|
"@ai-sdk/provider-utils": "5.0.0-beta.17"
|
|
50
50
|
},
|