ai 5.0.0-canary.2 → 5.0.0-canary.20

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +305 -0
  2. package/README.md +4 -4
  3. package/dist/index.d.mts +3246 -2586
  4. package/dist/index.d.ts +3246 -2586
  5. package/dist/index.js +4080 -3409
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +4748 -4084
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/internal/index.d.mts +473 -0
  10. package/dist/internal/index.d.ts +473 -0
  11. package/dist/internal/index.js +957 -0
  12. package/dist/internal/index.js.map +1 -0
  13. package/dist/internal/index.mjs +930 -0
  14. package/dist/internal/index.mjs.map +1 -0
  15. package/{mcp-stdio/dist → dist/mcp-stdio}/index.js +5 -8
  16. package/dist/mcp-stdio/index.js.map +1 -0
  17. package/{mcp-stdio/dist → dist/mcp-stdio}/index.mjs +5 -20
  18. package/dist/mcp-stdio/index.mjs.map +1 -0
  19. package/{test/dist → dist/test}/index.d.mts +23 -24
  20. package/{test/dist → dist/test}/index.d.ts +23 -24
  21. package/{test/dist → dist/test}/index.js +39 -16
  22. package/dist/test/index.js.map +1 -0
  23. package/{test/dist → dist/test}/index.mjs +38 -15
  24. package/dist/test/index.mjs.map +1 -0
  25. package/internal.d.ts +1 -0
  26. package/mcp-stdio.d.ts +1 -0
  27. package/package.json +32 -49
  28. package/test.d.ts +1 -0
  29. package/mcp-stdio/create-child-process.test.ts +0 -92
  30. package/mcp-stdio/create-child-process.ts +0 -21
  31. package/mcp-stdio/dist/index.js.map +0 -1
  32. package/mcp-stdio/dist/index.mjs.map +0 -1
  33. package/mcp-stdio/get-environment.ts +0 -43
  34. package/mcp-stdio/index.ts +0 -4
  35. package/mcp-stdio/mcp-stdio-transport.test.ts +0 -262
  36. package/mcp-stdio/mcp-stdio-transport.ts +0 -157
  37. package/rsc/dist/index.d.ts +0 -813
  38. package/rsc/dist/index.mjs +0 -18
  39. package/rsc/dist/rsc-client.d.mts +0 -1
  40. package/rsc/dist/rsc-client.mjs +0 -18
  41. package/rsc/dist/rsc-client.mjs.map +0 -1
  42. package/rsc/dist/rsc-server.d.mts +0 -748
  43. package/rsc/dist/rsc-server.mjs +0 -2142
  44. package/rsc/dist/rsc-server.mjs.map +0 -1
  45. package/rsc/dist/rsc-shared.d.mts +0 -101
  46. package/rsc/dist/rsc-shared.mjs +0 -308
  47. package/rsc/dist/rsc-shared.mjs.map +0 -1
  48. package/test/dist/index.js.map +0 -1
  49. package/test/dist/index.mjs.map +0 -1
  50. package/{mcp-stdio/dist → dist/mcp-stdio}/index.d.mts +8 -8
  51. package/{mcp-stdio/dist → dist/mcp-stdio}/index.d.ts +8 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,310 @@
1
1
  # ai
2
2
 
3
+ ## 5.0.0-canary.20
4
+
5
+ ### Major Changes
6
+
7
+ - 13fef90: chore (ai): remove automatic conversion of UI messages to model messages
8
+ - 496bbc1: chore (ui): inline/remove ChatRequest type
9
+ - da70d79: chore (ai): remove getUIText helper
10
+ - c7710a9: chore (ai): rename DataStreamToSSETransformStream to JsonToSseTransformStream
11
+ - 35fc02c: chore (ui): rename RequestOptions to CompletionRequestOptions
12
+ - b983b51: feat (ai): support model message array in prompt
13
+
14
+ ### Minor Changes
15
+
16
+ - bcea599: feat (ai): add content to generateText result
17
+ - 48d675a: feat (ai): add content to streamText result
18
+
19
+ ### Patch Changes
20
+
21
+ - e90d45d: chore (rsc): move HANGING_STREAM_WARNING_TIME constant into @ai-sdk/rsc package
22
+ - bc3109f: chore (ai): push stream-callbacks into langchain/llamaindex adapters
23
+ - Updated dependencies [87b828f]
24
+ - @ai-sdk/provider-utils@3.0.0-canary.16
25
+
26
+ ## 5.0.0-canary.19
27
+
28
+ ### Major Changes
29
+
30
+ - 2d03e19: chore (ai): remove StreamCallbacks.onCompletion
31
+ - 319b989: chore (ai): remove content from ui messages
32
+ - 441d042: chore (ui): data stream protocol v2 with SSEs
33
+ - dcc549b: remove StreamTextResult.mergeIntoDataStream method
34
+ rename DataStreamOptions.getErrorMessage to onError
35
+ add pipeTextStreamToResponse function
36
+ add createTextStreamResponse function
37
+ change createDataStreamResponse function to accept a DataStream and not a DataStreamWriter
38
+ change pipeDataStreamToResponse function to accept a DataStream and not a DataStreamWriter
39
+ change pipeDataStreamToResponse function to have a single parameter
40
+ - cb2b53a: chore (ai): refactor header preparation
41
+ - e244a78: chore (ai): remove StreamData and mergeStreams
42
+
43
+ ## 5.0.0-canary.18
44
+
45
+ ### Major Changes
46
+
47
+ - c60f895: chore (ai): remove useChat keepLastMessageOnError
48
+ - a662dea: chore (ai): remove sendExtraMessageFields
49
+
50
+ ### Patch Changes
51
+
52
+ - a571d6e: chore(provider-utils): move ToolResultContent to provider-utils
53
+ - 332167b: chore (ai): move maxSteps into UseChatOptions
54
+ - a8c8bd5: feat(embed-many): respect supportsParallelCalls & concurrency
55
+ - Updated dependencies [a571d6e]
56
+ - Updated dependencies [a8c8bd5]
57
+ - Updated dependencies [7979f7f]
58
+ - Updated dependencies [41fa418]
59
+ - @ai-sdk/provider-utils@3.0.0-canary.15
60
+ - @ai-sdk/provider@2.0.0-canary.14
61
+
62
+ ## 5.0.0-canary.17
63
+
64
+ ### Major Changes
65
+
66
+ - f04fb4a: chore (ai): replace useChat attachments with file ui parts
67
+ - fd1924b: chore (ai): remove redundant `mimeType` property
68
+ - fafc3f2: chore (ai): change file to parts to use urls instead of data
69
+ - 92cb0a2: chore (ai): rename CoreMessage to ModelMessage
70
+
71
+ ### Minor Changes
72
+
73
+ - c9ad635: feat (ai): add filename to file ui parts
74
+
75
+ ### Patch Changes
76
+
77
+ - 9bd5ab5: feat (provider): add providerMetadata to ImageModelV2 interface (#5977)
78
+
79
+ The `experimental_generateImage` method from the `ai` package now returnes revised prompts for OpenAI's image models.
80
+
81
+ ```js
82
+ const prompt = 'Santa Claus driving a Cadillac';
83
+
84
+ const { providerMetadata } = await experimental_generateImage({
85
+ model: openai.image('dall-e-3'),
86
+ prompt,
87
+ });
88
+
89
+ const revisedPrompt = providerMetadata.openai.images[0]?.revisedPrompt;
90
+
91
+ console.log({
92
+ prompt,
93
+ revisedPrompt,
94
+ });
95
+ ```
96
+
97
+ - Updated dependencies [957b739]
98
+ - Updated dependencies [9bd5ab5]
99
+ - @ai-sdk/provider-utils@3.0.0-canary.14
100
+ - @ai-sdk/provider@2.0.0-canary.13
101
+
102
+ ## 5.0.0-canary.16
103
+
104
+ ### Major Changes
105
+
106
+ - ec78cdc: chore (ai): remove "data" UIMessage role
107
+ - 8b86e99: chore (ai): replace `Message` with `UIMessage`
108
+ - 2524fc7: chore (ai): remove ui message toolInvocations property
109
+ - 175b868: chore (ai): rename reasoning UI parts 'reasoning' property to 'text'
110
+
111
+ ### Patch Changes
112
+
113
+ - 9b4d074: feat(streamObject): add enum support
114
+ - 28ad69e: fix(react-native): support experimental_attachments without FileList global
115
+ - ec5933d: chore (ai/mcp): add `assertCapability` method to experimental MCP client
116
+
117
+ ## 5.0.0-canary.15
118
+
119
+ ### Major Changes
120
+
121
+ - 4bfe9ec: chore (ai): remove ui message reasoning property
122
+ - 2877a74: chore (ai): remove ui message data property
123
+
124
+ ### Patch Changes
125
+
126
+ - d9209ca: fix (image-model): `specificationVersion: v1` -> `v2`
127
+ - ea27cc6: chore (ai): use JSONValue definition from provider
128
+ - 0ff02bb: chore(provider-utils): move over jsonSchema
129
+ - Updated dependencies [7b3ae3f]
130
+ - Updated dependencies [0ff02bb]
131
+ - @ai-sdk/provider@2.0.0-canary.12
132
+ - @ai-sdk/provider-utils@3.0.0-canary.13
133
+
134
+ ## 5.0.0-canary.14
135
+
136
+ ### Patch Changes
137
+
138
+ - 9bf7291: chore(providers/openai): enable structuredOutputs by default & switch to provider option
139
+ - 4617fab: chore(embedding-models): remove remaining settings
140
+ - a76a62b: feat (ai): add experimental prepareStep callback to generateText
141
+ - Updated dependencies [9bf7291]
142
+ - Updated dependencies [4617fab]
143
+ - Updated dependencies [e030615]
144
+ - @ai-sdk/provider@2.0.0-canary.11
145
+ - @ai-sdk/provider-utils@3.0.0-canary.12
146
+
147
+ ## 5.0.0-canary.13
148
+
149
+ ### Patch Changes
150
+
151
+ - 14cb3be: chore(providers/llamaindex): extract to separate package
152
+ - 66962ed: fix(packages): export node10 compatible types
153
+ - 9301f86: refactor (image-model): rename `ImageModelV1` to `ImageModelV2`
154
+ - Updated dependencies [66962ed]
155
+ - Updated dependencies [9301f86]
156
+ - Updated dependencies [a3f768e]
157
+ - @ai-sdk/provider-utils@3.0.0-canary.11
158
+ - @ai-sdk/provider@2.0.0-canary.10
159
+
160
+ ## 5.0.0-canary.12
161
+
162
+ ### Patch Changes
163
+
164
+ - Updated dependencies [e86be6f]
165
+ - @ai-sdk/provider@2.0.0-canary.9
166
+ - @ai-sdk/provider-utils@3.0.0-canary.10
167
+
168
+ ## 5.0.0-canary.11
169
+
170
+ ### Patch Changes
171
+
172
+ - 8e64e9c: feat (ai): allow using provider default temperature by specifying null
173
+ - Updated dependencies [95857aa]
174
+ - Updated dependencies [7ea4132]
175
+ - @ai-sdk/provider@2.0.0-canary.8
176
+ - @ai-sdk/provider-utils@3.0.0-canary.9
177
+
178
+ ## 5.0.0-canary.10
179
+
180
+ ### Patch Changes
181
+
182
+ - d8aeaef: feat(providers/fal): add transcribe
183
+ - 3e10408: fix(utils/detect-mimetype): add support for detecting id3 tags
184
+
185
+ ## 5.0.0-canary.9
186
+
187
+ ### Major Changes
188
+
189
+ - a847c3e: chore: rename reasoning to reasoningText etc
190
+ - b32e192: chore (ai): rename reasoning to reasoningText, rename reasoningDetails to reasoning (streamText, generateText)
191
+
192
+ ### Patch Changes
193
+
194
+ - cb9c9e4: remove deprecated `experimental_wrapLanguageModel`
195
+ - 8aa9e20: feat: add speech with experimental_generateSpeech
196
+ - Updated dependencies [5d142ab]
197
+ - Updated dependencies [b6b43c7]
198
+ - Updated dependencies [8aa9e20]
199
+ - Updated dependencies [3795467]
200
+ - @ai-sdk/provider-utils@3.0.0-canary.8
201
+ - @ai-sdk/provider@2.0.0-canary.7
202
+
203
+ ## 5.0.0-canary.8
204
+
205
+ ### Major Changes
206
+
207
+ - 14c9410: chore: refactor file towards source pattern (spec)
208
+
209
+ ### Patch Changes
210
+
211
+ - 5d1e3ba: chore (ai): remove provider re-exports
212
+ - 26735b5: chore(embedding-model): add v2 interface
213
+ - 7827a49: fix (ai/core): refactor `toResponseMessages` to filter out empty string/content
214
+ - bd8a36c: feat(embedding-model-v2/embedMany): add response body field
215
+ - b6f9f3c: remove deprecated `CoreTool*` types
216
+ - 92c8e66: fix(ai/core): properly handle custom separator in provider registry
217
+ - fd65bc6: chore(embedding-model-v2): rename rawResponse to response
218
+ - 5bdff05: Removed deprecated `options.throwErrorForEmptyVectors` from `cosineSimilarity()`. Since `throwErrorForEmptyVectors` was the only option the entire `options` argument was removed.
219
+
220
+ ```diff
221
+ - cosineSimilarity(vector1, vector2, options)
222
+ +cosineSimilarity(vector1, vector2)
223
+ ```
224
+
225
+ - Updated dependencies [26735b5]
226
+ - Updated dependencies [443d8ec]
227
+ - Updated dependencies [14c9410]
228
+ - Updated dependencies [d9c98f4]
229
+ - Updated dependencies [c4a2fec]
230
+ - Updated dependencies [0054544]
231
+ - Updated dependencies [9e9c809]
232
+ - Updated dependencies [32831c6]
233
+ - Updated dependencies [d0f9495]
234
+ - Updated dependencies [fd65bc6]
235
+ - Updated dependencies [393138b]
236
+ - Updated dependencies [7182d14]
237
+ - @ai-sdk/provider@2.0.0-canary.6
238
+ - @ai-sdk/provider-utils@3.0.0-canary.7
239
+
240
+ ## 5.0.0-canary.7
241
+
242
+ ### Major Changes
243
+
244
+ - 6fba4c7: chore (ai): remove deprecated experimental_providerMetadata
245
+ - 1766ede: chore: rename maxTokens to maxOutputTokens
246
+
247
+ ### Patch Changes
248
+
249
+ - 0b78e17: chore(ai/generateObject): simplify function signature
250
+ - 3e3b9df: fix (ai/mcp): better support for zero-argument MCP tools
251
+ - f10304b: feat(tool-calling): don't require the user to have to pass parameters
252
+ - Updated dependencies [411e483]
253
+ - Updated dependencies [79457bd]
254
+ - Updated dependencies [ad80501]
255
+ - Updated dependencies [1766ede]
256
+ - Updated dependencies [f10304b]
257
+ - @ai-sdk/provider@2.0.0-canary.5
258
+ - @ai-sdk/provider-utils@3.0.0-canary.6
259
+
260
+ ## 5.0.0-canary.6
261
+
262
+ ### Patch Changes
263
+
264
+ - Updated dependencies [6f6bb89]
265
+ - @ai-sdk/provider@2.0.0-canary.4
266
+ - @ai-sdk/provider-utils@3.0.0-canary.5
267
+
268
+ ## 5.0.0-canary.5
269
+
270
+ ### Patch Changes
271
+
272
+ - b71fe8d: fix(ai): remove jsondiffpatch dependency
273
+ - d91b50d: chore(ui-utils): merge into ai package
274
+ - Updated dependencies [d1a1aa1]
275
+ - @ai-sdk/provider@2.0.0-canary.3
276
+ - @ai-sdk/provider-utils@3.0.0-canary.4
277
+
278
+ ## 5.0.0-canary.4
279
+
280
+ ### Major Changes
281
+
282
+ - e1cbf8a: chore(@ai-sdk/rsc): extract to separate package
283
+
284
+ ### Patch Changes
285
+
286
+ - 225f087: fix (ai/mcp): prevent mutation of customEnv
287
+ - a166433: feat: add transcription with experimental_transcribe
288
+ - 0a87932: core (ai): change transcription model mimeType to mediaType
289
+ - Updated dependencies [a166433]
290
+ - Updated dependencies [abf9a79]
291
+ - Updated dependencies [9f95b35]
292
+ - Updated dependencies [0a87932]
293
+ - Updated dependencies [6dc848c]
294
+ - @ai-sdk/provider-utils@3.0.0-canary.3
295
+ - @ai-sdk/provider@2.0.0-canary.2
296
+ - @ai-sdk/ui-utils@2.0.0-canary.3
297
+
298
+ ## 5.0.0-canary.3
299
+
300
+ ### Patch Changes
301
+
302
+ - Updated dependencies [c57e248]
303
+ - Updated dependencies [33f4a6a]
304
+ - @ai-sdk/provider@2.0.0-canary.1
305
+ - @ai-sdk/provider-utils@3.0.0-canary.2
306
+ - @ai-sdk/ui-utils@2.0.0-canary.2
307
+
3
308
  ## 5.0.0-canary.2
4
309
 
5
310
  ### Patch Changes
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  # AI SDK
4
4
 
5
- The [AI SDK](https://sdk.vercel.ai/docs) is a TypeScript toolkit designed to help you build AI-powered applications using popular frameworks like Next.js, React, Svelte, Vue and runtimes like Node.js.
5
+ The [AI SDK](https://ai-sdk.dev/docs) is a TypeScript toolkit designed to help you build AI-powered applications using popular frameworks like Next.js, React, Svelte, Vue and runtimes like Node.js.
6
6
 
7
- To learn more about how to use the AI SDK, check out our [API Reference](https://sdk.vercel.ai/docs/reference) and [Documentation](https://sdk.vercel.ai/docs).
7
+ To learn more about how to use the AI SDK, check out our [API Reference](https://ai-sdk.dev/docs/reference) and [Documentation](https://ai-sdk.dev/docs).
8
8
 
9
9
  ## Installation
10
10
 
@@ -18,7 +18,7 @@ npm install ai
18
18
 
19
19
  ### AI SDK Core
20
20
 
21
- The [AI SDK Core](https://sdk.vercel.ai/docs/ai-sdk-core/overview) module provides a unified API to interact with model providers like [OpenAI](https://sdk.vercel.ai/providers/ai-sdk-providers/openai), [Anthropic](https://sdk.vercel.ai/providers/ai-sdk-providers/anthropic), [Google](https://sdk.vercel.ai/providers/ai-sdk-providers/google-generative-ai), and more.
21
+ The [AI SDK Core](https://ai-sdk.dev/docs/ai-sdk-core/overview) module provides a unified API to interact with model providers like [OpenAI](https://ai-sdk.dev/providers/ai-sdk-providers/openai), [Anthropic](https://ai-sdk.dev/providers/ai-sdk-providers/anthropic), [Google](https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai), and more.
22
22
 
23
23
  You will then install the model provider of your choice.
24
24
 
@@ -43,7 +43,7 @@ console.log(text);
43
43
 
44
44
  ### AI SDK UI
45
45
 
46
- The [AI SDK UI](https://sdk.vercel.ai/docs/ai-sdk-ui/overview) module provides a set of hooks that help you build chatbots and generative user interfaces. These hooks are framework agnostic, so they can be used in Next.js, React, Svelte, and Vue.
46
+ The [AI SDK UI](https://ai-sdk.dev/docs/ai-sdk-ui/overview) module provides a set of hooks that help you build chatbots and generative user interfaces. These hooks are framework agnostic, so they can be used in Next.js, React, Svelte, and Vue.
47
47
 
48
48
  You need to install the package for your framework:
49
49