@ai-sdk/google 3.0.62 → 3.0.64
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -2
- 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 +10 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +10 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/google-generative-ai-language-model.ts +8 -1
- package/src/google-generative-ai-options.ts +8 -1
- package/src/google-generative-ai-video-settings.ts +1 -0
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 ? "3.0.
|
|
10
|
+
var VERSION = true ? "3.0.64" : "0.0.0-test";
|
|
11
11
|
|
|
12
12
|
// src/google-generative-ai-embedding-model.ts
|
|
13
13
|
import {
|
|
@@ -843,6 +843,11 @@ var googleLanguageModelOptions = lazySchema4(
|
|
|
843
843
|
})
|
|
844
844
|
)
|
|
845
845
|
);
|
|
846
|
+
var VertexServiceTierMap = {
|
|
847
|
+
standard: "SERVICE_TIER_STANDARD",
|
|
848
|
+
flex: "SERVICE_TIER_FLEX",
|
|
849
|
+
priority: "SERVICE_TIER_PRIORITY"
|
|
850
|
+
};
|
|
846
851
|
|
|
847
852
|
// src/google-prepare-tools.ts
|
|
848
853
|
import {
|
|
@@ -1406,6 +1411,10 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1406
1411
|
message: `'streamFunctionCallArguments' is only supported on the Vertex AI API and will be ignored with the current Google provider (${this.config.provider}). See https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#streaming-fc`
|
|
1407
1412
|
});
|
|
1408
1413
|
}
|
|
1414
|
+
let sanitizedServiceTier = googleOptions == null ? void 0 : googleOptions.serviceTier;
|
|
1415
|
+
if ((googleOptions == null ? void 0 : googleOptions.serviceTier) && isVertexProvider) {
|
|
1416
|
+
sanitizedServiceTier = VertexServiceTierMap[googleOptions.serviceTier];
|
|
1417
|
+
}
|
|
1409
1418
|
const isGemmaModel = this.modelId.toLowerCase().startsWith("gemma-");
|
|
1410
1419
|
const supportsFunctionResponseParts = this.modelId.startsWith("gemini-3");
|
|
1411
1420
|
const { contents, systemInstruction } = convertToGoogleGenerativeAIMessages(
|
|
@@ -1476,7 +1485,7 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1476
1485
|
toolConfig,
|
|
1477
1486
|
cachedContent: googleOptions == null ? void 0 : googleOptions.cachedContent,
|
|
1478
1487
|
labels: googleOptions == null ? void 0 : googleOptions.labels,
|
|
1479
|
-
serviceTier:
|
|
1488
|
+
serviceTier: sanitizedServiceTier
|
|
1480
1489
|
},
|
|
1481
1490
|
warnings: [...warnings, ...toolWarnings],
|
|
1482
1491
|
providerOptionsName
|