@google/genai 2.4.0 → 2.6.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.
@@ -586,18 +586,6 @@ function videoFromVertex$1(fromObject) {
586
586
  * Copyright 2025 Google LLC
587
587
  * SPDX-License-Identifier: Apache-2.0
588
588
  */
589
- /** Programming language of the `code`. */
590
- var Language;
591
- (function (Language) {
592
- /**
593
- * Unspecified language. This value should not be used.
594
- */
595
- Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
596
- /**
597
- * Python >= 3.10, with numpy and simpy available.
598
- */
599
- Language["PYTHON"] = "PYTHON";
600
- })(Language || (Language = {}));
601
589
  /** Outcome of the code execution. */
602
590
  var Outcome;
603
591
  (function (Outcome) {
@@ -606,18 +594,30 @@ var Outcome;
606
594
  */
607
595
  Outcome["OUTCOME_UNSPECIFIED"] = "OUTCOME_UNSPECIFIED";
608
596
  /**
609
- * Code execution completed successfully.
597
+ * Code execution completed successfully. `output` contains the stdout, if any.
610
598
  */
611
599
  Outcome["OUTCOME_OK"] = "OUTCOME_OK";
612
600
  /**
613
- * Code execution finished but with a failure. `stderr` should contain the reason.
601
+ * Code execution failed. `output` contains the stderr and stdout, if any.
614
602
  */
615
603
  Outcome["OUTCOME_FAILED"] = "OUTCOME_FAILED";
616
604
  /**
617
- * Code execution ran for too long, and was cancelled. There may or may not be a partial output present.
605
+ * Code execution ran for too long, and was cancelled. There may or may not be a partial `output` present.
618
606
  */
619
607
  Outcome["OUTCOME_DEADLINE_EXCEEDED"] = "OUTCOME_DEADLINE_EXCEEDED";
620
608
  })(Outcome || (Outcome = {}));
609
+ /** Programming language of the `code`. */
610
+ var Language;
611
+ (function (Language) {
612
+ /**
613
+ * Unspecified language. This value should not be used.
614
+ */
615
+ Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
616
+ /**
617
+ * Python >= 3.10, with numpy and simpy available.
618
+ */
619
+ Language["PYTHON"] = "PYTHON";
620
+ })(Language || (Language = {}));
621
621
  /** Specifies how the response should be scheduled in the conversation. */
622
622
  var FunctionResponseScheduling;
623
623
  (function (FunctionResponseScheduling) {
@@ -685,6 +685,14 @@ var Environment;
685
685
  * Operates in a web browser.
686
686
  */
687
687
  Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
688
+ /**
689
+ * Operates in a mobile environment.
690
+ */
691
+ Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
692
+ /**
693
+ * Operates in a desktop environment.
694
+ */
695
+ Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
688
696
  })(Environment || (Environment = {}));
689
697
  /** Type of auth scheme. This enum is not supported in Gemini API. */
690
698
  var AuthType;
@@ -1470,7 +1478,23 @@ var PairwiseChoice;
1470
1478
  */
1471
1479
  PairwiseChoice["TIE"] = "TIE";
1472
1480
  })(PairwiseChoice || (PairwiseChoice = {}));
1473
- /** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
1481
+ /** The speed of the tuning job. Only supported for Veo 3.0 models. This enum is not supported in Gemini API. */
1482
+ var TuningSpeed;
1483
+ (function (TuningSpeed) {
1484
+ /**
1485
+ * The default / unset value. For Veo 3.0 models, this defaults to FAST.
1486
+ */
1487
+ TuningSpeed["TUNING_SPEED_UNSPECIFIED"] = "TUNING_SPEED_UNSPECIFIED";
1488
+ /**
1489
+ * Regular tuning speed.
1490
+ */
1491
+ TuningSpeed["REGULAR"] = "REGULAR";
1492
+ /**
1493
+ * Fast tuning speed.
1494
+ */
1495
+ TuningSpeed["FAST"] = "FAST";
1496
+ })(TuningSpeed || (TuningSpeed = {}));
1497
+ /** The tuning task for Veo. This enum is not supported in Gemini API. */
1474
1498
  var TuningTask;
1475
1499
  (function (TuningTask) {
1476
1500
  /**
@@ -1490,6 +1514,22 @@ var TuningTask;
1490
1514
  */
1491
1515
  TuningTask["TUNING_TASK_R2V"] = "TUNING_TASK_R2V";
1492
1516
  })(TuningTask || (TuningTask = {}));
1517
+ /** The orientation of the video. Defaults to LANDSCAPE. This enum is not supported in Gemini API. */
1518
+ var VideoOrientation;
1519
+ (function (VideoOrientation) {
1520
+ /**
1521
+ * Unspecified video orientation. Defaults to landscape.
1522
+ */
1523
+ VideoOrientation["VIDEO_ORIENTATION_UNSPECIFIED"] = "VIDEO_ORIENTATION_UNSPECIFIED";
1524
+ /**
1525
+ * Landscape orientation (e.g. 16:9, 1280x720).
1526
+ */
1527
+ VideoOrientation["LANDSCAPE"] = "LANDSCAPE";
1528
+ /**
1529
+ * Portrait orientation (e.g. 9:16, 720x1280).
1530
+ */
1531
+ VideoOrientation["PORTRAIT"] = "PORTRAIT";
1532
+ })(VideoOrientation || (VideoOrientation = {}));
1493
1533
  /** Output only. Current state of the `Document`. This enum is not supported in Vertex AI. */
1494
1534
  var DocumentState;
1495
1535
  (function (DocumentState) {
@@ -5830,6 +5870,39 @@ function blobToMldev$3(fromObject) {
5830
5870
  }
5831
5871
  return toObject;
5832
5872
  }
5873
+ function codeExecutionResultToVertex$2(fromObject) {
5874
+ const toObject = {};
5875
+ const fromOutcome = getValueByPath(fromObject, ['outcome']);
5876
+ if (fromOutcome != null) {
5877
+ setValueByPath(toObject, ['outcome'], fromOutcome);
5878
+ }
5879
+ const fromOutput = getValueByPath(fromObject, ['output']);
5880
+ if (fromOutput != null) {
5881
+ setValueByPath(toObject, ['output'], fromOutput);
5882
+ }
5883
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
5884
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
5885
+ }
5886
+ return toObject;
5887
+ }
5888
+ function computerUseToVertex$2(fromObject) {
5889
+ const toObject = {};
5890
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
5891
+ if (fromEnvironment != null) {
5892
+ setValueByPath(toObject, ['environment'], fromEnvironment);
5893
+ }
5894
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
5895
+ 'excludedPredefinedFunctions',
5896
+ ]);
5897
+ if (fromExcludedPredefinedFunctions != null) {
5898
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
5899
+ }
5900
+ if (getValueByPath(fromObject, ['enablePromptInjectionDetection']) !==
5901
+ undefined) {
5902
+ throw new Error('enablePromptInjectionDetection parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
5903
+ }
5904
+ return toObject;
5905
+ }
5833
5906
  function contentToMldev$3(fromObject) {
5834
5907
  const toObject = {};
5835
5908
  const fromParts = getValueByPath(fromObject, ['parts']);
@@ -6025,6 +6098,21 @@ function deleteCachedContentResponseFromVertex(fromObject) {
6025
6098
  }
6026
6099
  return toObject;
6027
6100
  }
6101
+ function executableCodeToVertex$2(fromObject) {
6102
+ const toObject = {};
6103
+ const fromCode = getValueByPath(fromObject, ['code']);
6104
+ if (fromCode != null) {
6105
+ setValueByPath(toObject, ['code'], fromCode);
6106
+ }
6107
+ const fromLanguage = getValueByPath(fromObject, ['language']);
6108
+ if (fromLanguage != null) {
6109
+ setValueByPath(toObject, ['language'], fromLanguage);
6110
+ }
6111
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
6112
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6113
+ }
6114
+ return toObject;
6115
+ }
6028
6116
  function fileDataToMldev$3(fromObject) {
6029
6117
  const toObject = {};
6030
6118
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -6308,13 +6396,13 @@ function partToVertex$2(fromObject) {
6308
6396
  'codeExecutionResult',
6309
6397
  ]);
6310
6398
  if (fromCodeExecutionResult != null) {
6311
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
6399
+ setValueByPath(toObject, ['codeExecutionResult'], codeExecutionResultToVertex$2(fromCodeExecutionResult));
6312
6400
  }
6313
6401
  const fromExecutableCode = getValueByPath(fromObject, [
6314
6402
  'executableCode',
6315
6403
  ]);
6316
6404
  if (fromExecutableCode != null) {
6317
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
6405
+ setValueByPath(toObject, ['executableCode'], executableCodeToVertex$2(fromExecutableCode));
6318
6406
  }
6319
6407
  const fromFileData = getValueByPath(fromObject, ['fileData']);
6320
6408
  if (fromFileData != null) {
@@ -6480,7 +6568,7 @@ function toolToVertex$2(fromObject) {
6480
6568
  }
6481
6569
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
6482
6570
  if (fromComputerUse != null) {
6483
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
6571
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex$2(fromComputerUse));
6484
6572
  }
6485
6573
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
6486
6574
  throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
@@ -7872,6 +7960,39 @@ function blobToMldev$2(fromObject) {
7872
7960
  }
7873
7961
  return toObject;
7874
7962
  }
7963
+ function codeExecutionResultToVertex$1(fromObject) {
7964
+ const toObject = {};
7965
+ const fromOutcome = getValueByPath(fromObject, ['outcome']);
7966
+ if (fromOutcome != null) {
7967
+ setValueByPath(toObject, ['outcome'], fromOutcome);
7968
+ }
7969
+ const fromOutput = getValueByPath(fromObject, ['output']);
7970
+ if (fromOutput != null) {
7971
+ setValueByPath(toObject, ['output'], fromOutput);
7972
+ }
7973
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
7974
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
7975
+ }
7976
+ return toObject;
7977
+ }
7978
+ function computerUseToVertex$1(fromObject) {
7979
+ const toObject = {};
7980
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
7981
+ if (fromEnvironment != null) {
7982
+ setValueByPath(toObject, ['environment'], fromEnvironment);
7983
+ }
7984
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
7985
+ 'excludedPredefinedFunctions',
7986
+ ]);
7987
+ if (fromExcludedPredefinedFunctions != null) {
7988
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
7989
+ }
7990
+ if (getValueByPath(fromObject, ['enablePromptInjectionDetection']) !==
7991
+ undefined) {
7992
+ throw new Error('enablePromptInjectionDetection parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
7993
+ }
7994
+ return toObject;
7995
+ }
7875
7996
  function contentToMldev$2(fromObject) {
7876
7997
  const toObject = {};
7877
7998
  const fromParts = getValueByPath(fromObject, ['parts']);
@@ -7908,6 +8029,21 @@ function contentToVertex$1(fromObject) {
7908
8029
  }
7909
8030
  return toObject;
7910
8031
  }
8032
+ function executableCodeToVertex$1(fromObject) {
8033
+ const toObject = {};
8034
+ const fromCode = getValueByPath(fromObject, ['code']);
8035
+ if (fromCode != null) {
8036
+ setValueByPath(toObject, ['code'], fromCode);
8037
+ }
8038
+ const fromLanguage = getValueByPath(fromObject, ['language']);
8039
+ if (fromLanguage != null) {
8040
+ setValueByPath(toObject, ['language'], fromLanguage);
8041
+ }
8042
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
8043
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8044
+ }
8045
+ return toObject;
8046
+ }
7911
8047
  function fileDataToMldev$2(fromObject) {
7912
8048
  const toObject = {};
7913
8049
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -8647,13 +8783,13 @@ function partToVertex$1(fromObject) {
8647
8783
  'codeExecutionResult',
8648
8784
  ]);
8649
8785
  if (fromCodeExecutionResult != null) {
8650
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
8786
+ setValueByPath(toObject, ['codeExecutionResult'], codeExecutionResultToVertex$1(fromCodeExecutionResult));
8651
8787
  }
8652
8788
  const fromExecutableCode = getValueByPath(fromObject, [
8653
8789
  'executableCode',
8654
8790
  ]);
8655
8791
  if (fromExecutableCode != null) {
8656
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
8792
+ setValueByPath(toObject, ['executableCode'], executableCodeToVertex$1(fromExecutableCode));
8657
8793
  }
8658
8794
  const fromFileData = getValueByPath(fromObject, ['fileData']);
8659
8795
  if (fromFileData != null) {
@@ -8805,7 +8941,7 @@ function toolToVertex$1(fromObject) {
8805
8941
  }
8806
8942
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
8807
8943
  if (fromComputerUse != null) {
8808
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
8944
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex$1(fromComputerUse));
8809
8945
  }
8810
8946
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
8811
8947
  throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
@@ -9085,6 +9221,21 @@ function citationMetadataFromMldev(fromObject, _rootObject) {
9085
9221
  }
9086
9222
  return toObject;
9087
9223
  }
9224
+ function codeExecutionResultToVertex(fromObject, _rootObject) {
9225
+ const toObject = {};
9226
+ const fromOutcome = getValueByPath(fromObject, ['outcome']);
9227
+ if (fromOutcome != null) {
9228
+ setValueByPath(toObject, ['outcome'], fromOutcome);
9229
+ }
9230
+ const fromOutput = getValueByPath(fromObject, ['output']);
9231
+ if (fromOutput != null) {
9232
+ setValueByPath(toObject, ['output'], fromOutput);
9233
+ }
9234
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
9235
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
9236
+ }
9237
+ return toObject;
9238
+ }
9088
9239
  function computeTokensParametersToVertex(apiClient, fromObject, rootObject) {
9089
9240
  const toObject = {};
9090
9241
  const fromModel = getValueByPath(fromObject, ['model']);
@@ -9123,6 +9274,24 @@ function computeTokensResponseFromVertex(fromObject, _rootObject) {
9123
9274
  }
9124
9275
  return toObject;
9125
9276
  }
9277
+ function computerUseToVertex(fromObject, _rootObject) {
9278
+ const toObject = {};
9279
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
9280
+ if (fromEnvironment != null) {
9281
+ setValueByPath(toObject, ['environment'], fromEnvironment);
9282
+ }
9283
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
9284
+ 'excludedPredefinedFunctions',
9285
+ ]);
9286
+ if (fromExcludedPredefinedFunctions != null) {
9287
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
9288
+ }
9289
+ if (getValueByPath(fromObject, ['enablePromptInjectionDetection']) !==
9290
+ undefined) {
9291
+ throw new Error('enablePromptInjectionDetection parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
9292
+ }
9293
+ return toObject;
9294
+ }
9126
9295
  function contentEmbeddingFromVertex(fromObject, rootObject) {
9127
9296
  const toObject = {};
9128
9297
  const fromValues = getValueByPath(fromObject, ['values']);
@@ -9797,6 +9966,21 @@ function endpointFromVertex(fromObject, _rootObject) {
9797
9966
  }
9798
9967
  return toObject;
9799
9968
  }
9969
+ function executableCodeToVertex(fromObject, _rootObject) {
9970
+ const toObject = {};
9971
+ const fromCode = getValueByPath(fromObject, ['code']);
9972
+ if (fromCode != null) {
9973
+ setValueByPath(toObject, ['code'], fromCode);
9974
+ }
9975
+ const fromLanguage = getValueByPath(fromObject, ['language']);
9976
+ if (fromLanguage != null) {
9977
+ setValueByPath(toObject, ['language'], fromLanguage);
9978
+ }
9979
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
9980
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
9981
+ }
9982
+ return toObject;
9983
+ }
9800
9984
  function fileDataToMldev$1(fromObject, _rootObject) {
9801
9985
  const toObject = {};
9802
9986
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -11675,7 +11859,7 @@ function partToMldev$1(fromObject, rootObject) {
11675
11859
  }
11676
11860
  return toObject;
11677
11861
  }
11678
- function partToVertex(fromObject, _rootObject) {
11862
+ function partToVertex(fromObject, rootObject) {
11679
11863
  const toObject = {};
11680
11864
  const fromMediaResolution = getValueByPath(fromObject, [
11681
11865
  'mediaResolution',
@@ -11687,13 +11871,13 @@ function partToVertex(fromObject, _rootObject) {
11687
11871
  'codeExecutionResult',
11688
11872
  ]);
11689
11873
  if (fromCodeExecutionResult != null) {
11690
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
11874
+ setValueByPath(toObject, ['codeExecutionResult'], codeExecutionResultToVertex(fromCodeExecutionResult));
11691
11875
  }
11692
11876
  const fromExecutableCode = getValueByPath(fromObject, [
11693
11877
  'executableCode',
11694
11878
  ]);
11695
11879
  if (fromExecutableCode != null) {
11696
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
11880
+ setValueByPath(toObject, ['executableCode'], executableCodeToVertex(fromExecutableCode));
11697
11881
  }
11698
11882
  const fromFileData = getValueByPath(fromObject, ['fileData']);
11699
11883
  if (fromFileData != null) {
@@ -12168,7 +12352,7 @@ function toolToMldev$1(fromObject, rootObject) {
12168
12352
  }
12169
12353
  return toObject;
12170
12354
  }
12171
- function toolToVertex(fromObject, _rootObject) {
12355
+ function toolToVertex(fromObject, rootObject) {
12172
12356
  const toObject = {};
12173
12357
  const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
12174
12358
  if (fromRetrieval != null) {
@@ -12176,7 +12360,7 @@ function toolToVertex(fromObject, _rootObject) {
12176
12360
  }
12177
12361
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
12178
12362
  if (fromComputerUse != null) {
12179
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
12363
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex(fromComputerUse));
12180
12364
  }
12181
12365
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
12182
12366
  throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
@@ -12793,7 +12977,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
12793
12977
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
12794
12978
  const USER_AGENT_HEADER = 'User-Agent';
12795
12979
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
12796
- const SDK_VERSION = '2.4.0'; // x-release-please-version
12980
+ const SDK_VERSION = '2.6.0'; // x-release-please-version
12797
12981
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
12798
12982
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
12799
12983
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -20018,6 +20202,250 @@ function createTuningJobParametersPrivateToVertex(fromObject, rootObject) {
20018
20202
  }
20019
20203
  return toObject;
20020
20204
  }
20205
+ function distillationHyperParametersFromVertex(fromObject, rootObject) {
20206
+ const toObject = {};
20207
+ const fromAdapterSize = getValueByPath(fromObject, ['adapterSize']);
20208
+ if (fromAdapterSize != null) {
20209
+ setValueByPath(toObject, ['adapterSize'], fromAdapterSize);
20210
+ }
20211
+ const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
20212
+ if (fromEpochCount != null) {
20213
+ setValueByPath(toObject, ['epochCount'], fromEpochCount);
20214
+ }
20215
+ const fromLearningRateMultiplier = getValueByPath(fromObject, [
20216
+ 'learningRateMultiplier',
20217
+ ]);
20218
+ if (fromLearningRateMultiplier != null) {
20219
+ setValueByPath(toObject, ['learningRateMultiplier'], fromLearningRateMultiplier);
20220
+ }
20221
+ const fromGenerationConfig = getValueByPath(fromObject, [
20222
+ 'generationConfig',
20223
+ ]);
20224
+ if (fromGenerationConfig != null) {
20225
+ setValueByPath(toObject, ['generationConfig'], generationConfigFromVertex(fromGenerationConfig));
20226
+ }
20227
+ const fromLearningRate = getValueByPath(fromObject, ['learningRate']);
20228
+ if (fromLearningRate != null) {
20229
+ setValueByPath(toObject, ['learningRate'], fromLearningRate);
20230
+ }
20231
+ const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
20232
+ if (fromBatchSize != null) {
20233
+ setValueByPath(toObject, ['batchSize'], fromBatchSize);
20234
+ }
20235
+ return toObject;
20236
+ }
20237
+ function distillationSamplingSpecFromVertex(fromObject, rootObject) {
20238
+ const toObject = {};
20239
+ const fromBaseTeacherModel = getValueByPath(fromObject, [
20240
+ 'baseTeacherModel',
20241
+ ]);
20242
+ if (fromBaseTeacherModel != null) {
20243
+ setValueByPath(toObject, ['baseTeacherModel'], fromBaseTeacherModel);
20244
+ }
20245
+ const fromTunedTeacherModelSource = getValueByPath(fromObject, [
20246
+ 'tunedTeacherModelSource',
20247
+ ]);
20248
+ if (fromTunedTeacherModelSource != null) {
20249
+ setValueByPath(toObject, ['tunedTeacherModelSource'], fromTunedTeacherModelSource);
20250
+ }
20251
+ const fromValidationDatasetUri = getValueByPath(fromObject, [
20252
+ 'validationDatasetUri',
20253
+ ]);
20254
+ if (fromValidationDatasetUri != null) {
20255
+ setValueByPath(toObject, ['validationDatasetUri'], fromValidationDatasetUri);
20256
+ }
20257
+ const fromPromptDatasetUri = getValueByPath(fromObject, [
20258
+ 'promptDatasetUri',
20259
+ ]);
20260
+ if (fromPromptDatasetUri != null) {
20261
+ setValueByPath(toObject, ['promptDatasetUri'], fromPromptDatasetUri);
20262
+ }
20263
+ const fromHyperparameters = getValueByPath(fromObject, [
20264
+ 'hyperparameters',
20265
+ ]);
20266
+ if (fromHyperparameters != null) {
20267
+ setValueByPath(toObject, ['hyperparameters'], distillationHyperParametersFromVertex(fromHyperparameters));
20268
+ }
20269
+ return toObject;
20270
+ }
20271
+ function distillationSpecFromVertex(fromObject, rootObject) {
20272
+ const toObject = {};
20273
+ const fromPromptDatasetUri = getValueByPath(fromObject, [
20274
+ 'promptDatasetUri',
20275
+ ]);
20276
+ if (fromPromptDatasetUri != null) {
20277
+ setValueByPath(toObject, ['promptDatasetUri'], fromPromptDatasetUri);
20278
+ }
20279
+ const fromBaseTeacherModel = getValueByPath(fromObject, [
20280
+ 'baseTeacherModel',
20281
+ ]);
20282
+ if (fromBaseTeacherModel != null) {
20283
+ setValueByPath(toObject, ['baseTeacherModel'], fromBaseTeacherModel);
20284
+ }
20285
+ const fromHyperParameters = getValueByPath(fromObject, [
20286
+ 'hyperParameters',
20287
+ ]);
20288
+ if (fromHyperParameters != null) {
20289
+ setValueByPath(toObject, ['hyperParameters'], distillationHyperParametersFromVertex(fromHyperParameters));
20290
+ }
20291
+ const fromPipelineRootDirectory = getValueByPath(fromObject, [
20292
+ 'pipelineRootDirectory',
20293
+ ]);
20294
+ if (fromPipelineRootDirectory != null) {
20295
+ setValueByPath(toObject, ['pipelineRootDirectory'], fromPipelineRootDirectory);
20296
+ }
20297
+ const fromStudentModel = getValueByPath(fromObject, ['studentModel']);
20298
+ if (fromStudentModel != null) {
20299
+ setValueByPath(toObject, ['studentModel'], fromStudentModel);
20300
+ }
20301
+ const fromTrainingDatasetUri = getValueByPath(fromObject, [
20302
+ 'trainingDatasetUri',
20303
+ ]);
20304
+ if (fromTrainingDatasetUri != null) {
20305
+ setValueByPath(toObject, ['trainingDatasetUri'], fromTrainingDatasetUri);
20306
+ }
20307
+ const fromTunedTeacherModelSource = getValueByPath(fromObject, [
20308
+ 'tunedTeacherModelSource',
20309
+ ]);
20310
+ if (fromTunedTeacherModelSource != null) {
20311
+ setValueByPath(toObject, ['tunedTeacherModelSource'], fromTunedTeacherModelSource);
20312
+ }
20313
+ const fromValidationDatasetUri = getValueByPath(fromObject, [
20314
+ 'validationDatasetUri',
20315
+ ]);
20316
+ if (fromValidationDatasetUri != null) {
20317
+ setValueByPath(toObject, ['validationDatasetUri'], fromValidationDatasetUri);
20318
+ }
20319
+ const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
20320
+ if (fromTuningMode != null) {
20321
+ setValueByPath(toObject, ['tuningMode'], fromTuningMode);
20322
+ }
20323
+ return toObject;
20324
+ }
20325
+ function generationConfigFromVertex(fromObject, _rootObject) {
20326
+ const toObject = {};
20327
+ const fromModelSelectionConfig = getValueByPath(fromObject, [
20328
+ 'modelConfig',
20329
+ ]);
20330
+ if (fromModelSelectionConfig != null) {
20331
+ setValueByPath(toObject, ['modelSelectionConfig'], fromModelSelectionConfig);
20332
+ }
20333
+ const fromResponseJsonSchema = getValueByPath(fromObject, [
20334
+ 'responseJsonSchema',
20335
+ ]);
20336
+ if (fromResponseJsonSchema != null) {
20337
+ setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
20338
+ }
20339
+ const fromAudioTimestamp = getValueByPath(fromObject, [
20340
+ 'audioTimestamp',
20341
+ ]);
20342
+ if (fromAudioTimestamp != null) {
20343
+ setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);
20344
+ }
20345
+ const fromCandidateCount = getValueByPath(fromObject, [
20346
+ 'candidateCount',
20347
+ ]);
20348
+ if (fromCandidateCount != null) {
20349
+ setValueByPath(toObject, ['candidateCount'], fromCandidateCount);
20350
+ }
20351
+ const fromEnableAffectiveDialog = getValueByPath(fromObject, [
20352
+ 'enableAffectiveDialog',
20353
+ ]);
20354
+ if (fromEnableAffectiveDialog != null) {
20355
+ setValueByPath(toObject, ['enableAffectiveDialog'], fromEnableAffectiveDialog);
20356
+ }
20357
+ const fromFrequencyPenalty = getValueByPath(fromObject, [
20358
+ 'frequencyPenalty',
20359
+ ]);
20360
+ if (fromFrequencyPenalty != null) {
20361
+ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);
20362
+ }
20363
+ const fromLogprobs = getValueByPath(fromObject, ['logprobs']);
20364
+ if (fromLogprobs != null) {
20365
+ setValueByPath(toObject, ['logprobs'], fromLogprobs);
20366
+ }
20367
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
20368
+ 'maxOutputTokens',
20369
+ ]);
20370
+ if (fromMaxOutputTokens != null) {
20371
+ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);
20372
+ }
20373
+ const fromMediaResolution = getValueByPath(fromObject, [
20374
+ 'mediaResolution',
20375
+ ]);
20376
+ if (fromMediaResolution != null) {
20377
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
20378
+ }
20379
+ const fromPresencePenalty = getValueByPath(fromObject, [
20380
+ 'presencePenalty',
20381
+ ]);
20382
+ if (fromPresencePenalty != null) {
20383
+ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);
20384
+ }
20385
+ const fromResponseLogprobs = getValueByPath(fromObject, [
20386
+ 'responseLogprobs',
20387
+ ]);
20388
+ if (fromResponseLogprobs != null) {
20389
+ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);
20390
+ }
20391
+ const fromResponseMimeType = getValueByPath(fromObject, [
20392
+ 'responseMimeType',
20393
+ ]);
20394
+ if (fromResponseMimeType != null) {
20395
+ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);
20396
+ }
20397
+ const fromResponseModalities = getValueByPath(fromObject, [
20398
+ 'responseModalities',
20399
+ ]);
20400
+ if (fromResponseModalities != null) {
20401
+ setValueByPath(toObject, ['responseModalities'], fromResponseModalities);
20402
+ }
20403
+ const fromResponseSchema = getValueByPath(fromObject, [
20404
+ 'responseSchema',
20405
+ ]);
20406
+ if (fromResponseSchema != null) {
20407
+ setValueByPath(toObject, ['responseSchema'], fromResponseSchema);
20408
+ }
20409
+ const fromRoutingConfig = getValueByPath(fromObject, [
20410
+ 'routingConfig',
20411
+ ]);
20412
+ if (fromRoutingConfig != null) {
20413
+ setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);
20414
+ }
20415
+ const fromSeed = getValueByPath(fromObject, ['seed']);
20416
+ if (fromSeed != null) {
20417
+ setValueByPath(toObject, ['seed'], fromSeed);
20418
+ }
20419
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
20420
+ if (fromSpeechConfig != null) {
20421
+ setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
20422
+ }
20423
+ const fromStopSequences = getValueByPath(fromObject, [
20424
+ 'stopSequences',
20425
+ ]);
20426
+ if (fromStopSequences != null) {
20427
+ setValueByPath(toObject, ['stopSequences'], fromStopSequences);
20428
+ }
20429
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
20430
+ if (fromTemperature != null) {
20431
+ setValueByPath(toObject, ['temperature'], fromTemperature);
20432
+ }
20433
+ const fromThinkingConfig = getValueByPath(fromObject, [
20434
+ 'thinkingConfig',
20435
+ ]);
20436
+ if (fromThinkingConfig != null) {
20437
+ setValueByPath(toObject, ['thinkingConfig'], fromThinkingConfig);
20438
+ }
20439
+ const fromTopK = getValueByPath(fromObject, ['topK']);
20440
+ if (fromTopK != null) {
20441
+ setValueByPath(toObject, ['topK'], fromTopK);
20442
+ }
20443
+ const fromTopP = getValueByPath(fromObject, ['topP']);
20444
+ if (fromTopP != null) {
20445
+ setValueByPath(toObject, ['topP'], fromTopP);
20446
+ }
20447
+ return toObject;
20448
+ }
20021
20449
  function getTuningJobParametersToMldev(fromObject, _rootObject) {
20022
20450
  const toObject = {};
20023
20451
  const fromName = getValueByPath(fromObject, ['name']);
@@ -20231,7 +20659,7 @@ function tuningJobFromMldev(fromObject, rootObject) {
20231
20659
  }
20232
20660
  return toObject;
20233
20661
  }
20234
- function tuningJobFromVertex(fromObject, _rootObject) {
20662
+ function tuningJobFromVertex(fromObject, rootObject) {
20235
20663
  const toObject = {};
20236
20664
  const fromSdkHttpResponse = getValueByPath(fromObject, [
20237
20665
  'sdkHttpResponse',
@@ -20301,7 +20729,7 @@ function tuningJobFromVertex(fromObject, _rootObject) {
20301
20729
  'distillationSpec',
20302
20730
  ]);
20303
20731
  if (fromDistillationSpec != null) {
20304
- setValueByPath(toObject, ['distillationSpec'], fromDistillationSpec);
20732
+ setValueByPath(toObject, ['distillationSpec'], distillationSpecFromVertex(fromDistillationSpec));
20305
20733
  }
20306
20734
  const fromTuningDataStats = getValueByPath(fromObject, [
20307
20735
  'tuningDataStats',
@@ -20385,18 +20813,24 @@ function tuningJobFromVertex(fromObject, _rootObject) {
20385
20813
  if (fromVeoTuningSpec != null) {
20386
20814
  setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
20387
20815
  }
20388
- const fromDistillationSamplingSpec = getValueByPath(fromObject, [
20389
- 'distillationSamplingSpec',
20390
- ]);
20391
- if (fromDistillationSamplingSpec != null) {
20392
- setValueByPath(toObject, ['distillationSamplingSpec'], fromDistillationSamplingSpec);
20393
- }
20394
20816
  const fromTuningJobMetadata = getValueByPath(fromObject, [
20395
20817
  'tuningJobMetadata',
20396
20818
  ]);
20397
20819
  if (fromTuningJobMetadata != null) {
20398
20820
  setValueByPath(toObject, ['tuningJobMetadata'], fromTuningJobMetadata);
20399
20821
  }
20822
+ const fromVeoLoraTuningSpec = getValueByPath(fromObject, [
20823
+ 'veoLoraTuningSpec',
20824
+ ]);
20825
+ if (fromVeoLoraTuningSpec != null) {
20826
+ setValueByPath(toObject, ['veoLoraTuningSpec'], fromVeoLoraTuningSpec);
20827
+ }
20828
+ const fromDistillationSamplingSpec = getValueByPath(fromObject, [
20829
+ 'distillationSamplingSpec',
20830
+ ]);
20831
+ if (fromDistillationSamplingSpec != null) {
20832
+ setValueByPath(toObject, ['distillationSamplingSpec'], distillationSamplingSpecFromVertex(fromDistillationSamplingSpec));
20833
+ }
20400
20834
  return toObject;
20401
20835
  }
20402
20836
  function tuningOperationFromMldev(fromObject, _rootObject) {
@@ -21108,5 +21542,5 @@ class GoogleGenAI {
21108
21542
  }
21109
21543
  }
21110
21544
 
21111
- export { ActivityHandling, AdapterSize, AggregationMetric, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EmbeddingApiType, EndSensitivity, Environment, EvaluateDatasetResponse, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImageResizeMode, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, ModelStage, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PairwiseChoice, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, ProminentPeople, RawReferenceImage, RecontextImageResponse, RegisterFilesResponse, ReplayResponse, ResourceScope, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, ServiceTier, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, ToolResponse, ToolType, TrafficType, TuningJobState, TuningMethod, TuningMode, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
21545
+ export { ActivityHandling, AdapterSize, AggregationMetric, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EmbeddingApiType, EndSensitivity, Environment, EvaluateDatasetResponse, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImageResizeMode, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, ModelStage, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PairwiseChoice, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, ProminentPeople, RawReferenceImage, RecontextImageResponse, RegisterFilesResponse, ReplayResponse, ResourceScope, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, ServiceTier, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, ToolResponse, ToolType, TrafficType, TuningJobState, TuningMethod, TuningMode, TuningSpeed, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VideoOrientation, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
21112
21546
  //# sourceMappingURL=index.mjs.map