@google/genai 1.43.0 → 1.45.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
@@ -610,7 +610,7 @@ exports.FunctionResponseScheduling = void 0;
610
610
  */
611
611
  FunctionResponseScheduling["INTERRUPT"] = "INTERRUPT";
612
612
  })(exports.FunctionResponseScheduling || (exports.FunctionResponseScheduling = {}));
613
- /** The type of the data. */
613
+ /** Data type of the schema field. */
614
614
  exports.Type = void 0;
615
615
  (function (Type) {
616
616
  /**
@@ -678,22 +678,6 @@ exports.PhishBlockThreshold = void 0;
678
678
  */
679
679
  PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
680
680
  })(exports.PhishBlockThreshold || (exports.PhishBlockThreshold = {}));
681
- /** The API spec that the external API implements. This enum is not supported in Gemini API. */
682
- exports.ApiSpec = void 0;
683
- (function (ApiSpec) {
684
- /**
685
- * Unspecified API spec. This value should not be used.
686
- */
687
- ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
688
- /**
689
- * Simple search API spec.
690
- */
691
- ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
692
- /**
693
- * Elastic search API spec.
694
- */
695
- ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
696
- })(exports.ApiSpec || (exports.ApiSpec = {}));
697
681
  /** Type of auth scheme. This enum is not supported in Gemini API. */
698
682
  exports.AuthType = void 0;
699
683
  (function (AuthType) {
@@ -748,6 +732,22 @@ exports.HttpElementLocation = void 0;
748
732
  */
749
733
  HttpElementLocation["HTTP_IN_COOKIE"] = "HTTP_IN_COOKIE";
750
734
  })(exports.HttpElementLocation || (exports.HttpElementLocation = {}));
735
+ /** The API spec that the external API implements. This enum is not supported in Gemini API. */
736
+ exports.ApiSpec = void 0;
737
+ (function (ApiSpec) {
738
+ /**
739
+ * Unspecified API spec. This value should not be used.
740
+ */
741
+ ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
742
+ /**
743
+ * Simple search API spec.
744
+ */
745
+ ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
746
+ /**
747
+ * Elastic search API spec.
748
+ */
749
+ ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
750
+ })(exports.ApiSpec || (exports.ApiSpec = {}));
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) {
@@ -824,27 +824,43 @@ exports.ThinkingLevel = void 0;
824
824
  */
825
825
  ThinkingLevel["MINIMAL"] = "MINIMAL";
826
826
  })(exports.ThinkingLevel || (exports.ThinkingLevel = {}));
827
- /** Harm category. */
827
+ /** Enum that controls the generation of people. */
828
+ exports.PersonGeneration = void 0;
829
+ (function (PersonGeneration) {
830
+ /**
831
+ * Block generation of images of people.
832
+ */
833
+ PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
834
+ /**
835
+ * Generate images of adults, but not children.
836
+ */
837
+ PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
838
+ /**
839
+ * Generate images that include adults and children.
840
+ */
841
+ PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
842
+ })(exports.PersonGeneration || (exports.PersonGeneration = {}));
843
+ /** The harm category to be blocked. */
828
844
  exports.HarmCategory = void 0;
829
845
  (function (HarmCategory) {
830
846
  /**
831
- * The harm category is unspecified.
847
+ * Default value. This value is unused.
832
848
  */
833
849
  HarmCategory["HARM_CATEGORY_UNSPECIFIED"] = "HARM_CATEGORY_UNSPECIFIED";
834
850
  /**
835
- * The harm category is harassment.
851
+ * Abusive, threatening, or content intended to bully, torment, or ridicule.
836
852
  */
837
853
  HarmCategory["HARM_CATEGORY_HARASSMENT"] = "HARM_CATEGORY_HARASSMENT";
838
854
  /**
839
- * The harm category is hate speech.
855
+ * Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
840
856
  */
841
857
  HarmCategory["HARM_CATEGORY_HATE_SPEECH"] = "HARM_CATEGORY_HATE_SPEECH";
842
858
  /**
843
- * The harm category is sexually explicit content.
859
+ * Content that contains sexually explicit material.
844
860
  */
845
861
  HarmCategory["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
846
862
  /**
847
- * The harm category is dangerous content.
863
+ * Content that promotes, facilitates, or enables dangerous activities.
848
864
  */
849
865
  HarmCategory["HARM_CATEGORY_DANGEROUS_CONTENT"] = "HARM_CATEGORY_DANGEROUS_CONTENT";
850
866
  /**
@@ -852,27 +868,27 @@ exports.HarmCategory = void 0;
852
868
  */
853
869
  HarmCategory["HARM_CATEGORY_CIVIC_INTEGRITY"] = "HARM_CATEGORY_CIVIC_INTEGRITY";
854
870
  /**
855
- * The harm category is image hate. This enum value is not supported in Gemini API.
871
+ * Images that contain hate speech. This enum value is not supported in Gemini API.
856
872
  */
857
873
  HarmCategory["HARM_CATEGORY_IMAGE_HATE"] = "HARM_CATEGORY_IMAGE_HATE";
858
874
  /**
859
- * The harm category is image dangerous content. This enum value is not supported in Gemini API.
875
+ * Images that contain dangerous content. This enum value is not supported in Gemini API.
860
876
  */
861
877
  HarmCategory["HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT"] = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT";
862
878
  /**
863
- * The harm category is image harassment. This enum value is not supported in Gemini API.
879
+ * Images that contain harassment. This enum value is not supported in Gemini API.
864
880
  */
865
881
  HarmCategory["HARM_CATEGORY_IMAGE_HARASSMENT"] = "HARM_CATEGORY_IMAGE_HARASSMENT";
866
882
  /**
867
- * The harm category is image sexually explicit content. This enum value is not supported in Gemini API.
883
+ * Images that contain sexually explicit content. This enum value is not supported in Gemini API.
868
884
  */
869
885
  HarmCategory["HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT";
870
886
  /**
871
- * The harm category is for jailbreak prompts. This enum value is not supported in Gemini API.
887
+ * Prompts designed to bypass safety filters. This enum value is not supported in Gemini API.
872
888
  */
873
889
  HarmCategory["HARM_CATEGORY_JAILBREAK"] = "HARM_CATEGORY_JAILBREAK";
874
890
  })(exports.HarmCategory || (exports.HarmCategory = {}));
875
- /** Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. This enum is not supported in Gemini API. */
891
+ /** The method for blocking content. If not specified, the default behavior is to use the probability score. This enum is not supported in Gemini API. */
876
892
  exports.HarmBlockMethod = void 0;
877
893
  (function (HarmBlockMethod) {
878
894
  /**
@@ -888,31 +904,31 @@ exports.HarmBlockMethod = void 0;
888
904
  */
889
905
  HarmBlockMethod["PROBABILITY"] = "PROBABILITY";
890
906
  })(exports.HarmBlockMethod || (exports.HarmBlockMethod = {}));
891
- /** The harm block threshold. */
907
+ /** The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
892
908
  exports.HarmBlockThreshold = void 0;
893
909
  (function (HarmBlockThreshold) {
894
910
  /**
895
- * Unspecified harm block threshold.
911
+ * The harm block threshold is unspecified.
896
912
  */
897
913
  HarmBlockThreshold["HARM_BLOCK_THRESHOLD_UNSPECIFIED"] = "HARM_BLOCK_THRESHOLD_UNSPECIFIED";
898
914
  /**
899
- * Block low threshold and above (i.e. block more).
915
+ * Block content with a low harm probability or higher.
900
916
  */
901
917
  HarmBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
902
918
  /**
903
- * Block medium threshold and above.
919
+ * Block content with a medium harm probability or higher.
904
920
  */
905
921
  HarmBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
906
922
  /**
907
- * Block only high threshold (i.e. block less).
923
+ * Block content with a high harm probability.
908
924
  */
909
925
  HarmBlockThreshold["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
910
926
  /**
911
- * Block none.
927
+ * Do not block any content, regardless of its harm probability.
912
928
  */
913
929
  HarmBlockThreshold["BLOCK_NONE"] = "BLOCK_NONE";
914
930
  /**
915
- * Turn off the safety filter.
931
+ * Turn off the safety filter entirely.
916
932
  */
917
933
  HarmBlockThreshold["OFF"] = "OFF";
918
934
  })(exports.HarmBlockThreshold || (exports.HarmBlockThreshold = {}));
@@ -990,55 +1006,55 @@ exports.FinishReason = void 0;
990
1006
  */
991
1007
  FinishReason["IMAGE_OTHER"] = "IMAGE_OTHER";
992
1008
  })(exports.FinishReason || (exports.FinishReason = {}));
993
- /** Output only. Harm probability levels in the content. */
1009
+ /** Output only. The probability of harm for this category. */
994
1010
  exports.HarmProbability = void 0;
995
1011
  (function (HarmProbability) {
996
1012
  /**
997
- * Harm probability unspecified.
1013
+ * The harm probability is unspecified.
998
1014
  */
999
1015
  HarmProbability["HARM_PROBABILITY_UNSPECIFIED"] = "HARM_PROBABILITY_UNSPECIFIED";
1000
1016
  /**
1001
- * Negligible level of harm.
1017
+ * The harm probability is negligible.
1002
1018
  */
1003
1019
  HarmProbability["NEGLIGIBLE"] = "NEGLIGIBLE";
1004
1020
  /**
1005
- * Low level of harm.
1021
+ * The harm probability is low.
1006
1022
  */
1007
1023
  HarmProbability["LOW"] = "LOW";
1008
1024
  /**
1009
- * Medium level of harm.
1025
+ * The harm probability is medium.
1010
1026
  */
1011
1027
  HarmProbability["MEDIUM"] = "MEDIUM";
1012
1028
  /**
1013
- * High level of harm.
1029
+ * The harm probability is high.
1014
1030
  */
1015
1031
  HarmProbability["HIGH"] = "HIGH";
1016
1032
  })(exports.HarmProbability || (exports.HarmProbability = {}));
1017
- /** Output only. Harm severity levels in the content. This enum is not supported in Gemini API. */
1033
+ /** Output only. The severity of harm for this category. This enum is not supported in Gemini API. */
1018
1034
  exports.HarmSeverity = void 0;
1019
1035
  (function (HarmSeverity) {
1020
1036
  /**
1021
- * Harm severity unspecified.
1037
+ * The harm severity is unspecified.
1022
1038
  */
1023
1039
  HarmSeverity["HARM_SEVERITY_UNSPECIFIED"] = "HARM_SEVERITY_UNSPECIFIED";
1024
1040
  /**
1025
- * Negligible level of harm severity.
1041
+ * The harm severity is negligible.
1026
1042
  */
1027
1043
  HarmSeverity["HARM_SEVERITY_NEGLIGIBLE"] = "HARM_SEVERITY_NEGLIGIBLE";
1028
1044
  /**
1029
- * Low level of harm severity.
1045
+ * The harm severity is low.
1030
1046
  */
1031
1047
  HarmSeverity["HARM_SEVERITY_LOW"] = "HARM_SEVERITY_LOW";
1032
1048
  /**
1033
- * Medium level of harm severity.
1049
+ * The harm severity is medium.
1034
1050
  */
1035
1051
  HarmSeverity["HARM_SEVERITY_MEDIUM"] = "HARM_SEVERITY_MEDIUM";
1036
1052
  /**
1037
- * High level of harm severity.
1053
+ * The harm severity is high.
1038
1054
  */
1039
1055
  HarmSeverity["HARM_SEVERITY_HIGH"] = "HARM_SEVERITY_HIGH";
1040
1056
  })(exports.HarmSeverity || (exports.HarmSeverity = {}));
1041
- /** Status of the url retrieval. */
1057
+ /** The status of the URL retrieval. */
1042
1058
  exports.UrlRetrievalStatus = void 0;
1043
1059
  (function (UrlRetrievalStatus) {
1044
1060
  /**
@@ -1046,11 +1062,11 @@ exports.UrlRetrievalStatus = void 0;
1046
1062
  */
1047
1063
  UrlRetrievalStatus["URL_RETRIEVAL_STATUS_UNSPECIFIED"] = "URL_RETRIEVAL_STATUS_UNSPECIFIED";
1048
1064
  /**
1049
- * Url retrieval is successful.
1065
+ * The URL was retrieved successfully.
1050
1066
  */
1051
1067
  UrlRetrievalStatus["URL_RETRIEVAL_STATUS_SUCCESS"] = "URL_RETRIEVAL_STATUS_SUCCESS";
1052
1068
  /**
1053
- * Url retrieval is failed due to error.
1069
+ * The URL retrieval failed.
1054
1070
  */
1055
1071
  UrlRetrievalStatus["URL_RETRIEVAL_STATUS_ERROR"] = "URL_RETRIEVAL_STATUS_ERROR";
1056
1072
  /**
@@ -1109,6 +1125,14 @@ exports.TrafficType = void 0;
1109
1125
  * The request was processed using Pay-As-You-Go quota.
1110
1126
  */
1111
1127
  TrafficType["ON_DEMAND"] = "ON_DEMAND";
1128
+ /**
1129
+ * Type for Priority Pay-As-You-Go traffic.
1130
+ */
1131
+ TrafficType["ON_DEMAND_PRIORITY"] = "ON_DEMAND_PRIORITY";
1132
+ /**
1133
+ * Type for Flex traffic.
1134
+ */
1135
+ TrafficType["ON_DEMAND_FLEX"] = "ON_DEMAND_FLEX";
1112
1136
  /**
1113
1137
  * Type for Provisioned Throughput traffic.
1114
1138
  */
@@ -1254,6 +1278,102 @@ exports.JobState = void 0;
1254
1278
  */
1255
1279
  JobState["JOB_STATE_PARTIALLY_SUCCEEDED"] = "JOB_STATE_PARTIALLY_SUCCEEDED";
1256
1280
  })(exports.JobState || (exports.JobState = {}));
1281
+ /** Output only. The detail state of the tuning job (while the overall `JobState` is running). This enum is not supported in Gemini API. */
1282
+ exports.TuningJobState = void 0;
1283
+ (function (TuningJobState) {
1284
+ /**
1285
+ * Default tuning job state.
1286
+ */
1287
+ TuningJobState["TUNING_JOB_STATE_UNSPECIFIED"] = "TUNING_JOB_STATE_UNSPECIFIED";
1288
+ /**
1289
+ * Tuning job is waiting for job quota.
1290
+ */
1291
+ TuningJobState["TUNING_JOB_STATE_WAITING_FOR_QUOTA"] = "TUNING_JOB_STATE_WAITING_FOR_QUOTA";
1292
+ /**
1293
+ * Tuning job is validating the dataset.
1294
+ */
1295
+ TuningJobState["TUNING_JOB_STATE_PROCESSING_DATASET"] = "TUNING_JOB_STATE_PROCESSING_DATASET";
1296
+ /**
1297
+ * Tuning job is waiting for hardware capacity.
1298
+ */
1299
+ TuningJobState["TUNING_JOB_STATE_WAITING_FOR_CAPACITY"] = "TUNING_JOB_STATE_WAITING_FOR_CAPACITY";
1300
+ /**
1301
+ * Tuning job is running.
1302
+ */
1303
+ TuningJobState["TUNING_JOB_STATE_TUNING"] = "TUNING_JOB_STATE_TUNING";
1304
+ /**
1305
+ * Tuning job is doing some post processing steps.
1306
+ */
1307
+ TuningJobState["TUNING_JOB_STATE_POST_PROCESSING"] = "TUNING_JOB_STATE_POST_PROCESSING";
1308
+ })(exports.TuningJobState || (exports.TuningJobState = {}));
1309
+ /** Aggregation metric. This enum is not supported in Gemini API. */
1310
+ exports.AggregationMetric = void 0;
1311
+ (function (AggregationMetric) {
1312
+ /**
1313
+ * Unspecified aggregation metric.
1314
+ */
1315
+ AggregationMetric["AGGREGATION_METRIC_UNSPECIFIED"] = "AGGREGATION_METRIC_UNSPECIFIED";
1316
+ /**
1317
+ * Average aggregation metric. Not supported for Pairwise metric.
1318
+ */
1319
+ AggregationMetric["AVERAGE"] = "AVERAGE";
1320
+ /**
1321
+ * Mode aggregation metric.
1322
+ */
1323
+ AggregationMetric["MODE"] = "MODE";
1324
+ /**
1325
+ * Standard deviation aggregation metric. Not supported for pairwise metric.
1326
+ */
1327
+ AggregationMetric["STANDARD_DEVIATION"] = "STANDARD_DEVIATION";
1328
+ /**
1329
+ * Variance aggregation metric. Not supported for pairwise metric.
1330
+ */
1331
+ AggregationMetric["VARIANCE"] = "VARIANCE";
1332
+ /**
1333
+ * Minimum aggregation metric. Not supported for pairwise metric.
1334
+ */
1335
+ AggregationMetric["MINIMUM"] = "MINIMUM";
1336
+ /**
1337
+ * Maximum aggregation metric. Not supported for pairwise metric.
1338
+ */
1339
+ AggregationMetric["MAXIMUM"] = "MAXIMUM";
1340
+ /**
1341
+ * Median aggregation metric. Not supported for pairwise metric.
1342
+ */
1343
+ AggregationMetric["MEDIAN"] = "MEDIAN";
1344
+ /**
1345
+ * 90th percentile aggregation metric. Not supported for pairwise metric.
1346
+ */
1347
+ AggregationMetric["PERCENTILE_P90"] = "PERCENTILE_P90";
1348
+ /**
1349
+ * 95th percentile aggregation metric. Not supported for pairwise metric.
1350
+ */
1351
+ AggregationMetric["PERCENTILE_P95"] = "PERCENTILE_P95";
1352
+ /**
1353
+ * 99th percentile aggregation metric. Not supported for pairwise metric.
1354
+ */
1355
+ AggregationMetric["PERCENTILE_P99"] = "PERCENTILE_P99";
1356
+ })(exports.AggregationMetric || (exports.AggregationMetric = {}));
1357
+ /** Output only. Pairwise metric choice. This enum is not supported in Gemini API. */
1358
+ exports.PairwiseChoice = void 0;
1359
+ (function (PairwiseChoice) {
1360
+ /**
1361
+ * Unspecified prediction choice.
1362
+ */
1363
+ PairwiseChoice["PAIRWISE_CHOICE_UNSPECIFIED"] = "PAIRWISE_CHOICE_UNSPECIFIED";
1364
+ /**
1365
+ * Baseline prediction wins
1366
+ */
1367
+ PairwiseChoice["BASELINE"] = "BASELINE";
1368
+ /**
1369
+ * Candidate prediction wins
1370
+ */
1371
+ PairwiseChoice["CANDIDATE"] = "CANDIDATE";
1372
+ /**
1373
+ * Winner cannot be determined
1374
+ */
1375
+ PairwiseChoice["TIE"] = "TIE";
1376
+ })(exports.PairwiseChoice || (exports.PairwiseChoice = {}));
1257
1377
  /** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
1258
1378
  exports.TuningTask = void 0;
1259
1379
  (function (TuningTask) {
@@ -1366,22 +1486,6 @@ exports.SafetyFilterLevel = void 0;
1366
1486
  SafetyFilterLevel["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
1367
1487
  SafetyFilterLevel["BLOCK_NONE"] = "BLOCK_NONE";
1368
1488
  })(exports.SafetyFilterLevel || (exports.SafetyFilterLevel = {}));
1369
- /** Enum that controls the generation of people. */
1370
- exports.PersonGeneration = void 0;
1371
- (function (PersonGeneration) {
1372
- /**
1373
- * Block generation of images of people.
1374
- */
1375
- PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
1376
- /**
1377
- * Generate images of adults, but not children.
1378
- */
1379
- PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
1380
- /**
1381
- * Generate images that include adults and children.
1382
- */
1383
- PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
1384
- })(exports.PersonGeneration || (exports.PersonGeneration = {}));
1385
1489
  /** Enum that specifies the language of the text in the prompt. */
1386
1490
  exports.ImagePromptLanguage = void 0;
1387
1491
  (function (ImagePromptLanguage) {
@@ -2280,6 +2384,9 @@ class GenerateVideosOperation {
2280
2384
  return operation;
2281
2385
  }
2282
2386
  }
2387
+ /** The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API. */
2388
+ class EvaluateDatasetResponse {
2389
+ }
2283
2390
  /** Response for the list tuning jobs method. */
2284
2391
  class ListTuningJobsResponse {
2285
2392
  }
@@ -3399,6 +3506,33 @@ function tIsVertexEmbedContentModel(model) {
3399
3506
  * Copyright 2025 Google LLC
3400
3507
  * SPDX-License-Identifier: Apache-2.0
3401
3508
  */
3509
+ function authConfigToMldev$4(fromObject) {
3510
+ const toObject = {};
3511
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
3512
+ if (fromApiKey != null) {
3513
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
3514
+ }
3515
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
3516
+ throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
3517
+ }
3518
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
3519
+ throw new Error('authType parameter is not supported in Gemini API.');
3520
+ }
3521
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
3522
+ undefined) {
3523
+ throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
3524
+ }
3525
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
3526
+ throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
3527
+ }
3528
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
3529
+ throw new Error('oauthConfig parameter is not supported in Gemini API.');
3530
+ }
3531
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
3532
+ throw new Error('oidcConfig parameter is not supported in Gemini API.');
3533
+ }
3534
+ return toObject;
3535
+ }
3402
3536
  function batchJobDestinationFromMldev(fromObject) {
3403
3537
  const toObject = {};
3404
3538
  const fromFileName = getValueByPath(fromObject, ['responsesFile']);
@@ -4248,8 +4382,9 @@ function getBatchJobParametersToVertex(apiClient, fromObject) {
4248
4382
  }
4249
4383
  function googleMapsToMldev$4(fromObject) {
4250
4384
  const toObject = {};
4251
- if (getValueByPath(fromObject, ['authConfig']) !== undefined) {
4252
- throw new Error('authConfig parameter is not supported in Gemini API.');
4385
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
4386
+ if (fromAuthConfig != null) {
4387
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev$4(fromAuthConfig));
4253
4388
  }
4254
4389
  const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
4255
4390
  if (fromEnableWidget != null) {
@@ -4263,12 +4398,12 @@ function googleSearchToMldev$4(fromObject) {
4263
4398
  if (fromSearchTypes != null) {
4264
4399
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
4265
4400
  }
4266
- if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
4267
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
4268
- }
4269
4401
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
4270
4402
  throw new Error('blockingConfidence parameter is not supported in Gemini API.');
4271
4403
  }
4404
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
4405
+ throw new Error('excludeDomains parameter is not supported in Gemini API.');
4406
+ }
4272
4407
  const fromTimeRangeFilter = getValueByPath(fromObject, [
4273
4408
  'timeRangeFilter',
4274
4409
  ]);
@@ -4300,6 +4435,9 @@ function imageConfigToMldev$1(fromObject) {
4300
4435
  undefined) {
4301
4436
  throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
4302
4437
  }
4438
+ if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
4439
+ throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
4440
+ }
4303
4441
  return toObject;
4304
4442
  }
4305
4443
  function inlinedRequestToMldev(apiClient, fromObject) {
@@ -4553,6 +4691,10 @@ function toolToMldev$4(fromObject) {
4553
4691
  if (fromGoogleSearch != null) {
4554
4692
  setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$4(fromGoogleSearch));
4555
4693
  }
4694
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
4695
+ if (fromGoogleMaps != null) {
4696
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$4(fromGoogleMaps));
4697
+ }
4556
4698
  const fromCodeExecution = getValueByPath(fromObject, [
4557
4699
  'codeExecution',
4558
4700
  ]);
@@ -4574,16 +4716,15 @@ function toolToMldev$4(fromObject) {
4574
4716
  }
4575
4717
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
4576
4718
  }
4577
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
4578
- if (fromGoogleMaps != null) {
4579
- setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$4(fromGoogleMaps));
4580
- }
4581
4719
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
4582
4720
  'googleSearchRetrieval',
4583
4721
  ]);
4584
4722
  if (fromGoogleSearchRetrieval != null) {
4585
4723
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
4586
4724
  }
4725
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
4726
+ throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
4727
+ }
4587
4728
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
4588
4729
  if (fromUrlContext != null) {
4589
4730
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -5293,6 +5434,33 @@ class Batches extends BaseModule {
5293
5434
  * Copyright 2025 Google LLC
5294
5435
  * SPDX-License-Identifier: Apache-2.0
5295
5436
  */
5437
+ function authConfigToMldev$3(fromObject) {
5438
+ const toObject = {};
5439
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
5440
+ if (fromApiKey != null) {
5441
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
5442
+ }
5443
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
5444
+ throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
5445
+ }
5446
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
5447
+ throw new Error('authType parameter is not supported in Gemini API.');
5448
+ }
5449
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
5450
+ undefined) {
5451
+ throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
5452
+ }
5453
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
5454
+ throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
5455
+ }
5456
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
5457
+ throw new Error('oauthConfig parameter is not supported in Gemini API.');
5458
+ }
5459
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
5460
+ throw new Error('oidcConfig parameter is not supported in Gemini API.');
5461
+ }
5462
+ return toObject;
5463
+ }
5296
5464
  function blobToMldev$3(fromObject) {
5297
5465
  const toObject = {};
5298
5466
  const fromData = getValueByPath(fromObject, ['data']);
@@ -5593,8 +5761,9 @@ function getCachedContentParametersToVertex(apiClient, fromObject) {
5593
5761
  }
5594
5762
  function googleMapsToMldev$3(fromObject) {
5595
5763
  const toObject = {};
5596
- if (getValueByPath(fromObject, ['authConfig']) !== undefined) {
5597
- throw new Error('authConfig parameter is not supported in Gemini API.');
5764
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
5765
+ if (fromAuthConfig != null) {
5766
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev$3(fromAuthConfig));
5598
5767
  }
5599
5768
  const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
5600
5769
  if (fromEnableWidget != null) {
@@ -5608,12 +5777,12 @@ function googleSearchToMldev$3(fromObject) {
5608
5777
  if (fromSearchTypes != null) {
5609
5778
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
5610
5779
  }
5611
- if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
5612
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
5613
- }
5614
5780
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
5615
5781
  throw new Error('blockingConfidence parameter is not supported in Gemini API.');
5616
5782
  }
5783
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
5784
+ throw new Error('excludeDomains parameter is not supported in Gemini API.');
5785
+ }
5617
5786
  const fromTimeRangeFilter = getValueByPath(fromObject, [
5618
5787
  'timeRangeFilter',
5619
5788
  ]);
@@ -5811,6 +5980,10 @@ function toolToMldev$3(fromObject) {
5811
5980
  if (fromGoogleSearch != null) {
5812
5981
  setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$3(fromGoogleSearch));
5813
5982
  }
5983
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
5984
+ if (fromGoogleMaps != null) {
5985
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$3(fromGoogleMaps));
5986
+ }
5814
5987
  const fromCodeExecution = getValueByPath(fromObject, [
5815
5988
  'codeExecution',
5816
5989
  ]);
@@ -5832,16 +6005,15 @@ function toolToMldev$3(fromObject) {
5832
6005
  }
5833
6006
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
5834
6007
  }
5835
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
5836
- if (fromGoogleMaps != null) {
5837
- setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$3(fromGoogleMaps));
5838
- }
5839
6008
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
5840
6009
  'googleSearchRetrieval',
5841
6010
  ]);
5842
6011
  if (fromGoogleSearchRetrieval != null) {
5843
6012
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
5844
6013
  }
6014
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
6015
+ throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
6016
+ }
5845
6017
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
5846
6018
  if (fromUrlContext != null) {
5847
6019
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -5875,6 +6047,10 @@ function toolToVertex$2(fromObject) {
5875
6047
  if (fromGoogleSearch != null) {
5876
6048
  setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
5877
6049
  }
6050
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
6051
+ if (fromGoogleMaps != null) {
6052
+ setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
6053
+ }
5878
6054
  const fromCodeExecution = getValueByPath(fromObject, [
5879
6055
  'codeExecution',
5880
6056
  ]);
@@ -5899,16 +6075,18 @@ function toolToVertex$2(fromObject) {
5899
6075
  }
5900
6076
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
5901
6077
  }
5902
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
5903
- if (fromGoogleMaps != null) {
5904
- setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
5905
- }
5906
6078
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
5907
6079
  'googleSearchRetrieval',
5908
6080
  ]);
5909
6081
  if (fromGoogleSearchRetrieval != null) {
5910
6082
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
5911
6083
  }
6084
+ const fromParallelAiSearch = getValueByPath(fromObject, [
6085
+ 'parallelAiSearch',
6086
+ ]);
6087
+ if (fromParallelAiSearch != null) {
6088
+ setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
6089
+ }
5912
6090
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
5913
6091
  if (fromUrlContext != null) {
5914
6092
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -6999,7 +7177,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
6999
7177
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
7000
7178
  const USER_AGENT_HEADER = 'User-Agent';
7001
7179
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
7002
- const SDK_VERSION = '1.43.0'; // x-release-please-version
7180
+ const SDK_VERSION = '1.45.0'; // x-release-please-version
7003
7181
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
7004
7182
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
7005
7183
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -7018,6 +7196,9 @@ const DEFAULT_RETRY_HTTP_STATUS_CODES = [
7018
7196
  /**
7019
7197
  * The ApiClient class is used to send requests to the Gemini API or Vertex AI
7020
7198
  * endpoints.
7199
+ *
7200
+ * WARNING: This is an internal API and may change without notice. Direct usage
7201
+ * is not supported and may break your application.
7021
7202
  */
7022
7203
  class ApiClient {
7023
7204
  constructor(opts) {
@@ -7065,10 +7246,7 @@ class ApiClient {
7065
7246
  else {
7066
7247
  // Gemini API
7067
7248
  if (!this.clientOptions.apiKey) {
7068
- throw new ApiError({
7069
- message: 'API key must be set when using the Gemini API.',
7070
- status: 403,
7071
- });
7249
+ console.warn('API key should be set when using the Gemini API.');
7072
7250
  }
7073
7251
  initHttpOptions.apiVersion =
7074
7252
  (_c = this.clientOptions.apiVersion) !== null && _c !== void 0 ? _c : GOOGLE_AI_API_DEFAULT_VERSION;
@@ -8969,166 +9147,6 @@ const safeJSON = (text) => {
8969
9147
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
8970
9148
  const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
8971
9149
 
8972
- /**
8973
- * @license
8974
- * Copyright 2025 Google LLC
8975
- * SPDX-License-Identifier: Apache-2.0
8976
- */
8977
- const VERSION = '0.0.1';
8978
-
8979
- /**
8980
- * @license
8981
- * Copyright 2025 Google LLC
8982
- * SPDX-License-Identifier: Apache-2.0
8983
- */
8984
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
8985
- /**
8986
- * Note this does not detect 'browser'; for that, use getBrowserInfo().
8987
- */
8988
- function getDetectedPlatform() {
8989
- if (typeof Deno !== 'undefined' && Deno.build != null) {
8990
- return 'deno';
8991
- }
8992
- if (typeof EdgeRuntime !== 'undefined') {
8993
- return 'edge';
8994
- }
8995
- if (Object.prototype.toString.call(typeof globalThis.process !== 'undefined' ? globalThis.process : 0) === '[object process]') {
8996
- return 'node';
8997
- }
8998
- return 'unknown';
8999
- }
9000
- const getPlatformProperties = () => {
9001
- var _a, _b, _c, _d, _e;
9002
- const detectedPlatform = getDetectedPlatform();
9003
- if (detectedPlatform === 'deno') {
9004
- return {
9005
- 'X-Stainless-Lang': 'js',
9006
- 'X-Stainless-Package-Version': VERSION,
9007
- 'X-Stainless-OS': normalizePlatform(Deno.build.os),
9008
- 'X-Stainless-Arch': normalizeArch(Deno.build.arch),
9009
- 'X-Stainless-Runtime': 'deno',
9010
- 'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : (_b = (_a = Deno.version) === null || _a === void 0 ? void 0 : _a.deno) !== null && _b !== void 0 ? _b : 'unknown',
9011
- };
9012
- }
9013
- if (typeof EdgeRuntime !== 'undefined') {
9014
- return {
9015
- 'X-Stainless-Lang': 'js',
9016
- 'X-Stainless-Package-Version': VERSION,
9017
- 'X-Stainless-OS': 'Unknown',
9018
- 'X-Stainless-Arch': `other:${EdgeRuntime}`,
9019
- 'X-Stainless-Runtime': 'edge',
9020
- 'X-Stainless-Runtime-Version': globalThis.process.version,
9021
- };
9022
- }
9023
- // Check if Node.js
9024
- if (detectedPlatform === 'node') {
9025
- return {
9026
- 'X-Stainless-Lang': 'js',
9027
- 'X-Stainless-Package-Version': VERSION,
9028
- 'X-Stainless-OS': normalizePlatform((_c = globalThis.process.platform) !== null && _c !== void 0 ? _c : 'unknown'),
9029
- 'X-Stainless-Arch': normalizeArch((_d = globalThis.process.arch) !== null && _d !== void 0 ? _d : 'unknown'),
9030
- 'X-Stainless-Runtime': 'node',
9031
- 'X-Stainless-Runtime-Version': (_e = globalThis.process.version) !== null && _e !== void 0 ? _e : 'unknown',
9032
- };
9033
- }
9034
- const browserInfo = getBrowserInfo();
9035
- if (browserInfo) {
9036
- return {
9037
- 'X-Stainless-Lang': 'js',
9038
- 'X-Stainless-Package-Version': VERSION,
9039
- 'X-Stainless-OS': 'Unknown',
9040
- 'X-Stainless-Arch': 'unknown',
9041
- 'X-Stainless-Runtime': `browser:${browserInfo.browser}`,
9042
- 'X-Stainless-Runtime-Version': browserInfo.version,
9043
- };
9044
- }
9045
- // TODO add support for Cloudflare workers, etc.
9046
- return {
9047
- 'X-Stainless-Lang': 'js',
9048
- 'X-Stainless-Package-Version': VERSION,
9049
- 'X-Stainless-OS': 'Unknown',
9050
- 'X-Stainless-Arch': 'unknown',
9051
- 'X-Stainless-Runtime': 'unknown',
9052
- 'X-Stainless-Runtime-Version': 'unknown',
9053
- };
9054
- };
9055
- // Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts
9056
- function getBrowserInfo() {
9057
- if (typeof navigator === 'undefined' || !navigator) {
9058
- return null;
9059
- }
9060
- // NOTE: The order matters here!
9061
- const browserPatterns = [
9062
- { key: 'edge', pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
9063
- { key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
9064
- { key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ },
9065
- { key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
9066
- { key: 'firefox', pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
9067
- { key: 'safari', pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ },
9068
- ];
9069
- // Find the FIRST matching browser
9070
- for (const { key, pattern } of browserPatterns) {
9071
- const match = pattern.exec(navigator.userAgent);
9072
- if (match) {
9073
- const major = match[1] || 0;
9074
- const minor = match[2] || 0;
9075
- const patch = match[3] || 0;
9076
- return { browser: key, version: `${major}.${minor}.${patch}` };
9077
- }
9078
- }
9079
- return null;
9080
- }
9081
- const normalizeArch = (arch) => {
9082
- // Node docs:
9083
- // - https://nodejs.org/api/process.html#processarch
9084
- // Deno docs:
9085
- // - https://doc.deno.land/deno/stable/~/Deno.build
9086
- if (arch === 'x32')
9087
- return 'x32';
9088
- if (arch === 'x86_64' || arch === 'x64')
9089
- return 'x64';
9090
- if (arch === 'arm')
9091
- return 'arm';
9092
- if (arch === 'aarch64' || arch === 'arm64')
9093
- return 'arm64';
9094
- if (arch)
9095
- return `other:${arch}`;
9096
- return 'unknown';
9097
- };
9098
- const normalizePlatform = (platform) => {
9099
- // Node platforms:
9100
- // - https://nodejs.org/api/process.html#processplatform
9101
- // Deno platforms:
9102
- // - https://doc.deno.land/deno/stable/~/Deno.build
9103
- // - https://github.com/denoland/deno/issues/14799
9104
- platform = platform.toLowerCase();
9105
- // NOTE: this iOS check is untested and may not work
9106
- // Node does not work natively on IOS, there is a fork at
9107
- // https://github.com/nodejs-mobile/nodejs-mobile
9108
- // however it is unknown at the time of writing how to detect if it is running
9109
- if (platform.includes('ios'))
9110
- return 'iOS';
9111
- if (platform === 'android')
9112
- return 'Android';
9113
- if (platform === 'darwin')
9114
- return 'MacOS';
9115
- if (platform === 'win32')
9116
- return 'Windows';
9117
- if (platform === 'freebsd')
9118
- return 'FreeBSD';
9119
- if (platform === 'openbsd')
9120
- return 'OpenBSD';
9121
- if (platform === 'linux')
9122
- return 'Linux';
9123
- if (platform)
9124
- return `Other:${platform}`;
9125
- return 'Unknown';
9126
- };
9127
- let _platformHeaders;
9128
- const getPlatformHeaders = () => {
9129
- return (_platformHeaders !== null && _platformHeaders !== void 0 ? _platformHeaders : (_platformHeaders = getPlatformProperties()));
9130
- };
9131
-
9132
9150
  /**
9133
9151
  * @license
9134
9152
  * Copyright 2025 Google LLC
@@ -9234,6 +9252,37 @@ const FallbackEncoder = ({ headers, body }) => {
9234
9252
  };
9235
9253
  };
9236
9254
 
9255
+ /**
9256
+ * @license
9257
+ * Copyright 2025 Google LLC
9258
+ * SPDX-License-Identifier: Apache-2.0
9259
+ */
9260
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
9261
+ /**
9262
+ * Basic re-implementation of `qs.stringify` for primitive types.
9263
+ */
9264
+ function stringifyQuery(query) {
9265
+ return Object.entries(query)
9266
+ .filter(([_, value]) => typeof value !== 'undefined')
9267
+ .map(([key, value]) => {
9268
+ if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
9269
+ return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
9270
+ }
9271
+ if (value === null) {
9272
+ return `${encodeURIComponent(key)}=`;
9273
+ }
9274
+ throw new GeminiNextGenAPIClientError(`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`);
9275
+ })
9276
+ .join('&');
9277
+ }
9278
+
9279
+ /**
9280
+ * @license
9281
+ * Copyright 2025 Google LLC
9282
+ * SPDX-License-Identifier: Apache-2.0
9283
+ */
9284
+ const VERSION = '0.0.1';
9285
+
9237
9286
  /**
9238
9287
  * @license
9239
9288
  * Copyright 2025 Google LLC
@@ -9572,8 +9621,10 @@ class LineDecoder {
9572
9621
  constructor() {
9573
9622
  this.buffer = new Uint8Array();
9574
9623
  this.carriageReturnIndex = null;
9624
+ this.searchIndex = 0;
9575
9625
  }
9576
9626
  decode(chunk) {
9627
+ var _a;
9577
9628
  if (chunk == null) {
9578
9629
  return [];
9579
9630
  }
@@ -9583,7 +9634,7 @@ class LineDecoder {
9583
9634
  this.buffer = concatBytes([this.buffer, binaryChunk]);
9584
9635
  const lines = [];
9585
9636
  let patternIndex;
9586
- while ((patternIndex = findNewlineIndex(this.buffer, this.carriageReturnIndex)) != null) {
9637
+ while ((patternIndex = findNewlineIndex(this.buffer, (_a = this.carriageReturnIndex) !== null && _a !== void 0 ? _a : this.searchIndex)) != null) {
9587
9638
  if (patternIndex.carriage && this.carriageReturnIndex == null) {
9588
9639
  // skip until we either get a corresponding `\n`, a new `\r` or nothing
9589
9640
  this.carriageReturnIndex = patternIndex.index;
@@ -9595,6 +9646,7 @@ class LineDecoder {
9595
9646
  lines.push(decodeUTF8(this.buffer.subarray(0, this.carriageReturnIndex - 1)));
9596
9647
  this.buffer = this.buffer.subarray(this.carriageReturnIndex);
9597
9648
  this.carriageReturnIndex = null;
9649
+ this.searchIndex = 0;
9598
9650
  continue;
9599
9651
  }
9600
9652
  const endIndex = this.carriageReturnIndex !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
@@ -9602,7 +9654,9 @@ class LineDecoder {
9602
9654
  lines.push(line);
9603
9655
  this.buffer = this.buffer.subarray(patternIndex.index);
9604
9656
  this.carriageReturnIndex = null;
9657
+ this.searchIndex = 0;
9605
9658
  }
9659
+ this.searchIndex = Math.max(0, this.buffer.length - 1);
9606
9660
  return lines;
9607
9661
  }
9608
9662
  flush() {
@@ -9627,41 +9681,23 @@ LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g;
9627
9681
  function findNewlineIndex(buffer, startIndex) {
9628
9682
  const newline = 0x0a; // \n
9629
9683
  const carriage = 0x0d; // \r
9630
- for (let i = startIndex !== null && startIndex !== void 0 ? startIndex : 0; i < buffer.length; i++) {
9631
- if (buffer[i] === newline) {
9632
- return { preceding: i, index: i + 1, carriage: false };
9633
- }
9634
- if (buffer[i] === carriage) {
9635
- return { preceding: i, index: i + 1, carriage: true };
9636
- }
9684
+ const start = startIndex !== null && startIndex !== void 0 ? startIndex : 0;
9685
+ const nextNewline = buffer.indexOf(newline, start);
9686
+ const nextCarriage = buffer.indexOf(carriage, start);
9687
+ if (nextNewline === -1 && nextCarriage === -1) {
9688
+ return null;
9637
9689
  }
9638
- return null;
9639
- }
9640
- function findDoubleNewlineIndex(buffer) {
9641
- // This function searches the buffer for the end patterns (\r\r, \n\n, \r\n\r\n)
9642
- // and returns the index right after the first occurrence of any pattern,
9643
- // or -1 if none of the patterns are found.
9644
- const newline = 0x0a; // \n
9645
- const carriage = 0x0d; // \r
9646
- for (let i = 0; i < buffer.length - 1; i++) {
9647
- if (buffer[i] === newline && buffer[i + 1] === newline) {
9648
- // \n\n
9649
- return i + 2;
9650
- }
9651
- if (buffer[i] === carriage && buffer[i + 1] === carriage) {
9652
- // \r\r
9653
- return i + 2;
9654
- }
9655
- if (buffer[i] === carriage &&
9656
- buffer[i + 1] === newline &&
9657
- i + 3 < buffer.length &&
9658
- buffer[i + 2] === carriage &&
9659
- buffer[i + 3] === newline) {
9660
- // \r\n\r\n
9661
- return i + 4;
9662
- }
9690
+ let i;
9691
+ if (nextNewline !== -1 && nextCarriage !== -1) {
9692
+ i = Math.min(nextNewline, nextCarriage);
9693
+ }
9694
+ else {
9695
+ i = nextNewline !== -1 ? nextNewline : nextCarriage;
9696
+ }
9697
+ if (buffer[i] === newline) {
9698
+ return { preceding: i, index: i + 1, carriage: false };
9663
9699
  }
9664
- return -1;
9700
+ return { preceding: i, index: i + 1, carriage: true };
9665
9701
  }
9666
9702
 
9667
9703
  /**
@@ -9972,7 +10008,7 @@ function _iterSSEMessages(response, controller) {
9972
10008
  const lineDecoder = new LineDecoder();
9973
10009
  const iter = ReadableStreamToAsyncIterable(response.body);
9974
10010
  try {
9975
- for (var _d = true, _e = __asyncValues(iterSSEChunks(iter)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
10011
+ for (var _d = true, _e = __asyncValues(iterBinaryChunks(iter)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
9976
10012
  _c = _f.value;
9977
10013
  _d = false;
9978
10014
  const sseChunk = _c;
@@ -9998,13 +10034,12 @@ function _iterSSEMessages(response, controller) {
9998
10034
  });
9999
10035
  }
10000
10036
  /**
10001
- * Given an async iterable iterator, iterates over it and yields full
10002
- * SSE chunks, i.e. yields when a double new-line is encountered.
10037
+ * Given an async iterable iterator, normalizes each chunk to a
10038
+ * Uint8Array and yields it.
10003
10039
  */
10004
- function iterSSEChunks(iterator) {
10005
- return __asyncGenerator(this, arguments, function* iterSSEChunks_1() {
10040
+ function iterBinaryChunks(iterator) {
10041
+ return __asyncGenerator(this, arguments, function* iterBinaryChunks_1() {
10006
10042
  var _a, e_5, _b, _c;
10007
- let data = new Uint8Array();
10008
10043
  try {
10009
10044
  for (var _d = true, iterator_3 = __asyncValues(iterator), iterator_3_1; iterator_3_1 = yield __await(iterator_3.next()), _a = iterator_3_1.done, !_a; _d = true) {
10010
10045
  _c = iterator_3_1.value;
@@ -10016,15 +10051,7 @@ function iterSSEChunks(iterator) {
10016
10051
  const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk)
10017
10052
  : typeof chunk === 'string' ? encodeUTF8(chunk)
10018
10053
  : chunk;
10019
- let newData = new Uint8Array(data.length + binaryChunk.length);
10020
- newData.set(data);
10021
- newData.set(binaryChunk, data.length);
10022
- data = newData;
10023
- let patternIndex;
10024
- while ((patternIndex = findDoubleNewlineIndex(data)) !== -1) {
10025
- yield yield __await(data.slice(0, patternIndex));
10026
- data = data.slice(patternIndex);
10027
- }
10054
+ yield yield __await(binaryChunk);
10028
10055
  }
10029
10056
  }
10030
10057
  catch (e_5_1) { e_5 = { error: e_5_1 }; }
@@ -10034,9 +10061,6 @@ function iterSSEChunks(iterator) {
10034
10061
  }
10035
10062
  finally { if (e_5) throw e_5.error; }
10036
10063
  }
10037
- if (data.length > 0) {
10038
- yield yield __await(data);
10039
- }
10040
10064
  });
10041
10065
  }
10042
10066
  class SSEDecoder {
@@ -10395,18 +10419,7 @@ class BaseGeminiNextGenAPIClient {
10395
10419
  * Basic re-implementation of `qs.stringify` for primitive types.
10396
10420
  */
10397
10421
  stringifyQuery(query) {
10398
- return Object.entries(query)
10399
- .filter(([_, value]) => typeof value !== 'undefined')
10400
- .map(([key, value]) => {
10401
- if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
10402
- return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
10403
- }
10404
- if (value === null) {
10405
- return `${encodeURIComponent(key)}=`;
10406
- }
10407
- throw new GeminiNextGenAPIClientError(`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`);
10408
- })
10409
- .join('&');
10422
+ return stringifyQuery(query);
10410
10423
  }
10411
10424
  getUserAgent() {
10412
10425
  return `${this.constructor.name}/JS ${VERSION}`;
@@ -10423,8 +10436,9 @@ class BaseGeminiNextGenAPIClient {
10423
10436
  new URL(path)
10424
10437
  : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
10425
10438
  const defaultQuery = this.defaultQuery();
10426
- if (!isEmptyObj(defaultQuery)) {
10427
- query = Object.assign(Object.assign({}, defaultQuery), query);
10439
+ const pathQuery = Object.fromEntries(url.searchParams);
10440
+ if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
10441
+ query = Object.assign(Object.assign(Object.assign({}, pathQuery), defaultQuery), query);
10428
10442
  }
10429
10443
  if (typeof query === 'object' && query && !Array.isArray(query)) {
10430
10444
  url.search = this.stringifyQuery(query);
@@ -10645,9 +10659,9 @@ class BaseGeminiNextGenAPIClient {
10645
10659
  timeoutMillis = Date.parse(retryAfterHeader) - Date.now();
10646
10660
  }
10647
10661
  }
10648
- // If the API asks us to wait a certain amount of time (and it's a reasonable amount),
10649
- // just do what it says, but otherwise calculate a default
10650
- if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {
10662
+ // If the API asks us to wait a certain amount of time, just do what it
10663
+ // says, but otherwise calculate a default
10664
+ if (timeoutMillis === undefined) {
10651
10665
  const maxRetries = (_b = options.maxRetries) !== null && _b !== void 0 ? _b : this.maxRetries;
10652
10666
  timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
10653
10667
  }
@@ -10688,7 +10702,7 @@ class BaseGeminiNextGenAPIClient {
10688
10702
  const authHeaders = await this.authHeaders(options);
10689
10703
  let headers = buildHeaders([
10690
10704
  idempotencyHeaders,
10691
- Object.assign(Object.assign({ Accept: 'application/json', 'User-Agent': this.getUserAgent(), 'X-Stainless-Retry-Count': String(retryCount) }, (options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {})), getPlatformHeaders()),
10705
+ { Accept: 'application/json', 'User-Agent': this.getUserAgent() },
10692
10706
  this._options.defaultHeaders,
10693
10707
  bodyHeaders,
10694
10708
  options.headers,
@@ -10775,6 +10789,40 @@ GeminiNextGenAPIClient.Interactions = Interactions;
10775
10789
  * Copyright 2025 Google LLC
10776
10790
  * SPDX-License-Identifier: Apache-2.0
10777
10791
  */
10792
+ function audioTranscriptionConfigToMldev$1(fromObject) {
10793
+ const toObject = {};
10794
+ if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
10795
+ throw new Error('languageCodes parameter is not supported in Gemini API.');
10796
+ }
10797
+ return toObject;
10798
+ }
10799
+ function authConfigToMldev$2(fromObject) {
10800
+ const toObject = {};
10801
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
10802
+ if (fromApiKey != null) {
10803
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
10804
+ }
10805
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
10806
+ throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
10807
+ }
10808
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
10809
+ throw new Error('authType parameter is not supported in Gemini API.');
10810
+ }
10811
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
10812
+ undefined) {
10813
+ throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
10814
+ }
10815
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
10816
+ throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
10817
+ }
10818
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
10819
+ throw new Error('oauthConfig parameter is not supported in Gemini API.');
10820
+ }
10821
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
10822
+ throw new Error('oidcConfig parameter is not supported in Gemini API.');
10823
+ }
10824
+ return toObject;
10825
+ }
10778
10826
  function blobToMldev$2(fromObject) {
10779
10827
  const toObject = {};
10780
10828
  const fromData = getValueByPath(fromObject, ['data']);
@@ -11010,8 +11058,9 @@ function generationConfigToVertex$1(fromObject) {
11010
11058
  }
11011
11059
  function googleMapsToMldev$2(fromObject) {
11012
11060
  const toObject = {};
11013
- if (getValueByPath(fromObject, ['authConfig']) !== undefined) {
11014
- throw new Error('authConfig parameter is not supported in Gemini API.');
11061
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
11062
+ if (fromAuthConfig != null) {
11063
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev$2(fromAuthConfig));
11015
11064
  }
11016
11065
  const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
11017
11066
  if (fromEnableWidget != null) {
@@ -11025,12 +11074,12 @@ function googleSearchToMldev$2(fromObject) {
11025
11074
  if (fromSearchTypes != null) {
11026
11075
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
11027
11076
  }
11028
- if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
11029
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
11030
- }
11031
11077
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
11032
11078
  throw new Error('blockingConfidence parameter is not supported in Gemini API.');
11033
11079
  }
11080
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
11081
+ throw new Error('excludeDomains parameter is not supported in Gemini API.');
11082
+ }
11034
11083
  const fromTimeRangeFilter = getValueByPath(fromObject, [
11035
11084
  'timeRangeFilter',
11036
11085
  ]);
@@ -11123,13 +11172,13 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
11123
11172
  'inputAudioTranscription',
11124
11173
  ]);
11125
11174
  if (parentObject !== undefined && fromInputAudioTranscription != null) {
11126
- setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], fromInputAudioTranscription);
11175
+ setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToMldev$1(fromInputAudioTranscription));
11127
11176
  }
11128
11177
  const fromOutputAudioTranscription = getValueByPath(fromObject, [
11129
11178
  'outputAudioTranscription',
11130
11179
  ]);
11131
11180
  if (parentObject !== undefined && fromOutputAudioTranscription != null) {
11132
- setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], fromOutputAudioTranscription);
11181
+ setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToMldev$1(fromOutputAudioTranscription));
11133
11182
  }
11134
11183
  const fromRealtimeInputConfig = getValueByPath(fromObject, [
11135
11184
  'realtimeInputConfig',
@@ -11544,6 +11593,10 @@ function toolToMldev$2(fromObject) {
11544
11593
  if (fromGoogleSearch != null) {
11545
11594
  setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2(fromGoogleSearch));
11546
11595
  }
11596
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
11597
+ if (fromGoogleMaps != null) {
11598
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
11599
+ }
11547
11600
  const fromCodeExecution = getValueByPath(fromObject, [
11548
11601
  'codeExecution',
11549
11602
  ]);
@@ -11565,16 +11618,15 @@ function toolToMldev$2(fromObject) {
11565
11618
  }
11566
11619
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
11567
11620
  }
11568
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
11569
- if (fromGoogleMaps != null) {
11570
- setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
11571
- }
11572
11621
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
11573
11622
  'googleSearchRetrieval',
11574
11623
  ]);
11575
11624
  if (fromGoogleSearchRetrieval != null) {
11576
11625
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
11577
11626
  }
11627
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
11628
+ throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
11629
+ }
11578
11630
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
11579
11631
  if (fromUrlContext != null) {
11580
11632
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -11608,6 +11660,10 @@ function toolToVertex$1(fromObject) {
11608
11660
  if (fromGoogleSearch != null) {
11609
11661
  setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
11610
11662
  }
11663
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
11664
+ if (fromGoogleMaps != null) {
11665
+ setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
11666
+ }
11611
11667
  const fromCodeExecution = getValueByPath(fromObject, [
11612
11668
  'codeExecution',
11613
11669
  ]);
@@ -11632,16 +11688,18 @@ function toolToVertex$1(fromObject) {
11632
11688
  }
11633
11689
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
11634
11690
  }
11635
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
11636
- if (fromGoogleMaps != null) {
11637
- setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
11638
- }
11639
11691
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
11640
11692
  'googleSearchRetrieval',
11641
11693
  ]);
11642
11694
  if (fromGoogleSearchRetrieval != null) {
11643
11695
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
11644
11696
  }
11697
+ const fromParallelAiSearch = getValueByPath(fromObject, [
11698
+ 'parallelAiSearch',
11699
+ ]);
11700
+ if (fromParallelAiSearch != null) {
11701
+ setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
11702
+ }
11645
11703
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
11646
11704
  if (fromUrlContext != null) {
11647
11705
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -11757,6 +11815,33 @@ function voiceActivityFromVertex(fromObject) {
11757
11815
  * Copyright 2025 Google LLC
11758
11816
  * SPDX-License-Identifier: Apache-2.0
11759
11817
  */
11818
+ function authConfigToMldev$1(fromObject, _rootObject) {
11819
+ const toObject = {};
11820
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
11821
+ if (fromApiKey != null) {
11822
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
11823
+ }
11824
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
11825
+ throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
11826
+ }
11827
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
11828
+ throw new Error('authType parameter is not supported in Gemini API.');
11829
+ }
11830
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
11831
+ undefined) {
11832
+ throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
11833
+ }
11834
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
11835
+ throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
11836
+ }
11837
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
11838
+ throw new Error('oauthConfig parameter is not supported in Gemini API.');
11839
+ }
11840
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
11841
+ throw new Error('oidcConfig parameter is not supported in Gemini API.');
11842
+ }
11843
+ return toObject;
11844
+ }
11760
11845
  function blobToMldev$1(fromObject, _rootObject) {
11761
11846
  const toObject = {};
11762
11847
  const fromData = getValueByPath(fromObject, ['data']);
@@ -13905,10 +13990,11 @@ function getModelParametersToVertex(apiClient, fromObject, _rootObject) {
13905
13990
  }
13906
13991
  return toObject;
13907
13992
  }
13908
- function googleMapsToMldev$1(fromObject, _rootObject) {
13993
+ function googleMapsToMldev$1(fromObject, rootObject) {
13909
13994
  const toObject = {};
13910
- if (getValueByPath(fromObject, ['authConfig']) !== undefined) {
13911
- throw new Error('authConfig parameter is not supported in Gemini API.');
13995
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
13996
+ if (fromAuthConfig != null) {
13997
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev$1(fromAuthConfig));
13912
13998
  }
13913
13999
  const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
13914
14000
  if (fromEnableWidget != null) {
@@ -13922,12 +14008,12 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
13922
14008
  if (fromSearchTypes != null) {
13923
14009
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
13924
14010
  }
13925
- if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
13926
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
13927
- }
13928
14011
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
13929
14012
  throw new Error('blockingConfidence parameter is not supported in Gemini API.');
13930
14013
  }
14014
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
14015
+ throw new Error('excludeDomains parameter is not supported in Gemini API.');
14016
+ }
13931
14017
  const fromTimeRangeFilter = getValueByPath(fromObject, [
13932
14018
  'timeRangeFilter',
13933
14019
  ]);
@@ -13959,6 +14045,9 @@ function imageConfigToMldev(fromObject, _rootObject) {
13959
14045
  undefined) {
13960
14046
  throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
13961
14047
  }
14048
+ if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
14049
+ throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
14050
+ }
13962
14051
  return toObject;
13963
14052
  }
13964
14053
  function imageConfigToVertex(fromObject, _rootObject) {
@@ -13995,6 +14084,12 @@ function imageConfigToVertex(fromObject, _rootObject) {
13995
14084
  if (fromOutputCompressionQuality != null) {
13996
14085
  setValueByPath(toObject, ['imageOutputOptions', 'compressionQuality'], fromOutputCompressionQuality);
13997
14086
  }
14087
+ const fromImageOutputOptions = getValueByPath(fromObject, [
14088
+ 'imageOutputOptions',
14089
+ ]);
14090
+ if (fromImageOutputOptions != null) {
14091
+ setValueByPath(toObject, ['imageOutputOptions'], fromImageOutputOptions);
14092
+ }
13998
14093
  return toObject;
13999
14094
  }
14000
14095
  function imageFromMldev(fromObject, _rootObject) {
@@ -14714,6 +14809,10 @@ function toolToMldev$1(fromObject, rootObject) {
14714
14809
  if (fromGoogleSearch != null) {
14715
14810
  setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1(fromGoogleSearch));
14716
14811
  }
14812
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
14813
+ if (fromGoogleMaps != null) {
14814
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
14815
+ }
14717
14816
  const fromCodeExecution = getValueByPath(fromObject, [
14718
14817
  'codeExecution',
14719
14818
  ]);
@@ -14735,16 +14834,15 @@ function toolToMldev$1(fromObject, rootObject) {
14735
14834
  }
14736
14835
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
14737
14836
  }
14738
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
14739
- if (fromGoogleMaps != null) {
14740
- setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
14741
- }
14742
14837
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
14743
14838
  'googleSearchRetrieval',
14744
14839
  ]);
14745
14840
  if (fromGoogleSearchRetrieval != null) {
14746
14841
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
14747
14842
  }
14843
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
14844
+ throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
14845
+ }
14748
14846
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
14749
14847
  if (fromUrlContext != null) {
14750
14848
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -14778,6 +14876,10 @@ function toolToVertex(fromObject, rootObject) {
14778
14876
  if (fromGoogleSearch != null) {
14779
14877
  setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
14780
14878
  }
14879
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
14880
+ if (fromGoogleMaps != null) {
14881
+ setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
14882
+ }
14781
14883
  const fromCodeExecution = getValueByPath(fromObject, [
14782
14884
  'codeExecution',
14783
14885
  ]);
@@ -14802,16 +14904,18 @@ function toolToVertex(fromObject, rootObject) {
14802
14904
  }
14803
14905
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
14804
14906
  }
14805
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
14806
- if (fromGoogleMaps != null) {
14807
- setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
14808
- }
14809
14907
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
14810
14908
  'googleSearchRetrieval',
14811
14909
  ]);
14812
14910
  if (fromGoogleSearchRetrieval != null) {
14813
14911
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
14814
14912
  }
14913
+ const fromParallelAiSearch = getValueByPath(fromObject, [
14914
+ 'parallelAiSearch',
14915
+ ]);
14916
+ if (fromParallelAiSearch != null) {
14917
+ setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
14918
+ }
14815
14919
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
14816
14920
  if (fromUrlContext != null) {
14817
14921
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -17797,6 +17901,40 @@ class Operations extends BaseModule {
17797
17901
  * Copyright 2025 Google LLC
17798
17902
  * SPDX-License-Identifier: Apache-2.0
17799
17903
  */
17904
+ function audioTranscriptionConfigToMldev(fromObject) {
17905
+ const toObject = {};
17906
+ if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
17907
+ throw new Error('languageCodes parameter is not supported in Gemini API.');
17908
+ }
17909
+ return toObject;
17910
+ }
17911
+ function authConfigToMldev(fromObject) {
17912
+ const toObject = {};
17913
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
17914
+ if (fromApiKey != null) {
17915
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
17916
+ }
17917
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
17918
+ throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
17919
+ }
17920
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
17921
+ throw new Error('authType parameter is not supported in Gemini API.');
17922
+ }
17923
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
17924
+ undefined) {
17925
+ throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
17926
+ }
17927
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
17928
+ throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
17929
+ }
17930
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
17931
+ throw new Error('oauthConfig parameter is not supported in Gemini API.');
17932
+ }
17933
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
17934
+ throw new Error('oidcConfig parameter is not supported in Gemini API.');
17935
+ }
17936
+ return toObject;
17937
+ }
17800
17938
  function blobToMldev(fromObject) {
17801
17939
  const toObject = {};
17802
17940
  const fromData = getValueByPath(fromObject, ['data']);
@@ -17907,8 +18045,9 @@ function functionCallToMldev(fromObject) {
17907
18045
  }
17908
18046
  function googleMapsToMldev(fromObject) {
17909
18047
  const toObject = {};
17910
- if (getValueByPath(fromObject, ['authConfig']) !== undefined) {
17911
- throw new Error('authConfig parameter is not supported in Gemini API.');
18048
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
18049
+ if (fromAuthConfig != null) {
18050
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev(fromAuthConfig));
17912
18051
  }
17913
18052
  const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
17914
18053
  if (fromEnableWidget != null) {
@@ -17922,12 +18061,12 @@ function googleSearchToMldev(fromObject) {
17922
18061
  if (fromSearchTypes != null) {
17923
18062
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
17924
18063
  }
17925
- if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
17926
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
17927
- }
17928
18064
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
17929
18065
  throw new Error('blockingConfidence parameter is not supported in Gemini API.');
17930
18066
  }
18067
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
18068
+ throw new Error('excludeDomains parameter is not supported in Gemini API.');
18069
+ }
17931
18070
  const fromTimeRangeFilter = getValueByPath(fromObject, [
17932
18071
  'timeRangeFilter',
17933
18072
  ]);
@@ -18020,13 +18159,13 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
18020
18159
  'inputAudioTranscription',
18021
18160
  ]);
18022
18161
  if (parentObject !== undefined && fromInputAudioTranscription != null) {
18023
- setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], fromInputAudioTranscription);
18162
+ setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToMldev(fromInputAudioTranscription));
18024
18163
  }
18025
18164
  const fromOutputAudioTranscription = getValueByPath(fromObject, [
18026
18165
  'outputAudioTranscription',
18027
18166
  ]);
18028
18167
  if (parentObject !== undefined && fromOutputAudioTranscription != null) {
18029
- setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], fromOutputAudioTranscription);
18168
+ setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToMldev(fromOutputAudioTranscription));
18030
18169
  }
18031
18170
  const fromRealtimeInputConfig = getValueByPath(fromObject, [
18032
18171
  'realtimeInputConfig',
@@ -18149,6 +18288,10 @@ function toolToMldev(fromObject) {
18149
18288
  if (fromGoogleSearch != null) {
18150
18289
  setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(fromGoogleSearch));
18151
18290
  }
18291
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
18292
+ if (fromGoogleMaps != null) {
18293
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
18294
+ }
18152
18295
  const fromCodeExecution = getValueByPath(fromObject, [
18153
18296
  'codeExecution',
18154
18297
  ]);
@@ -18170,16 +18313,15 @@ function toolToMldev(fromObject) {
18170
18313
  }
18171
18314
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
18172
18315
  }
18173
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
18174
- if (fromGoogleMaps != null) {
18175
- setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
18176
- }
18177
18316
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
18178
18317
  'googleSearchRetrieval',
18179
18318
  ]);
18180
18319
  if (fromGoogleSearchRetrieval != null) {
18181
18320
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
18182
18321
  }
18322
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
18323
+ throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
18324
+ }
18183
18325
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
18184
18326
  if (fromUrlContext != null) {
18185
18327
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -19229,10 +19371,28 @@ function tuningJobFromVertex(fromObject, _rootObject) {
19229
19371
  if (fromCustomBaseModel != null) {
19230
19372
  setValueByPath(toObject, ['customBaseModel'], fromCustomBaseModel);
19231
19373
  }
19374
+ const fromEvaluateDatasetRuns = getValueByPath(fromObject, [
19375
+ 'evaluateDatasetRuns',
19376
+ ]);
19377
+ if (fromEvaluateDatasetRuns != null) {
19378
+ let transformedList = fromEvaluateDatasetRuns;
19379
+ if (Array.isArray(transformedList)) {
19380
+ transformedList = transformedList.map((item) => {
19381
+ return item;
19382
+ });
19383
+ }
19384
+ setValueByPath(toObject, ['evaluateDatasetRuns'], transformedList);
19385
+ }
19232
19386
  const fromExperiment = getValueByPath(fromObject, ['experiment']);
19233
19387
  if (fromExperiment != null) {
19234
19388
  setValueByPath(toObject, ['experiment'], fromExperiment);
19235
19389
  }
19390
+ const fromFullFineTuningSpec = getValueByPath(fromObject, [
19391
+ 'fullFineTuningSpec',
19392
+ ]);
19393
+ if (fromFullFineTuningSpec != null) {
19394
+ setValueByPath(toObject, ['fullFineTuningSpec'], fromFullFineTuningSpec);
19395
+ }
19236
19396
  const fromLabels = getValueByPath(fromObject, ['labels']);
19237
19397
  if (fromLabels != null) {
19238
19398
  setValueByPath(toObject, ['labels'], fromLabels);
@@ -19257,6 +19417,12 @@ function tuningJobFromVertex(fromObject, _rootObject) {
19257
19417
  if (fromTunedModelDisplayName != null) {
19258
19418
  setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
19259
19419
  }
19420
+ const fromTuningJobState = getValueByPath(fromObject, [
19421
+ 'tuningJobState',
19422
+ ]);
19423
+ if (fromTuningJobState != null) {
19424
+ setValueByPath(toObject, ['tuningJobState'], fromTuningJobState);
19425
+ }
19260
19426
  const fromVeoTuningSpec = getValueByPath(fromObject, [
19261
19427
  'veoTuningSpec',
19262
19428
  ]);
@@ -19821,6 +19987,7 @@ exports.DeleteFileResponse = DeleteFileResponse;
19821
19987
  exports.DeleteModelResponse = DeleteModelResponse;
19822
19988
  exports.EditImageResponse = EditImageResponse;
19823
19989
  exports.EmbedContentResponse = EmbedContentResponse;
19990
+ exports.EvaluateDatasetResponse = EvaluateDatasetResponse;
19824
19991
  exports.Files = Files;
19825
19992
  exports.FunctionResponse = FunctionResponse;
19826
19993
  exports.FunctionResponseBlob = FunctionResponseBlob;