@ai-sdk/google 3.0.57 → 3.0.59
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 +14 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +8 -0
- package/dist/internal/index.d.ts +8 -0
- package/dist/internal/index.js +11 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +11 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/convert-google-generative-ai-usage.ts +7 -0
- package/src/google-generative-ai-language-model.ts +12 -0
- package/src/google-prepare-tools.ts +1 -1
package/dist/internal/index.mjs
CHANGED
|
@@ -698,7 +698,7 @@ function prepareTools({
|
|
|
698
698
|
toolWarnings.push({
|
|
699
699
|
type: "unsupported",
|
|
700
700
|
feature: `provider-defined tool ${tool.id}`,
|
|
701
|
-
details: "The code execution
|
|
701
|
+
details: "The code execution tool is not supported with other Gemini models than Gemini 2."
|
|
702
702
|
});
|
|
703
703
|
}
|
|
704
704
|
break;
|
|
@@ -1740,6 +1740,12 @@ var getSafetyRatingSchema = () => z3.object({
|
|
|
1740
1740
|
severityScore: z3.number().nullish(),
|
|
1741
1741
|
blocked: z3.boolean().nullish()
|
|
1742
1742
|
});
|
|
1743
|
+
var tokenDetailsSchema = z3.array(
|
|
1744
|
+
z3.object({
|
|
1745
|
+
modality: z3.string(),
|
|
1746
|
+
tokenCount: z3.number()
|
|
1747
|
+
})
|
|
1748
|
+
).nullish();
|
|
1743
1749
|
var usageSchema = z3.object({
|
|
1744
1750
|
cachedContentTokenCount: z3.number().nullish(),
|
|
1745
1751
|
thoughtsTokenCount: z3.number().nullish(),
|
|
@@ -1747,7 +1753,10 @@ var usageSchema = z3.object({
|
|
|
1747
1753
|
candidatesTokenCount: z3.number().nullish(),
|
|
1748
1754
|
totalTokenCount: z3.number().nullish(),
|
|
1749
1755
|
// https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#TrafficType
|
|
1750
|
-
trafficType: z3.string().nullish()
|
|
1756
|
+
trafficType: z3.string().nullish(),
|
|
1757
|
+
// https://ai.google.dev/api/generate-content#Modality
|
|
1758
|
+
promptTokensDetails: tokenDetailsSchema,
|
|
1759
|
+
candidatesTokensDetails: tokenDetailsSchema
|
|
1751
1760
|
});
|
|
1752
1761
|
var getUrlContextMetadataSchema = () => z3.object({
|
|
1753
1762
|
urlMetadata: z3.array(
|