@google/genai 1.46.0 → 1.47.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.
@@ -704,38 +704,18 @@ exports.Type = void 0;
704
704
  */
705
705
  Type["NULL"] = "NULL";
706
706
  })(exports.Type || (exports.Type = {}));
707
- /** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
708
- exports.PhishBlockThreshold = void 0;
709
- (function (PhishBlockThreshold) {
710
- /**
711
- * Defaults to unspecified.
712
- */
713
- PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
714
- /**
715
- * Blocks Low and above confidence URL that is risky.
716
- */
717
- PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
718
- /**
719
- * Blocks Medium and above confidence URL that is risky.
720
- */
721
- PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
722
- /**
723
- * Blocks High and above confidence URL that is risky.
724
- */
725
- PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
726
- /**
727
- * Blocks Higher and above confidence URL that is risky.
728
- */
729
- PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
707
+ /** The environment being operated. */
708
+ exports.Environment = void 0;
709
+ (function (Environment) {
730
710
  /**
731
- * Blocks Very high and above confidence URL that is risky.
711
+ * Defaults to browser.
732
712
  */
733
- PhishBlockThreshold["BLOCK_VERY_HIGH_AND_ABOVE"] = "BLOCK_VERY_HIGH_AND_ABOVE";
713
+ Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
734
714
  /**
735
- * Blocks Extremely high confidence URL that is risky.
715
+ * Operates in a web browser.
736
716
  */
737
- PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
738
- })(exports.PhishBlockThreshold || (exports.PhishBlockThreshold = {}));
717
+ Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
718
+ })(exports.Environment || (exports.Environment = {}));
739
719
  /** Type of auth scheme. This enum is not supported in Gemini API. */
740
720
  exports.AuthType = void 0;
741
721
  (function (AuthType) {
@@ -806,6 +786,38 @@ exports.ApiSpec = void 0;
806
786
  */
807
787
  ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
808
788
  })(exports.ApiSpec || (exports.ApiSpec = {}));
789
+ /** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
790
+ exports.PhishBlockThreshold = void 0;
791
+ (function (PhishBlockThreshold) {
792
+ /**
793
+ * Defaults to unspecified.
794
+ */
795
+ PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
796
+ /**
797
+ * Blocks Low and above confidence URL that is risky.
798
+ */
799
+ PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
800
+ /**
801
+ * Blocks Medium and above confidence URL that is risky.
802
+ */
803
+ PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
804
+ /**
805
+ * Blocks High and above confidence URL that is risky.
806
+ */
807
+ PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
808
+ /**
809
+ * Blocks Higher and above confidence URL that is risky.
810
+ */
811
+ PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
812
+ /**
813
+ * Blocks Very high and above confidence URL that is risky.
814
+ */
815
+ PhishBlockThreshold["BLOCK_VERY_HIGH_AND_ABOVE"] = "BLOCK_VERY_HIGH_AND_ABOVE";
816
+ /**
817
+ * Blocks Extremely high confidence URL that is risky.
818
+ */
819
+ PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
820
+ })(exports.PhishBlockThreshold || (exports.PhishBlockThreshold = {}));
809
821
  /** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
810
822
  exports.Behavior = void 0;
811
823
  (function (Behavior) {
@@ -865,6 +877,10 @@ exports.ThinkingLevel = void 0;
865
877
  * Unspecified thinking level.
866
878
  */
867
879
  ThinkingLevel["THINKING_LEVEL_UNSPECIFIED"] = "THINKING_LEVEL_UNSPECIFIED";
880
+ /**
881
+ * MINIMAL thinking level.
882
+ */
883
+ ThinkingLevel["MINIMAL"] = "MINIMAL";
868
884
  /**
869
885
  * Low thinking level.
870
886
  */
@@ -877,10 +893,6 @@ exports.ThinkingLevel = void 0;
877
893
  * High thinking level.
878
894
  */
879
895
  ThinkingLevel["HIGH"] = "HIGH";
880
- /**
881
- * MINIMAL thinking level.
882
- */
883
- ThinkingLevel["MINIMAL"] = "MINIMAL";
884
896
  })(exports.ThinkingLevel || (exports.ThinkingLevel = {}));
885
897
  /** Enum that controls the generation of people. */
886
898
  exports.PersonGeneration = void 0;
@@ -898,6 +910,22 @@ exports.PersonGeneration = void 0;
898
910
  */
899
911
  PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
900
912
  })(exports.PersonGeneration || (exports.PersonGeneration = {}));
913
+ /** Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people. This enum is not supported in Gemini API. */
914
+ exports.ProminentPeople = void 0;
915
+ (function (ProminentPeople) {
916
+ /**
917
+ * Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
918
+ */
919
+ ProminentPeople["PROMINENT_PEOPLE_UNSPECIFIED"] = "PROMINENT_PEOPLE_UNSPECIFIED";
920
+ /**
921
+ * Allows the model to generate images of prominent people.
922
+ */
923
+ ProminentPeople["ALLOW_PROMINENT_PEOPLE"] = "ALLOW_PROMINENT_PEOPLE";
924
+ /**
925
+ * Prevents the model from generating images of prominent people.
926
+ */
927
+ ProminentPeople["BLOCK_PROMINENT_PEOPLE"] = "BLOCK_PROMINENT_PEOPLE";
928
+ })(exports.ProminentPeople || (exports.ProminentPeople = {}));
901
929
  /** The harm category to be blocked. */
902
930
  exports.HarmCategory = void 0;
903
931
  (function (HarmCategory) {
@@ -1216,6 +1244,42 @@ exports.Modality = void 0;
1216
1244
  */
1217
1245
  Modality["AUDIO"] = "AUDIO";
1218
1246
  })(exports.Modality || (exports.Modality = {}));
1247
+ /** The stage of the underlying model. This enum is not supported in Vertex AI. */
1248
+ exports.ModelStage = void 0;
1249
+ (function (ModelStage) {
1250
+ /**
1251
+ * Unspecified model stage.
1252
+ */
1253
+ ModelStage["MODEL_STAGE_UNSPECIFIED"] = "MODEL_STAGE_UNSPECIFIED";
1254
+ /**
1255
+ * The underlying model is subject to lots of tunings.
1256
+ */
1257
+ ModelStage["UNSTABLE_EXPERIMENTAL"] = "UNSTABLE_EXPERIMENTAL";
1258
+ /**
1259
+ * Models in this stage are for experimental purposes only.
1260
+ */
1261
+ ModelStage["EXPERIMENTAL"] = "EXPERIMENTAL";
1262
+ /**
1263
+ * Models in this stage are more mature than experimental models.
1264
+ */
1265
+ ModelStage["PREVIEW"] = "PREVIEW";
1266
+ /**
1267
+ * Models in this stage are considered stable and ready for production use.
1268
+ */
1269
+ ModelStage["STABLE"] = "STABLE";
1270
+ /**
1271
+ * If the model is on this stage, it means that this model is on the path to deprecation in near future. Only existing customers can use this model.
1272
+ */
1273
+ ModelStage["LEGACY"] = "LEGACY";
1274
+ /**
1275
+ * Models in this stage are deprecated. These models cannot be used.
1276
+ */
1277
+ ModelStage["DEPRECATED"] = "DEPRECATED";
1278
+ /**
1279
+ * Models in this stage are retired. These models cannot be used.
1280
+ */
1281
+ ModelStage["RETIRED"] = "RETIRED";
1282
+ })(exports.ModelStage || (exports.ModelStage = {}));
1219
1283
  /** The media resolution to use. */
1220
1284
  exports.MediaResolution = void 0;
1221
1285
  (function (MediaResolution) {
@@ -1452,6 +1516,26 @@ exports.TuningTask = void 0;
1452
1516
  */
1453
1517
  TuningTask["TUNING_TASK_R2V"] = "TUNING_TASK_R2V";
1454
1518
  })(exports.TuningTask || (exports.TuningTask = {}));
1519
+ /** Output only. Current state of the `Document`. This enum is not supported in Vertex AI. */
1520
+ exports.DocumentState = void 0;
1521
+ (function (DocumentState) {
1522
+ /**
1523
+ * The default value. This value is used if the state is omitted.
1524
+ */
1525
+ DocumentState["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
1526
+ /**
1527
+ * Some `Chunks` of the `Document` are being processed (embedding and vector storage).
1528
+ */
1529
+ DocumentState["STATE_PENDING"] = "STATE_PENDING";
1530
+ /**
1531
+ * All `Chunks` of the `Document` is processed and available for querying.
1532
+ */
1533
+ DocumentState["STATE_ACTIVE"] = "STATE_ACTIVE";
1534
+ /**
1535
+ * Some `Chunks` of the `Document` failed processing.
1536
+ */
1537
+ DocumentState["STATE_FAILED"] = "STATE_FAILED";
1538
+ })(exports.DocumentState || (exports.DocumentState = {}));
1455
1539
  /** The tokenization quality used for given media. */
1456
1540
  exports.PartMediaResolutionLevel = void 0;
1457
1541
  (function (PartMediaResolutionLevel) {
@@ -1516,42 +1600,34 @@ exports.ResourceScope = void 0;
1516
1600
  */
1517
1601
  ResourceScope["COLLECTION"] = "COLLECTION";
1518
1602
  })(exports.ResourceScope || (exports.ResourceScope = {}));
1519
- /** Options for feature selection preference. */
1520
- exports.FeatureSelectionPreference = void 0;
1521
- (function (FeatureSelectionPreference) {
1522
- FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED";
1523
- FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY";
1524
- FeatureSelectionPreference["BALANCED"] = "BALANCED";
1525
- FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST";
1526
- })(exports.FeatureSelectionPreference || (exports.FeatureSelectionPreference = {}));
1527
- /** The environment being operated. */
1528
- exports.Environment = void 0;
1529
- (function (Environment) {
1603
+ /** Pricing and performance service tier. */
1604
+ exports.ServiceTier = void 0;
1605
+ (function (ServiceTier) {
1530
1606
  /**
1531
- * Defaults to browser.
1607
+ * Default service tier, which is standard.
1532
1608
  */
1533
- Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
1609
+ ServiceTier["SERVICE_TIER_UNSPECIFIED"] = "SERVICE_TIER_UNSPECIFIED";
1534
1610
  /**
1535
- * Operates in a web browser.
1611
+ * Flex service tier.
1536
1612
  */
1537
- Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
1538
- })(exports.Environment || (exports.Environment = {}));
1539
- /** Enum for controlling whether the model can generate images of prominent people (celebrities). */
1540
- exports.ProminentPeople = void 0;
1541
- (function (ProminentPeople) {
1613
+ ServiceTier["SERVICE_TIER_FLEX"] = "SERVICE_TIER_FLEX";
1542
1614
  /**
1543
- * Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
1615
+ * Standard service tier.
1544
1616
  */
1545
- ProminentPeople["PROMINENT_PEOPLE_UNSPECIFIED"] = "PROMINENT_PEOPLE_UNSPECIFIED";
1617
+ ServiceTier["SERVICE_TIER_STANDARD"] = "SERVICE_TIER_STANDARD";
1546
1618
  /**
1547
- * Allows the model to generate images of prominent people.
1619
+ * Priority service tier.
1548
1620
  */
1549
- ProminentPeople["ALLOW_PROMINENT_PEOPLE"] = "ALLOW_PROMINENT_PEOPLE";
1550
- /**
1551
- * Prevents the model from generating images of prominent people.
1552
- */
1553
- ProminentPeople["BLOCK_PROMINENT_PEOPLE"] = "BLOCK_PROMINENT_PEOPLE";
1554
- })(exports.ProminentPeople || (exports.ProminentPeople = {}));
1621
+ ServiceTier["SERVICE_TIER_PRIORITY"] = "SERVICE_TIER_PRIORITY";
1622
+ })(exports.ServiceTier || (exports.ServiceTier = {}));
1623
+ /** Options for feature selection preference. */
1624
+ exports.FeatureSelectionPreference = void 0;
1625
+ (function (FeatureSelectionPreference) {
1626
+ FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED";
1627
+ FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY";
1628
+ FeatureSelectionPreference["BALANCED"] = "BALANCED";
1629
+ FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST";
1630
+ })(exports.FeatureSelectionPreference || (exports.FeatureSelectionPreference = {}));
1555
1631
  /** Enum representing the Vertex embedding API to use. */
1556
1632
  exports.EmbeddingApiType = void 0;
1557
1633
  (function (EmbeddingApiType) {
@@ -1726,14 +1802,6 @@ exports.TuningMethod = void 0;
1726
1802
  */
1727
1803
  TuningMethod["DISTILLATION"] = "DISTILLATION";
1728
1804
  })(exports.TuningMethod || (exports.TuningMethod = {}));
1729
- /** State for the lifecycle of a Document. */
1730
- exports.DocumentState = void 0;
1731
- (function (DocumentState) {
1732
- DocumentState["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
1733
- DocumentState["STATE_PENDING"] = "STATE_PENDING";
1734
- DocumentState["STATE_ACTIVE"] = "STATE_ACTIVE";
1735
- DocumentState["STATE_FAILED"] = "STATE_FAILED";
1736
- })(exports.DocumentState || (exports.DocumentState = {}));
1737
1805
  /** State for the lifecycle of a File. */
1738
1806
  exports.FileState = void 0;
1739
1807
  (function (FileState) {
@@ -1893,6 +1961,10 @@ exports.TurnCoverage = void 0;
1893
1961
  * The users turn includes all realtime input since the last turn, including inactivity (e.g. silence on the audio stream).
1894
1962
  */
1895
1963
  TurnCoverage["TURN_INCLUDES_ALL_INPUT"] = "TURN_INCLUDES_ALL_INPUT";
1964
+ /**
1965
+ * Includes audio activity and all video since the last turn. With automatic activity detection, audio activity means speech and excludes silence.
1966
+ */
1967
+ TurnCoverage["TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO"] = "TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO";
1896
1968
  })(exports.TurnCoverage || (exports.TurnCoverage = {}));
1897
1969
  /** Scale of the generated music. */
1898
1970
  exports.Scale = void 0;
@@ -2462,7 +2534,6 @@ class GenerateVideosResponse {
2462
2534
  class GenerateVideosOperation {
2463
2535
  /**
2464
2536
  * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
2465
- * @internal
2466
2537
  */
2467
2538
  _fromAPIResponse({ apiResponse, _isVertexAI, }) {
2468
2539
  const operation = new GenerateVideosOperation();
@@ -2508,7 +2579,6 @@ class ImportFileResponse {
2508
2579
  class ImportFileOperation {
2509
2580
  /**
2510
2581
  * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
2511
- * @internal
2512
2582
  */
2513
2583
  _fromAPIResponse({ apiResponse, _isVertexAI, }) {
2514
2584
  const operation = new ImportFileOperation();
@@ -2763,7 +2833,6 @@ class UploadToFileSearchStoreResponse {
2763
2833
  class UploadToFileSearchStoreOperation {
2764
2834
  /**
2765
2835
  * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
2766
- * @internal
2767
2836
  */
2768
2837
  _fromAPIResponse({ apiResponse, _isVertexAI, }) {
2769
2838
  const operation = new UploadToFileSearchStoreOperation();
@@ -4416,6 +4485,10 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4416
4485
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
4417
4486
  throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
4418
4487
  }
4488
+ const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
4489
+ if (parentObject !== undefined && fromServiceTier != null) {
4490
+ setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
4491
+ }
4419
4492
  return toObject;
4420
4493
  }
4421
4494
  function generateContentResponseFromMldev$1(fromObject) {
@@ -4456,6 +4529,10 @@ function generateContentResponseFromMldev$1(fromObject) {
4456
4529
  if (fromUsageMetadata != null) {
4457
4530
  setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
4458
4531
  }
4532
+ const fromModelStatus = getValueByPath(fromObject, ['modelStatus']);
4533
+ if (fromModelStatus != null) {
4534
+ setValueByPath(toObject, ['modelStatus'], fromModelStatus);
4535
+ }
4459
4536
  return toObject;
4460
4537
  }
4461
4538
  function getBatchJobParametersToMldev(apiClient, fromObject) {
@@ -4743,6 +4820,10 @@ function partToMldev$4(fromObject) {
4743
4820
  if (fromToolResponse != null) {
4744
4821
  setValueByPath(toObject, ['toolResponse'], fromToolResponse);
4745
4822
  }
4823
+ const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
4824
+ if (fromPartMetadata != null) {
4825
+ setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
4826
+ }
4746
4827
  return toObject;
4747
4828
  }
4748
4829
  function safetySettingToMldev$1(fromObject) {
@@ -6077,6 +6158,10 @@ function partToMldev$3(fromObject) {
6077
6158
  if (fromToolResponse != null) {
6078
6159
  setValueByPath(toObject, ['toolResponse'], fromToolResponse);
6079
6160
  }
6161
+ const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
6162
+ if (fromPartMetadata != null) {
6163
+ setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
6164
+ }
6080
6165
  return toObject;
6081
6166
  }
6082
6167
  function partToVertex$2(fromObject) {
@@ -6143,6 +6228,9 @@ function partToVertex$2(fromObject) {
6143
6228
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
6144
6229
  throw new Error('toolResponse parameter is not supported in Vertex AI.');
6145
6230
  }
6231
+ if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
6232
+ throw new Error('partMetadata parameter is not supported in Vertex AI.');
6233
+ }
6146
6234
  return toObject;
6147
6235
  }
6148
6236
  function toolConfigToMldev$1(fromObject) {
@@ -7856,7 +7944,7 @@ function generationConfigToVertex$1(fromObject) {
7856
7944
  }
7857
7945
  const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
7858
7946
  if (fromSpeechConfig != null) {
7859
- setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
7947
+ setValueByPath(toObject, ['speechConfig'], speechConfigToVertex$1(fromSpeechConfig));
7860
7948
  }
7861
7949
  const fromStopSequences = getValueByPath(fromObject, [
7862
7950
  'stopSequences',
@@ -8077,7 +8165,7 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
8077
8165
  }
8078
8166
  const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
8079
8167
  if (parentObject !== undefined && fromSpeechConfig != null) {
8080
- setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], tLiveSpeechConfig(fromSpeechConfig));
8168
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
8081
8169
  }
8082
8170
  const fromThinkingConfig = getValueByPath(fromObject, [
8083
8171
  'thinkingConfig',
@@ -8337,6 +8425,22 @@ function liveServerMessageFromVertex(fromObject) {
8337
8425
  }
8338
8426
  return toObject;
8339
8427
  }
8428
+ function multiSpeakerVoiceConfigToVertex$1(fromObject) {
8429
+ const toObject = {};
8430
+ const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
8431
+ 'speakerVoiceConfigs',
8432
+ ]);
8433
+ if (fromSpeakerVoiceConfigs != null) {
8434
+ let transformedList = fromSpeakerVoiceConfigs;
8435
+ if (Array.isArray(transformedList)) {
8436
+ transformedList = transformedList.map((item) => {
8437
+ return speakerVoiceConfigToVertex$1(item);
8438
+ });
8439
+ }
8440
+ setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
8441
+ }
8442
+ return toObject;
8443
+ }
8340
8444
  function partToMldev$2(fromObject) {
8341
8445
  const toObject = {};
8342
8446
  const fromMediaResolution = getValueByPath(fromObject, [
@@ -8403,6 +8507,10 @@ function partToMldev$2(fromObject) {
8403
8507
  if (fromToolResponse != null) {
8404
8508
  setValueByPath(toObject, ['toolResponse'], fromToolResponse);
8405
8509
  }
8510
+ const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
8511
+ if (fromPartMetadata != null) {
8512
+ setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
8513
+ }
8406
8514
  return toObject;
8407
8515
  }
8408
8516
  function partToVertex$1(fromObject) {
@@ -8469,6 +8577,23 @@ function partToVertex$1(fromObject) {
8469
8577
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
8470
8578
  throw new Error('toolResponse parameter is not supported in Vertex AI.');
8471
8579
  }
8580
+ if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
8581
+ throw new Error('partMetadata parameter is not supported in Vertex AI.');
8582
+ }
8583
+ return toObject;
8584
+ }
8585
+ function replicatedVoiceConfigToVertex$1(fromObject) {
8586
+ const toObject = {};
8587
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
8588
+ if (fromMimeType != null) {
8589
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
8590
+ }
8591
+ const fromVoiceSampleAudio = getValueByPath(fromObject, [
8592
+ 'voiceSampleAudio',
8593
+ ]);
8594
+ if (fromVoiceSampleAudio != null) {
8595
+ setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
8596
+ }
8472
8597
  return toObject;
8473
8598
  }
8474
8599
  function sessionResumptionConfigToMldev$1(fromObject) {
@@ -8482,6 +8607,36 @@ function sessionResumptionConfigToMldev$1(fromObject) {
8482
8607
  }
8483
8608
  return toObject;
8484
8609
  }
8610
+ function speakerVoiceConfigToVertex$1(fromObject) {
8611
+ const toObject = {};
8612
+ const fromSpeaker = getValueByPath(fromObject, ['speaker']);
8613
+ if (fromSpeaker != null) {
8614
+ setValueByPath(toObject, ['speaker'], fromSpeaker);
8615
+ }
8616
+ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
8617
+ if (fromVoiceConfig != null) {
8618
+ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
8619
+ }
8620
+ return toObject;
8621
+ }
8622
+ function speechConfigToVertex$1(fromObject) {
8623
+ const toObject = {};
8624
+ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
8625
+ if (fromVoiceConfig != null) {
8626
+ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
8627
+ }
8628
+ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
8629
+ if (fromLanguageCode != null) {
8630
+ setValueByPath(toObject, ['languageCode'], fromLanguageCode);
8631
+ }
8632
+ const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
8633
+ 'multiSpeakerVoiceConfig',
8634
+ ]);
8635
+ if (fromMultiSpeakerVoiceConfig != null) {
8636
+ setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex$1(fromMultiSpeakerVoiceConfig));
8637
+ }
8638
+ return toObject;
8639
+ }
8485
8640
  function toolToMldev$2(fromObject) {
8486
8641
  const toObject = {};
8487
8642
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
@@ -8715,6 +8870,22 @@ function voiceActivityFromVertex(fromObject) {
8715
8870
  }
8716
8871
  return toObject;
8717
8872
  }
8873
+ function voiceConfigToVertex$1(fromObject) {
8874
+ const toObject = {};
8875
+ const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
8876
+ 'replicatedVoiceConfig',
8877
+ ]);
8878
+ if (fromReplicatedVoiceConfig != null) {
8879
+ setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex$1(fromReplicatedVoiceConfig));
8880
+ }
8881
+ const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
8882
+ 'prebuiltVoiceConfig',
8883
+ ]);
8884
+ if (fromPrebuiltVoiceConfig != null) {
8885
+ setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
8886
+ }
8887
+ return toObject;
8888
+ }
8718
8889
 
8719
8890
  /**
8720
8891
  * @license
@@ -9768,6 +9939,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
9768
9939
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
9769
9940
  throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
9770
9941
  }
9942
+ const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
9943
+ if (parentObject !== undefined && fromServiceTier != null) {
9944
+ setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
9945
+ }
9771
9946
  return toObject;
9772
9947
  }
9773
9948
  function generateContentConfigToVertex(apiClient, fromObject, parentObject, rootObject) {
@@ -9914,7 +10089,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
9914
10089
  }
9915
10090
  const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
9916
10091
  if (fromSpeechConfig != null) {
9917
- setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
10092
+ setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(tSpeechConfig(fromSpeechConfig)));
9918
10093
  }
9919
10094
  const fromAudioTimestamp = getValueByPath(fromObject, [
9920
10095
  'audioTimestamp',
@@ -9942,6 +10117,9 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
9942
10117
  if (parentObject !== undefined && fromModelArmorConfig != null) {
9943
10118
  setValueByPath(parentObject, ['modelArmorConfig'], fromModelArmorConfig);
9944
10119
  }
10120
+ if (getValueByPath(fromObject, ['serviceTier']) !== undefined) {
10121
+ throw new Error('serviceTier parameter is not supported in Vertex AI.');
10122
+ }
9945
10123
  return toObject;
9946
10124
  }
9947
10125
  function generateContentParametersToMldev(apiClient, fromObject, rootObject) {
@@ -10026,6 +10204,10 @@ function generateContentResponseFromMldev(fromObject, rootObject) {
10026
10204
  if (fromUsageMetadata != null) {
10027
10205
  setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
10028
10206
  }
10207
+ const fromModelStatus = getValueByPath(fromObject, ['modelStatus']);
10208
+ if (fromModelStatus != null) {
10209
+ setValueByPath(toObject, ['modelStatus'], fromModelStatus);
10210
+ }
10029
10211
  return toObject;
10030
10212
  }
10031
10213
  function generateContentResponseFromVertex(fromObject, _rootObject) {
@@ -10411,6 +10593,9 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10411
10593
  if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
10412
10594
  throw new Error('compressionQuality parameter is not supported in Gemini API.');
10413
10595
  }
10596
+ if (getValueByPath(fromObject, ['labels']) !== undefined) {
10597
+ throw new Error('labels parameter is not supported in Gemini API.');
10598
+ }
10414
10599
  return toObject;
10415
10600
  }
10416
10601
  function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
@@ -10501,6 +10686,10 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
10501
10686
  if (parentObject !== undefined && fromCompressionQuality != null) {
10502
10687
  setValueByPath(parentObject, ['parameters', 'compressionQuality'], fromCompressionQuality);
10503
10688
  }
10689
+ const fromLabels = getValueByPath(fromObject, ['labels']);
10690
+ if (parentObject !== undefined && fromLabels != null) {
10691
+ setValueByPath(parentObject, ['labels'], fromLabels);
10692
+ }
10504
10693
  return toObject;
10505
10694
  }
10506
10695
  function generateVideosOperationFromMldev(fromObject, rootObject) {
@@ -10770,7 +10959,7 @@ function generatedVideoFromVertex(fromObject, rootObject) {
10770
10959
  }
10771
10960
  return toObject;
10772
10961
  }
10773
- function generationConfigToVertex(fromObject, _rootObject) {
10962
+ function generationConfigToVertex(fromObject, rootObject) {
10774
10963
  const toObject = {};
10775
10964
  const fromModelSelectionConfig = getValueByPath(fromObject, [
10776
10965
  'modelSelectionConfig',
@@ -10866,7 +11055,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
10866
11055
  }
10867
11056
  const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
10868
11057
  if (fromSpeechConfig != null) {
10869
- setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
11058
+ setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(fromSpeechConfig));
10870
11059
  }
10871
11060
  const fromStopSequences = getValueByPath(fromObject, [
10872
11061
  'stopSequences',
@@ -11323,6 +11512,22 @@ function modelFromVertex(fromObject, rootObject) {
11323
11512
  }
11324
11513
  return toObject;
11325
11514
  }
11515
+ function multiSpeakerVoiceConfigToVertex(fromObject, rootObject) {
11516
+ const toObject = {};
11517
+ const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
11518
+ 'speakerVoiceConfigs',
11519
+ ]);
11520
+ if (fromSpeakerVoiceConfigs != null) {
11521
+ let transformedList = fromSpeakerVoiceConfigs;
11522
+ if (Array.isArray(transformedList)) {
11523
+ transformedList = transformedList.map((item) => {
11524
+ return speakerVoiceConfigToVertex(item);
11525
+ });
11526
+ }
11527
+ setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
11528
+ }
11529
+ return toObject;
11530
+ }
11326
11531
  function partToMldev$1(fromObject, rootObject) {
11327
11532
  const toObject = {};
11328
11533
  const fromMediaResolution = getValueByPath(fromObject, [
@@ -11389,6 +11594,10 @@ function partToMldev$1(fromObject, rootObject) {
11389
11594
  if (fromToolResponse != null) {
11390
11595
  setValueByPath(toObject, ['toolResponse'], fromToolResponse);
11391
11596
  }
11597
+ const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
11598
+ if (fromPartMetadata != null) {
11599
+ setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
11600
+ }
11392
11601
  return toObject;
11393
11602
  }
11394
11603
  function partToVertex(fromObject, _rootObject) {
@@ -11455,6 +11664,9 @@ function partToVertex(fromObject, _rootObject) {
11455
11664
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
11456
11665
  throw new Error('toolResponse parameter is not supported in Vertex AI.');
11457
11666
  }
11667
+ if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
11668
+ throw new Error('partMetadata parameter is not supported in Vertex AI.');
11669
+ }
11458
11670
  return toObject;
11459
11671
  }
11460
11672
  function productImageToVertex(fromObject, rootObject) {
@@ -11625,6 +11837,20 @@ function referenceImageAPIInternalToVertex(fromObject, rootObject) {
11625
11837
  }
11626
11838
  return toObject;
11627
11839
  }
11840
+ function replicatedVoiceConfigToVertex(fromObject, _rootObject) {
11841
+ const toObject = {};
11842
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
11843
+ if (fromMimeType != null) {
11844
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
11845
+ }
11846
+ const fromVoiceSampleAudio = getValueByPath(fromObject, [
11847
+ 'voiceSampleAudio',
11848
+ ]);
11849
+ if (fromVoiceSampleAudio != null) {
11850
+ setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
11851
+ }
11852
+ return toObject;
11853
+ }
11628
11854
  function safetyAttributesFromMldev(fromObject, _rootObject) {
11629
11855
  const toObject = {};
11630
11856
  const fromCategories = getValueByPath(fromObject, [
@@ -11774,6 +12000,36 @@ function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
11774
12000
  }
11775
12001
  return toObject;
11776
12002
  }
12003
+ function speakerVoiceConfigToVertex(fromObject, rootObject) {
12004
+ const toObject = {};
12005
+ const fromSpeaker = getValueByPath(fromObject, ['speaker']);
12006
+ if (fromSpeaker != null) {
12007
+ setValueByPath(toObject, ['speaker'], fromSpeaker);
12008
+ }
12009
+ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
12010
+ if (fromVoiceConfig != null) {
12011
+ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
12012
+ }
12013
+ return toObject;
12014
+ }
12015
+ function speechConfigToVertex(fromObject, rootObject) {
12016
+ const toObject = {};
12017
+ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
12018
+ if (fromVoiceConfig != null) {
12019
+ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
12020
+ }
12021
+ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
12022
+ if (fromLanguageCode != null) {
12023
+ setValueByPath(toObject, ['languageCode'], fromLanguageCode);
12024
+ }
12025
+ const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
12026
+ 'multiSpeakerVoiceConfig',
12027
+ ]);
12028
+ if (fromMultiSpeakerVoiceConfig != null) {
12029
+ setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex(fromMultiSpeakerVoiceConfig));
12030
+ }
12031
+ return toObject;
12032
+ }
11777
12033
  function toolConfigToMldev(fromObject, rootObject) {
11778
12034
  const toObject = {};
11779
12035
  const fromRetrievalConfig = getValueByPath(fromObject, [
@@ -12256,6 +12512,22 @@ function videoToVertex(fromObject, _rootObject) {
12256
12512
  }
12257
12513
  return toObject;
12258
12514
  }
12515
+ function voiceConfigToVertex(fromObject, rootObject) {
12516
+ const toObject = {};
12517
+ const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
12518
+ 'replicatedVoiceConfig',
12519
+ ]);
12520
+ if (fromReplicatedVoiceConfig != null) {
12521
+ setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex(fromReplicatedVoiceConfig));
12522
+ }
12523
+ const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
12524
+ 'prebuiltVoiceConfig',
12525
+ ]);
12526
+ if (fromPrebuiltVoiceConfig != null) {
12527
+ setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
12528
+ }
12529
+ return toObject;
12530
+ }
12259
12531
 
12260
12532
  /**
12261
12533
  * @license
@@ -12501,7 +12773,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
12501
12773
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
12502
12774
  const USER_AGENT_HEADER = 'User-Agent';
12503
12775
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
12504
- const SDK_VERSION = '1.46.0'; // x-release-please-version
12776
+ const SDK_VERSION = '1.47.0'; // x-release-please-version
12505
12777
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
12506
12778
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
12507
12779
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -12561,6 +12833,11 @@ class ApiClient {
12561
12833
  // Vertex Express or global endpoint case.
12562
12834
  initHttpOptions.baseUrl = 'https://aiplatform.googleapis.com/';
12563
12835
  }
12836
+ else if (this.clientOptions.project &&
12837
+ this.clientOptions.location &&
12838
+ this.clientOptions.location === 'us') {
12839
+ initHttpOptions.baseUrl = `https://aiplatform.${this.clientOptions.location}.rep.googleapis.com/`;
12840
+ }
12564
12841
  else if (this.clientOptions.project && this.clientOptions.location) {
12565
12842
  initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;
12566
12843
  }
@@ -16198,6 +16475,10 @@ function partToMldev(fromObject) {
16198
16475
  if (fromToolResponse != null) {
16199
16476
  setValueByPath(toObject, ['toolResponse'], fromToolResponse);
16200
16477
  }
16478
+ const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
16479
+ if (fromPartMetadata != null) {
16480
+ setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
16481
+ }
16201
16482
  return toObject;
16202
16483
  }
16203
16484
  function sessionResumptionConfigToMldev(fromObject) {
@@ -19361,6 +19642,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
19361
19642
  setValueByPath(parentObject, ['supervisedTuningSpec', 'tuningMode'], fromTuningMode);
19362
19643
  }
19363
19644
  }
19645
+ else if (discriminatorTuningMode === 'DISTILLATION') {
19646
+ const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
19647
+ if (parentObject !== undefined && fromTuningMode != null) {
19648
+ setValueByPath(parentObject, ['distillationSpec', 'tuningMode'], fromTuningMode);
19649
+ }
19650
+ }
19364
19651
  const fromCustomBaseModel = getValueByPath(fromObject, [
19365
19652
  'customBaseModel',
19366
19653
  ]);
@@ -19380,6 +19667,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
19380
19667
  setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
19381
19668
  }
19382
19669
  }
19670
+ else if (discriminatorBatchSize === 'DISTILLATION') {
19671
+ const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
19672
+ if (parentObject !== undefined && fromBatchSize != null) {
19673
+ setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
19674
+ }
19675
+ }
19383
19676
  let discriminatorLearningRate = getValueByPath(rootObject, [
19384
19677
  'config',
19385
19678
  'method',
@@ -19395,6 +19688,14 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
19395
19688
  setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
19396
19689
  }
19397
19690
  }
19691
+ else if (discriminatorLearningRate === 'DISTILLATION') {
19692
+ const fromLearningRate = getValueByPath(fromObject, [
19693
+ 'learningRate',
19694
+ ]);
19695
+ if (parentObject !== undefined && fromLearningRate != null) {
19696
+ setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
19697
+ }
19698
+ }
19398
19699
  const fromLabels = getValueByPath(fromObject, ['labels']);
19399
19700
  if (parentObject !== undefined && fromLabels != null) {
19400
19701
  setValueByPath(parentObject, ['labels'], fromLabels);
@@ -19898,6 +20199,18 @@ function tuningJobFromVertex(fromObject, _rootObject) {
19898
20199
  if (fromVeoTuningSpec != null) {
19899
20200
  setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
19900
20201
  }
20202
+ const fromDistillationSamplingSpec = getValueByPath(fromObject, [
20203
+ 'distillationSamplingSpec',
20204
+ ]);
20205
+ if (fromDistillationSamplingSpec != null) {
20206
+ setValueByPath(toObject, ['distillationSamplingSpec'], fromDistillationSamplingSpec);
20207
+ }
20208
+ const fromTuningJobMetadata = getValueByPath(fromObject, [
20209
+ 'tuningJobMetadata',
20210
+ ]);
20211
+ if (fromTuningJobMetadata != null) {
20212
+ setValueByPath(toObject, ['tuningJobMetadata'], fromTuningJobMetadata);
20213
+ }
19901
20214
  return toObject;
19902
20215
  }
19903
20216
  function tuningOperationFromMldev(fromObject, _rootObject) {