@ai-sdk/google 3.0.137 → 3.0.138
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 +6 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +5 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +5 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/convert-json-schema-to-openapi-schema.ts +11 -1
package/dist/index.mjs
CHANGED
|
@@ -238,7 +238,7 @@ import {
|
|
|
238
238
|
} from "@ai-sdk/provider-utils";
|
|
239
239
|
|
|
240
240
|
// src/version.ts
|
|
241
|
-
var VERSION = true ? "3.0.
|
|
241
|
+
var VERSION = true ? "3.0.138" : "0.0.0-test";
|
|
242
242
|
|
|
243
243
|
// src/google-generative-ai-embedding-model.ts
|
|
244
244
|
import {
|
|
@@ -694,6 +694,11 @@ function convertJSONSchemaDefinition(jsonSchema, isRoot, referenceContext) {
|
|
|
694
694
|
const nonNullTypes = type.filter((t) => t !== "null");
|
|
695
695
|
if (nonNullTypes.length === 0) {
|
|
696
696
|
result.type = "null";
|
|
697
|
+
} else if (nonNullTypes.length === 1) {
|
|
698
|
+
result.type = nonNullTypes[0];
|
|
699
|
+
if (hasNull) {
|
|
700
|
+
result.nullable = true;
|
|
701
|
+
}
|
|
697
702
|
} else {
|
|
698
703
|
result.anyOf = nonNullTypes.map((t) => ({ type: t }));
|
|
699
704
|
if (hasNull) {
|