@ai-sdk/provider-utils 4.0.66 → 4.0.67

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider-utils",
3
- "version": "4.0.66",
3
+ "version": "4.0.67",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
package/src/schema.ts CHANGED
@@ -176,7 +176,8 @@ function standardSchema<OBJECT>(
176
176
  {
177
177
  validate: async value => {
178
178
  const result = await standardSchema['~standard'].validate(value);
179
- return 'value' in result
179
+ // Failed Standard Schema results can also contain a value.
180
+ return result.issues === undefined && 'value' in result
180
181
  ? { success: true, value: result.value }
181
182
  : {
182
183
  success: false,