@ai-sdk/google 2.0.104 → 2.0.105

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.
@@ -1986,13 +1986,13 @@ var getSafetyRatingSchema = () => z3.object({
1986
1986
  severityScore: z3.number().nullish(),
1987
1987
  blocked: z3.boolean().nullish()
1988
1988
  });
1989
- var tokenDetailsSchema = z3.array(
1989
+ var tokenDetailsSchema = () => z3.array(
1990
1990
  z3.object({
1991
1991
  modality: z3.string(),
1992
1992
  tokenCount: z3.number()
1993
1993
  })
1994
1994
  ).nullish();
1995
- var usageSchema = z3.object({
1995
+ var usageSchema = () => z3.object({
1996
1996
  cachedContentTokenCount: z3.number().nullish(),
1997
1997
  thoughtsTokenCount: z3.number().nullish(),
1998
1998
  promptTokenCount: z3.number().nullish(),
@@ -2001,8 +2001,8 @@ var usageSchema = z3.object({
2001
2001
  // https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#TrafficType
2002
2002
  trafficType: z3.string().nullish(),
2003
2003
  // https://ai.google.dev/api/generate-content#Modality
2004
- promptTokensDetails: tokenDetailsSchema,
2005
- candidatesTokensDetails: tokenDetailsSchema
2004
+ promptTokensDetails: tokenDetailsSchema(),
2005
+ candidatesTokensDetails: tokenDetailsSchema()
2006
2006
  });
2007
2007
  var getUrlContextMetadataSchema = () => z3.object({
2008
2008
  urlMetadata: z3.array(
@@ -2025,7 +2025,7 @@ var responseSchema = lazySchema3(
2025
2025
  urlContextMetadata: getUrlContextMetadataSchema().nullish()
2026
2026
  })
2027
2027
  ).nullish(),
2028
- usageMetadata: usageSchema.nullish(),
2028
+ usageMetadata: usageSchema().nullish(),
2029
2029
  promptFeedback: z3.object({
2030
2030
  blockReason: z3.string().nullish(),
2031
2031
  safetyRatings: z3.array(getSafetyRatingSchema()).nullish()
@@ -2047,7 +2047,7 @@ var chunkSchema = lazySchema3(
2047
2047
  urlContextMetadata: getUrlContextMetadataSchema().nullish()
2048
2048
  })
2049
2049
  ).nullish(),
2050
- usageMetadata: usageSchema.nullish(),
2050
+ usageMetadata: usageSchema().nullish(),
2051
2051
  promptFeedback: z3.object({
2052
2052
  blockReason: z3.string().nullish(),
2053
2053
  safetyRatings: z3.array(getSafetyRatingSchema()).nullish()
@@ -2093,7 +2093,7 @@ import {
2093
2093
  zodSchema as zodSchema5
2094
2094
  } from "@ai-sdk/provider-utils";
2095
2095
  import { z as z6 } from "zod/v4";
2096
- var fileSearchArgsBaseSchema = z6.object({
2096
+ var fileSearchArgsBaseSchema = () => z6.object({
2097
2097
  /** The names of the file_search_stores to retrieve from.
2098
2098
  * Example: `fileSearchStores/my-file-search-store-123`
2099
2099
  */
@@ -2110,7 +2110,7 @@ var fileSearchArgsBaseSchema = z6.object({
2110
2110
  ).optional()
2111
2111
  }).passthrough();
2112
2112
  var fileSearchArgsSchema = lazySchema5(
2113
- () => zodSchema5(fileSearchArgsBaseSchema)
2113
+ () => zodSchema5(fileSearchArgsBaseSchema())
2114
2114
  );
2115
2115
  var fileSearch = createProviderDefinedToolFactory2({
2116
2116
  id: "google.file_search",
@@ -2138,7 +2138,7 @@ import {
2138
2138
  zodSchema as zodSchema7
2139
2139
  } from "@ai-sdk/provider-utils";
2140
2140
  import { z as z8 } from "zod/v4";
2141
- var googleSearchToolArgsBaseSchema = z8.object({
2141
+ var googleSearchToolArgsBaseSchema = () => z8.object({
2142
2142
  searchTypes: z8.object({
2143
2143
  webSearch: z8.object({}).optional(),
2144
2144
  imageSearch: z8.object({}).optional()
@@ -2149,7 +2149,7 @@ var googleSearchToolArgsBaseSchema = z8.object({
2149
2149
  }).optional()
2150
2150
  }).passthrough();
2151
2151
  var googleSearchToolArgsSchema = lazySchema7(
2152
- () => zodSchema7(googleSearchToolArgsBaseSchema)
2152
+ () => zodSchema7(googleSearchToolArgsBaseSchema())
2153
2153
  );
2154
2154
  var googleSearch = createProviderDefinedToolFactory4({
2155
2155
  id: "google.google_search",