@google/genai 1.42.0 → 1.43.0

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.cjs CHANGED
@@ -646,6 +646,38 @@ exports.Type = void 0;
646
646
  */
647
647
  Type["NULL"] = "NULL";
648
648
  })(exports.Type || (exports.Type = {}));
649
+ /** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
650
+ exports.PhishBlockThreshold = void 0;
651
+ (function (PhishBlockThreshold) {
652
+ /**
653
+ * Defaults to unspecified.
654
+ */
655
+ PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
656
+ /**
657
+ * Blocks Low and above confidence URL that is risky.
658
+ */
659
+ PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
660
+ /**
661
+ * Blocks Medium and above confidence URL that is risky.
662
+ */
663
+ PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
664
+ /**
665
+ * Blocks High and above confidence URL that is risky.
666
+ */
667
+ PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
668
+ /**
669
+ * Blocks Higher and above confidence URL that is risky.
670
+ */
671
+ PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
672
+ /**
673
+ * Blocks Very high and above confidence URL that is risky.
674
+ */
675
+ PhishBlockThreshold["BLOCK_VERY_HIGH_AND_ABOVE"] = "BLOCK_VERY_HIGH_AND_ABOVE";
676
+ /**
677
+ * Blocks Extremely high confidence URL that is risky.
678
+ */
679
+ PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
680
+ })(exports.PhishBlockThreshold || (exports.PhishBlockThreshold = {}));
649
681
  /** The API spec that the external API implements. This enum is not supported in Gemini API. */
650
682
  exports.ApiSpec = void 0;
651
683
  (function (ApiSpec) {
@@ -716,38 +748,6 @@ exports.HttpElementLocation = void 0;
716
748
  */
717
749
  HttpElementLocation["HTTP_IN_COOKIE"] = "HTTP_IN_COOKIE";
718
750
  })(exports.HttpElementLocation || (exports.HttpElementLocation = {}));
719
- /** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
720
- exports.PhishBlockThreshold = void 0;
721
- (function (PhishBlockThreshold) {
722
- /**
723
- * Defaults to unspecified.
724
- */
725
- PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
726
- /**
727
- * Blocks Low and above confidence URL that is risky.
728
- */
729
- PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
730
- /**
731
- * Blocks Medium and above confidence URL that is risky.
732
- */
733
- PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
734
- /**
735
- * Blocks High and above confidence URL that is risky.
736
- */
737
- PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
738
- /**
739
- * Blocks Higher and above confidence URL that is risky.
740
- */
741
- PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
742
- /**
743
- * Blocks Very high and above confidence URL that is risky.
744
- */
745
- PhishBlockThreshold["BLOCK_VERY_HIGH_AND_ABOVE"] = "BLOCK_VERY_HIGH_AND_ABOVE";
746
- /**
747
- * Blocks Extremely high confidence URL that is risky.
748
- */
749
- PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
750
- })(exports.PhishBlockThreshold || (exports.PhishBlockThreshold = {}));
751
751
  /** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
752
752
  exports.Behavior = void 0;
753
753
  (function (Behavior) {
@@ -1330,6 +1330,22 @@ exports.Environment = void 0;
1330
1330
  */
1331
1331
  Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
1332
1332
  })(exports.Environment || (exports.Environment = {}));
1333
+ /** Enum for controlling whether the model can generate images of prominent people (celebrities). */
1334
+ exports.ProminentPeople = void 0;
1335
+ (function (ProminentPeople) {
1336
+ /**
1337
+ * Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
1338
+ */
1339
+ ProminentPeople["PROMINENT_PEOPLE_UNSPECIFIED"] = "PROMINENT_PEOPLE_UNSPECIFIED";
1340
+ /**
1341
+ * Allows the model to generate images of prominent people.
1342
+ */
1343
+ ProminentPeople["ALLOW_PROMINENT_PEOPLE"] = "ALLOW_PROMINENT_PEOPLE";
1344
+ /**
1345
+ * Prevents the model from generating images of prominent people.
1346
+ */
1347
+ ProminentPeople["BLOCK_PROMINENT_PEOPLE"] = "BLOCK_PROMINENT_PEOPLE";
1348
+ })(exports.ProminentPeople || (exports.ProminentPeople = {}));
1333
1349
  /** Enum representing the Vertex embedding API to use. */
1334
1350
  exports.EmbeddingApiType = void 0;
1335
1351
  (function (EmbeddingApiType) {
@@ -3688,16 +3704,16 @@ function candidateFromMldev$1(fromObject) {
3688
3704
  if (fromFinishReason != null) {
3689
3705
  setValueByPath(toObject, ['finishReason'], fromFinishReason);
3690
3706
  }
3691
- const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']);
3692
- if (fromAvgLogprobs != null) {
3693
- setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);
3694
- }
3695
3707
  const fromGroundingMetadata = getValueByPath(fromObject, [
3696
3708
  'groundingMetadata',
3697
3709
  ]);
3698
3710
  if (fromGroundingMetadata != null) {
3699
3711
  setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
3700
3712
  }
3713
+ const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']);
3714
+ if (fromAvgLogprobs != null) {
3715
+ setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);
3716
+ }
3701
3717
  const fromIndex = getValueByPath(fromObject, ['index']);
3702
3718
  if (fromIndex != null) {
3703
3719
  setValueByPath(toObject, ['index'], fromIndex);
@@ -4243,6 +4259,10 @@ function googleMapsToMldev$4(fromObject) {
4243
4259
  }
4244
4260
  function googleSearchToMldev$4(fromObject) {
4245
4261
  const toObject = {};
4262
+ const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
4263
+ if (fromSearchTypes != null) {
4264
+ setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
4265
+ }
4246
4266
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
4247
4267
  throw new Error('excludeDomains parameter is not supported in Gemini API.');
4248
4268
  }
@@ -4270,6 +4290,9 @@ function imageConfigToMldev$1(fromObject) {
4270
4290
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
4271
4291
  throw new Error('personGeneration parameter is not supported in Gemini API.');
4272
4292
  }
4293
+ if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
4294
+ throw new Error('prominentPeople parameter is not supported in Gemini API.');
4295
+ }
4273
4296
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
4274
4297
  throw new Error('outputMimeType parameter is not supported in Gemini API.');
4275
4298
  }
@@ -4526,6 +4549,10 @@ function toolToMldev$4(fromObject) {
4526
4549
  if (fromFileSearch != null) {
4527
4550
  setValueByPath(toObject, ['fileSearch'], fromFileSearch);
4528
4551
  }
4552
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
4553
+ if (fromGoogleSearch != null) {
4554
+ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$4(fromGoogleSearch));
4555
+ }
4529
4556
  const fromCodeExecution = getValueByPath(fromObject, [
4530
4557
  'codeExecution',
4531
4558
  ]);
@@ -4551,10 +4578,6 @@ function toolToMldev$4(fromObject) {
4551
4578
  if (fromGoogleMaps != null) {
4552
4579
  setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$4(fromGoogleMaps));
4553
4580
  }
4554
- const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
4555
- if (fromGoogleSearch != null) {
4556
- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$4(fromGoogleSearch));
4557
- }
4558
4581
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
4559
4582
  'googleSearchRetrieval',
4560
4583
  ]);
@@ -4565,6 +4588,16 @@ function toolToMldev$4(fromObject) {
4565
4588
  if (fromUrlContext != null) {
4566
4589
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
4567
4590
  }
4591
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
4592
+ if (fromMcpServers != null) {
4593
+ let transformedList = fromMcpServers;
4594
+ if (Array.isArray(transformedList)) {
4595
+ transformedList = transformedList.map((item) => {
4596
+ return item;
4597
+ });
4598
+ }
4599
+ setValueByPath(toObject, ['mcpServers'], transformedList);
4600
+ }
4568
4601
  return toObject;
4569
4602
  }
4570
4603
 
@@ -5571,6 +5604,10 @@ function googleMapsToMldev$3(fromObject) {
5571
5604
  }
5572
5605
  function googleSearchToMldev$3(fromObject) {
5573
5606
  const toObject = {};
5607
+ const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
5608
+ if (fromSearchTypes != null) {
5609
+ setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
5610
+ }
5574
5611
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
5575
5612
  throw new Error('excludeDomains parameter is not supported in Gemini API.');
5576
5613
  }
@@ -5770,6 +5807,10 @@ function toolToMldev$3(fromObject) {
5770
5807
  if (fromFileSearch != null) {
5771
5808
  setValueByPath(toObject, ['fileSearch'], fromFileSearch);
5772
5809
  }
5810
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
5811
+ if (fromGoogleSearch != null) {
5812
+ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$3(fromGoogleSearch));
5813
+ }
5773
5814
  const fromCodeExecution = getValueByPath(fromObject, [
5774
5815
  'codeExecution',
5775
5816
  ]);
@@ -5795,10 +5836,6 @@ function toolToMldev$3(fromObject) {
5795
5836
  if (fromGoogleMaps != null) {
5796
5837
  setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$3(fromGoogleMaps));
5797
5838
  }
5798
- const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
5799
- if (fromGoogleSearch != null) {
5800
- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$3(fromGoogleSearch));
5801
- }
5802
5839
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
5803
5840
  'googleSearchRetrieval',
5804
5841
  ]);
@@ -5809,6 +5846,16 @@ function toolToMldev$3(fromObject) {
5809
5846
  if (fromUrlContext != null) {
5810
5847
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
5811
5848
  }
5849
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
5850
+ if (fromMcpServers != null) {
5851
+ let transformedList = fromMcpServers;
5852
+ if (Array.isArray(transformedList)) {
5853
+ transformedList = transformedList.map((item) => {
5854
+ return item;
5855
+ });
5856
+ }
5857
+ setValueByPath(toObject, ['mcpServers'], transformedList);
5858
+ }
5812
5859
  return toObject;
5813
5860
  }
5814
5861
  function toolToVertex$2(fromObject) {
@@ -5824,6 +5871,10 @@ function toolToVertex$2(fromObject) {
5824
5871
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
5825
5872
  throw new Error('fileSearch parameter is not supported in Vertex AI.');
5826
5873
  }
5874
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
5875
+ if (fromGoogleSearch != null) {
5876
+ setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
5877
+ }
5827
5878
  const fromCodeExecution = getValueByPath(fromObject, [
5828
5879
  'codeExecution',
5829
5880
  ]);
@@ -5852,10 +5903,6 @@ function toolToVertex$2(fromObject) {
5852
5903
  if (fromGoogleMaps != null) {
5853
5904
  setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
5854
5905
  }
5855
- const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
5856
- if (fromGoogleSearch != null) {
5857
- setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
5858
- }
5859
5906
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
5860
5907
  'googleSearchRetrieval',
5861
5908
  ]);
@@ -5866,6 +5913,9 @@ function toolToVertex$2(fromObject) {
5866
5913
  if (fromUrlContext != null) {
5867
5914
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
5868
5915
  }
5916
+ if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
5917
+ throw new Error('mcpServers parameter is not supported in Vertex AI.');
5918
+ }
5869
5919
  return toObject;
5870
5920
  }
5871
5921
  function updateCachedContentConfigToMldev(fromObject, parentObject) {
@@ -6949,7 +6999,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
6949
6999
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
6950
7000
  const USER_AGENT_HEADER = 'User-Agent';
6951
7001
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
6952
- const SDK_VERSION = '1.42.0'; // x-release-please-version
7002
+ const SDK_VERSION = '1.43.0'; // x-release-please-version
6953
7003
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
6954
7004
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
6955
7005
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -9390,14 +9440,17 @@ const createPathTagFunction = (pathEncoder = encodeURIPath) => (function path(st
9390
9440
  return previousValue + currentValue + (index === params.length ? '' : encoded);
9391
9441
  }, '');
9392
9442
  const pathOnly = path.split(/[?#]/, 1)[0];
9393
- const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
9443
+ const invalidSegmentPattern = /(^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
9394
9444
  let match;
9395
9445
  // Find all invalid segments
9396
9446
  while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
9447
+ const hasLeadingSlash = match[0].startsWith('/');
9448
+ const offset = hasLeadingSlash ? 1 : 0;
9449
+ const cleanMatch = hasLeadingSlash ? match[0].slice(1) : match[0];
9397
9450
  invalidSegments.push({
9398
- start: match.index,
9399
- length: match[0].length,
9400
- error: `Value "${match[0]}" can\'t be safely passed as a path parameter`,
9451
+ start: match.index + offset,
9452
+ length: cleanMatch.length,
9453
+ error: `Value "${cleanMatch}" can\'t be safely passed as a path parameter`,
9401
9454
  });
9402
9455
  }
9403
9456
  invalidSegments.sort((a, b) => a.start - b.start);
@@ -10968,6 +11021,10 @@ function googleMapsToMldev$2(fromObject) {
10968
11021
  }
10969
11022
  function googleSearchToMldev$2(fromObject) {
10970
11023
  const toObject = {};
11024
+ const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
11025
+ if (fromSearchTypes != null) {
11026
+ setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
11027
+ }
10971
11028
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
10972
11029
  throw new Error('excludeDomains parameter is not supported in Gemini API.');
10973
11030
  }
@@ -11483,6 +11540,10 @@ function toolToMldev$2(fromObject) {
11483
11540
  if (fromFileSearch != null) {
11484
11541
  setValueByPath(toObject, ['fileSearch'], fromFileSearch);
11485
11542
  }
11543
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
11544
+ if (fromGoogleSearch != null) {
11545
+ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2(fromGoogleSearch));
11546
+ }
11486
11547
  const fromCodeExecution = getValueByPath(fromObject, [
11487
11548
  'codeExecution',
11488
11549
  ]);
@@ -11508,10 +11569,6 @@ function toolToMldev$2(fromObject) {
11508
11569
  if (fromGoogleMaps != null) {
11509
11570
  setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
11510
11571
  }
11511
- const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
11512
- if (fromGoogleSearch != null) {
11513
- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2(fromGoogleSearch));
11514
- }
11515
11572
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
11516
11573
  'googleSearchRetrieval',
11517
11574
  ]);
@@ -11522,6 +11579,16 @@ function toolToMldev$2(fromObject) {
11522
11579
  if (fromUrlContext != null) {
11523
11580
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
11524
11581
  }
11582
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
11583
+ if (fromMcpServers != null) {
11584
+ let transformedList = fromMcpServers;
11585
+ if (Array.isArray(transformedList)) {
11586
+ transformedList = transformedList.map((item) => {
11587
+ return item;
11588
+ });
11589
+ }
11590
+ setValueByPath(toObject, ['mcpServers'], transformedList);
11591
+ }
11525
11592
  return toObject;
11526
11593
  }
11527
11594
  function toolToVertex$1(fromObject) {
@@ -11537,6 +11604,10 @@ function toolToVertex$1(fromObject) {
11537
11604
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
11538
11605
  throw new Error('fileSearch parameter is not supported in Vertex AI.');
11539
11606
  }
11607
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
11608
+ if (fromGoogleSearch != null) {
11609
+ setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
11610
+ }
11540
11611
  const fromCodeExecution = getValueByPath(fromObject, [
11541
11612
  'codeExecution',
11542
11613
  ]);
@@ -11565,10 +11636,6 @@ function toolToVertex$1(fromObject) {
11565
11636
  if (fromGoogleMaps != null) {
11566
11637
  setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
11567
11638
  }
11568
- const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
11569
- if (fromGoogleSearch != null) {
11570
- setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
11571
- }
11572
11639
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
11573
11640
  'googleSearchRetrieval',
11574
11641
  ]);
@@ -11579,6 +11646,9 @@ function toolToVertex$1(fromObject) {
11579
11646
  if (fromUrlContext != null) {
11580
11647
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
11581
11648
  }
11649
+ if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
11650
+ throw new Error('mcpServers parameter is not supported in Vertex AI.');
11651
+ }
11582
11652
  return toObject;
11583
11653
  }
11584
11654
  function usageMetadataFromVertex(fromObject) {
@@ -11722,16 +11792,16 @@ function candidateFromMldev(fromObject, rootObject) {
11722
11792
  if (fromFinishReason != null) {
11723
11793
  setValueByPath(toObject, ['finishReason'], fromFinishReason);
11724
11794
  }
11725
- const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']);
11726
- if (fromAvgLogprobs != null) {
11727
- setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);
11728
- }
11729
11795
  const fromGroundingMetadata = getValueByPath(fromObject, [
11730
11796
  'groundingMetadata',
11731
11797
  ]);
11732
11798
  if (fromGroundingMetadata != null) {
11733
11799
  setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
11734
11800
  }
11801
+ const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']);
11802
+ if (fromAvgLogprobs != null) {
11803
+ setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);
11804
+ }
11735
11805
  const fromIndex = getValueByPath(fromObject, ['index']);
11736
11806
  if (fromIndex != null) {
11737
11807
  setValueByPath(toObject, ['index'], fromIndex);
@@ -13848,6 +13918,10 @@ function googleMapsToMldev$1(fromObject, _rootObject) {
13848
13918
  }
13849
13919
  function googleSearchToMldev$1(fromObject, _rootObject) {
13850
13920
  const toObject = {};
13921
+ const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
13922
+ if (fromSearchTypes != null) {
13923
+ setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
13924
+ }
13851
13925
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
13852
13926
  throw new Error('excludeDomains parameter is not supported in Gemini API.');
13853
13927
  }
@@ -13875,6 +13949,9 @@ function imageConfigToMldev(fromObject, _rootObject) {
13875
13949
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
13876
13950
  throw new Error('personGeneration parameter is not supported in Gemini API.');
13877
13951
  }
13952
+ if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
13953
+ throw new Error('prominentPeople parameter is not supported in Gemini API.');
13954
+ }
13878
13955
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
13879
13956
  throw new Error('outputMimeType parameter is not supported in Gemini API.');
13880
13957
  }
@@ -13900,6 +13977,12 @@ function imageConfigToVertex(fromObject, _rootObject) {
13900
13977
  if (fromPersonGeneration != null) {
13901
13978
  setValueByPath(toObject, ['personGeneration'], fromPersonGeneration);
13902
13979
  }
13980
+ const fromProminentPeople = getValueByPath(fromObject, [
13981
+ 'prominentPeople',
13982
+ ]);
13983
+ if (fromProminentPeople != null) {
13984
+ setValueByPath(toObject, ['prominentPeople'], fromProminentPeople);
13985
+ }
13903
13986
  const fromOutputMimeType = getValueByPath(fromObject, [
13904
13987
  'outputMimeType',
13905
13988
  ]);
@@ -14627,6 +14710,10 @@ function toolToMldev$1(fromObject, rootObject) {
14627
14710
  if (fromFileSearch != null) {
14628
14711
  setValueByPath(toObject, ['fileSearch'], fromFileSearch);
14629
14712
  }
14713
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
14714
+ if (fromGoogleSearch != null) {
14715
+ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1(fromGoogleSearch));
14716
+ }
14630
14717
  const fromCodeExecution = getValueByPath(fromObject, [
14631
14718
  'codeExecution',
14632
14719
  ]);
@@ -14652,10 +14739,6 @@ function toolToMldev$1(fromObject, rootObject) {
14652
14739
  if (fromGoogleMaps != null) {
14653
14740
  setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
14654
14741
  }
14655
- const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
14656
- if (fromGoogleSearch != null) {
14657
- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1(fromGoogleSearch));
14658
- }
14659
14742
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
14660
14743
  'googleSearchRetrieval',
14661
14744
  ]);
@@ -14666,6 +14749,16 @@ function toolToMldev$1(fromObject, rootObject) {
14666
14749
  if (fromUrlContext != null) {
14667
14750
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
14668
14751
  }
14752
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
14753
+ if (fromMcpServers != null) {
14754
+ let transformedList = fromMcpServers;
14755
+ if (Array.isArray(transformedList)) {
14756
+ transformedList = transformedList.map((item) => {
14757
+ return item;
14758
+ });
14759
+ }
14760
+ setValueByPath(toObject, ['mcpServers'], transformedList);
14761
+ }
14669
14762
  return toObject;
14670
14763
  }
14671
14764
  function toolToVertex(fromObject, rootObject) {
@@ -14681,6 +14774,10 @@ function toolToVertex(fromObject, rootObject) {
14681
14774
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
14682
14775
  throw new Error('fileSearch parameter is not supported in Vertex AI.');
14683
14776
  }
14777
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
14778
+ if (fromGoogleSearch != null) {
14779
+ setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
14780
+ }
14684
14781
  const fromCodeExecution = getValueByPath(fromObject, [
14685
14782
  'codeExecution',
14686
14783
  ]);
@@ -14709,10 +14806,6 @@ function toolToVertex(fromObject, rootObject) {
14709
14806
  if (fromGoogleMaps != null) {
14710
14807
  setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
14711
14808
  }
14712
- const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
14713
- if (fromGoogleSearch != null) {
14714
- setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
14715
- }
14716
14809
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
14717
14810
  'googleSearchRetrieval',
14718
14811
  ]);
@@ -14723,6 +14816,9 @@ function toolToVertex(fromObject, rootObject) {
14723
14816
  if (fromUrlContext != null) {
14724
14817
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
14725
14818
  }
14819
+ if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
14820
+ throw new Error('mcpServers parameter is not supported in Vertex AI.');
14821
+ }
14726
14822
  return toObject;
14727
14823
  }
14728
14824
  function tunedModelInfoFromMldev(fromObject, _rootObject) {
@@ -17822,6 +17918,10 @@ function googleMapsToMldev(fromObject) {
17822
17918
  }
17823
17919
  function googleSearchToMldev(fromObject) {
17824
17920
  const toObject = {};
17921
+ const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
17922
+ if (fromSearchTypes != null) {
17923
+ setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
17924
+ }
17825
17925
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
17826
17926
  throw new Error('excludeDomains parameter is not supported in Gemini API.');
17827
17927
  }
@@ -18045,6 +18145,10 @@ function toolToMldev(fromObject) {
18045
18145
  if (fromFileSearch != null) {
18046
18146
  setValueByPath(toObject, ['fileSearch'], fromFileSearch);
18047
18147
  }
18148
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
18149
+ if (fromGoogleSearch != null) {
18150
+ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(fromGoogleSearch));
18151
+ }
18048
18152
  const fromCodeExecution = getValueByPath(fromObject, [
18049
18153
  'codeExecution',
18050
18154
  ]);
@@ -18070,10 +18174,6 @@ function toolToMldev(fromObject) {
18070
18174
  if (fromGoogleMaps != null) {
18071
18175
  setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
18072
18176
  }
18073
- const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
18074
- if (fromGoogleSearch != null) {
18075
- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(fromGoogleSearch));
18076
- }
18077
18177
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
18078
18178
  'googleSearchRetrieval',
18079
18179
  ]);
@@ -18084,6 +18184,16 @@ function toolToMldev(fromObject) {
18084
18184
  if (fromUrlContext != null) {
18085
18185
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
18086
18186
  }
18187
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
18188
+ if (fromMcpServers != null) {
18189
+ let transformedList = fromMcpServers;
18190
+ if (Array.isArray(transformedList)) {
18191
+ transformedList = transformedList.map((item) => {
18192
+ return item;
18193
+ });
18194
+ }
18195
+ setValueByPath(toObject, ['mcpServers'], transformedList);
18196
+ }
18087
18197
  return toObject;
18088
18198
  }
18089
18199