@ai-sdk/google 3.0.56 → 3.0.58

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/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.56" : "0.0.0-test";
10
+ var VERSION = true ? "3.0.58" : "0.0.0-test";
11
11
 
12
12
  // src/google-generative-ai-embedding-model.ts
13
13
  import {
@@ -828,11 +828,7 @@ var googleLanguageModelOptions = lazySchema4(
828
828
  /**
829
829
  * Optional. The service tier to use for the request.
830
830
  */
831
- serviceTier: z4.enum([
832
- "SERVICE_TIER_STANDARD",
833
- "SERVICE_TIER_FLEX",
834
- "SERVICE_TIER_PRIORITY"
835
- ]).optional()
831
+ serviceTier: z4.enum(["standard", "flex", "priority"]).optional()
836
832
  })
837
833
  )
838
834
  );
@@ -1955,6 +1951,12 @@ var getSafetyRatingSchema = () => z5.object({
1955
1951
  severityScore: z5.number().nullish(),
1956
1952
  blocked: z5.boolean().nullish()
1957
1953
  });
1954
+ var tokenDetailsSchema = z5.array(
1955
+ z5.object({
1956
+ modality: z5.string(),
1957
+ tokenCount: z5.number()
1958
+ })
1959
+ ).nullish();
1958
1960
  var usageSchema = z5.object({
1959
1961
  cachedContentTokenCount: z5.number().nullish(),
1960
1962
  thoughtsTokenCount: z5.number().nullish(),
@@ -1962,7 +1964,10 @@ var usageSchema = z5.object({
1962
1964
  candidatesTokenCount: z5.number().nullish(),
1963
1965
  totalTokenCount: z5.number().nullish(),
1964
1966
  // https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#TrafficType
1965
- trafficType: z5.string().nullish()
1967
+ trafficType: z5.string().nullish(),
1968
+ // https://ai.google.dev/api/generate-content#Modality
1969
+ promptTokensDetails: tokenDetailsSchema,
1970
+ candidatesTokensDetails: tokenDetailsSchema
1966
1971
  });
1967
1972
  var getUrlContextMetadataSchema = () => z5.object({
1968
1973
  urlMetadata: z5.array(