@mastra/ai-sdk 1.2.0-alpha.1 → 1.2.0
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 +36 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @mastra/ai-sdk
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Exposes `messageMetadata` option in `handleChatStream` for attaching custom metadata to streamed messages. ([#14315](https://github.com/mastra-ai/mastra/pull/14315))
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
const stream = await handleChatStream({
|
|
11
|
+
mastra,
|
|
12
|
+
agentId: 'my-agent',
|
|
13
|
+
params,
|
|
14
|
+
messageMetadata: () => ({ createdAt: new Date().toISOString() }),
|
|
15
|
+
});
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Added support for AI SDK v6 response helpers while keeping the existing v5 stream path backwards compatible. ([#14405](https://github.com/mastra-ai/mastra/pull/14405))
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { toAISdkStream } from '@mastra/ai-sdk';
|
|
24
|
+
|
|
25
|
+
// Existing default path for AI SDK v5
|
|
26
|
+
const v5Stream = toAISdkStream(mastraStream, { from: 'agent' });
|
|
27
|
+
|
|
28
|
+
// Use the v6 stream contract with AI SDK v6 response helpers
|
|
29
|
+
const v6Stream = toAISdkStream(mastraStream, { from: 'agent', version: 'v6' });
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`toAISdkStream`, the framework-agnostic `handle*Stream()` helpers, and the `chatRoute()` / `networkRoute()` / `workflowRoute()` route helpers keep the existing v5/default behavior. Pass `version: 'v6'` when your app is typed against AI SDK v6 response helpers.
|
|
33
|
+
|
|
34
|
+
- Fixed `withMastra` to accept `LanguageModelV3` models from the latest AI SDK (`@ai-sdk/openai@3+`, `ai@6+`). Previously, passing a V3 model caused a TypeScript error: `LanguageModelV3 is not assignable to LanguageModelV2`. The function now accepts both `LanguageModelV2` and `LanguageModelV3` via overloads. ([#14380](https://github.com/mastra-ai/mastra/pull/14380))
|
|
35
|
+
|
|
36
|
+
- Updated dependencies [[`cb611a1`](https://github.com/mastra-ai/mastra/commit/cb611a1e89a4f4cf74c97b57e0c27bb56f2eceb5), [`da93115`](https://github.com/mastra-ai/mastra/commit/da931155c1a9bc63d455d3d86b4ec984db5991fe), [`62d1d3c`](https://github.com/mastra-ai/mastra/commit/62d1d3cc08fe8182e7080237fd975de862ec8c91), [`9e1a3ed`](https://github.com/mastra-ai/mastra/commit/9e1a3ed07cfafb5e8e19a796ce0bee817002d7c0), [`8681ecb`](https://github.com/mastra-ai/mastra/commit/8681ecb86184d5907267000e4576cc442a9a83fc), [`28d0249`](https://github.com/mastra-ai/mastra/commit/28d0249295782277040ad1e0d243e695b7ab1ce4), [`681ee1c`](https://github.com/mastra-ai/mastra/commit/681ee1c811359efd1b8bebc4bce35b9bb7b14bec), [`bb0f09d`](https://github.com/mastra-ai/mastra/commit/bb0f09dbac58401b36069f483acf5673202db5b5), [`a579f7a`](https://github.com/mastra-ai/mastra/commit/a579f7a31e582674862b5679bc79af7ccf7429b8), [`5f7e9d0`](https://github.com/mastra-ai/mastra/commit/5f7e9d0db664020e1f3d97d7d18c6b0b9d4843d0), [`d7f14c3`](https://github.com/mastra-ai/mastra/commit/d7f14c3285cd253ecdd5f58139b7b6cbdf3678b5), [`0efe12a`](https://github.com/mastra-ai/mastra/commit/0efe12a5f008a939a1aac71699486ba40138054e)]:
|
|
37
|
+
- @mastra/core@1.15.0
|
|
38
|
+
|
|
3
39
|
## 1.2.0-alpha.1
|
|
4
40
|
|
|
5
41
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/ai-sdk",
|
|
3
|
-
"version": "1.2.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Adds custom API routes to be compatible with the AI SDK UI parts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"vitest": "4.0.18",
|
|
48
48
|
"zod": "^4.3.6",
|
|
49
|
-
"@internal/ai-sdk-v4": "0.0.
|
|
50
|
-
"@internal/ai-
|
|
51
|
-
"@internal/lint": "0.0.
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
49
|
+
"@internal/ai-sdk-v4": "0.0.20",
|
|
50
|
+
"@internal/ai-sdk-v5": "0.0.20",
|
|
51
|
+
"@internal/lint": "0.0.73",
|
|
52
|
+
"@internal/types-builder": "0.0.48",
|
|
53
|
+
"@internal/ai-v6": "0.0.20",
|
|
54
|
+
"@mastra/core": "1.15.0",
|
|
55
55
|
"@mastra/libsql": "1.7.1",
|
|
56
|
-
"@
|
|
56
|
+
"@mastra/memory": "1.9.0"
|
|
57
57
|
},
|
|
58
58
|
"keywords": [
|
|
59
59
|
"mastra",
|