@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/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.59" : "0.0.0-test";
|
|
11
11
|
|
|
12
12
|
// src/google-generative-ai-embedding-model.ts
|
|
13
13
|
import {
|
|
@@ -909,7 +909,7 @@ function prepareTools({
|
|
|
909
909
|
toolWarnings.push({
|
|
910
910
|
type: "unsupported",
|
|
911
911
|
feature: `provider-defined tool ${tool.id}`,
|
|
912
|
-
details: "The code execution
|
|
912
|
+
details: "The code execution tool is not supported with other Gemini models than Gemini 2."
|
|
913
913
|
});
|
|
914
914
|
}
|
|
915
915
|
break;
|
|
@@ -1951,6 +1951,12 @@ var getSafetyRatingSchema = () => z5.object({
|
|
|
1951
1951
|
severityScore: z5.number().nullish(),
|
|
1952
1952
|
blocked: z5.boolean().nullish()
|
|
1953
1953
|
});
|
|
1954
|
+
var tokenDetailsSchema = z5.array(
|
|
1955
|
+
z5.object({
|
|
1956
|
+
modality: z5.string(),
|
|
1957
|
+
tokenCount: z5.number()
|
|
1958
|
+
})
|
|
1959
|
+
).nullish();
|
|
1954
1960
|
var usageSchema = z5.object({
|
|
1955
1961
|
cachedContentTokenCount: z5.number().nullish(),
|
|
1956
1962
|
thoughtsTokenCount: z5.number().nullish(),
|
|
@@ -1958,7 +1964,10 @@ var usageSchema = z5.object({
|
|
|
1958
1964
|
candidatesTokenCount: z5.number().nullish(),
|
|
1959
1965
|
totalTokenCount: z5.number().nullish(),
|
|
1960
1966
|
// https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#TrafficType
|
|
1961
|
-
trafficType: z5.string().nullish()
|
|
1967
|
+
trafficType: z5.string().nullish(),
|
|
1968
|
+
// https://ai.google.dev/api/generate-content#Modality
|
|
1969
|
+
promptTokensDetails: tokenDetailsSchema,
|
|
1970
|
+
candidatesTokensDetails: tokenDetailsSchema
|
|
1962
1971
|
});
|
|
1963
1972
|
var getUrlContextMetadataSchema = () => z5.object({
|
|
1964
1973
|
urlMetadata: z5.array(
|