@ai-sdk/provider-utils 4.0.36 → 4.0.37

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.37
4
+
5
+ ### Patch Changes
6
+
7
+ - d559de9: Ensure the default empty tool input schema includes `type: "object"` for OpenAI-compatible providers that require object schemas.
8
+
3
9
  ## 4.0.36
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -779,7 +779,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
779
779
  }
780
780
 
781
781
  // src/version.ts
782
- var VERSION = true ? "4.0.36" : "0.0.0-test";
782
+ var VERSION = true ? "4.0.37" : "0.0.0-test";
783
783
 
784
784
  // src/get-from-api.ts
785
785
  var getOriginalFetch = () => globalThis.fetch;
@@ -2323,7 +2323,11 @@ function isSchema(value) {
2323
2323
  return typeof value === "object" && value !== null && schemaSymbol in value && value[schemaSymbol] === true && "jsonSchema" in value && "validate" in value;
2324
2324
  }
2325
2325
  function asSchema(schema) {
2326
- return schema == null ? jsonSchema({ properties: {}, additionalProperties: false }) : isSchema(schema) ? schema : "~standard" in schema ? schema["~standard"].vendor === "zod" ? zodSchema(schema) : standardSchema(schema) : schema();
2326
+ return schema == null ? jsonSchema({
2327
+ type: "object",
2328
+ properties: {},
2329
+ additionalProperties: false
2330
+ }) : isSchema(schema) ? schema : "~standard" in schema ? schema["~standard"].vendor === "zod" ? zodSchema(schema) : standardSchema(schema) : schema();
2327
2331
  }
2328
2332
  function standardSchema(standardSchema2) {
2329
2333
  return jsonSchema(