@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.
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 ? "2.0.104" : "0.0.0-test";
10
+ var VERSION = true ? "2.0.105" : "0.0.0-test";
11
11
 
12
12
  // src/google-generative-ai-embedding-model.ts
13
13
  import {
@@ -54,7 +54,7 @@ import {
54
54
  zodSchema as zodSchema2
55
55
  } from "@ai-sdk/provider-utils";
56
56
  import { z as z2 } from "zod/v4";
57
- var googleEmbeddingContentPartSchema = z2.union([
57
+ var googleEmbeddingContentPartSchema = () => z2.union([
58
58
  z2.object({ text: z2.string() }),
59
59
  z2.object({
60
60
  inlineData: z2.object({
@@ -102,7 +102,7 @@ var googleGenerativeAIEmbeddingProviderOptions = lazySchema2(
102
102
  * The array length must match the number of values being embedded. In
103
103
  * the case of a single embedding, the array length must be 1.
104
104
  */
105
- content: z2.array(z2.array(googleEmbeddingContentPartSchema).min(1).nullable()).optional()
105
+ content: z2.array(z2.array(googleEmbeddingContentPartSchema()).min(1).nullable()).optional()
106
106
  })
107
107
  )
108
108
  );
@@ -2195,13 +2195,13 @@ var getSafetyRatingSchema = () => z5.object({
2195
2195
  severityScore: z5.number().nullish(),
2196
2196
  blocked: z5.boolean().nullish()
2197
2197
  });
2198
- var tokenDetailsSchema = z5.array(
2198
+ var tokenDetailsSchema = () => z5.array(
2199
2199
  z5.object({
2200
2200
  modality: z5.string(),
2201
2201
  tokenCount: z5.number()
2202
2202
  })
2203
2203
  ).nullish();
2204
- var usageSchema = z5.object({
2204
+ var usageSchema = () => z5.object({
2205
2205
  cachedContentTokenCount: z5.number().nullish(),
2206
2206
  thoughtsTokenCount: z5.number().nullish(),
2207
2207
  promptTokenCount: z5.number().nullish(),
@@ -2210,8 +2210,8 @@ var usageSchema = z5.object({
2210
2210
  // https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#TrafficType
2211
2211
  trafficType: z5.string().nullish(),
2212
2212
  // https://ai.google.dev/api/generate-content#Modality
2213
- promptTokensDetails: tokenDetailsSchema,
2214
- candidatesTokensDetails: tokenDetailsSchema
2213
+ promptTokensDetails: tokenDetailsSchema(),
2214
+ candidatesTokensDetails: tokenDetailsSchema()
2215
2215
  });
2216
2216
  var getUrlContextMetadataSchema = () => z5.object({
2217
2217
  urlMetadata: z5.array(
@@ -2234,7 +2234,7 @@ var responseSchema = lazySchema5(
2234
2234
  urlContextMetadata: getUrlContextMetadataSchema().nullish()
2235
2235
  })
2236
2236
  ).nullish(),
2237
- usageMetadata: usageSchema.nullish(),
2237
+ usageMetadata: usageSchema().nullish(),
2238
2238
  promptFeedback: z5.object({
2239
2239
  blockReason: z5.string().nullish(),
2240
2240
  safetyRatings: z5.array(getSafetyRatingSchema()).nullish()
@@ -2256,7 +2256,7 @@ var chunkSchema = lazySchema5(
2256
2256
  urlContextMetadata: getUrlContextMetadataSchema().nullish()
2257
2257
  })
2258
2258
  ).nullish(),
2259
- usageMetadata: usageSchema.nullish(),
2259
+ usageMetadata: usageSchema().nullish(),
2260
2260
  promptFeedback: z5.object({
2261
2261
  blockReason: z5.string().nullish(),
2262
2262
  safetyRatings: z5.array(getSafetyRatingSchema()).nullish()
@@ -2302,7 +2302,7 @@ import {
2302
2302
  zodSchema as zodSchema7
2303
2303
  } from "@ai-sdk/provider-utils";
2304
2304
  import { z as z8 } from "zod/v4";
2305
- var fileSearchArgsBaseSchema = z8.object({
2305
+ var fileSearchArgsBaseSchema = () => z8.object({
2306
2306
  /** The names of the file_search_stores to retrieve from.
2307
2307
  * Example: `fileSearchStores/my-file-search-store-123`
2308
2308
  */
@@ -2319,7 +2319,7 @@ var fileSearchArgsBaseSchema = z8.object({
2319
2319
  ).optional()
2320
2320
  }).passthrough();
2321
2321
  var fileSearchArgsSchema = lazySchema7(
2322
- () => zodSchema7(fileSearchArgsBaseSchema)
2322
+ () => zodSchema7(fileSearchArgsBaseSchema())
2323
2323
  );
2324
2324
  var fileSearch = createProviderDefinedToolFactory2({
2325
2325
  id: "google.file_search",
@@ -2347,7 +2347,7 @@ import {
2347
2347
  zodSchema as zodSchema9
2348
2348
  } from "@ai-sdk/provider-utils";
2349
2349
  import { z as z10 } from "zod/v4";
2350
- var googleSearchToolArgsBaseSchema = z10.object({
2350
+ var googleSearchToolArgsBaseSchema = () => z10.object({
2351
2351
  searchTypes: z10.object({
2352
2352
  webSearch: z10.object({}).optional(),
2353
2353
  imageSearch: z10.object({}).optional()
@@ -2358,7 +2358,7 @@ var googleSearchToolArgsBaseSchema = z10.object({
2358
2358
  }).optional()
2359
2359
  }).passthrough();
2360
2360
  var googleSearchToolArgsSchema = lazySchema9(
2361
- () => zodSchema9(googleSearchToolArgsBaseSchema)
2361
+ () => zodSchema9(googleSearchToolArgsBaseSchema())
2362
2362
  );
2363
2363
  var googleSearch = createProviderDefinedToolFactory4({
2364
2364
  id: "google.google_search",