ai 7.0.50 → 7.0.52
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 +19 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/internal/index.js +1 -1
- package/package.json +3 -3
- package/src/ui/validate-ui-messages.ts +4 -8
package/dist/internal/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.52",
|
|
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,9 +42,9 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@ai-sdk/gateway": "4.0.
|
|
45
|
+
"@ai-sdk/gateway": "4.0.41",
|
|
46
46
|
"@ai-sdk/provider": "4.0.5",
|
|
47
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
47
|
+
"@ai-sdk/provider-utils": "5.0.21"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@edge-runtime/vm": "^5.0.0",
|
|
@@ -497,14 +497,10 @@ export async function safeValidateUIMessages<UI_MESSAGE extends UIMessage>({
|
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
// Tool input validation
|
|
500
|
-
// Note: input is intentionally not re-validated for
|
|
501
|
-
//
|
|
502
|
-
//
|
|
503
|
-
|
|
504
|
-
if (
|
|
505
|
-
toolPart.state === 'input-available' ||
|
|
506
|
-
toolPart.state === 'output-available'
|
|
507
|
-
) {
|
|
500
|
+
// Note: input is intentionally not re-validated for terminal states.
|
|
501
|
+
// Terminal tool calls can keep invalid or incomplete input, and
|
|
502
|
+
// re-validating it on replay would crash follow-up messages.
|
|
503
|
+
if (toolPart.state === 'input-available') {
|
|
508
504
|
await validateTypes({
|
|
509
505
|
value: toolPart.input,
|
|
510
506
|
schema: tool.inputSchema,
|