ai 6.0.192 → 6.0.194

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.
@@ -152,7 +152,7 @@ function detectMediaType({
152
152
  var import_provider_utils2 = require("@ai-sdk/provider-utils");
153
153
 
154
154
  // src/version.ts
155
- var VERSION = true ? "6.0.192" : "0.0.0-test";
155
+ var VERSION = true ? "6.0.194" : "0.0.0-test";
156
156
 
157
157
  // src/util/download/download.ts
158
158
  var download = async ({
@@ -131,7 +131,7 @@ import {
131
131
  } from "@ai-sdk/provider-utils";
132
132
 
133
133
  // src/version.ts
134
- var VERSION = true ? "6.0.192" : "0.0.0-test";
134
+ var VERSION = true ? "6.0.194" : "0.0.0-test";
135
135
 
136
136
  // src/util/download/download.ts
137
137
  var download = async ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "6.0.192",
3
+ "version": "6.0.194",
4
4
  "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.",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@opentelemetry/api": "^1.9.0",
48
- "@ai-sdk/gateway": "3.0.121",
48
+ "@ai-sdk/gateway": "3.0.122",
49
49
  "@ai-sdk/provider": "3.0.10",
50
50
  "@ai-sdk/provider-utils": "4.0.27"
51
51
  },
@@ -455,11 +455,13 @@ export async function safeValidateUIMessages<UI_MESSAGE extends UIMessage>({
455
455
  }
456
456
 
457
457
  // Tool input validation
458
+ // Note: input is intentionally not re-validated for `output-error`
459
+ // states. A tool call that failed with an invalid-input error keeps
460
+ // its (invalid) input, and re-validating it on replay would throw a
461
+ // TypeValidationError that crashes follow-up messages.
458
462
  if (
459
463
  toolPart.state === 'input-available' ||
460
- toolPart.state === 'output-available' ||
461
- (toolPart.state === 'output-error' &&
462
- toolPart.input !== undefined)
464
+ toolPart.state === 'output-available'
463
465
  ) {
464
466
  await validateTypes({
465
467
  value: toolPart.input,