@ai-sdk/provider-utils 4.0.36 → 4.0.38
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 +13 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/schema.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ai-sdk/provider-utils
|
|
2
2
|
|
|
3
|
+
## 4.0.38
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [e1af05f]
|
|
8
|
+
- @ai-sdk/provider@3.0.14
|
|
9
|
+
|
|
10
|
+
## 4.0.37
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- d559de9: Ensure the default empty tool input schema includes `type: "object"` for OpenAI-compatible providers that require object schemas.
|
|
15
|
+
|
|
3
16
|
## 4.0.36
|
|
4
17
|
|
|
5
18
|
### 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.
|
|
782
|
+
var VERSION = true ? "4.0.38" : "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({
|
|
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(
|