@google/genai 2.5.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.
@@ -594,18 +594,6 @@ function videoFromVertex$1(fromObject) {
594
594
  * Copyright 2025 Google LLC
595
595
  * SPDX-License-Identifier: Apache-2.0
596
596
  */
597
- /** Programming language of the `code`. */
598
- var Language;
599
- (function (Language) {
600
- /**
601
- * Unspecified language. This value should not be used.
602
- */
603
- Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
604
- /**
605
- * Python >= 3.10, with numpy and simpy available.
606
- */
607
- Language["PYTHON"] = "PYTHON";
608
- })(Language || (Language = {}));
609
597
  /** Outcome of the code execution. */
610
598
  var Outcome;
611
599
  (function (Outcome) {
@@ -614,18 +602,30 @@ var Outcome;
614
602
  */
615
603
  Outcome["OUTCOME_UNSPECIFIED"] = "OUTCOME_UNSPECIFIED";
616
604
  /**
617
- * Code execution completed successfully.
605
+ * Code execution completed successfully. `output` contains the stdout, if any.
618
606
  */
619
607
  Outcome["OUTCOME_OK"] = "OUTCOME_OK";
620
608
  /**
621
- * Code execution finished but with a failure. `stderr` should contain the reason.
609
+ * Code execution failed. `output` contains the stderr and stdout, if any.
622
610
  */
623
611
  Outcome["OUTCOME_FAILED"] = "OUTCOME_FAILED";
624
612
  /**
625
- * Code execution ran for too long, and was cancelled. There may or may not be a partial output present.
613
+ * Code execution ran for too long, and was cancelled. There may or may not be a partial `output` present.
626
614
  */
627
615
  Outcome["OUTCOME_DEADLINE_EXCEEDED"] = "OUTCOME_DEADLINE_EXCEEDED";
628
616
  })(Outcome || (Outcome = {}));
617
+ /** Programming language of the `code`. */
618
+ var Language;
619
+ (function (Language) {
620
+ /**
621
+ * Unspecified language. This value should not be used.
622
+ */
623
+ Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
624
+ /**
625
+ * Python >= 3.10, with numpy and simpy available.
626
+ */
627
+ Language["PYTHON"] = "PYTHON";
628
+ })(Language || (Language = {}));
629
629
  /** Specifies how the response should be scheduled in the conversation. */
630
630
  var FunctionResponseScheduling;
631
631
  (function (FunctionResponseScheduling) {
@@ -693,6 +693,14 @@ var Environment;
693
693
  * Operates in a web browser.
694
694
  */
695
695
  Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
696
+ /**
697
+ * Operates in a mobile environment.
698
+ */
699
+ Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
700
+ /**
701
+ * Operates in a desktop environment.
702
+ */
703
+ Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
696
704
  })(Environment || (Environment = {}));
697
705
  /** Type of auth scheme. This enum is not supported in Gemini API. */
698
706
  var AuthType;
@@ -1478,7 +1486,23 @@ var PairwiseChoice;
1478
1486
  */
1479
1487
  PairwiseChoice["TIE"] = "TIE";
1480
1488
  })(PairwiseChoice || (PairwiseChoice = {}));
1481
- /** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
1489
+ /** The speed of the tuning job. Only supported for Veo 3.0 models. This enum is not supported in Gemini API. */
1490
+ var TuningSpeed;
1491
+ (function (TuningSpeed) {
1492
+ /**
1493
+ * The default / unset value. For Veo 3.0 models, this defaults to FAST.
1494
+ */
1495
+ TuningSpeed["TUNING_SPEED_UNSPECIFIED"] = "TUNING_SPEED_UNSPECIFIED";
1496
+ /**
1497
+ * Regular tuning speed.
1498
+ */
1499
+ TuningSpeed["REGULAR"] = "REGULAR";
1500
+ /**
1501
+ * Fast tuning speed.
1502
+ */
1503
+ TuningSpeed["FAST"] = "FAST";
1504
+ })(TuningSpeed || (TuningSpeed = {}));
1505
+ /** The tuning task for Veo. This enum is not supported in Gemini API. */
1482
1506
  var TuningTask;
1483
1507
  (function (TuningTask) {
1484
1508
  /**
@@ -1498,6 +1522,22 @@ var TuningTask;
1498
1522
  */
1499
1523
  TuningTask["TUNING_TASK_R2V"] = "TUNING_TASK_R2V";
1500
1524
  })(TuningTask || (TuningTask = {}));
1525
+ /** The orientation of the video. Defaults to LANDSCAPE. This enum is not supported in Gemini API. */
1526
+ var VideoOrientation;
1527
+ (function (VideoOrientation) {
1528
+ /**
1529
+ * Unspecified video orientation. Defaults to landscape.
1530
+ */
1531
+ VideoOrientation["VIDEO_ORIENTATION_UNSPECIFIED"] = "VIDEO_ORIENTATION_UNSPECIFIED";
1532
+ /**
1533
+ * Landscape orientation (e.g. 16:9, 1280x720).
1534
+ */
1535
+ VideoOrientation["LANDSCAPE"] = "LANDSCAPE";
1536
+ /**
1537
+ * Portrait orientation (e.g. 9:16, 720x1280).
1538
+ */
1539
+ VideoOrientation["PORTRAIT"] = "PORTRAIT";
1540
+ })(VideoOrientation || (VideoOrientation = {}));
1501
1541
  /** Output only. Current state of the `Document`. This enum is not supported in Vertex AI. */
1502
1542
  var DocumentState;
1503
1543
  (function (DocumentState) {
@@ -5838,6 +5878,39 @@ function blobToMldev$3(fromObject) {
5838
5878
  }
5839
5879
  return toObject;
5840
5880
  }
5881
+ function codeExecutionResultToVertex$2(fromObject) {
5882
+ const toObject = {};
5883
+ const fromOutcome = getValueByPath(fromObject, ['outcome']);
5884
+ if (fromOutcome != null) {
5885
+ setValueByPath(toObject, ['outcome'], fromOutcome);
5886
+ }
5887
+ const fromOutput = getValueByPath(fromObject, ['output']);
5888
+ if (fromOutput != null) {
5889
+ setValueByPath(toObject, ['output'], fromOutput);
5890
+ }
5891
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
5892
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
5893
+ }
5894
+ return toObject;
5895
+ }
5896
+ function computerUseToVertex$2(fromObject) {
5897
+ const toObject = {};
5898
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
5899
+ if (fromEnvironment != null) {
5900
+ setValueByPath(toObject, ['environment'], fromEnvironment);
5901
+ }
5902
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
5903
+ 'excludedPredefinedFunctions',
5904
+ ]);
5905
+ if (fromExcludedPredefinedFunctions != null) {
5906
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
5907
+ }
5908
+ if (getValueByPath(fromObject, ['enablePromptInjectionDetection']) !==
5909
+ undefined) {
5910
+ throw new Error('enablePromptInjectionDetection parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
5911
+ }
5912
+ return toObject;
5913
+ }
5841
5914
  function contentToMldev$3(fromObject) {
5842
5915
  const toObject = {};
5843
5916
  const fromParts = getValueByPath(fromObject, ['parts']);
@@ -6033,6 +6106,21 @@ function deleteCachedContentResponseFromVertex(fromObject) {
6033
6106
  }
6034
6107
  return toObject;
6035
6108
  }
6109
+ function executableCodeToVertex$2(fromObject) {
6110
+ const toObject = {};
6111
+ const fromCode = getValueByPath(fromObject, ['code']);
6112
+ if (fromCode != null) {
6113
+ setValueByPath(toObject, ['code'], fromCode);
6114
+ }
6115
+ const fromLanguage = getValueByPath(fromObject, ['language']);
6116
+ if (fromLanguage != null) {
6117
+ setValueByPath(toObject, ['language'], fromLanguage);
6118
+ }
6119
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
6120
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6121
+ }
6122
+ return toObject;
6123
+ }
6036
6124
  function fileDataToMldev$3(fromObject) {
6037
6125
  const toObject = {};
6038
6126
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -6316,13 +6404,13 @@ function partToVertex$2(fromObject) {
6316
6404
  'codeExecutionResult',
6317
6405
  ]);
6318
6406
  if (fromCodeExecutionResult != null) {
6319
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
6407
+ setValueByPath(toObject, ['codeExecutionResult'], codeExecutionResultToVertex$2(fromCodeExecutionResult));
6320
6408
  }
6321
6409
  const fromExecutableCode = getValueByPath(fromObject, [
6322
6410
  'executableCode',
6323
6411
  ]);
6324
6412
  if (fromExecutableCode != null) {
6325
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
6413
+ setValueByPath(toObject, ['executableCode'], executableCodeToVertex$2(fromExecutableCode));
6326
6414
  }
6327
6415
  const fromFileData = getValueByPath(fromObject, ['fileData']);
6328
6416
  if (fromFileData != null) {
@@ -6488,7 +6576,7 @@ function toolToVertex$2(fromObject) {
6488
6576
  }
6489
6577
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
6490
6578
  if (fromComputerUse != null) {
6491
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
6579
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex$2(fromComputerUse));
6492
6580
  }
6493
6581
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
6494
6582
  throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
@@ -7880,6 +7968,39 @@ function blobToMldev$2(fromObject) {
7880
7968
  }
7881
7969
  return toObject;
7882
7970
  }
7971
+ function codeExecutionResultToVertex$1(fromObject) {
7972
+ const toObject = {};
7973
+ const fromOutcome = getValueByPath(fromObject, ['outcome']);
7974
+ if (fromOutcome != null) {
7975
+ setValueByPath(toObject, ['outcome'], fromOutcome);
7976
+ }
7977
+ const fromOutput = getValueByPath(fromObject, ['output']);
7978
+ if (fromOutput != null) {
7979
+ setValueByPath(toObject, ['output'], fromOutput);
7980
+ }
7981
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
7982
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
7983
+ }
7984
+ return toObject;
7985
+ }
7986
+ function computerUseToVertex$1(fromObject) {
7987
+ const toObject = {};
7988
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
7989
+ if (fromEnvironment != null) {
7990
+ setValueByPath(toObject, ['environment'], fromEnvironment);
7991
+ }
7992
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
7993
+ 'excludedPredefinedFunctions',
7994
+ ]);
7995
+ if (fromExcludedPredefinedFunctions != null) {
7996
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
7997
+ }
7998
+ if (getValueByPath(fromObject, ['enablePromptInjectionDetection']) !==
7999
+ undefined) {
8000
+ throw new Error('enablePromptInjectionDetection parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8001
+ }
8002
+ return toObject;
8003
+ }
7883
8004
  function contentToMldev$2(fromObject) {
7884
8005
  const toObject = {};
7885
8006
  const fromParts = getValueByPath(fromObject, ['parts']);
@@ -7916,6 +8037,21 @@ function contentToVertex$1(fromObject) {
7916
8037
  }
7917
8038
  return toObject;
7918
8039
  }
8040
+ function executableCodeToVertex$1(fromObject) {
8041
+ const toObject = {};
8042
+ const fromCode = getValueByPath(fromObject, ['code']);
8043
+ if (fromCode != null) {
8044
+ setValueByPath(toObject, ['code'], fromCode);
8045
+ }
8046
+ const fromLanguage = getValueByPath(fromObject, ['language']);
8047
+ if (fromLanguage != null) {
8048
+ setValueByPath(toObject, ['language'], fromLanguage);
8049
+ }
8050
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
8051
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8052
+ }
8053
+ return toObject;
8054
+ }
7919
8055
  function fileDataToMldev$2(fromObject) {
7920
8056
  const toObject = {};
7921
8057
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -8655,13 +8791,13 @@ function partToVertex$1(fromObject) {
8655
8791
  'codeExecutionResult',
8656
8792
  ]);
8657
8793
  if (fromCodeExecutionResult != null) {
8658
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
8794
+ setValueByPath(toObject, ['codeExecutionResult'], codeExecutionResultToVertex$1(fromCodeExecutionResult));
8659
8795
  }
8660
8796
  const fromExecutableCode = getValueByPath(fromObject, [
8661
8797
  'executableCode',
8662
8798
  ]);
8663
8799
  if (fromExecutableCode != null) {
8664
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
8800
+ setValueByPath(toObject, ['executableCode'], executableCodeToVertex$1(fromExecutableCode));
8665
8801
  }
8666
8802
  const fromFileData = getValueByPath(fromObject, ['fileData']);
8667
8803
  if (fromFileData != null) {
@@ -8813,7 +8949,7 @@ function toolToVertex$1(fromObject) {
8813
8949
  }
8814
8950
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
8815
8951
  if (fromComputerUse != null) {
8816
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
8952
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex$1(fromComputerUse));
8817
8953
  }
8818
8954
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
8819
8955
  throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
@@ -9093,6 +9229,21 @@ function citationMetadataFromMldev(fromObject, _rootObject) {
9093
9229
  }
9094
9230
  return toObject;
9095
9231
  }
9232
+ function codeExecutionResultToVertex(fromObject, _rootObject) {
9233
+ const toObject = {};
9234
+ const fromOutcome = getValueByPath(fromObject, ['outcome']);
9235
+ if (fromOutcome != null) {
9236
+ setValueByPath(toObject, ['outcome'], fromOutcome);
9237
+ }
9238
+ const fromOutput = getValueByPath(fromObject, ['output']);
9239
+ if (fromOutput != null) {
9240
+ setValueByPath(toObject, ['output'], fromOutput);
9241
+ }
9242
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
9243
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
9244
+ }
9245
+ return toObject;
9246
+ }
9096
9247
  function computeTokensParametersToVertex(apiClient, fromObject, rootObject) {
9097
9248
  const toObject = {};
9098
9249
  const fromModel = getValueByPath(fromObject, ['model']);
@@ -9131,6 +9282,24 @@ function computeTokensResponseFromVertex(fromObject, _rootObject) {
9131
9282
  }
9132
9283
  return toObject;
9133
9284
  }
9285
+ function computerUseToVertex(fromObject, _rootObject) {
9286
+ const toObject = {};
9287
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
9288
+ if (fromEnvironment != null) {
9289
+ setValueByPath(toObject, ['environment'], fromEnvironment);
9290
+ }
9291
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
9292
+ 'excludedPredefinedFunctions',
9293
+ ]);
9294
+ if (fromExcludedPredefinedFunctions != null) {
9295
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
9296
+ }
9297
+ if (getValueByPath(fromObject, ['enablePromptInjectionDetection']) !==
9298
+ undefined) {
9299
+ throw new Error('enablePromptInjectionDetection parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
9300
+ }
9301
+ return toObject;
9302
+ }
9134
9303
  function contentEmbeddingFromVertex(fromObject, rootObject) {
9135
9304
  const toObject = {};
9136
9305
  const fromValues = getValueByPath(fromObject, ['values']);
@@ -9805,6 +9974,21 @@ function endpointFromVertex(fromObject, _rootObject) {
9805
9974
  }
9806
9975
  return toObject;
9807
9976
  }
9977
+ function executableCodeToVertex(fromObject, _rootObject) {
9978
+ const toObject = {};
9979
+ const fromCode = getValueByPath(fromObject, ['code']);
9980
+ if (fromCode != null) {
9981
+ setValueByPath(toObject, ['code'], fromCode);
9982
+ }
9983
+ const fromLanguage = getValueByPath(fromObject, ['language']);
9984
+ if (fromLanguage != null) {
9985
+ setValueByPath(toObject, ['language'], fromLanguage);
9986
+ }
9987
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
9988
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
9989
+ }
9990
+ return toObject;
9991
+ }
9808
9992
  function fileDataToMldev$1(fromObject, _rootObject) {
9809
9993
  const toObject = {};
9810
9994
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -11683,7 +11867,7 @@ function partToMldev$1(fromObject, rootObject) {
11683
11867
  }
11684
11868
  return toObject;
11685
11869
  }
11686
- function partToVertex(fromObject, _rootObject) {
11870
+ function partToVertex(fromObject, rootObject) {
11687
11871
  const toObject = {};
11688
11872
  const fromMediaResolution = getValueByPath(fromObject, [
11689
11873
  'mediaResolution',
@@ -11695,13 +11879,13 @@ function partToVertex(fromObject, _rootObject) {
11695
11879
  'codeExecutionResult',
11696
11880
  ]);
11697
11881
  if (fromCodeExecutionResult != null) {
11698
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
11882
+ setValueByPath(toObject, ['codeExecutionResult'], codeExecutionResultToVertex(fromCodeExecutionResult));
11699
11883
  }
11700
11884
  const fromExecutableCode = getValueByPath(fromObject, [
11701
11885
  'executableCode',
11702
11886
  ]);
11703
11887
  if (fromExecutableCode != null) {
11704
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
11888
+ setValueByPath(toObject, ['executableCode'], executableCodeToVertex(fromExecutableCode));
11705
11889
  }
11706
11890
  const fromFileData = getValueByPath(fromObject, ['fileData']);
11707
11891
  if (fromFileData != null) {
@@ -12176,7 +12360,7 @@ function toolToMldev$1(fromObject, rootObject) {
12176
12360
  }
12177
12361
  return toObject;
12178
12362
  }
12179
- function toolToVertex(fromObject, _rootObject) {
12363
+ function toolToVertex(fromObject, rootObject) {
12180
12364
  const toObject = {};
12181
12365
  const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
12182
12366
  if (fromRetrieval != null) {
@@ -12184,7 +12368,7 @@ function toolToVertex(fromObject, _rootObject) {
12184
12368
  }
12185
12369
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
12186
12370
  if (fromComputerUse != null) {
12187
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
12371
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex(fromComputerUse));
12188
12372
  }
12189
12373
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
12190
12374
  throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
@@ -12801,7 +12985,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
12801
12985
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
12802
12986
  const USER_AGENT_HEADER = 'User-Agent';
12803
12987
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
12804
- const SDK_VERSION = '2.5.0'; // x-release-please-version
12988
+ const SDK_VERSION = '2.6.0'; // x-release-please-version
12805
12989
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
12806
12990
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
12807
12991
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -20205,6 +20389,250 @@ function createTuningJobParametersPrivateToVertex(fromObject, rootObject) {
20205
20389
  }
20206
20390
  return toObject;
20207
20391
  }
20392
+ function distillationHyperParametersFromVertex(fromObject, rootObject) {
20393
+ const toObject = {};
20394
+ const fromAdapterSize = getValueByPath(fromObject, ['adapterSize']);
20395
+ if (fromAdapterSize != null) {
20396
+ setValueByPath(toObject, ['adapterSize'], fromAdapterSize);
20397
+ }
20398
+ const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
20399
+ if (fromEpochCount != null) {
20400
+ setValueByPath(toObject, ['epochCount'], fromEpochCount);
20401
+ }
20402
+ const fromLearningRateMultiplier = getValueByPath(fromObject, [
20403
+ 'learningRateMultiplier',
20404
+ ]);
20405
+ if (fromLearningRateMultiplier != null) {
20406
+ setValueByPath(toObject, ['learningRateMultiplier'], fromLearningRateMultiplier);
20407
+ }
20408
+ const fromGenerationConfig = getValueByPath(fromObject, [
20409
+ 'generationConfig',
20410
+ ]);
20411
+ if (fromGenerationConfig != null) {
20412
+ setValueByPath(toObject, ['generationConfig'], generationConfigFromVertex(fromGenerationConfig));
20413
+ }
20414
+ const fromLearningRate = getValueByPath(fromObject, ['learningRate']);
20415
+ if (fromLearningRate != null) {
20416
+ setValueByPath(toObject, ['learningRate'], fromLearningRate);
20417
+ }
20418
+ const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
20419
+ if (fromBatchSize != null) {
20420
+ setValueByPath(toObject, ['batchSize'], fromBatchSize);
20421
+ }
20422
+ return toObject;
20423
+ }
20424
+ function distillationSamplingSpecFromVertex(fromObject, rootObject) {
20425
+ const toObject = {};
20426
+ const fromBaseTeacherModel = getValueByPath(fromObject, [
20427
+ 'baseTeacherModel',
20428
+ ]);
20429
+ if (fromBaseTeacherModel != null) {
20430
+ setValueByPath(toObject, ['baseTeacherModel'], fromBaseTeacherModel);
20431
+ }
20432
+ const fromTunedTeacherModelSource = getValueByPath(fromObject, [
20433
+ 'tunedTeacherModelSource',
20434
+ ]);
20435
+ if (fromTunedTeacherModelSource != null) {
20436
+ setValueByPath(toObject, ['tunedTeacherModelSource'], fromTunedTeacherModelSource);
20437
+ }
20438
+ const fromValidationDatasetUri = getValueByPath(fromObject, [
20439
+ 'validationDatasetUri',
20440
+ ]);
20441
+ if (fromValidationDatasetUri != null) {
20442
+ setValueByPath(toObject, ['validationDatasetUri'], fromValidationDatasetUri);
20443
+ }
20444
+ const fromPromptDatasetUri = getValueByPath(fromObject, [
20445
+ 'promptDatasetUri',
20446
+ ]);
20447
+ if (fromPromptDatasetUri != null) {
20448
+ setValueByPath(toObject, ['promptDatasetUri'], fromPromptDatasetUri);
20449
+ }
20450
+ const fromHyperparameters = getValueByPath(fromObject, [
20451
+ 'hyperparameters',
20452
+ ]);
20453
+ if (fromHyperparameters != null) {
20454
+ setValueByPath(toObject, ['hyperparameters'], distillationHyperParametersFromVertex(fromHyperparameters));
20455
+ }
20456
+ return toObject;
20457
+ }
20458
+ function distillationSpecFromVertex(fromObject, rootObject) {
20459
+ const toObject = {};
20460
+ const fromPromptDatasetUri = getValueByPath(fromObject, [
20461
+ 'promptDatasetUri',
20462
+ ]);
20463
+ if (fromPromptDatasetUri != null) {
20464
+ setValueByPath(toObject, ['promptDatasetUri'], fromPromptDatasetUri);
20465
+ }
20466
+ const fromBaseTeacherModel = getValueByPath(fromObject, [
20467
+ 'baseTeacherModel',
20468
+ ]);
20469
+ if (fromBaseTeacherModel != null) {
20470
+ setValueByPath(toObject, ['baseTeacherModel'], fromBaseTeacherModel);
20471
+ }
20472
+ const fromHyperParameters = getValueByPath(fromObject, [
20473
+ 'hyperParameters',
20474
+ ]);
20475
+ if (fromHyperParameters != null) {
20476
+ setValueByPath(toObject, ['hyperParameters'], distillationHyperParametersFromVertex(fromHyperParameters));
20477
+ }
20478
+ const fromPipelineRootDirectory = getValueByPath(fromObject, [
20479
+ 'pipelineRootDirectory',
20480
+ ]);
20481
+ if (fromPipelineRootDirectory != null) {
20482
+ setValueByPath(toObject, ['pipelineRootDirectory'], fromPipelineRootDirectory);
20483
+ }
20484
+ const fromStudentModel = getValueByPath(fromObject, ['studentModel']);
20485
+ if (fromStudentModel != null) {
20486
+ setValueByPath(toObject, ['studentModel'], fromStudentModel);
20487
+ }
20488
+ const fromTrainingDatasetUri = getValueByPath(fromObject, [
20489
+ 'trainingDatasetUri',
20490
+ ]);
20491
+ if (fromTrainingDatasetUri != null) {
20492
+ setValueByPath(toObject, ['trainingDatasetUri'], fromTrainingDatasetUri);
20493
+ }
20494
+ const fromTunedTeacherModelSource = getValueByPath(fromObject, [
20495
+ 'tunedTeacherModelSource',
20496
+ ]);
20497
+ if (fromTunedTeacherModelSource != null) {
20498
+ setValueByPath(toObject, ['tunedTeacherModelSource'], fromTunedTeacherModelSource);
20499
+ }
20500
+ const fromValidationDatasetUri = getValueByPath(fromObject, [
20501
+ 'validationDatasetUri',
20502
+ ]);
20503
+ if (fromValidationDatasetUri != null) {
20504
+ setValueByPath(toObject, ['validationDatasetUri'], fromValidationDatasetUri);
20505
+ }
20506
+ const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
20507
+ if (fromTuningMode != null) {
20508
+ setValueByPath(toObject, ['tuningMode'], fromTuningMode);
20509
+ }
20510
+ return toObject;
20511
+ }
20512
+ function generationConfigFromVertex(fromObject, _rootObject) {
20513
+ const toObject = {};
20514
+ const fromModelSelectionConfig = getValueByPath(fromObject, [
20515
+ 'modelConfig',
20516
+ ]);
20517
+ if (fromModelSelectionConfig != null) {
20518
+ setValueByPath(toObject, ['modelSelectionConfig'], fromModelSelectionConfig);
20519
+ }
20520
+ const fromResponseJsonSchema = getValueByPath(fromObject, [
20521
+ 'responseJsonSchema',
20522
+ ]);
20523
+ if (fromResponseJsonSchema != null) {
20524
+ setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
20525
+ }
20526
+ const fromAudioTimestamp = getValueByPath(fromObject, [
20527
+ 'audioTimestamp',
20528
+ ]);
20529
+ if (fromAudioTimestamp != null) {
20530
+ setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);
20531
+ }
20532
+ const fromCandidateCount = getValueByPath(fromObject, [
20533
+ 'candidateCount',
20534
+ ]);
20535
+ if (fromCandidateCount != null) {
20536
+ setValueByPath(toObject, ['candidateCount'], fromCandidateCount);
20537
+ }
20538
+ const fromEnableAffectiveDialog = getValueByPath(fromObject, [
20539
+ 'enableAffectiveDialog',
20540
+ ]);
20541
+ if (fromEnableAffectiveDialog != null) {
20542
+ setValueByPath(toObject, ['enableAffectiveDialog'], fromEnableAffectiveDialog);
20543
+ }
20544
+ const fromFrequencyPenalty = getValueByPath(fromObject, [
20545
+ 'frequencyPenalty',
20546
+ ]);
20547
+ if (fromFrequencyPenalty != null) {
20548
+ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);
20549
+ }
20550
+ const fromLogprobs = getValueByPath(fromObject, ['logprobs']);
20551
+ if (fromLogprobs != null) {
20552
+ setValueByPath(toObject, ['logprobs'], fromLogprobs);
20553
+ }
20554
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
20555
+ 'maxOutputTokens',
20556
+ ]);
20557
+ if (fromMaxOutputTokens != null) {
20558
+ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);
20559
+ }
20560
+ const fromMediaResolution = getValueByPath(fromObject, [
20561
+ 'mediaResolution',
20562
+ ]);
20563
+ if (fromMediaResolution != null) {
20564
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
20565
+ }
20566
+ const fromPresencePenalty = getValueByPath(fromObject, [
20567
+ 'presencePenalty',
20568
+ ]);
20569
+ if (fromPresencePenalty != null) {
20570
+ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);
20571
+ }
20572
+ const fromResponseLogprobs = getValueByPath(fromObject, [
20573
+ 'responseLogprobs',
20574
+ ]);
20575
+ if (fromResponseLogprobs != null) {
20576
+ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);
20577
+ }
20578
+ const fromResponseMimeType = getValueByPath(fromObject, [
20579
+ 'responseMimeType',
20580
+ ]);
20581
+ if (fromResponseMimeType != null) {
20582
+ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);
20583
+ }
20584
+ const fromResponseModalities = getValueByPath(fromObject, [
20585
+ 'responseModalities',
20586
+ ]);
20587
+ if (fromResponseModalities != null) {
20588
+ setValueByPath(toObject, ['responseModalities'], fromResponseModalities);
20589
+ }
20590
+ const fromResponseSchema = getValueByPath(fromObject, [
20591
+ 'responseSchema',
20592
+ ]);
20593
+ if (fromResponseSchema != null) {
20594
+ setValueByPath(toObject, ['responseSchema'], fromResponseSchema);
20595
+ }
20596
+ const fromRoutingConfig = getValueByPath(fromObject, [
20597
+ 'routingConfig',
20598
+ ]);
20599
+ if (fromRoutingConfig != null) {
20600
+ setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);
20601
+ }
20602
+ const fromSeed = getValueByPath(fromObject, ['seed']);
20603
+ if (fromSeed != null) {
20604
+ setValueByPath(toObject, ['seed'], fromSeed);
20605
+ }
20606
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
20607
+ if (fromSpeechConfig != null) {
20608
+ setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
20609
+ }
20610
+ const fromStopSequences = getValueByPath(fromObject, [
20611
+ 'stopSequences',
20612
+ ]);
20613
+ if (fromStopSequences != null) {
20614
+ setValueByPath(toObject, ['stopSequences'], fromStopSequences);
20615
+ }
20616
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
20617
+ if (fromTemperature != null) {
20618
+ setValueByPath(toObject, ['temperature'], fromTemperature);
20619
+ }
20620
+ const fromThinkingConfig = getValueByPath(fromObject, [
20621
+ 'thinkingConfig',
20622
+ ]);
20623
+ if (fromThinkingConfig != null) {
20624
+ setValueByPath(toObject, ['thinkingConfig'], fromThinkingConfig);
20625
+ }
20626
+ const fromTopK = getValueByPath(fromObject, ['topK']);
20627
+ if (fromTopK != null) {
20628
+ setValueByPath(toObject, ['topK'], fromTopK);
20629
+ }
20630
+ const fromTopP = getValueByPath(fromObject, ['topP']);
20631
+ if (fromTopP != null) {
20632
+ setValueByPath(toObject, ['topP'], fromTopP);
20633
+ }
20634
+ return toObject;
20635
+ }
20208
20636
  function getTuningJobParametersToMldev(fromObject, _rootObject) {
20209
20637
  const toObject = {};
20210
20638
  const fromName = getValueByPath(fromObject, ['name']);
@@ -20418,7 +20846,7 @@ function tuningJobFromMldev(fromObject, rootObject) {
20418
20846
  }
20419
20847
  return toObject;
20420
20848
  }
20421
- function tuningJobFromVertex(fromObject, _rootObject) {
20849
+ function tuningJobFromVertex(fromObject, rootObject) {
20422
20850
  const toObject = {};
20423
20851
  const fromSdkHttpResponse = getValueByPath(fromObject, [
20424
20852
  'sdkHttpResponse',
@@ -20488,7 +20916,7 @@ function tuningJobFromVertex(fromObject, _rootObject) {
20488
20916
  'distillationSpec',
20489
20917
  ]);
20490
20918
  if (fromDistillationSpec != null) {
20491
- setValueByPath(toObject, ['distillationSpec'], fromDistillationSpec);
20919
+ setValueByPath(toObject, ['distillationSpec'], distillationSpecFromVertex(fromDistillationSpec));
20492
20920
  }
20493
20921
  const fromTuningDataStats = getValueByPath(fromObject, [
20494
20922
  'tuningDataStats',
@@ -20572,18 +21000,24 @@ function tuningJobFromVertex(fromObject, _rootObject) {
20572
21000
  if (fromVeoTuningSpec != null) {
20573
21001
  setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
20574
21002
  }
20575
- const fromDistillationSamplingSpec = getValueByPath(fromObject, [
20576
- 'distillationSamplingSpec',
20577
- ]);
20578
- if (fromDistillationSamplingSpec != null) {
20579
- setValueByPath(toObject, ['distillationSamplingSpec'], fromDistillationSamplingSpec);
20580
- }
20581
21003
  const fromTuningJobMetadata = getValueByPath(fromObject, [
20582
21004
  'tuningJobMetadata',
20583
21005
  ]);
20584
21006
  if (fromTuningJobMetadata != null) {
20585
21007
  setValueByPath(toObject, ['tuningJobMetadata'], fromTuningJobMetadata);
20586
21008
  }
21009
+ const fromVeoLoraTuningSpec = getValueByPath(fromObject, [
21010
+ 'veoLoraTuningSpec',
21011
+ ]);
21012
+ if (fromVeoLoraTuningSpec != null) {
21013
+ setValueByPath(toObject, ['veoLoraTuningSpec'], fromVeoLoraTuningSpec);
21014
+ }
21015
+ const fromDistillationSamplingSpec = getValueByPath(fromObject, [
21016
+ 'distillationSamplingSpec',
21017
+ ]);
21018
+ if (fromDistillationSamplingSpec != null) {
21019
+ setValueByPath(toObject, ['distillationSamplingSpec'], distillationSamplingSpecFromVertex(fromDistillationSamplingSpec));
21020
+ }
20587
21021
  return toObject;
20588
21022
  }
20589
21023
  function tuningOperationFromMldev(fromObject, _rootObject) {
@@ -21545,5 +21979,5 @@ function getApiKeyFromEnv() {
21545
21979
  return envGoogleApiKey || envGeminiApiKey || undefined;
21546
21980
  }
21547
21981
 
21548
- 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 };
21982
+ 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 };
21549
21983
  //# sourceMappingURL=index.mjs.map