@google/genai 1.43.0 → 1.44.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.44.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,13 @@ 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
+ const VERSION = '0.0.1';
9261
+
9237
9262
  /**
9238
9263
  * @license
9239
9264
  * Copyright 2025 Google LLC
@@ -9572,8 +9597,10 @@ class LineDecoder {
9572
9597
  constructor() {
9573
9598
  this.buffer = new Uint8Array();
9574
9599
  this.carriageReturnIndex = null;
9600
+ this.searchIndex = 0;
9575
9601
  }
9576
9602
  decode(chunk) {
9603
+ var _a;
9577
9604
  if (chunk == null) {
9578
9605
  return [];
9579
9606
  }
@@ -9583,7 +9610,7 @@ class LineDecoder {
9583
9610
  this.buffer = concatBytes([this.buffer, binaryChunk]);
9584
9611
  const lines = [];
9585
9612
  let patternIndex;
9586
- while ((patternIndex = findNewlineIndex(this.buffer, this.carriageReturnIndex)) != null) {
9613
+ while ((patternIndex = findNewlineIndex(this.buffer, (_a = this.carriageReturnIndex) !== null && _a !== void 0 ? _a : this.searchIndex)) != null) {
9587
9614
  if (patternIndex.carriage && this.carriageReturnIndex == null) {
9588
9615
  // skip until we either get a corresponding `\n`, a new `\r` or nothing
9589
9616
  this.carriageReturnIndex = patternIndex.index;
@@ -9595,6 +9622,7 @@ class LineDecoder {
9595
9622
  lines.push(decodeUTF8(this.buffer.subarray(0, this.carriageReturnIndex - 1)));
9596
9623
  this.buffer = this.buffer.subarray(this.carriageReturnIndex);
9597
9624
  this.carriageReturnIndex = null;
9625
+ this.searchIndex = 0;
9598
9626
  continue;
9599
9627
  }
9600
9628
  const endIndex = this.carriageReturnIndex !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
@@ -9602,7 +9630,9 @@ class LineDecoder {
9602
9630
  lines.push(line);
9603
9631
  this.buffer = this.buffer.subarray(patternIndex.index);
9604
9632
  this.carriageReturnIndex = null;
9633
+ this.searchIndex = 0;
9605
9634
  }
9635
+ this.searchIndex = Math.max(0, this.buffer.length - 1);
9606
9636
  return lines;
9607
9637
  }
9608
9638
  flush() {
@@ -9627,41 +9657,23 @@ LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g;
9627
9657
  function findNewlineIndex(buffer, startIndex) {
9628
9658
  const newline = 0x0a; // \n
9629
9659
  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
- }
9660
+ const start = startIndex !== null && startIndex !== void 0 ? startIndex : 0;
9661
+ const nextNewline = buffer.indexOf(newline, start);
9662
+ const nextCarriage = buffer.indexOf(carriage, start);
9663
+ if (nextNewline === -1 && nextCarriage === -1) {
9664
+ return null;
9637
9665
  }
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
- }
9666
+ let i;
9667
+ if (nextNewline !== -1 && nextCarriage !== -1) {
9668
+ i = Math.min(nextNewline, nextCarriage);
9669
+ }
9670
+ else {
9671
+ i = nextNewline !== -1 ? nextNewline : nextCarriage;
9672
+ }
9673
+ if (buffer[i] === newline) {
9674
+ return { preceding: i, index: i + 1, carriage: false };
9663
9675
  }
9664
- return -1;
9676
+ return { preceding: i, index: i + 1, carriage: true };
9665
9677
  }
9666
9678
 
9667
9679
  /**
@@ -9972,7 +9984,7 @@ function _iterSSEMessages(response, controller) {
9972
9984
  const lineDecoder = new LineDecoder();
9973
9985
  const iter = ReadableStreamToAsyncIterable(response.body);
9974
9986
  try {
9975
- for (var _d = true, _e = __asyncValues(iterSSEChunks(iter)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
9987
+ for (var _d = true, _e = __asyncValues(iterBinaryChunks(iter)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
9976
9988
  _c = _f.value;
9977
9989
  _d = false;
9978
9990
  const sseChunk = _c;
@@ -9998,13 +10010,12 @@ function _iterSSEMessages(response, controller) {
9998
10010
  });
9999
10011
  }
10000
10012
  /**
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.
10013
+ * Given an async iterable iterator, normalizes each chunk to a
10014
+ * Uint8Array and yields it.
10003
10015
  */
10004
- function iterSSEChunks(iterator) {
10005
- return __asyncGenerator(this, arguments, function* iterSSEChunks_1() {
10016
+ function iterBinaryChunks(iterator) {
10017
+ return __asyncGenerator(this, arguments, function* iterBinaryChunks_1() {
10006
10018
  var _a, e_5, _b, _c;
10007
- let data = new Uint8Array();
10008
10019
  try {
10009
10020
  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
10021
  _c = iterator_3_1.value;
@@ -10016,15 +10027,7 @@ function iterSSEChunks(iterator) {
10016
10027
  const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk)
10017
10028
  : typeof chunk === 'string' ? encodeUTF8(chunk)
10018
10029
  : 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
- }
10030
+ yield yield __await(binaryChunk);
10028
10031
  }
10029
10032
  }
10030
10033
  catch (e_5_1) { e_5 = { error: e_5_1 }; }
@@ -10034,9 +10037,6 @@ function iterSSEChunks(iterator) {
10034
10037
  }
10035
10038
  finally { if (e_5) throw e_5.error; }
10036
10039
  }
10037
- if (data.length > 0) {
10038
- yield yield __await(data);
10039
- }
10040
10040
  });
10041
10041
  }
10042
10042
  class SSEDecoder {
@@ -10688,7 +10688,7 @@ class BaseGeminiNextGenAPIClient {
10688
10688
  const authHeaders = await this.authHeaders(options);
10689
10689
  let headers = buildHeaders([
10690
10690
  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()),
10691
+ { Accept: 'application/json', 'User-Agent': this.getUserAgent() },
10692
10692
  this._options.defaultHeaders,
10693
10693
  bodyHeaders,
10694
10694
  options.headers,
@@ -10775,6 +10775,33 @@ GeminiNextGenAPIClient.Interactions = Interactions;
10775
10775
  * Copyright 2025 Google LLC
10776
10776
  * SPDX-License-Identifier: Apache-2.0
10777
10777
  */
10778
+ function authConfigToMldev$2(fromObject) {
10779
+ const toObject = {};
10780
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
10781
+ if (fromApiKey != null) {
10782
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
10783
+ }
10784
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
10785
+ throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
10786
+ }
10787
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
10788
+ throw new Error('authType parameter is not supported in Gemini API.');
10789
+ }
10790
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
10791
+ undefined) {
10792
+ throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
10793
+ }
10794
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
10795
+ throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
10796
+ }
10797
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
10798
+ throw new Error('oauthConfig parameter is not supported in Gemini API.');
10799
+ }
10800
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
10801
+ throw new Error('oidcConfig parameter is not supported in Gemini API.');
10802
+ }
10803
+ return toObject;
10804
+ }
10778
10805
  function blobToMldev$2(fromObject) {
10779
10806
  const toObject = {};
10780
10807
  const fromData = getValueByPath(fromObject, ['data']);
@@ -11010,8 +11037,9 @@ function generationConfigToVertex$1(fromObject) {
11010
11037
  }
11011
11038
  function googleMapsToMldev$2(fromObject) {
11012
11039
  const toObject = {};
11013
- if (getValueByPath(fromObject, ['authConfig']) !== undefined) {
11014
- throw new Error('authConfig parameter is not supported in Gemini API.');
11040
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
11041
+ if (fromAuthConfig != null) {
11042
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev$2(fromAuthConfig));
11015
11043
  }
11016
11044
  const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
11017
11045
  if (fromEnableWidget != null) {
@@ -11025,12 +11053,12 @@ function googleSearchToMldev$2(fromObject) {
11025
11053
  if (fromSearchTypes != null) {
11026
11054
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
11027
11055
  }
11028
- if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
11029
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
11030
- }
11031
11056
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
11032
11057
  throw new Error('blockingConfidence parameter is not supported in Gemini API.');
11033
11058
  }
11059
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
11060
+ throw new Error('excludeDomains parameter is not supported in Gemini API.');
11061
+ }
11034
11062
  const fromTimeRangeFilter = getValueByPath(fromObject, [
11035
11063
  'timeRangeFilter',
11036
11064
  ]);
@@ -11544,6 +11572,10 @@ function toolToMldev$2(fromObject) {
11544
11572
  if (fromGoogleSearch != null) {
11545
11573
  setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2(fromGoogleSearch));
11546
11574
  }
11575
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
11576
+ if (fromGoogleMaps != null) {
11577
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
11578
+ }
11547
11579
  const fromCodeExecution = getValueByPath(fromObject, [
11548
11580
  'codeExecution',
11549
11581
  ]);
@@ -11565,16 +11597,15 @@ function toolToMldev$2(fromObject) {
11565
11597
  }
11566
11598
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
11567
11599
  }
11568
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
11569
- if (fromGoogleMaps != null) {
11570
- setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
11571
- }
11572
11600
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
11573
11601
  'googleSearchRetrieval',
11574
11602
  ]);
11575
11603
  if (fromGoogleSearchRetrieval != null) {
11576
11604
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
11577
11605
  }
11606
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
11607
+ throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
11608
+ }
11578
11609
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
11579
11610
  if (fromUrlContext != null) {
11580
11611
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -11608,6 +11639,10 @@ function toolToVertex$1(fromObject) {
11608
11639
  if (fromGoogleSearch != null) {
11609
11640
  setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
11610
11641
  }
11642
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
11643
+ if (fromGoogleMaps != null) {
11644
+ setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
11645
+ }
11611
11646
  const fromCodeExecution = getValueByPath(fromObject, [
11612
11647
  'codeExecution',
11613
11648
  ]);
@@ -11632,16 +11667,18 @@ function toolToVertex$1(fromObject) {
11632
11667
  }
11633
11668
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
11634
11669
  }
11635
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
11636
- if (fromGoogleMaps != null) {
11637
- setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
11638
- }
11639
11670
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
11640
11671
  'googleSearchRetrieval',
11641
11672
  ]);
11642
11673
  if (fromGoogleSearchRetrieval != null) {
11643
11674
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
11644
11675
  }
11676
+ const fromParallelAiSearch = getValueByPath(fromObject, [
11677
+ 'parallelAiSearch',
11678
+ ]);
11679
+ if (fromParallelAiSearch != null) {
11680
+ setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
11681
+ }
11645
11682
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
11646
11683
  if (fromUrlContext != null) {
11647
11684
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -11757,6 +11794,33 @@ function voiceActivityFromVertex(fromObject) {
11757
11794
  * Copyright 2025 Google LLC
11758
11795
  * SPDX-License-Identifier: Apache-2.0
11759
11796
  */
11797
+ function authConfigToMldev$1(fromObject, _rootObject) {
11798
+ const toObject = {};
11799
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
11800
+ if (fromApiKey != null) {
11801
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
11802
+ }
11803
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
11804
+ throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
11805
+ }
11806
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
11807
+ throw new Error('authType parameter is not supported in Gemini API.');
11808
+ }
11809
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
11810
+ undefined) {
11811
+ throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
11812
+ }
11813
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
11814
+ throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
11815
+ }
11816
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
11817
+ throw new Error('oauthConfig parameter is not supported in Gemini API.');
11818
+ }
11819
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
11820
+ throw new Error('oidcConfig parameter is not supported in Gemini API.');
11821
+ }
11822
+ return toObject;
11823
+ }
11760
11824
  function blobToMldev$1(fromObject, _rootObject) {
11761
11825
  const toObject = {};
11762
11826
  const fromData = getValueByPath(fromObject, ['data']);
@@ -13905,10 +13969,11 @@ function getModelParametersToVertex(apiClient, fromObject, _rootObject) {
13905
13969
  }
13906
13970
  return toObject;
13907
13971
  }
13908
- function googleMapsToMldev$1(fromObject, _rootObject) {
13972
+ function googleMapsToMldev$1(fromObject, rootObject) {
13909
13973
  const toObject = {};
13910
- if (getValueByPath(fromObject, ['authConfig']) !== undefined) {
13911
- throw new Error('authConfig parameter is not supported in Gemini API.');
13974
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
13975
+ if (fromAuthConfig != null) {
13976
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev$1(fromAuthConfig));
13912
13977
  }
13913
13978
  const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
13914
13979
  if (fromEnableWidget != null) {
@@ -13922,12 +13987,12 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
13922
13987
  if (fromSearchTypes != null) {
13923
13988
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
13924
13989
  }
13925
- if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
13926
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
13927
- }
13928
13990
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
13929
13991
  throw new Error('blockingConfidence parameter is not supported in Gemini API.');
13930
13992
  }
13993
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
13994
+ throw new Error('excludeDomains parameter is not supported in Gemini API.');
13995
+ }
13931
13996
  const fromTimeRangeFilter = getValueByPath(fromObject, [
13932
13997
  'timeRangeFilter',
13933
13998
  ]);
@@ -13959,6 +14024,9 @@ function imageConfigToMldev(fromObject, _rootObject) {
13959
14024
  undefined) {
13960
14025
  throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
13961
14026
  }
14027
+ if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
14028
+ throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
14029
+ }
13962
14030
  return toObject;
13963
14031
  }
13964
14032
  function imageConfigToVertex(fromObject, _rootObject) {
@@ -13995,6 +14063,12 @@ function imageConfigToVertex(fromObject, _rootObject) {
13995
14063
  if (fromOutputCompressionQuality != null) {
13996
14064
  setValueByPath(toObject, ['imageOutputOptions', 'compressionQuality'], fromOutputCompressionQuality);
13997
14065
  }
14066
+ const fromImageOutputOptions = getValueByPath(fromObject, [
14067
+ 'imageOutputOptions',
14068
+ ]);
14069
+ if (fromImageOutputOptions != null) {
14070
+ setValueByPath(toObject, ['imageOutputOptions'], fromImageOutputOptions);
14071
+ }
13998
14072
  return toObject;
13999
14073
  }
14000
14074
  function imageFromMldev(fromObject, _rootObject) {
@@ -14714,6 +14788,10 @@ function toolToMldev$1(fromObject, rootObject) {
14714
14788
  if (fromGoogleSearch != null) {
14715
14789
  setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1(fromGoogleSearch));
14716
14790
  }
14791
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
14792
+ if (fromGoogleMaps != null) {
14793
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
14794
+ }
14717
14795
  const fromCodeExecution = getValueByPath(fromObject, [
14718
14796
  'codeExecution',
14719
14797
  ]);
@@ -14735,16 +14813,15 @@ function toolToMldev$1(fromObject, rootObject) {
14735
14813
  }
14736
14814
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
14737
14815
  }
14738
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
14739
- if (fromGoogleMaps != null) {
14740
- setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
14741
- }
14742
14816
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
14743
14817
  'googleSearchRetrieval',
14744
14818
  ]);
14745
14819
  if (fromGoogleSearchRetrieval != null) {
14746
14820
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
14747
14821
  }
14822
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
14823
+ throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
14824
+ }
14748
14825
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
14749
14826
  if (fromUrlContext != null) {
14750
14827
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -14778,6 +14855,10 @@ function toolToVertex(fromObject, rootObject) {
14778
14855
  if (fromGoogleSearch != null) {
14779
14856
  setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
14780
14857
  }
14858
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
14859
+ if (fromGoogleMaps != null) {
14860
+ setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
14861
+ }
14781
14862
  const fromCodeExecution = getValueByPath(fromObject, [
14782
14863
  'codeExecution',
14783
14864
  ]);
@@ -14802,16 +14883,18 @@ function toolToVertex(fromObject, rootObject) {
14802
14883
  }
14803
14884
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
14804
14885
  }
14805
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
14806
- if (fromGoogleMaps != null) {
14807
- setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
14808
- }
14809
14886
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
14810
14887
  'googleSearchRetrieval',
14811
14888
  ]);
14812
14889
  if (fromGoogleSearchRetrieval != null) {
14813
14890
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
14814
14891
  }
14892
+ const fromParallelAiSearch = getValueByPath(fromObject, [
14893
+ 'parallelAiSearch',
14894
+ ]);
14895
+ if (fromParallelAiSearch != null) {
14896
+ setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
14897
+ }
14815
14898
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
14816
14899
  if (fromUrlContext != null) {
14817
14900
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -17797,6 +17880,33 @@ class Operations extends BaseModule {
17797
17880
  * Copyright 2025 Google LLC
17798
17881
  * SPDX-License-Identifier: Apache-2.0
17799
17882
  */
17883
+ function authConfigToMldev(fromObject) {
17884
+ const toObject = {};
17885
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
17886
+ if (fromApiKey != null) {
17887
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
17888
+ }
17889
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
17890
+ throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
17891
+ }
17892
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
17893
+ throw new Error('authType parameter is not supported in Gemini API.');
17894
+ }
17895
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
17896
+ undefined) {
17897
+ throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
17898
+ }
17899
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
17900
+ throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
17901
+ }
17902
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
17903
+ throw new Error('oauthConfig parameter is not supported in Gemini API.');
17904
+ }
17905
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
17906
+ throw new Error('oidcConfig parameter is not supported in Gemini API.');
17907
+ }
17908
+ return toObject;
17909
+ }
17800
17910
  function blobToMldev(fromObject) {
17801
17911
  const toObject = {};
17802
17912
  const fromData = getValueByPath(fromObject, ['data']);
@@ -17907,8 +18017,9 @@ function functionCallToMldev(fromObject) {
17907
18017
  }
17908
18018
  function googleMapsToMldev(fromObject) {
17909
18019
  const toObject = {};
17910
- if (getValueByPath(fromObject, ['authConfig']) !== undefined) {
17911
- throw new Error('authConfig parameter is not supported in Gemini API.');
18020
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
18021
+ if (fromAuthConfig != null) {
18022
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev(fromAuthConfig));
17912
18023
  }
17913
18024
  const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
17914
18025
  if (fromEnableWidget != null) {
@@ -17922,12 +18033,12 @@ function googleSearchToMldev(fromObject) {
17922
18033
  if (fromSearchTypes != null) {
17923
18034
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
17924
18035
  }
17925
- if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
17926
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
17927
- }
17928
18036
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
17929
18037
  throw new Error('blockingConfidence parameter is not supported in Gemini API.');
17930
18038
  }
18039
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
18040
+ throw new Error('excludeDomains parameter is not supported in Gemini API.');
18041
+ }
17931
18042
  const fromTimeRangeFilter = getValueByPath(fromObject, [
17932
18043
  'timeRangeFilter',
17933
18044
  ]);
@@ -18149,6 +18260,10 @@ function toolToMldev(fromObject) {
18149
18260
  if (fromGoogleSearch != null) {
18150
18261
  setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(fromGoogleSearch));
18151
18262
  }
18263
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
18264
+ if (fromGoogleMaps != null) {
18265
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
18266
+ }
18152
18267
  const fromCodeExecution = getValueByPath(fromObject, [
18153
18268
  'codeExecution',
18154
18269
  ]);
@@ -18170,16 +18285,15 @@ function toolToMldev(fromObject) {
18170
18285
  }
18171
18286
  setValueByPath(toObject, ['functionDeclarations'], transformedList);
18172
18287
  }
18173
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
18174
- if (fromGoogleMaps != null) {
18175
- setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
18176
- }
18177
18288
  const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
18178
18289
  'googleSearchRetrieval',
18179
18290
  ]);
18180
18291
  if (fromGoogleSearchRetrieval != null) {
18181
18292
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
18182
18293
  }
18294
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
18295
+ throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
18296
+ }
18183
18297
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
18184
18298
  if (fromUrlContext != null) {
18185
18299
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
@@ -19229,10 +19343,28 @@ function tuningJobFromVertex(fromObject, _rootObject) {
19229
19343
  if (fromCustomBaseModel != null) {
19230
19344
  setValueByPath(toObject, ['customBaseModel'], fromCustomBaseModel);
19231
19345
  }
19346
+ const fromEvaluateDatasetRuns = getValueByPath(fromObject, [
19347
+ 'evaluateDatasetRuns',
19348
+ ]);
19349
+ if (fromEvaluateDatasetRuns != null) {
19350
+ let transformedList = fromEvaluateDatasetRuns;
19351
+ if (Array.isArray(transformedList)) {
19352
+ transformedList = transformedList.map((item) => {
19353
+ return item;
19354
+ });
19355
+ }
19356
+ setValueByPath(toObject, ['evaluateDatasetRuns'], transformedList);
19357
+ }
19232
19358
  const fromExperiment = getValueByPath(fromObject, ['experiment']);
19233
19359
  if (fromExperiment != null) {
19234
19360
  setValueByPath(toObject, ['experiment'], fromExperiment);
19235
19361
  }
19362
+ const fromFullFineTuningSpec = getValueByPath(fromObject, [
19363
+ 'fullFineTuningSpec',
19364
+ ]);
19365
+ if (fromFullFineTuningSpec != null) {
19366
+ setValueByPath(toObject, ['fullFineTuningSpec'], fromFullFineTuningSpec);
19367
+ }
19236
19368
  const fromLabels = getValueByPath(fromObject, ['labels']);
19237
19369
  if (fromLabels != null) {
19238
19370
  setValueByPath(toObject, ['labels'], fromLabels);
@@ -19257,6 +19389,12 @@ function tuningJobFromVertex(fromObject, _rootObject) {
19257
19389
  if (fromTunedModelDisplayName != null) {
19258
19390
  setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
19259
19391
  }
19392
+ const fromTuningJobState = getValueByPath(fromObject, [
19393
+ 'tuningJobState',
19394
+ ]);
19395
+ if (fromTuningJobState != null) {
19396
+ setValueByPath(toObject, ['tuningJobState'], fromTuningJobState);
19397
+ }
19260
19398
  const fromVeoTuningSpec = getValueByPath(fromObject, [
19261
19399
  'veoTuningSpec',
19262
19400
  ]);
@@ -19821,6 +19959,7 @@ exports.DeleteFileResponse = DeleteFileResponse;
19821
19959
  exports.DeleteModelResponse = DeleteModelResponse;
19822
19960
  exports.EditImageResponse = EditImageResponse;
19823
19961
  exports.EmbedContentResponse = EmbedContentResponse;
19962
+ exports.EvaluateDatasetResponse = EvaluateDatasetResponse;
19824
19963
  exports.Files = Files;
19825
19964
  exports.FunctionResponse = FunctionResponse;
19826
19965
  exports.FunctionResponseBlob = FunctionResponseBlob;