@ai-sdk/google 2.0.67 → 2.0.69
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 +12 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +1 -1
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +12 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +12 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "@ai-sdk/provider-utils";
|
|
8
8
|
|
|
9
9
|
// src/version.ts
|
|
10
|
-
var VERSION = true ? "2.0.
|
|
10
|
+
var VERSION = true ? "2.0.69" : "0.0.0-test";
|
|
11
11
|
|
|
12
12
|
// src/google-generative-ai-embedding-model.ts
|
|
13
13
|
import {
|
|
@@ -712,6 +712,11 @@ var googleGenerativeAIProviderOptions = lazySchema4(
|
|
|
712
712
|
})
|
|
713
713
|
)
|
|
714
714
|
);
|
|
715
|
+
var VertexServiceTierMap = {
|
|
716
|
+
standard: "SERVICE_TIER_STANDARD",
|
|
717
|
+
flex: "SERVICE_TIER_FLEX",
|
|
718
|
+
priority: "SERVICE_TIER_PRIORITY"
|
|
719
|
+
};
|
|
715
720
|
|
|
716
721
|
// src/google-prepare-tools.ts
|
|
717
722
|
import {
|
|
@@ -978,14 +983,19 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
978
983
|
providerOptions,
|
|
979
984
|
schema: googleGenerativeAIProviderOptions
|
|
980
985
|
});
|
|
986
|
+
const isVertexProvider = this.config.provider.startsWith("google.vertex.");
|
|
981
987
|
if ((tools == null ? void 0 : tools.some(
|
|
982
988
|
(tool) => tool.type === "provider-defined" && tool.id === "google.vertex_rag_store"
|
|
983
|
-
)) && !
|
|
989
|
+
)) && !isVertexProvider) {
|
|
984
990
|
warnings.push({
|
|
985
991
|
type: "other",
|
|
986
992
|
message: `The 'vertex_rag_store' tool is only supported with the Google Vertex provider and might not be supported or could behave unexpectedly with the current Google provider (${this.config.provider}).`
|
|
987
993
|
});
|
|
988
994
|
}
|
|
995
|
+
let sanitizedServiceTier = googleOptions == null ? void 0 : googleOptions.serviceTier;
|
|
996
|
+
if ((googleOptions == null ? void 0 : googleOptions.serviceTier) && isVertexProvider) {
|
|
997
|
+
sanitizedServiceTier = VertexServiceTierMap[googleOptions.serviceTier];
|
|
998
|
+
}
|
|
989
999
|
const isGemmaModel = this.modelId.toLowerCase().startsWith("gemma-");
|
|
990
1000
|
const supportsFunctionResponseParts = this.modelId.startsWith("gemini-3");
|
|
991
1001
|
const { contents, systemInstruction } = convertToGoogleGenerativeAIMessages(
|
|
@@ -1042,7 +1052,7 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1042
1052
|
} : googleToolConfig,
|
|
1043
1053
|
cachedContent: googleOptions == null ? void 0 : googleOptions.cachedContent,
|
|
1044
1054
|
labels: googleOptions == null ? void 0 : googleOptions.labels,
|
|
1045
|
-
serviceTier:
|
|
1055
|
+
serviceTier: sanitizedServiceTier
|
|
1046
1056
|
},
|
|
1047
1057
|
warnings: [...warnings, ...toolWarnings]
|
|
1048
1058
|
};
|