@ai-sdk/google 4.0.0-beta.36 → 4.0.0-beta.38

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.
@@ -1,35 +1,22 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/internal/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- GoogleGenerativeAILanguageModel: () => GoogleGenerativeAILanguageModel,
24
- getGroundingMetadataSchema: () => getGroundingMetadataSchema,
25
- getUrlContextMetadataSchema: () => getUrlContextMetadataSchema,
26
- googleTools: () => googleTools
27
- });
28
- module.exports = __toCommonJS(index_exports);
29
-
30
1
  // src/google-generative-ai-language-model.ts
31
- var import_provider_utils4 = require("@ai-sdk/provider-utils");
32
- var import_v43 = require("zod/v4");
2
+ import {
3
+ combineHeaders,
4
+ createEventSourceResponseHandler,
5
+ createJsonResponseHandler,
6
+ generateId,
7
+ isCustomReasoning,
8
+ lazySchema as lazySchema3,
9
+ mapReasoningToProviderBudget,
10
+ mapReasoningToProviderEffort,
11
+ parseProviderOptions,
12
+ postJsonToApi,
13
+ resolve,
14
+ serializeModelOptions,
15
+ WORKFLOW_SERIALIZE,
16
+ WORKFLOW_DESERIALIZE,
17
+ zodSchema as zodSchema3
18
+ } from "@ai-sdk/provider-utils";
19
+ import { z as z3 } from "zod/v4";
33
20
 
34
21
  // src/convert-google-generative-ai-usage.ts
35
22
  function convertGoogleGenerativeAIUsage(usage) {
@@ -187,8 +174,14 @@ function isEmptyObjectSchema(jsonSchema) {
187
174
  }
188
175
 
189
176
  // src/convert-to-google-generative-ai-messages.ts
190
- var import_provider = require("@ai-sdk/provider");
191
- var import_provider_utils = require("@ai-sdk/provider-utils");
177
+ import {
178
+ UnsupportedFunctionalityError
179
+ } from "@ai-sdk/provider";
180
+ import {
181
+ convertToBase64,
182
+ isProviderReference,
183
+ resolveProviderReference
184
+ } from "@ai-sdk/provider-utils";
192
185
  var dataUrlRegex = /^data:([^;,]+);base64,(.+)$/s;
193
186
  function parseBase64DataUrl(value) {
194
187
  const match = dataUrlRegex.exec(value);
@@ -221,7 +214,6 @@ function appendToolResultParts(parts, toolName, outputValue) {
221
214
  responseTextParts.push(contentPart.text);
222
215
  break;
223
216
  }
224
- case "image-data":
225
217
  case "file-data": {
226
218
  functionResponseParts.push({
227
219
  inlineData: {
@@ -231,7 +223,6 @@ function appendToolResultParts(parts, toolName, outputValue) {
231
223
  });
232
224
  break;
233
225
  }
234
- case "image-url":
235
226
  case "file-url": {
236
227
  const functionResponsePart = convertUrlToolResultPart(
237
228
  contentPart.url
@@ -274,18 +265,22 @@ function appendLegacyToolResultParts(parts, toolName, outputValue) {
274
265
  }
275
266
  });
276
267
  break;
277
- case "image-data":
278
- parts.push(
279
- {
280
- inlineData: {
281
- mimeType: String(contentPart.mediaType),
282
- data: String(contentPart.data)
268
+ case "file-data":
269
+ if (contentPart.mediaType.startsWith("image/")) {
270
+ parts.push(
271
+ {
272
+ inlineData: {
273
+ mimeType: contentPart.mediaType,
274
+ data: contentPart.data
275
+ }
276
+ },
277
+ {
278
+ text: "Tool executed successfully and returned this image as a response"
283
279
  }
284
- },
285
- {
286
- text: "Tool executed successfully and returned this image as a response"
287
- }
288
- );
280
+ );
281
+ } else {
282
+ parts.push({ text: JSON.stringify(contentPart) });
283
+ }
289
284
  break;
290
285
  default:
291
286
  parts.push({ text: JSON.stringify(contentPart) });
@@ -305,7 +300,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
305
300
  switch (role) {
306
301
  case "system": {
307
302
  if (!systemMessagesAllowed) {
308
- throw new import_provider.UnsupportedFunctionalityError({
303
+ throw new UnsupportedFunctionalityError({
309
304
  functionality: "system messages are only supported at the beginning of the conversation"
310
305
  });
311
306
  }
@@ -330,16 +325,16 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
330
325
  fileUri: part.data.toString()
331
326
  }
332
327
  });
333
- } else if ((0, import_provider_utils.isProviderReference)(part.data)) {
328
+ } else if (isProviderReference(part.data)) {
334
329
  if (providerOptionsName === "vertex") {
335
- throw new import_provider.UnsupportedFunctionalityError({
330
+ throw new UnsupportedFunctionalityError({
336
331
  functionality: "file parts with provider references"
337
332
  });
338
333
  }
339
334
  parts.push({
340
335
  fileData: {
341
336
  mimeType: mediaType,
342
- fileUri: (0, import_provider_utils.resolveProviderReference)({
337
+ fileUri: resolveProviderReference({
343
338
  reference: part.data,
344
339
  provider: "google"
345
340
  })
@@ -349,7 +344,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
349
344
  parts.push({
350
345
  inlineData: {
351
346
  mimeType: mediaType,
352
- data: (0, import_provider_utils.convertToBase64)(part.data)
347
+ data: convertToBase64(part.data)
353
348
  }
354
349
  });
355
350
  }
@@ -384,14 +379,14 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
384
379
  }
385
380
  case "reasoning-file": {
386
381
  if (part.data instanceof URL) {
387
- throw new import_provider.UnsupportedFunctionalityError({
382
+ throw new UnsupportedFunctionalityError({
388
383
  functionality: "File data URLs in assistant messages are not supported"
389
384
  });
390
385
  }
391
386
  return {
392
387
  inlineData: {
393
388
  mimeType: part.mediaType,
394
- data: (0, import_provider_utils.convertToBase64)(part.data)
389
+ data: convertToBase64(part.data)
395
390
  },
396
391
  thought: true,
397
392
  thoughtSignature
@@ -399,20 +394,20 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
399
394
  }
400
395
  case "file": {
401
396
  if (part.data instanceof URL) {
402
- throw new import_provider.UnsupportedFunctionalityError({
397
+ throw new UnsupportedFunctionalityError({
403
398
  functionality: "File data URLs in assistant messages are not supported"
404
399
  });
405
400
  }
406
- if ((0, import_provider_utils.isProviderReference)(part.data)) {
401
+ if (isProviderReference(part.data)) {
407
402
  if (providerOptionsName === "vertex") {
408
- throw new import_provider.UnsupportedFunctionalityError({
403
+ throw new UnsupportedFunctionalityError({
409
404
  functionality: "file parts with provider references"
410
405
  });
411
406
  }
412
407
  return {
413
408
  fileData: {
414
409
  mimeType: part.mediaType,
415
- fileUri: (0, import_provider_utils.resolveProviderReference)({
410
+ fileUri: resolveProviderReference({
416
411
  reference: part.data,
417
412
  provider: "google"
418
413
  })
@@ -424,7 +419,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
424
419
  return {
425
420
  inlineData: {
426
421
  mimeType: part.mediaType,
427
- data: (0, import_provider_utils.convertToBase64)(part.data)
422
+ data: convertToBase64(part.data)
428
423
  },
429
424
  ...(providerOpts == null ? void 0 : providerOpts.thought) === true ? { thought: true } : {},
430
425
  thoughtSignature
@@ -541,43 +536,47 @@ function getModelPath(modelId) {
541
536
  }
542
537
 
543
538
  // src/google-error.ts
544
- var import_provider_utils2 = require("@ai-sdk/provider-utils");
545
- var import_v4 = require("zod/v4");
546
- var googleErrorDataSchema = (0, import_provider_utils2.lazySchema)(
547
- () => (0, import_provider_utils2.zodSchema)(
548
- import_v4.z.object({
549
- error: import_v4.z.object({
550
- code: import_v4.z.number().nullable(),
551
- message: import_v4.z.string(),
552
- status: import_v4.z.string()
539
+ import {
540
+ createJsonErrorResponseHandler,
541
+ lazySchema,
542
+ zodSchema
543
+ } from "@ai-sdk/provider-utils";
544
+ import { z } from "zod/v4";
545
+ var googleErrorDataSchema = lazySchema(
546
+ () => zodSchema(
547
+ z.object({
548
+ error: z.object({
549
+ code: z.number().nullable(),
550
+ message: z.string(),
551
+ status: z.string()
553
552
  })
554
553
  })
555
554
  )
556
555
  );
557
- var googleFailedResponseHandler = (0, import_provider_utils2.createJsonErrorResponseHandler)({
556
+ var googleFailedResponseHandler = createJsonErrorResponseHandler({
558
557
  errorSchema: googleErrorDataSchema,
559
558
  errorToMessage: (data) => data.error.message
560
559
  });
561
560
 
562
561
  // src/google-generative-ai-options.ts
563
- var import_provider_utils3 = require("@ai-sdk/provider-utils");
564
- var import_v42 = require("zod/v4");
565
- var googleLanguageModelOptions = (0, import_provider_utils3.lazySchema)(
566
- () => (0, import_provider_utils3.zodSchema)(
567
- import_v42.z.object({
568
- responseModalities: import_v42.z.array(import_v42.z.enum(["TEXT", "IMAGE"])).optional(),
569
- thinkingConfig: import_v42.z.object({
570
- thinkingBudget: import_v42.z.number().optional(),
571
- includeThoughts: import_v42.z.boolean().optional(),
562
+ import { lazySchema as lazySchema2, zodSchema as zodSchema2 } from "@ai-sdk/provider-utils";
563
+ import { z as z2 } from "zod/v4";
564
+ var googleLanguageModelOptions = lazySchema2(
565
+ () => zodSchema2(
566
+ z2.object({
567
+ responseModalities: z2.array(z2.enum(["TEXT", "IMAGE"])).optional(),
568
+ thinkingConfig: z2.object({
569
+ thinkingBudget: z2.number().optional(),
570
+ includeThoughts: z2.boolean().optional(),
572
571
  // https://ai.google.dev/gemini-api/docs/gemini-3?thinking=high#thinking_level
573
- thinkingLevel: import_v42.z.enum(["minimal", "low", "medium", "high"]).optional()
572
+ thinkingLevel: z2.enum(["minimal", "low", "medium", "high"]).optional()
574
573
  }).optional(),
575
574
  /**
576
575
  * Optional.
577
576
  * The name of the cached content used as context to serve the prediction.
578
577
  * Format: cachedContents/{cachedContent}
579
578
  */
580
- cachedContent: import_v42.z.string().optional(),
579
+ cachedContent: z2.string().optional(),
581
580
  /**
582
581
  * Optional. Enable structured output. Default is true.
583
582
  *
@@ -586,13 +585,13 @@ var googleLanguageModelOptions = (0, import_provider_utils3.lazySchema)(
586
585
  * Google Generative AI uses. You can use this to disable
587
586
  * structured outputs if you need to.
588
587
  */
589
- structuredOutputs: import_v42.z.boolean().optional(),
588
+ structuredOutputs: z2.boolean().optional(),
590
589
  /**
591
590
  * Optional. A list of unique safety settings for blocking unsafe content.
592
591
  */
593
- safetySettings: import_v42.z.array(
594
- import_v42.z.object({
595
- category: import_v42.z.enum([
592
+ safetySettings: z2.array(
593
+ z2.object({
594
+ category: z2.enum([
596
595
  "HARM_CATEGORY_UNSPECIFIED",
597
596
  "HARM_CATEGORY_HATE_SPEECH",
598
597
  "HARM_CATEGORY_DANGEROUS_CONTENT",
@@ -600,7 +599,7 @@ var googleLanguageModelOptions = (0, import_provider_utils3.lazySchema)(
600
599
  "HARM_CATEGORY_SEXUALLY_EXPLICIT",
601
600
  "HARM_CATEGORY_CIVIC_INTEGRITY"
602
601
  ]),
603
- threshold: import_v42.z.enum([
602
+ threshold: z2.enum([
604
603
  "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
605
604
  "BLOCK_LOW_AND_ABOVE",
606
605
  "BLOCK_MEDIUM_AND_ABOVE",
@@ -610,7 +609,7 @@ var googleLanguageModelOptions = (0, import_provider_utils3.lazySchema)(
610
609
  ])
611
610
  })
612
611
  ).optional(),
613
- threshold: import_v42.z.enum([
612
+ threshold: z2.enum([
614
613
  "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
615
614
  "BLOCK_LOW_AND_ABOVE",
616
615
  "BLOCK_MEDIUM_AND_ABOVE",
@@ -623,19 +622,19 @@ var googleLanguageModelOptions = (0, import_provider_utils3.lazySchema)(
623
622
  *
624
623
  * https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/audio-understanding
625
624
  */
626
- audioTimestamp: import_v42.z.boolean().optional(),
625
+ audioTimestamp: z2.boolean().optional(),
627
626
  /**
628
627
  * Optional. Defines labels used in billing reports. Available on Vertex AI only.
629
628
  *
630
629
  * https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/add-labels-to-api-calls
631
630
  */
632
- labels: import_v42.z.record(import_v42.z.string(), import_v42.z.string()).optional(),
631
+ labels: z2.record(z2.string(), z2.string()).optional(),
633
632
  /**
634
633
  * Optional. If specified, the media resolution specified will be used.
635
634
  *
636
635
  * https://ai.google.dev/api/generate-content#MediaResolution
637
636
  */
638
- mediaResolution: import_v42.z.enum([
637
+ mediaResolution: z2.enum([
639
638
  "MEDIA_RESOLUTION_UNSPECIFIED",
640
639
  "MEDIA_RESOLUTION_LOW",
641
640
  "MEDIA_RESOLUTION_MEDIUM",
@@ -646,8 +645,8 @@ var googleLanguageModelOptions = (0, import_provider_utils3.lazySchema)(
646
645
  *
647
646
  * https://ai.google.dev/gemini-api/docs/image-generation#aspect_ratios
648
647
  */
649
- imageConfig: import_v42.z.object({
650
- aspectRatio: import_v42.z.enum([
648
+ imageConfig: z2.object({
649
+ aspectRatio: z2.enum([
651
650
  "1:1",
652
651
  "2:3",
653
652
  "3:2",
@@ -663,7 +662,7 @@ var googleLanguageModelOptions = (0, import_provider_utils3.lazySchema)(
663
662
  "1:4",
664
663
  "4:1"
665
664
  ]).optional(),
666
- imageSize: import_v42.z.enum(["1K", "2K", "4K", "512"]).optional()
665
+ imageSize: z2.enum(["1K", "2K", "4K", "512"]).optional()
667
666
  }).optional(),
668
667
  /**
669
668
  * Optional. Configuration for grounding retrieval.
@@ -671,10 +670,10 @@ var googleLanguageModelOptions = (0, import_provider_utils3.lazySchema)(
671
670
  *
672
671
  * https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-google-maps
673
672
  */
674
- retrievalConfig: import_v42.z.object({
675
- latLng: import_v42.z.object({
676
- latitude: import_v42.z.number(),
677
- longitude: import_v42.z.number()
673
+ retrievalConfig: z2.object({
674
+ latLng: z2.object({
675
+ latitude: z2.number(),
676
+ longitude: z2.number()
678
677
  }).optional()
679
678
  }).optional(),
680
679
  /**
@@ -687,11 +686,11 @@ var googleLanguageModelOptions = (0, import_provider_utils3.lazySchema)(
687
686
  *
688
687
  * https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#streaming-fc
689
688
  */
690
- streamFunctionCallArguments: import_v42.z.boolean().optional(),
689
+ streamFunctionCallArguments: z2.boolean().optional(),
691
690
  /**
692
691
  * Optional. The service tier to use for the request.
693
692
  */
694
- serviceTier: import_v42.z.enum(["standard", "flex", "priority"]).optional()
693
+ serviceTier: z2.enum(["standard", "flex", "priority"]).optional()
695
694
  })
696
695
  )
697
696
  );
@@ -702,7 +701,9 @@ var VertexServiceTierMap = {
702
701
  };
703
702
 
704
703
  // src/google-prepare-tools.ts
705
- var import_provider2 = require("@ai-sdk/provider");
704
+ import {
705
+ UnsupportedFunctionalityError as UnsupportedFunctionalityError2
706
+ } from "@ai-sdk/provider";
706
707
  function prepareTools({
707
708
  tools,
708
709
  toolChoice,
@@ -944,7 +945,7 @@ function prepareTools({
944
945
  };
945
946
  default: {
946
947
  const _exhaustiveCheck = type;
947
- throw new import_provider2.UnsupportedFunctionalityError({
948
+ throw new UnsupportedFunctionalityError2({
948
949
  functionality: `tool choice type: ${_exhaustiveCheck}`
949
950
  });
950
951
  }
@@ -1201,13 +1202,22 @@ function mapGoogleGenerativeAIFinishReason({
1201
1202
  }
1202
1203
 
1203
1204
  // src/google-generative-ai-language-model.ts
1204
- var GoogleGenerativeAILanguageModel = class {
1205
+ var GoogleGenerativeAILanguageModel = class _GoogleGenerativeAILanguageModel {
1205
1206
  constructor(modelId, config) {
1206
1207
  this.specificationVersion = "v4";
1207
1208
  var _a;
1208
1209
  this.modelId = modelId;
1209
1210
  this.config = config;
1210
- this.generateId = (_a = config.generateId) != null ? _a : import_provider_utils4.generateId;
1211
+ this.generateId = (_a = config.generateId) != null ? _a : generateId;
1212
+ }
1213
+ static [WORKFLOW_SERIALIZE](model) {
1214
+ return serializeModelOptions({
1215
+ modelId: model.modelId,
1216
+ config: model.config
1217
+ });
1218
+ }
1219
+ static [WORKFLOW_DESERIALIZE](options) {
1220
+ return new _GoogleGenerativeAILanguageModel(options.modelId, options.config);
1211
1221
  }
1212
1222
  get provider() {
1213
1223
  return this.config.provider;
@@ -1235,13 +1245,13 @@ var GoogleGenerativeAILanguageModel = class {
1235
1245
  var _a, _b;
1236
1246
  const warnings = [];
1237
1247
  const providerOptionsName = this.config.provider.includes("vertex") ? "vertex" : "google";
1238
- let googleOptions = await (0, import_provider_utils4.parseProviderOptions)({
1248
+ let googleOptions = await parseProviderOptions({
1239
1249
  provider: providerOptionsName,
1240
1250
  providerOptions,
1241
1251
  schema: googleLanguageModelOptions
1242
1252
  });
1243
1253
  if (googleOptions == null && providerOptionsName !== "google") {
1244
- googleOptions = await (0, import_provider_utils4.parseProviderOptions)({
1254
+ googleOptions = await parseProviderOptions({
1245
1255
  provider: "google",
1246
1256
  providerOptions,
1247
1257
  schema: googleLanguageModelOptions
@@ -1351,22 +1361,22 @@ var GoogleGenerativeAILanguageModel = class {
1351
1361
  async doGenerate(options) {
1352
1362
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
1353
1363
  const { args, warnings, providerOptionsName } = await this.getArgs(options);
1354
- const mergedHeaders = (0, import_provider_utils4.combineHeaders)(
1355
- await (0, import_provider_utils4.resolve)(this.config.headers),
1364
+ const mergedHeaders = combineHeaders(
1365
+ this.config.headers ? await resolve(this.config.headers) : void 0,
1356
1366
  options.headers
1357
1367
  );
1358
1368
  const {
1359
1369
  responseHeaders,
1360
1370
  value: response,
1361
1371
  rawValue: rawResponse
1362
- } = await (0, import_provider_utils4.postJsonToApi)({
1372
+ } = await postJsonToApi({
1363
1373
  url: `${this.config.baseURL}/${getModelPath(
1364
1374
  this.modelId
1365
1375
  )}:generateContent`,
1366
1376
  headers: mergedHeaders,
1367
1377
  body: args,
1368
1378
  failedResponseHandler: googleFailedResponseHandler,
1369
- successfulResponseHandler: (0, import_provider_utils4.createJsonResponseHandler)(responseSchema),
1379
+ successfulResponseHandler: createJsonResponseHandler(responseSchema),
1370
1380
  abortSignal: options.abortSignal,
1371
1381
  fetch: this.config.fetch
1372
1382
  });
@@ -1533,18 +1543,18 @@ var GoogleGenerativeAILanguageModel = class {
1533
1543
  options,
1534
1544
  { isStreaming: true }
1535
1545
  );
1536
- const headers = (0, import_provider_utils4.combineHeaders)(
1537
- await (0, import_provider_utils4.resolve)(this.config.headers),
1546
+ const headers = combineHeaders(
1547
+ this.config.headers ? await resolve(this.config.headers) : void 0,
1538
1548
  options.headers
1539
1549
  );
1540
- const { responseHeaders, value: response } = await (0, import_provider_utils4.postJsonToApi)({
1550
+ const { responseHeaders, value: response } = await postJsonToApi({
1541
1551
  url: `${this.config.baseURL}/${getModelPath(
1542
1552
  this.modelId
1543
1553
  )}:streamGenerateContent?alt=sse`,
1544
1554
  headers,
1545
1555
  body: args,
1546
1556
  failedResponseHandler: googleFailedResponseHandler,
1547
- successfulResponseHandler: (0, import_provider_utils4.createEventSourceResponseHandler)(chunkSchema),
1557
+ successfulResponseHandler: createEventSourceResponseHandler(chunkSchema),
1548
1558
  abortSignal: options.abortSignal,
1549
1559
  fetch: this.config.fetch
1550
1560
  });
@@ -1940,7 +1950,7 @@ function resolveThinkingConfig({
1940
1950
  modelId,
1941
1951
  warnings
1942
1952
  }) {
1943
- if (!(0, import_provider_utils4.isCustomReasoning)(reasoning)) {
1953
+ if (!isCustomReasoning(reasoning)) {
1944
1954
  return void 0;
1945
1955
  }
1946
1956
  if (isGemini3Model(modelId) && !modelId.includes("gemini-3-pro-image")) {
@@ -1955,7 +1965,7 @@ function resolveGemini3ThinkingConfig({
1955
1965
  if (reasoning === "none") {
1956
1966
  return { thinkingLevel: "minimal" };
1957
1967
  }
1958
- const thinkingLevel = (0, import_provider_utils4.mapReasoningToProviderEffort)({
1968
+ const thinkingLevel = mapReasoningToProviderEffort({
1959
1969
  reasoning,
1960
1970
  effortMap: {
1961
1971
  minimal: "minimal",
@@ -1979,7 +1989,7 @@ function resolveGemini25ThinkingConfig({
1979
1989
  if (reasoning === "none") {
1980
1990
  return { thinkingBudget: 0 };
1981
1991
  }
1982
- const thinkingBudget = (0, import_provider_utils4.mapReasoningToProviderBudget)({
1992
+ const thinkingBudget = mapReasoningToProviderBudget({
1983
1993
  reasoning,
1984
1994
  maxOutputTokens: getMaxOutputTokensForGemini25Model(),
1985
1995
  maxReasoningBudget: getMaxThinkingTokensForGemini25Model(modelId),
@@ -2085,270 +2095,286 @@ function extractSources({
2085
2095
  }
2086
2096
  return sources.length > 0 ? sources : void 0;
2087
2097
  }
2088
- var getGroundingMetadataSchema = () => import_v43.z.object({
2089
- webSearchQueries: import_v43.z.array(import_v43.z.string()).nullish(),
2090
- imageSearchQueries: import_v43.z.array(import_v43.z.string()).nullish(),
2091
- retrievalQueries: import_v43.z.array(import_v43.z.string()).nullish(),
2092
- searchEntryPoint: import_v43.z.object({ renderedContent: import_v43.z.string() }).nullish(),
2093
- groundingChunks: import_v43.z.array(
2094
- import_v43.z.object({
2095
- web: import_v43.z.object({ uri: import_v43.z.string(), title: import_v43.z.string().nullish() }).nullish(),
2096
- image: import_v43.z.object({
2097
- sourceUri: import_v43.z.string(),
2098
- imageUri: import_v43.z.string(),
2099
- title: import_v43.z.string().nullish(),
2100
- domain: import_v43.z.string().nullish()
2098
+ var getGroundingMetadataSchema = () => z3.object({
2099
+ webSearchQueries: z3.array(z3.string()).nullish(),
2100
+ imageSearchQueries: z3.array(z3.string()).nullish(),
2101
+ retrievalQueries: z3.array(z3.string()).nullish(),
2102
+ searchEntryPoint: z3.object({ renderedContent: z3.string() }).nullish(),
2103
+ groundingChunks: z3.array(
2104
+ z3.object({
2105
+ web: z3.object({ uri: z3.string(), title: z3.string().nullish() }).nullish(),
2106
+ image: z3.object({
2107
+ sourceUri: z3.string(),
2108
+ imageUri: z3.string(),
2109
+ title: z3.string().nullish(),
2110
+ domain: z3.string().nullish()
2101
2111
  }).nullish(),
2102
- retrievedContext: import_v43.z.object({
2103
- uri: import_v43.z.string().nullish(),
2104
- title: import_v43.z.string().nullish(),
2105
- text: import_v43.z.string().nullish(),
2106
- fileSearchStore: import_v43.z.string().nullish()
2112
+ retrievedContext: z3.object({
2113
+ uri: z3.string().nullish(),
2114
+ title: z3.string().nullish(),
2115
+ text: z3.string().nullish(),
2116
+ fileSearchStore: z3.string().nullish()
2107
2117
  }).nullish(),
2108
- maps: import_v43.z.object({
2109
- uri: import_v43.z.string().nullish(),
2110
- title: import_v43.z.string().nullish(),
2111
- text: import_v43.z.string().nullish(),
2112
- placeId: import_v43.z.string().nullish()
2118
+ maps: z3.object({
2119
+ uri: z3.string().nullish(),
2120
+ title: z3.string().nullish(),
2121
+ text: z3.string().nullish(),
2122
+ placeId: z3.string().nullish()
2113
2123
  }).nullish()
2114
2124
  })
2115
2125
  ).nullish(),
2116
- groundingSupports: import_v43.z.array(
2117
- import_v43.z.object({
2118
- segment: import_v43.z.object({
2119
- startIndex: import_v43.z.number().nullish(),
2120
- endIndex: import_v43.z.number().nullish(),
2121
- text: import_v43.z.string().nullish()
2126
+ groundingSupports: z3.array(
2127
+ z3.object({
2128
+ segment: z3.object({
2129
+ startIndex: z3.number().nullish(),
2130
+ endIndex: z3.number().nullish(),
2131
+ text: z3.string().nullish()
2122
2132
  }).nullish(),
2123
- segment_text: import_v43.z.string().nullish(),
2124
- groundingChunkIndices: import_v43.z.array(import_v43.z.number()).nullish(),
2125
- supportChunkIndices: import_v43.z.array(import_v43.z.number()).nullish(),
2126
- confidenceScores: import_v43.z.array(import_v43.z.number()).nullish(),
2127
- confidenceScore: import_v43.z.array(import_v43.z.number()).nullish()
2133
+ segment_text: z3.string().nullish(),
2134
+ groundingChunkIndices: z3.array(z3.number()).nullish(),
2135
+ supportChunkIndices: z3.array(z3.number()).nullish(),
2136
+ confidenceScores: z3.array(z3.number()).nullish(),
2137
+ confidenceScore: z3.array(z3.number()).nullish()
2128
2138
  })
2129
2139
  ).nullish(),
2130
- retrievalMetadata: import_v43.z.union([
2131
- import_v43.z.object({
2132
- webDynamicRetrievalScore: import_v43.z.number()
2140
+ retrievalMetadata: z3.union([
2141
+ z3.object({
2142
+ webDynamicRetrievalScore: z3.number()
2133
2143
  }),
2134
- import_v43.z.object({})
2144
+ z3.object({})
2135
2145
  ]).nullish()
2136
2146
  });
2137
- var partialArgSchema = import_v43.z.object({
2138
- jsonPath: import_v43.z.string(),
2139
- stringValue: import_v43.z.string().nullish(),
2140
- numberValue: import_v43.z.number().nullish(),
2141
- boolValue: import_v43.z.boolean().nullish(),
2142
- nullValue: import_v43.z.unknown().nullish(),
2143
- willContinue: import_v43.z.boolean().nullish()
2147
+ var partialArgSchema = z3.object({
2148
+ jsonPath: z3.string(),
2149
+ stringValue: z3.string().nullish(),
2150
+ numberValue: z3.number().nullish(),
2151
+ boolValue: z3.boolean().nullish(),
2152
+ nullValue: z3.unknown().nullish(),
2153
+ willContinue: z3.boolean().nullish()
2144
2154
  });
2145
- var getContentSchema = () => import_v43.z.object({
2146
- parts: import_v43.z.array(
2147
- import_v43.z.union([
2155
+ var getContentSchema = () => z3.object({
2156
+ parts: z3.array(
2157
+ z3.union([
2148
2158
  // note: order matters since text can be fully empty
2149
- import_v43.z.object({
2150
- functionCall: import_v43.z.object({
2151
- name: import_v43.z.string().nullish(),
2152
- args: import_v43.z.unknown().nullish(),
2153
- partialArgs: import_v43.z.array(partialArgSchema).nullish(),
2154
- willContinue: import_v43.z.boolean().nullish()
2159
+ z3.object({
2160
+ functionCall: z3.object({
2161
+ name: z3.string().nullish(),
2162
+ args: z3.unknown().nullish(),
2163
+ partialArgs: z3.array(partialArgSchema).nullish(),
2164
+ willContinue: z3.boolean().nullish()
2155
2165
  }),
2156
- thoughtSignature: import_v43.z.string().nullish()
2166
+ thoughtSignature: z3.string().nullish()
2157
2167
  }),
2158
- import_v43.z.object({
2159
- inlineData: import_v43.z.object({
2160
- mimeType: import_v43.z.string(),
2161
- data: import_v43.z.string()
2168
+ z3.object({
2169
+ inlineData: z3.object({
2170
+ mimeType: z3.string(),
2171
+ data: z3.string()
2162
2172
  }),
2163
- thought: import_v43.z.boolean().nullish(),
2164
- thoughtSignature: import_v43.z.string().nullish()
2173
+ thought: z3.boolean().nullish(),
2174
+ thoughtSignature: z3.string().nullish()
2165
2175
  }),
2166
- import_v43.z.object({
2167
- toolCall: import_v43.z.object({
2168
- toolType: import_v43.z.string(),
2169
- args: import_v43.z.unknown().nullish(),
2170
- id: import_v43.z.string()
2176
+ z3.object({
2177
+ toolCall: z3.object({
2178
+ toolType: z3.string(),
2179
+ args: z3.unknown().nullish(),
2180
+ id: z3.string()
2171
2181
  }),
2172
- thoughtSignature: import_v43.z.string().nullish()
2182
+ thoughtSignature: z3.string().nullish()
2173
2183
  }),
2174
- import_v43.z.object({
2175
- toolResponse: import_v43.z.object({
2176
- toolType: import_v43.z.string(),
2177
- response: import_v43.z.unknown().nullish(),
2178
- id: import_v43.z.string()
2184
+ z3.object({
2185
+ toolResponse: z3.object({
2186
+ toolType: z3.string(),
2187
+ response: z3.unknown().nullish(),
2188
+ id: z3.string()
2179
2189
  }),
2180
- thoughtSignature: import_v43.z.string().nullish()
2190
+ thoughtSignature: z3.string().nullish()
2181
2191
  }),
2182
- import_v43.z.object({
2183
- executableCode: import_v43.z.object({
2184
- language: import_v43.z.string(),
2185
- code: import_v43.z.string()
2192
+ z3.object({
2193
+ executableCode: z3.object({
2194
+ language: z3.string(),
2195
+ code: z3.string()
2186
2196
  }).nullish(),
2187
- codeExecutionResult: import_v43.z.object({
2188
- outcome: import_v43.z.string(),
2189
- output: import_v43.z.string().nullish()
2197
+ codeExecutionResult: z3.object({
2198
+ outcome: z3.string(),
2199
+ output: z3.string().nullish()
2190
2200
  }).nullish(),
2191
- text: import_v43.z.string().nullish(),
2192
- thought: import_v43.z.boolean().nullish(),
2193
- thoughtSignature: import_v43.z.string().nullish()
2201
+ text: z3.string().nullish(),
2202
+ thought: z3.boolean().nullish(),
2203
+ thoughtSignature: z3.string().nullish()
2194
2204
  })
2195
2205
  ])
2196
2206
  ).nullish()
2197
2207
  });
2198
- var getSafetyRatingSchema = () => import_v43.z.object({
2199
- category: import_v43.z.string().nullish(),
2200
- probability: import_v43.z.string().nullish(),
2201
- probabilityScore: import_v43.z.number().nullish(),
2202
- severity: import_v43.z.string().nullish(),
2203
- severityScore: import_v43.z.number().nullish(),
2204
- blocked: import_v43.z.boolean().nullish()
2208
+ var getSafetyRatingSchema = () => z3.object({
2209
+ category: z3.string().nullish(),
2210
+ probability: z3.string().nullish(),
2211
+ probabilityScore: z3.number().nullish(),
2212
+ severity: z3.string().nullish(),
2213
+ severityScore: z3.number().nullish(),
2214
+ blocked: z3.boolean().nullish()
2205
2215
  });
2206
- var tokenDetailsSchema = import_v43.z.array(
2207
- import_v43.z.object({
2208
- modality: import_v43.z.string(),
2209
- tokenCount: import_v43.z.number()
2216
+ var tokenDetailsSchema = z3.array(
2217
+ z3.object({
2218
+ modality: z3.string(),
2219
+ tokenCount: z3.number()
2210
2220
  })
2211
2221
  ).nullish();
2212
- var usageSchema = import_v43.z.object({
2213
- cachedContentTokenCount: import_v43.z.number().nullish(),
2214
- thoughtsTokenCount: import_v43.z.number().nullish(),
2215
- promptTokenCount: import_v43.z.number().nullish(),
2216
- candidatesTokenCount: import_v43.z.number().nullish(),
2217
- totalTokenCount: import_v43.z.number().nullish(),
2222
+ var usageSchema = z3.object({
2223
+ cachedContentTokenCount: z3.number().nullish(),
2224
+ thoughtsTokenCount: z3.number().nullish(),
2225
+ promptTokenCount: z3.number().nullish(),
2226
+ candidatesTokenCount: z3.number().nullish(),
2227
+ totalTokenCount: z3.number().nullish(),
2218
2228
  // https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#TrafficType
2219
- trafficType: import_v43.z.string().nullish(),
2229
+ trafficType: z3.string().nullish(),
2220
2230
  // https://ai.google.dev/api/generate-content#Modality
2221
2231
  promptTokensDetails: tokenDetailsSchema,
2222
2232
  candidatesTokensDetails: tokenDetailsSchema
2223
2233
  });
2224
- var getUrlContextMetadataSchema = () => import_v43.z.object({
2225
- urlMetadata: import_v43.z.array(
2226
- import_v43.z.object({
2227
- retrievedUrl: import_v43.z.string(),
2228
- urlRetrievalStatus: import_v43.z.string()
2234
+ var getUrlContextMetadataSchema = () => z3.object({
2235
+ urlMetadata: z3.array(
2236
+ z3.object({
2237
+ retrievedUrl: z3.string(),
2238
+ urlRetrievalStatus: z3.string()
2229
2239
  })
2230
2240
  ).nullish()
2231
2241
  });
2232
- var responseSchema = (0, import_provider_utils4.lazySchema)(
2233
- () => (0, import_provider_utils4.zodSchema)(
2234
- import_v43.z.object({
2235
- candidates: import_v43.z.array(
2236
- import_v43.z.object({
2237
- content: getContentSchema().nullish().or(import_v43.z.object({}).strict()),
2238
- finishReason: import_v43.z.string().nullish(),
2239
- finishMessage: import_v43.z.string().nullish(),
2240
- safetyRatings: import_v43.z.array(getSafetyRatingSchema()).nullish(),
2242
+ var responseSchema = lazySchema3(
2243
+ () => zodSchema3(
2244
+ z3.object({
2245
+ candidates: z3.array(
2246
+ z3.object({
2247
+ content: getContentSchema().nullish().or(z3.object({}).strict()),
2248
+ finishReason: z3.string().nullish(),
2249
+ finishMessage: z3.string().nullish(),
2250
+ safetyRatings: z3.array(getSafetyRatingSchema()).nullish(),
2241
2251
  groundingMetadata: getGroundingMetadataSchema().nullish(),
2242
2252
  urlContextMetadata: getUrlContextMetadataSchema().nullish()
2243
2253
  })
2244
2254
  ),
2245
2255
  usageMetadata: usageSchema.nullish(),
2246
- promptFeedback: import_v43.z.object({
2247
- blockReason: import_v43.z.string().nullish(),
2248
- safetyRatings: import_v43.z.array(getSafetyRatingSchema()).nullish()
2256
+ promptFeedback: z3.object({
2257
+ blockReason: z3.string().nullish(),
2258
+ safetyRatings: z3.array(getSafetyRatingSchema()).nullish()
2249
2259
  }).nullish(),
2250
- serviceTier: import_v43.z.string().nullish()
2260
+ serviceTier: z3.string().nullish()
2251
2261
  })
2252
2262
  )
2253
2263
  );
2254
- var chunkSchema = (0, import_provider_utils4.lazySchema)(
2255
- () => (0, import_provider_utils4.zodSchema)(
2256
- import_v43.z.object({
2257
- candidates: import_v43.z.array(
2258
- import_v43.z.object({
2264
+ var chunkSchema = lazySchema3(
2265
+ () => zodSchema3(
2266
+ z3.object({
2267
+ candidates: z3.array(
2268
+ z3.object({
2259
2269
  content: getContentSchema().nullish(),
2260
- finishReason: import_v43.z.string().nullish(),
2261
- finishMessage: import_v43.z.string().nullish(),
2262
- safetyRatings: import_v43.z.array(getSafetyRatingSchema()).nullish(),
2270
+ finishReason: z3.string().nullish(),
2271
+ finishMessage: z3.string().nullish(),
2272
+ safetyRatings: z3.array(getSafetyRatingSchema()).nullish(),
2263
2273
  groundingMetadata: getGroundingMetadataSchema().nullish(),
2264
2274
  urlContextMetadata: getUrlContextMetadataSchema().nullish()
2265
2275
  })
2266
2276
  ).nullish(),
2267
2277
  usageMetadata: usageSchema.nullish(),
2268
- promptFeedback: import_v43.z.object({
2269
- blockReason: import_v43.z.string().nullish(),
2270
- safetyRatings: import_v43.z.array(getSafetyRatingSchema()).nullish()
2278
+ promptFeedback: z3.object({
2279
+ blockReason: z3.string().nullish(),
2280
+ safetyRatings: z3.array(getSafetyRatingSchema()).nullish()
2271
2281
  }).nullish(),
2272
- serviceTier: import_v43.z.string().nullish()
2282
+ serviceTier: z3.string().nullish()
2273
2283
  })
2274
2284
  )
2275
2285
  );
2276
2286
 
2277
2287
  // src/tool/code-execution.ts
2278
- var import_provider_utils5 = require("@ai-sdk/provider-utils");
2279
- var import_v44 = require("zod/v4");
2280
- var codeExecution = (0, import_provider_utils5.createProviderToolFactoryWithOutputSchema)({
2288
+ import { createProviderToolFactoryWithOutputSchema } from "@ai-sdk/provider-utils";
2289
+ import { z as z4 } from "zod/v4";
2290
+ var codeExecution = createProviderToolFactoryWithOutputSchema({
2281
2291
  id: "google.code_execution",
2282
- inputSchema: import_v44.z.object({
2283
- language: import_v44.z.string().describe("The programming language of the code."),
2284
- code: import_v44.z.string().describe("The code to be executed.")
2292
+ inputSchema: z4.object({
2293
+ language: z4.string().describe("The programming language of the code."),
2294
+ code: z4.string().describe("The code to be executed.")
2285
2295
  }),
2286
- outputSchema: import_v44.z.object({
2287
- outcome: import_v44.z.string().describe('The outcome of the execution (e.g., "OUTCOME_OK").'),
2288
- output: import_v44.z.string().describe("The output from the code execution.")
2296
+ outputSchema: z4.object({
2297
+ outcome: z4.string().describe('The outcome of the execution (e.g., "OUTCOME_OK").'),
2298
+ output: z4.string().describe("The output from the code execution.")
2289
2299
  })
2290
2300
  });
2291
2301
 
2292
2302
  // src/tool/enterprise-web-search.ts
2293
- var import_provider_utils6 = require("@ai-sdk/provider-utils");
2294
- var import_v45 = require("zod/v4");
2295
- var enterpriseWebSearch = (0, import_provider_utils6.createProviderToolFactory)({
2303
+ import {
2304
+ createProviderToolFactory,
2305
+ lazySchema as lazySchema4,
2306
+ zodSchema as zodSchema4
2307
+ } from "@ai-sdk/provider-utils";
2308
+ import { z as z5 } from "zod/v4";
2309
+ var enterpriseWebSearch = createProviderToolFactory({
2296
2310
  id: "google.enterprise_web_search",
2297
- inputSchema: (0, import_provider_utils6.lazySchema)(() => (0, import_provider_utils6.zodSchema)(import_v45.z.object({})))
2311
+ inputSchema: lazySchema4(() => zodSchema4(z5.object({})))
2298
2312
  });
2299
2313
 
2300
2314
  // src/tool/file-search.ts
2301
- var import_provider_utils7 = require("@ai-sdk/provider-utils");
2302
- var import_v46 = require("zod/v4");
2303
- var fileSearchArgsBaseSchema = import_v46.z.object({
2315
+ import {
2316
+ createProviderToolFactory as createProviderToolFactory2,
2317
+ lazySchema as lazySchema5,
2318
+ zodSchema as zodSchema5
2319
+ } from "@ai-sdk/provider-utils";
2320
+ import { z as z6 } from "zod/v4";
2321
+ var fileSearchArgsBaseSchema = z6.object({
2304
2322
  /** The names of the file_search_stores to retrieve from.
2305
2323
  * Example: `fileSearchStores/my-file-search-store-123`
2306
2324
  */
2307
- fileSearchStoreNames: import_v46.z.array(import_v46.z.string()).describe(
2325
+ fileSearchStoreNames: z6.array(z6.string()).describe(
2308
2326
  "The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`"
2309
2327
  ),
2310
2328
  /** The number of file search retrieval chunks to retrieve. */
2311
- topK: import_v46.z.number().int().positive().describe("The number of file search retrieval chunks to retrieve.").optional(),
2329
+ topK: z6.number().int().positive().describe("The number of file search retrieval chunks to retrieve.").optional(),
2312
2330
  /** Metadata filter to apply to the file search retrieval documents.
2313
2331
  * See https://google.aip.dev/160 for the syntax of the filter expression.
2314
2332
  */
2315
- metadataFilter: import_v46.z.string().describe(
2333
+ metadataFilter: z6.string().describe(
2316
2334
  "Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression."
2317
2335
  ).optional()
2318
2336
  }).passthrough();
2319
- var fileSearchArgsSchema = (0, import_provider_utils7.lazySchema)(
2320
- () => (0, import_provider_utils7.zodSchema)(fileSearchArgsBaseSchema)
2337
+ var fileSearchArgsSchema = lazySchema5(
2338
+ () => zodSchema5(fileSearchArgsBaseSchema)
2321
2339
  );
2322
- var fileSearch = (0, import_provider_utils7.createProviderToolFactory)({
2340
+ var fileSearch = createProviderToolFactory2({
2323
2341
  id: "google.file_search",
2324
2342
  inputSchema: fileSearchArgsSchema
2325
2343
  });
2326
2344
 
2327
2345
  // src/tool/google-maps.ts
2328
- var import_provider_utils8 = require("@ai-sdk/provider-utils");
2329
- var import_v47 = require("zod/v4");
2330
- var googleMaps = (0, import_provider_utils8.createProviderToolFactory)({
2346
+ import {
2347
+ createProviderToolFactory as createProviderToolFactory3,
2348
+ lazySchema as lazySchema6,
2349
+ zodSchema as zodSchema6
2350
+ } from "@ai-sdk/provider-utils";
2351
+ import { z as z7 } from "zod/v4";
2352
+ var googleMaps = createProviderToolFactory3({
2331
2353
  id: "google.google_maps",
2332
- inputSchema: (0, import_provider_utils8.lazySchema)(() => (0, import_provider_utils8.zodSchema)(import_v47.z.object({})))
2354
+ inputSchema: lazySchema6(() => zodSchema6(z7.object({})))
2333
2355
  });
2334
2356
 
2335
2357
  // src/tool/google-search.ts
2336
- var import_provider_utils9 = require("@ai-sdk/provider-utils");
2337
- var import_v48 = require("zod/v4");
2338
- var googleSearchToolArgsBaseSchema = import_v48.z.object({
2339
- searchTypes: import_v48.z.object({
2340
- webSearch: import_v48.z.object({}).optional(),
2341
- imageSearch: import_v48.z.object({}).optional()
2358
+ import {
2359
+ createProviderToolFactory as createProviderToolFactory4,
2360
+ lazySchema as lazySchema7,
2361
+ zodSchema as zodSchema7
2362
+ } from "@ai-sdk/provider-utils";
2363
+ import { z as z8 } from "zod/v4";
2364
+ var googleSearchToolArgsBaseSchema = z8.object({
2365
+ searchTypes: z8.object({
2366
+ webSearch: z8.object({}).optional(),
2367
+ imageSearch: z8.object({}).optional()
2342
2368
  }).optional(),
2343
- timeRangeFilter: import_v48.z.object({
2344
- startTime: import_v48.z.string(),
2345
- endTime: import_v48.z.string()
2369
+ timeRangeFilter: z8.object({
2370
+ startTime: z8.string(),
2371
+ endTime: z8.string()
2346
2372
  }).optional()
2347
2373
  }).passthrough();
2348
- var googleSearchToolArgsSchema = (0, import_provider_utils9.lazySchema)(
2349
- () => (0, import_provider_utils9.zodSchema)(googleSearchToolArgsBaseSchema)
2374
+ var googleSearchToolArgsSchema = lazySchema7(
2375
+ () => zodSchema7(googleSearchToolArgsBaseSchema)
2350
2376
  );
2351
- var googleSearch = (0, import_provider_utils9.createProviderToolFactory)(
2377
+ var googleSearch = createProviderToolFactory4(
2352
2378
  {
2353
2379
  id: "google.google_search",
2354
2380
  inputSchema: googleSearchToolArgsSchema
@@ -2356,21 +2382,25 @@ var googleSearch = (0, import_provider_utils9.createProviderToolFactory)(
2356
2382
  );
2357
2383
 
2358
2384
  // src/tool/url-context.ts
2359
- var import_provider_utils10 = require("@ai-sdk/provider-utils");
2360
- var import_v49 = require("zod/v4");
2361
- var urlContext = (0, import_provider_utils10.createProviderToolFactory)({
2385
+ import {
2386
+ createProviderToolFactory as createProviderToolFactory5,
2387
+ lazySchema as lazySchema8,
2388
+ zodSchema as zodSchema8
2389
+ } from "@ai-sdk/provider-utils";
2390
+ import { z as z9 } from "zod/v4";
2391
+ var urlContext = createProviderToolFactory5({
2362
2392
  id: "google.url_context",
2363
- inputSchema: (0, import_provider_utils10.lazySchema)(() => (0, import_provider_utils10.zodSchema)(import_v49.z.object({})))
2393
+ inputSchema: lazySchema8(() => zodSchema8(z9.object({})))
2364
2394
  });
2365
2395
 
2366
2396
  // src/tool/vertex-rag-store.ts
2367
- var import_provider_utils11 = require("@ai-sdk/provider-utils");
2368
- var import_v410 = require("zod/v4");
2369
- var vertexRagStore = (0, import_provider_utils11.createProviderToolFactory)({
2397
+ import { createProviderToolFactory as createProviderToolFactory6 } from "@ai-sdk/provider-utils";
2398
+ import { z as z10 } from "zod/v4";
2399
+ var vertexRagStore = createProviderToolFactory6({
2370
2400
  id: "google.vertex_rag_store",
2371
- inputSchema: import_v410.z.object({
2372
- ragCorpus: import_v410.z.string(),
2373
- topK: import_v410.z.number().optional()
2401
+ inputSchema: z10.object({
2402
+ ragCorpus: z10.string(),
2403
+ topK: z10.number().optional()
2374
2404
  })
2375
2405
  });
2376
2406
 
@@ -2433,11 +2463,10 @@ var googleTools = {
2433
2463
  */
2434
2464
  vertexRagStore
2435
2465
  };
2436
- // Annotate the CommonJS export names for ESM import in node:
2437
- 0 && (module.exports = {
2466
+ export {
2438
2467
  GoogleGenerativeAILanguageModel,
2439
2468
  getGroundingMetadataSchema,
2440
2469
  getUrlContextMetadataSchema,
2441
2470
  googleTools
2442
- });
2471
+ };
2443
2472
  //# sourceMappingURL=index.js.map