@ai-sdk/provider-utils 5.0.0-canary.38 → 5.0.0-canary.39

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
+ ## 5.0.0-canary.39
4
+
5
+ ### Patch Changes
6
+
7
+ - 105f95b: Ensure the default empty tool input schema includes `type: "object"` for OpenAI-compatible providers that require object schemas.
8
+
3
9
  ## 5.0.0-canary.38
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -862,7 +862,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
862
862
  }
863
863
 
864
864
  // src/version.ts
865
- var VERSION = true ? "5.0.0-canary.38" : "0.0.0-test";
865
+ var VERSION = true ? "5.0.0-canary.39" : "0.0.0-test";
866
866
 
867
867
  // src/get-from-api.ts
868
868
  var getOriginalFetch = () => globalThis.fetch;
@@ -2481,7 +2481,11 @@ function isSchema(value) {
2481
2481
  return typeof value === "object" && value !== null && schemaSymbol in value && value[schemaSymbol] === true && "jsonSchema" in value && "validate" in value;
2482
2482
  }
2483
2483
  function asSchema(schema) {
2484
- return schema == null ? jsonSchema({ properties: {}, additionalProperties: false }) : isSchema(schema) ? schema : "~standard" in schema ? schema["~standard"].vendor === "zod" ? zodSchema(schema) : standardSchema(schema) : schema();
2484
+ return schema == null ? jsonSchema({
2485
+ type: "object",
2486
+ properties: {},
2487
+ additionalProperties: false
2488
+ }) : isSchema(schema) ? schema : "~standard" in schema ? schema["~standard"].vendor === "zod" ? zodSchema(schema) : standardSchema(schema) : schema();
2485
2489
  }
2486
2490
  function standardSchema(standardSchema2) {
2487
2491
  return jsonSchema(