@google/genai 2.1.0 → 2.3.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.
@@ -3775,23 +3775,23 @@ function authConfigToMldev$4(fromObject) {
3775
3775
  setValueByPath(toObject, ['apiKey'], fromApiKey);
3776
3776
  }
3777
3777
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
3778
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
3778
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3779
3779
  }
3780
3780
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
3781
- throw new Error('authType parameter is not supported in Gemini API.');
3781
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3782
3782
  }
3783
3783
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
3784
3784
  undefined) {
3785
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
3785
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3786
3786
  }
3787
3787
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
3788
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
3788
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3789
3789
  }
3790
3790
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
3791
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
3791
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3792
3792
  }
3793
3793
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
3794
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
3794
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3795
3795
  }
3796
3796
  return toObject;
3797
3797
  }
@@ -3872,14 +3872,14 @@ function batchJobDestinationToVertex(fromObject) {
3872
3872
  setValueByPath(toObject, ['bigqueryDestination', 'outputUri'], fromBigqueryUri);
3873
3873
  }
3874
3874
  if (getValueByPath(fromObject, ['fileName']) !== undefined) {
3875
- throw new Error('fileName parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3875
+ throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3876
3876
  }
3877
3877
  if (getValueByPath(fromObject, ['inlinedResponses']) !== undefined) {
3878
- throw new Error('inlinedResponses parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3878
+ throw new Error('inlinedResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3879
3879
  }
3880
3880
  if (getValueByPath(fromObject, ['inlinedEmbedContentResponses']) !==
3881
3881
  undefined) {
3882
- throw new Error('inlinedEmbedContentResponses parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3882
+ throw new Error('inlinedEmbedContentResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3883
3883
  }
3884
3884
  const fromVertexDataset = getValueByPath(fromObject, [
3885
3885
  'vertexDataset',
@@ -4024,13 +4024,13 @@ function batchJobSourceFromVertex(fromObject) {
4024
4024
  function batchJobSourceToMldev(apiClient, fromObject) {
4025
4025
  const toObject = {};
4026
4026
  if (getValueByPath(fromObject, ['format']) !== undefined) {
4027
- throw new Error('format parameter is not supported in Gemini API.');
4027
+ throw new Error('format parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4028
4028
  }
4029
4029
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
4030
- throw new Error('gcsUri parameter is not supported in Gemini API.');
4030
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4031
4031
  }
4032
4032
  if (getValueByPath(fromObject, ['bigqueryUri']) !== undefined) {
4033
- throw new Error('bigqueryUri parameter is not supported in Gemini API.');
4033
+ throw new Error('bigqueryUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4034
4034
  }
4035
4035
  const fromFileName = getValueByPath(fromObject, ['fileName']);
4036
4036
  if (fromFileName != null) {
@@ -4049,7 +4049,7 @@ function batchJobSourceToMldev(apiClient, fromObject) {
4049
4049
  setValueByPath(toObject, ['requests', 'requests'], transformedList);
4050
4050
  }
4051
4051
  if (getValueByPath(fromObject, ['vertexDatasetName']) !== undefined) {
4052
- throw new Error('vertexDatasetName parameter is not supported in Gemini API.');
4052
+ throw new Error('vertexDatasetName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4053
4053
  }
4054
4054
  return toObject;
4055
4055
  }
@@ -4068,10 +4068,10 @@ function batchJobSourceToVertex(fromObject) {
4068
4068
  setValueByPath(toObject, ['bigquerySource', 'inputUri'], fromBigqueryUri);
4069
4069
  }
4070
4070
  if (getValueByPath(fromObject, ['fileName']) !== undefined) {
4071
- throw new Error('fileName parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4071
+ throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4072
4072
  }
4073
4073
  if (getValueByPath(fromObject, ['inlinedRequests']) !== undefined) {
4074
- throw new Error('inlinedRequests parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4074
+ throw new Error('inlinedRequests parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4075
4075
  }
4076
4076
  const fromVertexDatasetName = getValueByPath(fromObject, [
4077
4077
  'vertexDatasetName',
@@ -4088,7 +4088,7 @@ function blobToMldev$4(fromObject) {
4088
4088
  setValueByPath(toObject, ['data'], fromData);
4089
4089
  }
4090
4090
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
4091
- throw new Error('displayName parameter is not supported in Gemini API.');
4091
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4092
4092
  }
4093
4093
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
4094
4094
  if (fromMimeType != null) {
@@ -4211,7 +4211,7 @@ function createBatchJobConfigToMldev(fromObject, parentObject) {
4211
4211
  setValueByPath(parentObject, ['batch', 'displayName'], fromDisplayName);
4212
4212
  }
4213
4213
  if (getValueByPath(fromObject, ['dest']) !== undefined) {
4214
- throw new Error('dest parameter is not supported in Gemini API.');
4214
+ throw new Error('dest parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4215
4215
  }
4216
4216
  const fromWebhookConfig = getValueByPath(fromObject, [
4217
4217
  'webhookConfig',
@@ -4232,7 +4232,7 @@ function createBatchJobConfigToVertex(fromObject, parentObject) {
4232
4232
  setValueByPath(parentObject, ['outputConfig'], batchJobDestinationToVertex(tBatchJobDestination(fromDest)));
4233
4233
  }
4234
4234
  if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
4235
- throw new Error('webhookConfig parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4235
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4236
4236
  }
4237
4237
  return toObject;
4238
4238
  }
@@ -4388,16 +4388,16 @@ function embedContentConfigToMldev$1(fromObject, parentObject) {
4388
4388
  setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
4389
4389
  }
4390
4390
  if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
4391
- throw new Error('mimeType parameter is not supported in Gemini API.');
4391
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4392
4392
  }
4393
4393
  if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
4394
- throw new Error('autoTruncate parameter is not supported in Gemini API.');
4394
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4395
4395
  }
4396
4396
  if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
4397
- throw new Error('documentOcr parameter is not supported in Gemini API.');
4397
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4398
4398
  }
4399
4399
  if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
4400
- throw new Error('audioTrackExtraction parameter is not supported in Gemini API.');
4400
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4401
4401
  }
4402
4402
  return toObject;
4403
4403
  }
@@ -4418,7 +4418,7 @@ function embeddingsBatchJobSourceToMldev(apiClient, fromObject) {
4418
4418
  function fileDataToMldev$4(fromObject) {
4419
4419
  const toObject = {};
4420
4420
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
4421
- throw new Error('displayName parameter is not supported in Gemini API.');
4421
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4422
4422
  }
4423
4423
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
4424
4424
  if (fromFileUri != null) {
@@ -4445,10 +4445,10 @@ function functionCallToMldev$4(fromObject) {
4445
4445
  setValueByPath(toObject, ['name'], fromName);
4446
4446
  }
4447
4447
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
4448
- throw new Error('partialArgs parameter is not supported in Gemini API.');
4448
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4449
4449
  }
4450
4450
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
4451
- throw new Error('willContinue parameter is not supported in Gemini API.');
4451
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4452
4452
  }
4453
4453
  return toObject;
4454
4454
  }
@@ -4466,7 +4466,7 @@ function functionCallingConfigToMldev$2(fromObject) {
4466
4466
  }
4467
4467
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
4468
4468
  undefined) {
4469
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
4469
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4470
4470
  }
4471
4471
  return toObject;
4472
4472
  }
@@ -4553,10 +4553,10 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4553
4553
  setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
4554
4554
  }
4555
4555
  if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
4556
- throw new Error('routingConfig parameter is not supported in Gemini API.');
4556
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4557
4557
  }
4558
4558
  if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
4559
- throw new Error('modelSelectionConfig parameter is not supported in Gemini API.');
4559
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4560
4560
  }
4561
4561
  const fromSafetySettings = getValueByPath(fromObject, [
4562
4562
  'safetySettings',
@@ -4585,7 +4585,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4585
4585
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$2(fromToolConfig));
4586
4586
  }
4587
4587
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
4588
- throw new Error('labels parameter is not supported in Gemini API.');
4588
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4589
4589
  }
4590
4590
  const fromCachedContent = getValueByPath(fromObject, [
4591
4591
  'cachedContent',
@@ -4610,7 +4610,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4610
4610
  setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
4611
4611
  }
4612
4612
  if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
4613
- throw new Error('audioTimestamp parameter is not supported in Gemini API.');
4613
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4614
4614
  }
4615
4615
  const fromThinkingConfig = getValueByPath(fromObject, [
4616
4616
  'thinkingConfig',
@@ -4629,7 +4629,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4629
4629
  setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
4630
4630
  }
4631
4631
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
4632
- throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
4632
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4633
4633
  }
4634
4634
  const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
4635
4635
  if (parentObject !== undefined && fromServiceTier != null) {
@@ -4716,10 +4716,10 @@ function googleSearchToMldev$4(fromObject) {
4716
4716
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
4717
4717
  }
4718
4718
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
4719
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
4719
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4720
4720
  }
4721
4721
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
4722
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
4722
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4723
4723
  }
4724
4724
  const fromTimeRangeFilter = getValueByPath(fromObject, [
4725
4725
  'timeRangeFilter',
@@ -4740,20 +4740,20 @@ function imageConfigToMldev$1(fromObject) {
4740
4740
  setValueByPath(toObject, ['imageSize'], fromImageSize);
4741
4741
  }
4742
4742
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
4743
- throw new Error('personGeneration parameter is not supported in Gemini API.');
4743
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4744
4744
  }
4745
4745
  if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
4746
- throw new Error('prominentPeople parameter is not supported in Gemini API.');
4746
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4747
4747
  }
4748
4748
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
4749
- throw new Error('outputMimeType parameter is not supported in Gemini API.');
4749
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4750
4750
  }
4751
4751
  if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
4752
4752
  undefined) {
4753
- throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
4753
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4754
4754
  }
4755
4755
  if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
4756
- throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
4756
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4757
4757
  }
4758
4758
  return toObject;
4759
4759
  }
@@ -4810,7 +4810,7 @@ function listBatchJobsConfigToMldev(fromObject, parentObject) {
4810
4810
  setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
4811
4811
  }
4812
4812
  if (getValueByPath(fromObject, ['filter']) !== undefined) {
4813
- throw new Error('filter parameter is not supported in Gemini API.');
4813
+ throw new Error('filter parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4814
4814
  }
4815
4815
  return toObject;
4816
4816
  }
@@ -4979,7 +4979,7 @@ function safetySettingToMldev$3(fromObject) {
4979
4979
  setValueByPath(toObject, ['category'], fromCategory);
4980
4980
  }
4981
4981
  if (getValueByPath(fromObject, ['method']) !== undefined) {
4982
- throw new Error('method parameter is not supported in Gemini API.');
4982
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4983
4983
  }
4984
4984
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
4985
4985
  if (fromThreshold != null) {
@@ -5010,7 +5010,7 @@ function toolConfigToMldev$2(fromObject) {
5010
5010
  function toolToMldev$4(fromObject) {
5011
5011
  const toObject = {};
5012
5012
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
5013
- throw new Error('retrieval parameter is not supported in Gemini API.');
5013
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5014
5014
  }
5015
5015
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
5016
5016
  if (fromComputerUse != null) {
@@ -5035,7 +5035,7 @@ function toolToMldev$4(fromObject) {
5035
5035
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
5036
5036
  }
5037
5037
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
5038
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
5038
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5039
5039
  }
5040
5040
  const fromFunctionDeclarations = getValueByPath(fromObject, [
5041
5041
  'functionDeclarations',
@@ -5056,7 +5056,7 @@ function toolToMldev$4(fromObject) {
5056
5056
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
5057
5057
  }
5058
5058
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
5059
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
5059
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5060
5060
  }
5061
5061
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
5062
5062
  if (fromUrlContext != null) {
@@ -5803,23 +5803,23 @@ function authConfigToMldev$3(fromObject) {
5803
5803
  setValueByPath(toObject, ['apiKey'], fromApiKey);
5804
5804
  }
5805
5805
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
5806
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
5806
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5807
5807
  }
5808
5808
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
5809
- throw new Error('authType parameter is not supported in Gemini API.');
5809
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5810
5810
  }
5811
5811
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
5812
5812
  undefined) {
5813
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
5813
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5814
5814
  }
5815
5815
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
5816
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
5816
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5817
5817
  }
5818
5818
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
5819
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
5819
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5820
5820
  }
5821
5821
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
5822
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
5822
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5823
5823
  }
5824
5824
  return toObject;
5825
5825
  }
@@ -5830,7 +5830,7 @@ function blobToMldev$3(fromObject) {
5830
5830
  setValueByPath(toObject, ['data'], fromData);
5831
5831
  }
5832
5832
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
5833
- throw new Error('displayName parameter is not supported in Gemini API.');
5833
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5834
5834
  }
5835
5835
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
5836
5836
  if (fromMimeType != null) {
@@ -5919,7 +5919,7 @@ function createCachedContentConfigToMldev(fromObject, parentObject) {
5919
5919
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$1(fromToolConfig));
5920
5920
  }
5921
5921
  if (getValueByPath(fromObject, ['kmsKeyName']) !== undefined) {
5922
- throw new Error('kmsKeyName parameter is not supported in Gemini API.');
5922
+ throw new Error('kmsKeyName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5923
5923
  }
5924
5924
  return toObject;
5925
5925
  }
@@ -6036,7 +6036,7 @@ function deleteCachedContentResponseFromVertex(fromObject) {
6036
6036
  function fileDataToMldev$3(fromObject) {
6037
6037
  const toObject = {};
6038
6038
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
6039
- throw new Error('displayName parameter is not supported in Gemini API.');
6039
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6040
6040
  }
6041
6041
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
6042
6042
  if (fromFileUri != null) {
@@ -6063,10 +6063,10 @@ function functionCallToMldev$3(fromObject) {
6063
6063
  setValueByPath(toObject, ['name'], fromName);
6064
6064
  }
6065
6065
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
6066
- throw new Error('partialArgs parameter is not supported in Gemini API.');
6066
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6067
6067
  }
6068
6068
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
6069
- throw new Error('willContinue parameter is not supported in Gemini API.');
6069
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6070
6070
  }
6071
6071
  return toObject;
6072
6072
  }
@@ -6084,7 +6084,7 @@ function functionCallingConfigToMldev$1(fromObject) {
6084
6084
  }
6085
6085
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
6086
6086
  undefined) {
6087
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
6087
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6088
6088
  }
6089
6089
  return toObject;
6090
6090
  }
@@ -6123,10 +6123,10 @@ function googleSearchToMldev$3(fromObject) {
6123
6123
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
6124
6124
  }
6125
6125
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
6126
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
6126
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6127
6127
  }
6128
6128
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
6129
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
6129
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6130
6130
  }
6131
6131
  const fromTimeRangeFilter = getValueByPath(fromObject, [
6132
6132
  'timeRangeFilter',
@@ -6363,13 +6363,13 @@ function partToVertex$2(fromObject) {
6363
6363
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
6364
6364
  }
6365
6365
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
6366
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6366
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6367
6367
  }
6368
6368
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
6369
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6369
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6370
6370
  }
6371
6371
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
6372
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6372
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6373
6373
  }
6374
6374
  return toObject;
6375
6375
  }
@@ -6409,14 +6409,14 @@ function toolConfigToVertex$1(fromObject) {
6409
6409
  }
6410
6410
  if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
6411
6411
  undefined) {
6412
- throw new Error('includeServerSideToolInvocations parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6412
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6413
6413
  }
6414
6414
  return toObject;
6415
6415
  }
6416
6416
  function toolToMldev$3(fromObject) {
6417
6417
  const toObject = {};
6418
6418
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
6419
- throw new Error('retrieval parameter is not supported in Gemini API.');
6419
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6420
6420
  }
6421
6421
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
6422
6422
  if (fromComputerUse != null) {
@@ -6441,7 +6441,7 @@ function toolToMldev$3(fromObject) {
6441
6441
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
6442
6442
  }
6443
6443
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
6444
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
6444
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6445
6445
  }
6446
6446
  const fromFunctionDeclarations = getValueByPath(fromObject, [
6447
6447
  'functionDeclarations',
@@ -6462,7 +6462,7 @@ function toolToMldev$3(fromObject) {
6462
6462
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
6463
6463
  }
6464
6464
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
6465
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
6465
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6466
6466
  }
6467
6467
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
6468
6468
  if (fromUrlContext != null) {
@@ -6491,7 +6491,7 @@ function toolToVertex$2(fromObject) {
6491
6491
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
6492
6492
  }
6493
6493
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
6494
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6494
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6495
6495
  }
6496
6496
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
6497
6497
  if (fromGoogleSearch != null) {
@@ -6542,7 +6542,7 @@ function toolToVertex$2(fromObject) {
6542
6542
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
6543
6543
  }
6544
6544
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
6545
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6545
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6546
6546
  }
6547
6547
  return toObject;
6548
6548
  }
@@ -7834,7 +7834,7 @@ class Files extends BaseModule {
7834
7834
  function audioTranscriptionConfigToMldev$1(fromObject) {
7835
7835
  const toObject = {};
7836
7836
  if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
7837
- throw new Error('languageCodes parameter is not supported in Gemini API.');
7837
+ throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7838
7838
  }
7839
7839
  return toObject;
7840
7840
  }
@@ -7845,23 +7845,23 @@ function authConfigToMldev$2(fromObject) {
7845
7845
  setValueByPath(toObject, ['apiKey'], fromApiKey);
7846
7846
  }
7847
7847
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
7848
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
7848
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7849
7849
  }
7850
7850
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
7851
- throw new Error('authType parameter is not supported in Gemini API.');
7851
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7852
7852
  }
7853
7853
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
7854
7854
  undefined) {
7855
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
7855
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7856
7856
  }
7857
7857
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
7858
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
7858
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7859
7859
  }
7860
7860
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
7861
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
7861
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7862
7862
  }
7863
7863
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
7864
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
7864
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7865
7865
  }
7866
7866
  return toObject;
7867
7867
  }
@@ -7872,7 +7872,7 @@ function blobToMldev$2(fromObject) {
7872
7872
  setValueByPath(toObject, ['data'], fromData);
7873
7873
  }
7874
7874
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
7875
- throw new Error('displayName parameter is not supported in Gemini API.');
7875
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7876
7876
  }
7877
7877
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
7878
7878
  if (fromMimeType != null) {
@@ -7919,7 +7919,7 @@ function contentToVertex$1(fromObject) {
7919
7919
  function fileDataToMldev$2(fromObject) {
7920
7920
  const toObject = {};
7921
7921
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
7922
- throw new Error('displayName parameter is not supported in Gemini API.');
7922
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7923
7923
  }
7924
7924
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
7925
7925
  if (fromFileUri != null) {
@@ -7946,10 +7946,10 @@ function functionCallToMldev$2(fromObject) {
7946
7946
  setValueByPath(toObject, ['name'], fromName);
7947
7947
  }
7948
7948
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
7949
- throw new Error('partialArgs parameter is not supported in Gemini API.');
7949
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7950
7950
  }
7951
7951
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
7952
- throw new Error('willContinue parameter is not supported in Gemini API.');
7952
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7953
7953
  }
7954
7954
  return toObject;
7955
7955
  }
@@ -8077,7 +8077,7 @@ function generationConfigToVertex$1(fromObject) {
8077
8077
  }
8078
8078
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
8079
8079
  undefined) {
8080
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8080
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8081
8081
  }
8082
8082
  return toObject;
8083
8083
  }
@@ -8100,10 +8100,10 @@ function googleSearchToMldev$2(fromObject) {
8100
8100
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
8101
8101
  }
8102
8102
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
8103
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
8103
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8104
8104
  }
8105
8105
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
8106
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
8106
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8107
8107
  }
8108
8108
  const fromTimeRangeFilter = getValueByPath(fromObject, [
8109
8109
  'timeRangeFilter',
@@ -8222,7 +8222,7 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
8222
8222
  setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
8223
8223
  }
8224
8224
  if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
8225
- throw new Error('explicitVadSignal parameter is not supported in Gemini API.');
8225
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8226
8226
  }
8227
8227
  const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
8228
8228
  if (parentObject !== undefined && fromAvatarConfig != null) {
@@ -8240,6 +8240,12 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
8240
8240
  }
8241
8241
  setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
8242
8242
  }
8243
+ const fromStreamTranslationConfig = getValueByPath(fromObject, [
8244
+ 'streamTranslationConfig',
8245
+ ]);
8246
+ if (parentObject !== undefined && fromStreamTranslationConfig != null) {
8247
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'streamTranslationConfig'], fromStreamTranslationConfig);
8248
+ }
8243
8249
  return toObject;
8244
8250
  }
8245
8251
  function liveConnectConfigToVertex(fromObject, parentObject) {
@@ -8372,6 +8378,9 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
8372
8378
  }
8373
8379
  setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
8374
8380
  }
8381
+ if (getValueByPath(fromObject, ['streamTranslationConfig']) !== undefined) {
8382
+ throw new Error('streamTranslationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8383
+ }
8375
8384
  return toObject;
8376
8385
  }
8377
8386
  function liveConnectParametersToMldev(apiClient, fromObject) {
@@ -8693,13 +8702,13 @@ function partToVertex$1(fromObject) {
8693
8702
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
8694
8703
  }
8695
8704
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
8696
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8705
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8697
8706
  }
8698
8707
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
8699
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8708
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8700
8709
  }
8701
8710
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
8702
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8711
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8703
8712
  }
8704
8713
  return toObject;
8705
8714
  }
@@ -8710,7 +8719,7 @@ function safetySettingToMldev$2(fromObject) {
8710
8719
  setValueByPath(toObject, ['category'], fromCategory);
8711
8720
  }
8712
8721
  if (getValueByPath(fromObject, ['method']) !== undefined) {
8713
- throw new Error('method parameter is not supported in Gemini API.');
8722
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8714
8723
  }
8715
8724
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
8716
8725
  if (fromThreshold != null) {
@@ -8725,14 +8734,14 @@ function sessionResumptionConfigToMldev$1(fromObject) {
8725
8734
  setValueByPath(toObject, ['handle'], fromHandle);
8726
8735
  }
8727
8736
  if (getValueByPath(fromObject, ['transparent']) !== undefined) {
8728
- throw new Error('transparent parameter is not supported in Gemini API.');
8737
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8729
8738
  }
8730
8739
  return toObject;
8731
8740
  }
8732
8741
  function toolToMldev$2(fromObject) {
8733
8742
  const toObject = {};
8734
8743
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
8735
- throw new Error('retrieval parameter is not supported in Gemini API.');
8744
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8736
8745
  }
8737
8746
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
8738
8747
  if (fromComputerUse != null) {
@@ -8757,7 +8766,7 @@ function toolToMldev$2(fromObject) {
8757
8766
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
8758
8767
  }
8759
8768
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
8760
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
8769
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8761
8770
  }
8762
8771
  const fromFunctionDeclarations = getValueByPath(fromObject, [
8763
8772
  'functionDeclarations',
@@ -8778,7 +8787,7 @@ function toolToMldev$2(fromObject) {
8778
8787
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
8779
8788
  }
8780
8789
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
8781
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
8790
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8782
8791
  }
8783
8792
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
8784
8793
  if (fromUrlContext != null) {
@@ -8807,7 +8816,7 @@ function toolToVertex$1(fromObject) {
8807
8816
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
8808
8817
  }
8809
8818
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
8810
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8819
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8811
8820
  }
8812
8821
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
8813
8822
  if (fromGoogleSearch != null) {
@@ -8858,7 +8867,7 @@ function toolToVertex$1(fromObject) {
8858
8867
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
8859
8868
  }
8860
8869
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
8861
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8870
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8862
8871
  }
8863
8872
  return toObject;
8864
8873
  }
@@ -8975,23 +8984,23 @@ function authConfigToMldev$1(fromObject, _rootObject) {
8975
8984
  setValueByPath(toObject, ['apiKey'], fromApiKey);
8976
8985
  }
8977
8986
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
8978
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
8987
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8979
8988
  }
8980
8989
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
8981
- throw new Error('authType parameter is not supported in Gemini API.');
8990
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8982
8991
  }
8983
8992
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
8984
8993
  undefined) {
8985
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
8994
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8986
8995
  }
8987
8996
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
8988
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
8997
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8989
8998
  }
8990
8999
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
8991
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
9000
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8992
9001
  }
8993
9002
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
8994
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
9003
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8995
9004
  }
8996
9005
  return toObject;
8997
9006
  }
@@ -9002,7 +9011,7 @@ function blobToMldev$1(fromObject, _rootObject) {
9002
9011
  setValueByPath(toObject, ['data'], fromData);
9003
9012
  }
9004
9013
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
9005
- throw new Error('displayName parameter is not supported in Gemini API.');
9014
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9006
9015
  }
9007
9016
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
9008
9017
  if (fromMimeType != null) {
@@ -9199,13 +9208,13 @@ function controlReferenceConfigToVertex(fromObject, _rootObject) {
9199
9208
  function countTokensConfigToMldev(fromObject, _rootObject) {
9200
9209
  const toObject = {};
9201
9210
  if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) {
9202
- throw new Error('systemInstruction parameter is not supported in Gemini API.');
9211
+ throw new Error('systemInstruction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9203
9212
  }
9204
9213
  if (getValueByPath(fromObject, ['tools']) !== undefined) {
9205
- throw new Error('tools parameter is not supported in Gemini API.');
9214
+ throw new Error('tools parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9206
9215
  }
9207
9216
  if (getValueByPath(fromObject, ['generationConfig']) !== undefined) {
9208
- throw new Error('generationConfig parameter is not supported in Gemini API.');
9217
+ throw new Error('generationConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9209
9218
  }
9210
9219
  return toObject;
9211
9220
  }
@@ -9506,16 +9515,16 @@ function embedContentConfigToMldev(fromObject, parentObject, _rootObject) {
9506
9515
  setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
9507
9516
  }
9508
9517
  if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
9509
- throw new Error('mimeType parameter is not supported in Gemini API.');
9518
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9510
9519
  }
9511
9520
  if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
9512
- throw new Error('autoTruncate parameter is not supported in Gemini API.');
9521
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9513
9522
  }
9514
9523
  if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
9515
- throw new Error('documentOcr parameter is not supported in Gemini API.');
9524
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9516
9525
  }
9517
9526
  if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
9518
- throw new Error('audioTrackExtraction parameter is not supported in Gemini API.');
9527
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9519
9528
  }
9520
9529
  return toObject;
9521
9530
  }
@@ -9799,7 +9808,7 @@ function endpointFromVertex(fromObject, _rootObject) {
9799
9808
  function fileDataToMldev$1(fromObject, _rootObject) {
9800
9809
  const toObject = {};
9801
9810
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
9802
- throw new Error('displayName parameter is not supported in Gemini API.');
9811
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9803
9812
  }
9804
9813
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
9805
9814
  if (fromFileUri != null) {
@@ -9826,10 +9835,10 @@ function functionCallToMldev$1(fromObject, _rootObject) {
9826
9835
  setValueByPath(toObject, ['name'], fromName);
9827
9836
  }
9828
9837
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
9829
- throw new Error('partialArgs parameter is not supported in Gemini API.');
9838
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9830
9839
  }
9831
9840
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
9832
- throw new Error('willContinue parameter is not supported in Gemini API.');
9841
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9833
9842
  }
9834
9843
  return toObject;
9835
9844
  }
@@ -9847,7 +9856,7 @@ function functionCallingConfigToMldev(fromObject, _rootObject) {
9847
9856
  }
9848
9857
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
9849
9858
  undefined) {
9850
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
9859
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9851
9860
  }
9852
9861
  return toObject;
9853
9862
  }
@@ -9934,10 +9943,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
9934
9943
  setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
9935
9944
  }
9936
9945
  if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
9937
- throw new Error('routingConfig parameter is not supported in Gemini API.');
9946
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9938
9947
  }
9939
9948
  if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
9940
- throw new Error('modelSelectionConfig parameter is not supported in Gemini API.');
9949
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9941
9950
  }
9942
9951
  const fromSafetySettings = getValueByPath(fromObject, [
9943
9952
  'safetySettings',
@@ -9966,7 +9975,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
9966
9975
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(fromToolConfig));
9967
9976
  }
9968
9977
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
9969
- throw new Error('labels parameter is not supported in Gemini API.');
9978
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9970
9979
  }
9971
9980
  const fromCachedContent = getValueByPath(fromObject, [
9972
9981
  'cachedContent',
@@ -9991,7 +10000,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
9991
10000
  setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
9992
10001
  }
9993
10002
  if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
9994
- throw new Error('audioTimestamp parameter is not supported in Gemini API.');
10003
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9995
10004
  }
9996
10005
  const fromThinkingConfig = getValueByPath(fromObject, [
9997
10006
  'thinkingConfig',
@@ -10010,7 +10019,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
10010
10019
  setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
10011
10020
  }
10012
10021
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
10013
- throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
10022
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10014
10023
  }
10015
10024
  const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
10016
10025
  if (parentObject !== undefined && fromServiceTier != null) {
@@ -10182,7 +10191,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
10182
10191
  }
10183
10192
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
10184
10193
  undefined) {
10185
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
10194
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
10186
10195
  }
10187
10196
  const fromModelArmorConfig = getValueByPath(fromObject, [
10188
10197
  'modelArmorConfig',
@@ -10331,10 +10340,10 @@ function generateContentResponseFromVertex(fromObject, _rootObject) {
10331
10340
  function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
10332
10341
  const toObject = {};
10333
10342
  if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
10334
- throw new Error('outputGcsUri parameter is not supported in Gemini API.');
10343
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10335
10344
  }
10336
10345
  if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) {
10337
- throw new Error('negativePrompt parameter is not supported in Gemini API.');
10346
+ throw new Error('negativePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10338
10347
  }
10339
10348
  const fromNumberOfImages = getValueByPath(fromObject, [
10340
10349
  'numberOfImages',
@@ -10353,7 +10362,7 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
10353
10362
  setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale);
10354
10363
  }
10355
10364
  if (getValueByPath(fromObject, ['seed']) !== undefined) {
10356
- throw new Error('seed parameter is not supported in Gemini API.');
10365
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10357
10366
  }
10358
10367
  const fromSafetyFilterLevel = getValueByPath(fromObject, [
10359
10368
  'safetyFilterLevel',
@@ -10396,17 +10405,17 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
10396
10405
  setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
10397
10406
  }
10398
10407
  if (getValueByPath(fromObject, ['addWatermark']) !== undefined) {
10399
- throw new Error('addWatermark parameter is not supported in Gemini API.');
10408
+ throw new Error('addWatermark parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10400
10409
  }
10401
10410
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
10402
- throw new Error('labels parameter is not supported in Gemini API.');
10411
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10403
10412
  }
10404
10413
  const fromImageSize = getValueByPath(fromObject, ['imageSize']);
10405
10414
  if (parentObject !== undefined && fromImageSize != null) {
10406
10415
  setValueByPath(parentObject, ['parameters', 'sampleImageSize'], fromImageSize);
10407
10416
  }
10408
10417
  if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {
10409
- throw new Error('enhancePrompt parameter is not supported in Gemini API.');
10418
+ throw new Error('enhancePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10410
10419
  }
10411
10420
  return toObject;
10412
10421
  }
@@ -10599,10 +10608,10 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10599
10608
  setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos);
10600
10609
  }
10601
10610
  if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
10602
- throw new Error('outputGcsUri parameter is not supported in Gemini API.');
10611
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10603
10612
  }
10604
10613
  if (getValueByPath(fromObject, ['fps']) !== undefined) {
10605
- throw new Error('fps parameter is not supported in Gemini API.');
10614
+ throw new Error('fps parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10606
10615
  }
10607
10616
  const fromDurationSeconds = getValueByPath(fromObject, [
10608
10617
  'durationSeconds',
@@ -10611,7 +10620,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10611
10620
  setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds);
10612
10621
  }
10613
10622
  if (getValueByPath(fromObject, ['seed']) !== undefined) {
10614
- throw new Error('seed parameter is not supported in Gemini API.');
10623
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10615
10624
  }
10616
10625
  const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
10617
10626
  if (parentObject !== undefined && fromAspectRatio != null) {
@@ -10628,7 +10637,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10628
10637
  setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
10629
10638
  }
10630
10639
  if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {
10631
- throw new Error('pubsubTopic parameter is not supported in Gemini API.');
10640
+ throw new Error('pubsubTopic parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10632
10641
  }
10633
10642
  const fromNegativePrompt = getValueByPath(fromObject, [
10634
10643
  'negativePrompt',
@@ -10643,7 +10652,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10643
10652
  setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
10644
10653
  }
10645
10654
  if (getValueByPath(fromObject, ['generateAudio']) !== undefined) {
10646
- throw new Error('generateAudio parameter is not supported in Gemini API.');
10655
+ throw new Error('generateAudio parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10647
10656
  }
10648
10657
  const fromLastFrame = getValueByPath(fromObject, ['lastFrame']);
10649
10658
  if (parentObject !== undefined && fromLastFrame != null) {
@@ -10662,13 +10671,13 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10662
10671
  setValueByPath(parentObject, ['instances[0]', 'referenceImages'], transformedList);
10663
10672
  }
10664
10673
  if (getValueByPath(fromObject, ['mask']) !== undefined) {
10665
- throw new Error('mask parameter is not supported in Gemini API.');
10674
+ throw new Error('mask parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10666
10675
  }
10667
10676
  if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
10668
- throw new Error('compressionQuality parameter is not supported in Gemini API.');
10677
+ throw new Error('compressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10669
10678
  }
10670
10679
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
10671
- throw new Error('labels parameter is not supported in Gemini API.');
10680
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10672
10681
  }
10673
10682
  const fromWebhookConfig = getValueByPath(fromObject, [
10674
10683
  'webhookConfig',
@@ -10677,7 +10686,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10677
10686
  setValueByPath(parentObject, ['webhookConfig'], fromWebhookConfig);
10678
10687
  }
10679
10688
  if (getValueByPath(fromObject, ['resizeMode']) !== undefined) {
10680
- throw new Error('resizeMode parameter is not supported in Gemini API.');
10689
+ throw new Error('resizeMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10681
10690
  }
10682
10691
  return toObject;
10683
10692
  }
@@ -10774,7 +10783,7 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
10774
10783
  setValueByPath(parentObject, ['labels'], fromLabels);
10775
10784
  }
10776
10785
  if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
10777
- throw new Error('webhookConfig parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
10786
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
10778
10787
  }
10779
10788
  const fromResizeMode = getValueByPath(fromObject, ['resizeMode']);
10780
10789
  if (parentObject !== undefined && fromResizeMode != null) {
@@ -11173,7 +11182,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
11173
11182
  }
11174
11183
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
11175
11184
  undefined) {
11176
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11185
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11177
11186
  }
11178
11187
  return toObject;
11179
11188
  }
@@ -11212,10 +11221,10 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
11212
11221
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
11213
11222
  }
11214
11223
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
11215
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
11224
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11216
11225
  }
11217
11226
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
11218
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
11227
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11219
11228
  }
11220
11229
  const fromTimeRangeFilter = getValueByPath(fromObject, [
11221
11230
  'timeRangeFilter',
@@ -11236,20 +11245,20 @@ function imageConfigToMldev(fromObject, _rootObject) {
11236
11245
  setValueByPath(toObject, ['imageSize'], fromImageSize);
11237
11246
  }
11238
11247
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
11239
- throw new Error('personGeneration parameter is not supported in Gemini API.');
11248
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11240
11249
  }
11241
11250
  if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
11242
- throw new Error('prominentPeople parameter is not supported in Gemini API.');
11251
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11243
11252
  }
11244
11253
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
11245
- throw new Error('outputMimeType parameter is not supported in Gemini API.');
11254
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11246
11255
  }
11247
11256
  if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
11248
11257
  undefined) {
11249
- throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
11258
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11250
11259
  }
11251
11260
  if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
11252
- throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
11261
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11253
11262
  }
11254
11263
  return toObject;
11255
11264
  }
@@ -11330,7 +11339,7 @@ function imageFromVertex(fromObject, _rootObject) {
11330
11339
  function imageToMldev(fromObject, _rootObject) {
11331
11340
  const toObject = {};
11332
11341
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
11333
- throw new Error('gcsUri parameter is not supported in Gemini API.');
11342
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11334
11343
  }
11335
11344
  const fromImageBytes = getValueByPath(fromObject, ['imageBytes']);
11336
11345
  if (fromImageBytes != null) {
@@ -11733,13 +11742,13 @@ function partToVertex(fromObject, _rootObject) {
11733
11742
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
11734
11743
  }
11735
11744
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
11736
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11745
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11737
11746
  }
11738
11747
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
11739
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11748
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11740
11749
  }
11741
11750
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
11742
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11751
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11743
11752
  }
11744
11753
  return toObject;
11745
11754
  }
@@ -11962,7 +11971,7 @@ function safetySettingToMldev$1(fromObject, _rootObject) {
11962
11971
  setValueByPath(toObject, ['category'], fromCategory);
11963
11972
  }
11964
11973
  if (getValueByPath(fromObject, ['method']) !== undefined) {
11965
- throw new Error('method parameter is not supported in Gemini API.');
11974
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11966
11975
  }
11967
11976
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
11968
11977
  if (fromThreshold != null) {
@@ -12096,14 +12105,14 @@ function toolConfigToVertex(fromObject, _rootObject) {
12096
12105
  }
12097
12106
  if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
12098
12107
  undefined) {
12099
- throw new Error('includeServerSideToolInvocations parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12108
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12100
12109
  }
12101
12110
  return toObject;
12102
12111
  }
12103
12112
  function toolToMldev$1(fromObject, rootObject) {
12104
12113
  const toObject = {};
12105
12114
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
12106
- throw new Error('retrieval parameter is not supported in Gemini API.');
12115
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12107
12116
  }
12108
12117
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
12109
12118
  if (fromComputerUse != null) {
@@ -12128,7 +12137,7 @@ function toolToMldev$1(fromObject, rootObject) {
12128
12137
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
12129
12138
  }
12130
12139
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
12131
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
12140
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12132
12141
  }
12133
12142
  const fromFunctionDeclarations = getValueByPath(fromObject, [
12134
12143
  'functionDeclarations',
@@ -12149,7 +12158,7 @@ function toolToMldev$1(fromObject, rootObject) {
12149
12158
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
12150
12159
  }
12151
12160
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
12152
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
12161
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12153
12162
  }
12154
12163
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
12155
12164
  if (fromUrlContext != null) {
@@ -12178,7 +12187,7 @@ function toolToVertex(fromObject, _rootObject) {
12178
12187
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
12179
12188
  }
12180
12189
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
12181
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12190
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12182
12191
  }
12183
12192
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
12184
12193
  if (fromGoogleSearch != null) {
@@ -12229,7 +12238,7 @@ function toolToVertex(fromObject, _rootObject) {
12229
12238
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
12230
12239
  }
12231
12240
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
12232
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12241
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12233
12242
  }
12234
12243
  return toObject;
12235
12244
  }
@@ -12792,7 +12801,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
12792
12801
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
12793
12802
  const USER_AGENT_HEADER = 'User-Agent';
12794
12803
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
12795
- const SDK_VERSION = '2.1.0'; // x-release-please-version
12804
+ const SDK_VERSION = '2.3.0'; // x-release-please-version
12796
12805
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
12797
12806
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
12798
12807
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -14688,7 +14697,7 @@ class Models extends BaseModule {
14688
14697
  if (this.apiClient.isVertexAI()) {
14689
14698
  if (!actualParams.config.queryBase) {
14690
14699
  if ((_a = actualParams.config) === null || _a === void 0 ? void 0 : _a.filter) {
14691
- throw new Error('Filtering tuned models list for Gemini Enterprise Agent Platform (previously known as Vertex AI) is not currently supported');
14700
+ throw new Error('Filtering tuned models list is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
14692
14701
  }
14693
14702
  else {
14694
14703
  actualParams.config.filter = 'labels.tune-type:*';
@@ -16144,7 +16153,7 @@ class Operations extends BaseModule {
16144
16153
  function audioTranscriptionConfigToMldev(fromObject) {
16145
16154
  const toObject = {};
16146
16155
  if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
16147
- throw new Error('languageCodes parameter is not supported in Gemini API.');
16156
+ throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16148
16157
  }
16149
16158
  return toObject;
16150
16159
  }
@@ -16155,23 +16164,23 @@ function authConfigToMldev(fromObject) {
16155
16164
  setValueByPath(toObject, ['apiKey'], fromApiKey);
16156
16165
  }
16157
16166
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
16158
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
16167
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16159
16168
  }
16160
16169
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
16161
- throw new Error('authType parameter is not supported in Gemini API.');
16170
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16162
16171
  }
16163
16172
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
16164
16173
  undefined) {
16165
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
16174
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16166
16175
  }
16167
16176
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
16168
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
16177
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16169
16178
  }
16170
16179
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
16171
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
16180
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16172
16181
  }
16173
16182
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
16174
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
16183
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16175
16184
  }
16176
16185
  return toObject;
16177
16186
  }
@@ -16182,7 +16191,7 @@ function blobToMldev(fromObject) {
16182
16191
  setValueByPath(toObject, ['data'], fromData);
16183
16192
  }
16184
16193
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
16185
- throw new Error('displayName parameter is not supported in Gemini API.');
16194
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16186
16195
  }
16187
16196
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
16188
16197
  if (fromMimeType != null) {
@@ -16249,7 +16258,7 @@ function createAuthTokenParametersToMldev(apiClient, fromObject) {
16249
16258
  function fileDataToMldev(fromObject) {
16250
16259
  const toObject = {};
16251
16260
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
16252
- throw new Error('displayName parameter is not supported in Gemini API.');
16261
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16253
16262
  }
16254
16263
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
16255
16264
  if (fromFileUri != null) {
@@ -16276,10 +16285,10 @@ function functionCallToMldev(fromObject) {
16276
16285
  setValueByPath(toObject, ['name'], fromName);
16277
16286
  }
16278
16287
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
16279
- throw new Error('partialArgs parameter is not supported in Gemini API.');
16288
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16280
16289
  }
16281
16290
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
16282
- throw new Error('willContinue parameter is not supported in Gemini API.');
16291
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16283
16292
  }
16284
16293
  return toObject;
16285
16294
  }
@@ -16302,10 +16311,10 @@ function googleSearchToMldev(fromObject) {
16302
16311
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
16303
16312
  }
16304
16313
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
16305
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
16314
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16306
16315
  }
16307
16316
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
16308
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
16317
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16309
16318
  }
16310
16319
  const fromTimeRangeFilter = getValueByPath(fromObject, [
16311
16320
  'timeRangeFilter',
@@ -16424,7 +16433,7 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
16424
16433
  setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
16425
16434
  }
16426
16435
  if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
16427
- throw new Error('explicitVadSignal parameter is not supported in Gemini API.');
16436
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16428
16437
  }
16429
16438
  const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
16430
16439
  if (parentObject !== undefined && fromAvatarConfig != null) {
@@ -16442,6 +16451,12 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
16442
16451
  }
16443
16452
  setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
16444
16453
  }
16454
+ const fromStreamTranslationConfig = getValueByPath(fromObject, [
16455
+ 'streamTranslationConfig',
16456
+ ]);
16457
+ if (parentObject !== undefined && fromStreamTranslationConfig != null) {
16458
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'streamTranslationConfig'], fromStreamTranslationConfig);
16459
+ }
16445
16460
  return toObject;
16446
16461
  }
16447
16462
  function liveConnectConstraintsToMldev(apiClient, fromObject) {
@@ -16535,7 +16550,7 @@ function safetySettingToMldev(fromObject) {
16535
16550
  setValueByPath(toObject, ['category'], fromCategory);
16536
16551
  }
16537
16552
  if (getValueByPath(fromObject, ['method']) !== undefined) {
16538
- throw new Error('method parameter is not supported in Gemini API.');
16553
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16539
16554
  }
16540
16555
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
16541
16556
  if (fromThreshold != null) {
@@ -16550,14 +16565,14 @@ function sessionResumptionConfigToMldev(fromObject) {
16550
16565
  setValueByPath(toObject, ['handle'], fromHandle);
16551
16566
  }
16552
16567
  if (getValueByPath(fromObject, ['transparent']) !== undefined) {
16553
- throw new Error('transparent parameter is not supported in Gemini API.');
16568
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16554
16569
  }
16555
16570
  return toObject;
16556
16571
  }
16557
16572
  function toolToMldev(fromObject) {
16558
16573
  const toObject = {};
16559
16574
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
16560
- throw new Error('retrieval parameter is not supported in Gemini API.');
16575
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16561
16576
  }
16562
16577
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
16563
16578
  if (fromComputerUse != null) {
@@ -16582,7 +16597,7 @@ function toolToMldev(fromObject) {
16582
16597
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
16583
16598
  }
16584
16599
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
16585
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
16600
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16586
16601
  }
16587
16602
  const fromFunctionDeclarations = getValueByPath(fromObject, [
16588
16603
  'functionDeclarations',
@@ -16603,7 +16618,7 @@ function toolToMldev(fromObject) {
16603
16618
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
16604
16619
  }
16605
16620
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
16606
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
16621
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16607
16622
  }
16608
16623
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
16609
16624
  if (fromUrlContext != null) {
@@ -18702,10 +18717,14 @@ class BaseInteractions extends APIResource {
18702
18717
  });
18703
18718
  const isStreaming = (_a = params.stream) !== null && _a !== void 0 ? _a : false;
18704
18719
  const promise = this._client.post(path `/${api_version}/interactions`, Object.assign(Object.assign(Object.assign({ body }, options), { stream: isStreaming }), (needsLegacyLyriaShim && isStreaming ? { __streamClass: LegacyLyriaStream } : {})));
18705
- if (needsLegacyLyriaShim && !isStreaming) {
18706
- return promise._thenUnwrap((data) => coerceLegacyInteractionResponse(data));
18720
+ if (isStreaming) {
18721
+ return promise;
18707
18722
  }
18708
- return promise;
18723
+ let nonStreaming = promise;
18724
+ if (needsLegacyLyriaShim) {
18725
+ nonStreaming = nonStreaming._thenUnwrap((data) => coerceLegacyInteractionResponse(data));
18726
+ }
18727
+ return nonStreaming._thenUnwrap(addOutputProperties);
18709
18728
  }
18710
18729
  /**
18711
18730
  * Deletes the interaction by id.
@@ -18734,17 +18753,64 @@ class BaseInteractions extends APIResource {
18734
18753
  */
18735
18754
  cancel(id, params = {}, options) {
18736
18755
  const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
18737
- return this._client.post(path `/${api_version}/interactions/${id}/cancel`, options);
18756
+ return this._client.post(path `/${api_version}/interactions/${id}/cancel`, options)._thenUnwrap(addOutputProperties);
18738
18757
  }
18739
18758
  get(id, params = {}, options) {
18740
18759
  var _a;
18741
18760
  const _b = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _b, query = __rest(_b, ["api_version"]);
18742
- return this._client.get(path `/${api_version}/interactions/${id}`, Object.assign(Object.assign({ query }, options), { stream: (_a = params === null || params === void 0 ? void 0 : params.stream) !== null && _a !== void 0 ? _a : false }));
18761
+ const response = this._client.get(path `/${api_version}/interactions/${id}`, Object.assign(Object.assign({ query }, options), { stream: (_a = params === null || params === void 0 ? void 0 : params.stream) !== null && _a !== void 0 ? _a : false }));
18762
+ if (params === null || params === void 0 ? void 0 : params.stream) {
18763
+ return response;
18764
+ }
18765
+ return response._thenUnwrap(addOutputProperties);
18743
18766
  }
18744
18767
  }
18745
18768
  BaseInteractions._key = Object.freeze(['interactions']);
18746
18769
  class Interactions extends BaseInteractions {
18747
18770
  }
18771
+ function addOutputProperties(interaction) {
18772
+ var _a, _b;
18773
+ const steps = (_a = interaction.steps) !== null && _a !== void 0 ? _a : [];
18774
+ let firstTrailing = steps.length;
18775
+ while (firstTrailing > 0 && steps[firstTrailing - 1].type === 'model_output') {
18776
+ firstTrailing--;
18777
+ }
18778
+ const modelSteps = steps.slice(firstTrailing);
18779
+ const output = modelSteps.flatMap((step) => { var _a; return (_a = step.content) !== null && _a !== void 0 ? _a : []; });
18780
+ const textParts = [];
18781
+ for (let i = output.length - 1; i >= 0; i--) {
18782
+ const content = output[i];
18783
+ if (content.type !== 'text')
18784
+ break;
18785
+ textParts.push((_b = content.text) !== null && _b !== void 0 ? _b : '');
18786
+ }
18787
+ const output_text = textParts.reverse().join('');
18788
+ let output_image;
18789
+ let output_audio;
18790
+ let output_video;
18791
+ for (let i = steps.length - 1; i >= 0; i--) {
18792
+ const step = steps[i];
18793
+ const anyStep = step;
18794
+ if (anyStep.type === 'user_input') {
18795
+ break;
18796
+ }
18797
+ if (anyStep.type === 'model_output' && anyStep.content) {
18798
+ for (let j = anyStep.content.length - 1; j >= 0; j--) {
18799
+ const content = anyStep.content[j];
18800
+ if (content.type === 'image' && !output_image) {
18801
+ output_image = content;
18802
+ }
18803
+ if (content.type === 'audio' && !output_audio) {
18804
+ output_audio = content;
18805
+ }
18806
+ if (content.type === 'video' && !output_video) {
18807
+ output_video = content;
18808
+ }
18809
+ }
18810
+ }
18811
+ }
18812
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, interaction), (output_text && { output_text })), (output_image && { output_image })), (output_audio && { output_audio })), (output_video && { output_video }));
18813
+ }
18748
18814
 
18749
18815
  /**
18750
18816
  * @license
@@ -19704,7 +19770,7 @@ function cancelTuningJobResponseFromVertex(fromObject, _rootObject) {
19704
19770
  function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19705
19771
  const toObject = {};
19706
19772
  if (getValueByPath(fromObject, ['validationDataset']) !== undefined) {
19707
- throw new Error('validationDataset parameter is not supported in Gemini API.');
19773
+ throw new Error('validationDataset parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19708
19774
  }
19709
19775
  const fromTunedModelDisplayName = getValueByPath(fromObject, [
19710
19776
  'tunedModelDisplayName',
@@ -19713,7 +19779,7 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19713
19779
  setValueByPath(parentObject, ['displayName'], fromTunedModelDisplayName);
19714
19780
  }
19715
19781
  if (getValueByPath(fromObject, ['description']) !== undefined) {
19716
- throw new Error('description parameter is not supported in Gemini API.');
19782
+ throw new Error('description parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19717
19783
  }
19718
19784
  const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
19719
19785
  if (parentObject !== undefined && fromEpochCount != null) {
@@ -19727,20 +19793,20 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19727
19793
  }
19728
19794
  if (getValueByPath(fromObject, ['exportLastCheckpointOnly']) !==
19729
19795
  undefined) {
19730
- throw new Error('exportLastCheckpointOnly parameter is not supported in Gemini API.');
19796
+ throw new Error('exportLastCheckpointOnly parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19731
19797
  }
19732
19798
  if (getValueByPath(fromObject, ['preTunedModelCheckpointId']) !==
19733
19799
  undefined) {
19734
- throw new Error('preTunedModelCheckpointId parameter is not supported in Gemini API.');
19800
+ throw new Error('preTunedModelCheckpointId parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19735
19801
  }
19736
19802
  if (getValueByPath(fromObject, ['adapterSize']) !== undefined) {
19737
- throw new Error('adapterSize parameter is not supported in Gemini API.');
19803
+ throw new Error('adapterSize parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19738
19804
  }
19739
19805
  if (getValueByPath(fromObject, ['tuningMode']) !== undefined) {
19740
- throw new Error('tuningMode parameter is not supported in Gemini API.');
19806
+ throw new Error('tuningMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19741
19807
  }
19742
19808
  if (getValueByPath(fromObject, ['customBaseModel']) !== undefined) {
19743
- throw new Error('customBaseModel parameter is not supported in Gemini API.');
19809
+ throw new Error('customBaseModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19744
19810
  }
19745
19811
  const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
19746
19812
  if (parentObject !== undefined && fromBatchSize != null) {
@@ -19751,25 +19817,25 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19751
19817
  setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'learningRate'], fromLearningRate);
19752
19818
  }
19753
19819
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
19754
- throw new Error('labels parameter is not supported in Gemini API.');
19820
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19755
19821
  }
19756
19822
  if (getValueByPath(fromObject, ['beta']) !== undefined) {
19757
- throw new Error('beta parameter is not supported in Gemini API.');
19823
+ throw new Error('beta parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19758
19824
  }
19759
19825
  if (getValueByPath(fromObject, ['baseTeacherModel']) !== undefined) {
19760
- throw new Error('baseTeacherModel parameter is not supported in Gemini API.');
19826
+ throw new Error('baseTeacherModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19761
19827
  }
19762
19828
  if (getValueByPath(fromObject, ['tunedTeacherModelSource']) !== undefined) {
19763
- throw new Error('tunedTeacherModelSource parameter is not supported in Gemini API.');
19829
+ throw new Error('tunedTeacherModelSource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19764
19830
  }
19765
19831
  if (getValueByPath(fromObject, ['sftLossWeightMultiplier']) !== undefined) {
19766
- throw new Error('sftLossWeightMultiplier parameter is not supported in Gemini API.');
19832
+ throw new Error('sftLossWeightMultiplier parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19767
19833
  }
19768
19834
  if (getValueByPath(fromObject, ['outputUri']) !== undefined) {
19769
- throw new Error('outputUri parameter is not supported in Gemini API.');
19835
+ throw new Error('outputUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19770
19836
  }
19771
19837
  if (getValueByPath(fromObject, ['encryptionSpec']) !== undefined) {
19772
- throw new Error('encryptionSpec parameter is not supported in Gemini API.');
19838
+ throw new Error('encryptionSpec parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19773
19839
  }
19774
19840
  return toObject;
19775
19841
  }
@@ -20163,10 +20229,10 @@ function tunedModelFromMldev(fromObject, _rootObject) {
20163
20229
  function tuningDatasetToMldev(fromObject, _rootObject) {
20164
20230
  const toObject = {};
20165
20231
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
20166
- throw new Error('gcsUri parameter is not supported in Gemini API.');
20232
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
20167
20233
  }
20168
20234
  if (getValueByPath(fromObject, ['vertexDatasetResource']) !== undefined) {
20169
- throw new Error('vertexDatasetResource parameter is not supported in Gemini API.');
20235
+ throw new Error('vertexDatasetResource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
20170
20236
  }
20171
20237
  const fromExamples = getValueByPath(fromObject, ['examples']);
20172
20238
  if (fromExamples != null) {
@@ -20239,7 +20305,7 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
20239
20305
  }
20240
20306
  }
20241
20307
  if (getValueByPath(fromObject, ['examples']) !== undefined) {
20242
- throw new Error('examples parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
20308
+ throw new Error('examples parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
20243
20309
  }
20244
20310
  return toObject;
20245
20311
  }
@@ -21297,6 +21363,7 @@ class GoogleGenAI {
21297
21363
  if (this._interactions !== undefined) {
21298
21364
  return this._interactions;
21299
21365
  }
21366
+ console.warn('GoogleGenAI.interactions: Interactions usage is experimental and may change in future versions.');
21300
21367
  this._interactions = this.getNextGenClient().interactions;
21301
21368
  return this._interactions;
21302
21369
  }