@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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 4.0.67
4
+
5
+ ### Patch Changes
6
+
7
+ - d59eee0: Fix validation of non-Zod Standard Schema results: a result that contains `issues` is now always treated as a failure, even when it also carries a `value`. Previously a failing schema such as Valibot's through `toStandardJsonSchema()` could be reported as valid, so rejected input, including tool input, was accepted.
8
+
3
9
  ## 4.0.66
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1057,7 +1057,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
1057
1057
  }
1058
1058
 
1059
1059
  // src/version.ts
1060
- var VERSION = true ? "4.0.66" : "0.0.0-test";
1060
+ var VERSION = true ? "4.0.67" : "0.0.0-test";
1061
1061
 
1062
1062
  // src/get-from-api.ts
1063
1063
  var getOriginalFetch = () => globalThis.fetch;
@@ -2629,7 +2629,7 @@ function standardSchema(standardSchema2) {
2629
2629
  {
2630
2630
  validate: async (value) => {
2631
2631
  const result = await standardSchema2["~standard"].validate(value);
2632
- return "value" in result ? { success: true, value: result.value } : {
2632
+ return result.issues === void 0 && "value" in result ? { success: true, value: result.value } : {
2633
2633
  success: false,
2634
2634
  error: new import_provider7.TypeValidationError({
2635
2635
  value,