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.
@@ -85,7 +85,7 @@ import {
85
85
  } from "@ai-sdk/provider-utils";
86
86
 
87
87
  // src/version.ts
88
- var VERSION = true ? "7.0.50" : "0.0.0-test";
88
+ var VERSION = true ? "7.0.52" : "0.0.0-test";
89
89
 
90
90
  // src/util/download/download.ts
91
91
  var download = async ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "7.0.50",
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.39",
45
+ "@ai-sdk/gateway": "4.0.41",
46
46
  "@ai-sdk/provider": "4.0.5",
47
- "@ai-sdk/provider-utils": "5.0.19"
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 `output-error`
501
- // states. A tool call that failed with an invalid-input error keeps
502
- // its (invalid) input, and re-validating it on replay would throw a
503
- // TypeValidationError that crashes follow-up messages.
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,