ai 3.3.30 → 3.3.32
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 +12 -0
- package/dist/index.d.mts +100 -2
- package/dist/index.d.ts +100 -2
- package/dist/index.js +137 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +137 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/rsc/dist/index.d.ts +7 -1
- package/rsc/dist/rsc-server.d.mts +7 -1
- package/rsc/dist/rsc-server.mjs +2 -0
- package/rsc/dist/rsc-server.mjs.map +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ai",
|
3
|
-
"version": "3.3.
|
3
|
+
"version": "3.3.32",
|
4
4
|
"description": "Vercel AI SDK - The AI Toolkit for TypeScript and JavaScript",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"sideEffects": false,
|
@@ -101,8 +101,8 @@
|
|
101
101
|
"tsup": "^7.2.0",
|
102
102
|
"typescript": "5.5.4",
|
103
103
|
"zod": "3.23.8",
|
104
|
-
"
|
105
|
-
"
|
104
|
+
"eslint-config-vercel-ai": "0.0.0",
|
105
|
+
"@vercel/ai-tsconfig": "0.0.0"
|
106
106
|
},
|
107
107
|
"peerDependencies": {
|
108
108
|
"openai": "^4.42.0",
|
package/rsc/dist/index.d.ts
CHANGED
@@ -460,7 +460,7 @@ type RenderResult = {
|
|
460
460
|
*/
|
461
461
|
declare function streamUI<TOOLS extends {
|
462
462
|
[name: string]: z.ZodTypeAny;
|
463
|
-
} = {}>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, headers, initial, text, onFinish, ...settings }: CallSettings & Prompt & {
|
463
|
+
} = {}>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, headers, initial, text, experimental_providerMetadata: providerMetadata, onFinish, ...settings }: CallSettings & Prompt & {
|
464
464
|
/**
|
465
465
|
* The language model to use.
|
466
466
|
*/
|
@@ -478,6 +478,12 @@ declare function streamUI<TOOLS extends {
|
|
478
478
|
text?: RenderText;
|
479
479
|
initial?: ReactNode;
|
480
480
|
/**
|
481
|
+
Additional provider-specific metadata. They are passed through
|
482
|
+
to the provider from the AI SDK and enable provider-specific
|
483
|
+
functionality that can be fully encapsulated in the provider.
|
484
|
+
*/
|
485
|
+
experimental_providerMetadata?: ProviderMetadata;
|
486
|
+
/**
|
481
487
|
* Callback that is called when the LLM response and the final object validation are finished.
|
482
488
|
*/
|
483
489
|
onFinish?: (event: {
|
@@ -458,7 +458,7 @@ type RenderResult = {
|
|
458
458
|
*/
|
459
459
|
declare function streamUI<TOOLS extends {
|
460
460
|
[name: string]: z.ZodTypeAny;
|
461
|
-
} = {}>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, headers, initial, text, onFinish, ...settings }: CallSettings & Prompt & {
|
461
|
+
} = {}>({ model, tools, toolChoice, system, prompt, messages, maxRetries, abortSignal, headers, initial, text, experimental_providerMetadata: providerMetadata, onFinish, ...settings }: CallSettings & Prompt & {
|
462
462
|
/**
|
463
463
|
* The language model to use.
|
464
464
|
*/
|
@@ -476,6 +476,12 @@ declare function streamUI<TOOLS extends {
|
|
476
476
|
text?: RenderText;
|
477
477
|
initial?: ReactNode;
|
478
478
|
/**
|
479
|
+
Additional provider-specific metadata. They are passed through
|
480
|
+
to the provider from the AI SDK and enable provider-specific
|
481
|
+
functionality that can be fully encapsulated in the provider.
|
482
|
+
*/
|
483
|
+
experimental_providerMetadata?: ProviderMetadata;
|
484
|
+
/**
|
479
485
|
* Callback that is called when the LLM response and the final object validation are finished.
|
480
486
|
*/
|
481
487
|
onFinish?: (event: {
|
package/rsc/dist/rsc-server.mjs
CHANGED
@@ -1291,6 +1291,7 @@ async function streamUI({
|
|
1291
1291
|
headers,
|
1292
1292
|
initial,
|
1293
1293
|
text,
|
1294
|
+
experimental_providerMetadata: providerMetadata,
|
1294
1295
|
onFinish,
|
1295
1296
|
...settings
|
1296
1297
|
}) {
|
@@ -1368,6 +1369,7 @@ async function streamUI({
|
|
1368
1369
|
prompt: validatedPrompt,
|
1369
1370
|
modelSupportsImageUrls: model.supportsImageUrls
|
1370
1371
|
}),
|
1372
|
+
providerMetadata,
|
1371
1373
|
abortSignal,
|
1372
1374
|
headers
|
1373
1375
|
})
|