@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.
@@ -3797,23 +3797,23 @@ function authConfigToMldev$4(fromObject) {
3797
3797
  setValueByPath(toObject, ['apiKey'], fromApiKey);
3798
3798
  }
3799
3799
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
3800
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
3800
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3801
3801
  }
3802
3802
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
3803
- throw new Error('authType parameter is not supported in Gemini API.');
3803
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3804
3804
  }
3805
3805
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
3806
3806
  undefined) {
3807
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
3807
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3808
3808
  }
3809
3809
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
3810
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
3810
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3811
3811
  }
3812
3812
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
3813
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
3813
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3814
3814
  }
3815
3815
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
3816
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
3816
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3817
3817
  }
3818
3818
  return toObject;
3819
3819
  }
@@ -3894,14 +3894,14 @@ function batchJobDestinationToVertex(fromObject) {
3894
3894
  setValueByPath(toObject, ['bigqueryDestination', 'outputUri'], fromBigqueryUri);
3895
3895
  }
3896
3896
  if (getValueByPath(fromObject, ['fileName']) !== undefined) {
3897
- throw new Error('fileName parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3897
+ throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3898
3898
  }
3899
3899
  if (getValueByPath(fromObject, ['inlinedResponses']) !== undefined) {
3900
- throw new Error('inlinedResponses parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3900
+ throw new Error('inlinedResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3901
3901
  }
3902
3902
  if (getValueByPath(fromObject, ['inlinedEmbedContentResponses']) !==
3903
3903
  undefined) {
3904
- throw new Error('inlinedEmbedContentResponses parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3904
+ throw new Error('inlinedEmbedContentResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3905
3905
  }
3906
3906
  const fromVertexDataset = getValueByPath(fromObject, [
3907
3907
  'vertexDataset',
@@ -4046,13 +4046,13 @@ function batchJobSourceFromVertex(fromObject) {
4046
4046
  function batchJobSourceToMldev(apiClient, fromObject) {
4047
4047
  const toObject = {};
4048
4048
  if (getValueByPath(fromObject, ['format']) !== undefined) {
4049
- throw new Error('format parameter is not supported in Gemini API.');
4049
+ throw new Error('format parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4050
4050
  }
4051
4051
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
4052
- throw new Error('gcsUri parameter is not supported in Gemini API.');
4052
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4053
4053
  }
4054
4054
  if (getValueByPath(fromObject, ['bigqueryUri']) !== undefined) {
4055
- throw new Error('bigqueryUri parameter is not supported in Gemini API.');
4055
+ throw new Error('bigqueryUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4056
4056
  }
4057
4057
  const fromFileName = getValueByPath(fromObject, ['fileName']);
4058
4058
  if (fromFileName != null) {
@@ -4071,7 +4071,7 @@ function batchJobSourceToMldev(apiClient, fromObject) {
4071
4071
  setValueByPath(toObject, ['requests', 'requests'], transformedList);
4072
4072
  }
4073
4073
  if (getValueByPath(fromObject, ['vertexDatasetName']) !== undefined) {
4074
- throw new Error('vertexDatasetName parameter is not supported in Gemini API.');
4074
+ throw new Error('vertexDatasetName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4075
4075
  }
4076
4076
  return toObject;
4077
4077
  }
@@ -4090,10 +4090,10 @@ function batchJobSourceToVertex(fromObject) {
4090
4090
  setValueByPath(toObject, ['bigquerySource', 'inputUri'], fromBigqueryUri);
4091
4091
  }
4092
4092
  if (getValueByPath(fromObject, ['fileName']) !== undefined) {
4093
- throw new Error('fileName parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4093
+ throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4094
4094
  }
4095
4095
  if (getValueByPath(fromObject, ['inlinedRequests']) !== undefined) {
4096
- throw new Error('inlinedRequests parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4096
+ throw new Error('inlinedRequests parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4097
4097
  }
4098
4098
  const fromVertexDatasetName = getValueByPath(fromObject, [
4099
4099
  'vertexDatasetName',
@@ -4110,7 +4110,7 @@ function blobToMldev$4(fromObject) {
4110
4110
  setValueByPath(toObject, ['data'], fromData);
4111
4111
  }
4112
4112
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
4113
- throw new Error('displayName parameter is not supported in Gemini API.');
4113
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4114
4114
  }
4115
4115
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
4116
4116
  if (fromMimeType != null) {
@@ -4233,7 +4233,7 @@ function createBatchJobConfigToMldev(fromObject, parentObject) {
4233
4233
  setValueByPath(parentObject, ['batch', 'displayName'], fromDisplayName);
4234
4234
  }
4235
4235
  if (getValueByPath(fromObject, ['dest']) !== undefined) {
4236
- throw new Error('dest parameter is not supported in Gemini API.');
4236
+ throw new Error('dest parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4237
4237
  }
4238
4238
  const fromWebhookConfig = getValueByPath(fromObject, [
4239
4239
  'webhookConfig',
@@ -4254,7 +4254,7 @@ function createBatchJobConfigToVertex(fromObject, parentObject) {
4254
4254
  setValueByPath(parentObject, ['outputConfig'], batchJobDestinationToVertex(tBatchJobDestination(fromDest)));
4255
4255
  }
4256
4256
  if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
4257
- throw new Error('webhookConfig parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4257
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4258
4258
  }
4259
4259
  return toObject;
4260
4260
  }
@@ -4410,16 +4410,16 @@ function embedContentConfigToMldev$1(fromObject, parentObject) {
4410
4410
  setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
4411
4411
  }
4412
4412
  if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
4413
- throw new Error('mimeType parameter is not supported in Gemini API.');
4413
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4414
4414
  }
4415
4415
  if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
4416
- throw new Error('autoTruncate parameter is not supported in Gemini API.');
4416
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4417
4417
  }
4418
4418
  if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
4419
- throw new Error('documentOcr parameter is not supported in Gemini API.');
4419
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4420
4420
  }
4421
4421
  if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
4422
- throw new Error('audioTrackExtraction parameter is not supported in Gemini API.');
4422
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4423
4423
  }
4424
4424
  return toObject;
4425
4425
  }
@@ -4440,7 +4440,7 @@ function embeddingsBatchJobSourceToMldev(apiClient, fromObject) {
4440
4440
  function fileDataToMldev$4(fromObject) {
4441
4441
  const toObject = {};
4442
4442
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
4443
- throw new Error('displayName parameter is not supported in Gemini API.');
4443
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4444
4444
  }
4445
4445
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
4446
4446
  if (fromFileUri != null) {
@@ -4467,10 +4467,10 @@ function functionCallToMldev$4(fromObject) {
4467
4467
  setValueByPath(toObject, ['name'], fromName);
4468
4468
  }
4469
4469
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
4470
- throw new Error('partialArgs parameter is not supported in Gemini API.');
4470
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4471
4471
  }
4472
4472
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
4473
- throw new Error('willContinue parameter is not supported in Gemini API.');
4473
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4474
4474
  }
4475
4475
  return toObject;
4476
4476
  }
@@ -4488,7 +4488,7 @@ function functionCallingConfigToMldev$2(fromObject) {
4488
4488
  }
4489
4489
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
4490
4490
  undefined) {
4491
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
4491
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4492
4492
  }
4493
4493
  return toObject;
4494
4494
  }
@@ -4575,10 +4575,10 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4575
4575
  setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
4576
4576
  }
4577
4577
  if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
4578
- throw new Error('routingConfig parameter is not supported in Gemini API.');
4578
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4579
4579
  }
4580
4580
  if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
4581
- throw new Error('modelSelectionConfig parameter is not supported in Gemini API.');
4581
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4582
4582
  }
4583
4583
  const fromSafetySettings = getValueByPath(fromObject, [
4584
4584
  'safetySettings',
@@ -4607,7 +4607,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4607
4607
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$2(fromToolConfig));
4608
4608
  }
4609
4609
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
4610
- throw new Error('labels parameter is not supported in Gemini API.');
4610
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4611
4611
  }
4612
4612
  const fromCachedContent = getValueByPath(fromObject, [
4613
4613
  'cachedContent',
@@ -4632,7 +4632,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4632
4632
  setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
4633
4633
  }
4634
4634
  if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
4635
- throw new Error('audioTimestamp parameter is not supported in Gemini API.');
4635
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4636
4636
  }
4637
4637
  const fromThinkingConfig = getValueByPath(fromObject, [
4638
4638
  'thinkingConfig',
@@ -4651,7 +4651,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4651
4651
  setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
4652
4652
  }
4653
4653
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
4654
- throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
4654
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4655
4655
  }
4656
4656
  const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
4657
4657
  if (parentObject !== undefined && fromServiceTier != null) {
@@ -4738,10 +4738,10 @@ function googleSearchToMldev$4(fromObject) {
4738
4738
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
4739
4739
  }
4740
4740
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
4741
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
4741
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4742
4742
  }
4743
4743
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
4744
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
4744
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4745
4745
  }
4746
4746
  const fromTimeRangeFilter = getValueByPath(fromObject, [
4747
4747
  'timeRangeFilter',
@@ -4762,20 +4762,20 @@ function imageConfigToMldev$1(fromObject) {
4762
4762
  setValueByPath(toObject, ['imageSize'], fromImageSize);
4763
4763
  }
4764
4764
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
4765
- throw new Error('personGeneration parameter is not supported in Gemini API.');
4765
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4766
4766
  }
4767
4767
  if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
4768
- throw new Error('prominentPeople parameter is not supported in Gemini API.');
4768
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4769
4769
  }
4770
4770
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
4771
- throw new Error('outputMimeType parameter is not supported in Gemini API.');
4771
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4772
4772
  }
4773
4773
  if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
4774
4774
  undefined) {
4775
- throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
4775
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4776
4776
  }
4777
4777
  if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
4778
- throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
4778
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4779
4779
  }
4780
4780
  return toObject;
4781
4781
  }
@@ -4832,7 +4832,7 @@ function listBatchJobsConfigToMldev(fromObject, parentObject) {
4832
4832
  setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
4833
4833
  }
4834
4834
  if (getValueByPath(fromObject, ['filter']) !== undefined) {
4835
- throw new Error('filter parameter is not supported in Gemini API.');
4835
+ throw new Error('filter parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4836
4836
  }
4837
4837
  return toObject;
4838
4838
  }
@@ -5001,7 +5001,7 @@ function safetySettingToMldev$3(fromObject) {
5001
5001
  setValueByPath(toObject, ['category'], fromCategory);
5002
5002
  }
5003
5003
  if (getValueByPath(fromObject, ['method']) !== undefined) {
5004
- throw new Error('method parameter is not supported in Gemini API.');
5004
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5005
5005
  }
5006
5006
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
5007
5007
  if (fromThreshold != null) {
@@ -5032,7 +5032,7 @@ function toolConfigToMldev$2(fromObject) {
5032
5032
  function toolToMldev$4(fromObject) {
5033
5033
  const toObject = {};
5034
5034
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
5035
- throw new Error('retrieval parameter is not supported in Gemini API.');
5035
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5036
5036
  }
5037
5037
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
5038
5038
  if (fromComputerUse != null) {
@@ -5057,7 +5057,7 @@ function toolToMldev$4(fromObject) {
5057
5057
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
5058
5058
  }
5059
5059
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
5060
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
5060
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5061
5061
  }
5062
5062
  const fromFunctionDeclarations = getValueByPath(fromObject, [
5063
5063
  'functionDeclarations',
@@ -5078,7 +5078,7 @@ function toolToMldev$4(fromObject) {
5078
5078
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
5079
5079
  }
5080
5080
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
5081
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
5081
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5082
5082
  }
5083
5083
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
5084
5084
  if (fromUrlContext != null) {
@@ -5825,23 +5825,23 @@ function authConfigToMldev$3(fromObject) {
5825
5825
  setValueByPath(toObject, ['apiKey'], fromApiKey);
5826
5826
  }
5827
5827
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
5828
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
5828
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5829
5829
  }
5830
5830
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
5831
- throw new Error('authType parameter is not supported in Gemini API.');
5831
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5832
5832
  }
5833
5833
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
5834
5834
  undefined) {
5835
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
5835
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5836
5836
  }
5837
5837
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
5838
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
5838
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5839
5839
  }
5840
5840
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
5841
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
5841
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5842
5842
  }
5843
5843
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
5844
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
5844
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5845
5845
  }
5846
5846
  return toObject;
5847
5847
  }
@@ -5852,7 +5852,7 @@ function blobToMldev$3(fromObject) {
5852
5852
  setValueByPath(toObject, ['data'], fromData);
5853
5853
  }
5854
5854
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
5855
- throw new Error('displayName parameter is not supported in Gemini API.');
5855
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5856
5856
  }
5857
5857
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
5858
5858
  if (fromMimeType != null) {
@@ -5941,7 +5941,7 @@ function createCachedContentConfigToMldev(fromObject, parentObject) {
5941
5941
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$1(fromToolConfig));
5942
5942
  }
5943
5943
  if (getValueByPath(fromObject, ['kmsKeyName']) !== undefined) {
5944
- throw new Error('kmsKeyName parameter is not supported in Gemini API.');
5944
+ throw new Error('kmsKeyName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5945
5945
  }
5946
5946
  return toObject;
5947
5947
  }
@@ -6058,7 +6058,7 @@ function deleteCachedContentResponseFromVertex(fromObject) {
6058
6058
  function fileDataToMldev$3(fromObject) {
6059
6059
  const toObject = {};
6060
6060
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
6061
- throw new Error('displayName parameter is not supported in Gemini API.');
6061
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6062
6062
  }
6063
6063
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
6064
6064
  if (fromFileUri != null) {
@@ -6085,10 +6085,10 @@ function functionCallToMldev$3(fromObject) {
6085
6085
  setValueByPath(toObject, ['name'], fromName);
6086
6086
  }
6087
6087
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
6088
- throw new Error('partialArgs parameter is not supported in Gemini API.');
6088
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6089
6089
  }
6090
6090
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
6091
- throw new Error('willContinue parameter is not supported in Gemini API.');
6091
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6092
6092
  }
6093
6093
  return toObject;
6094
6094
  }
@@ -6106,7 +6106,7 @@ function functionCallingConfigToMldev$1(fromObject) {
6106
6106
  }
6107
6107
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
6108
6108
  undefined) {
6109
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
6109
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6110
6110
  }
6111
6111
  return toObject;
6112
6112
  }
@@ -6145,10 +6145,10 @@ function googleSearchToMldev$3(fromObject) {
6145
6145
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
6146
6146
  }
6147
6147
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
6148
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
6148
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6149
6149
  }
6150
6150
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
6151
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
6151
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6152
6152
  }
6153
6153
  const fromTimeRangeFilter = getValueByPath(fromObject, [
6154
6154
  'timeRangeFilter',
@@ -6385,13 +6385,13 @@ function partToVertex$2(fromObject) {
6385
6385
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
6386
6386
  }
6387
6387
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
6388
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6388
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6389
6389
  }
6390
6390
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
6391
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6391
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6392
6392
  }
6393
6393
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
6394
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6394
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6395
6395
  }
6396
6396
  return toObject;
6397
6397
  }
@@ -6431,14 +6431,14 @@ function toolConfigToVertex$1(fromObject) {
6431
6431
  }
6432
6432
  if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
6433
6433
  undefined) {
6434
- throw new Error('includeServerSideToolInvocations parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6434
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6435
6435
  }
6436
6436
  return toObject;
6437
6437
  }
6438
6438
  function toolToMldev$3(fromObject) {
6439
6439
  const toObject = {};
6440
6440
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
6441
- throw new Error('retrieval parameter is not supported in Gemini API.');
6441
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6442
6442
  }
6443
6443
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
6444
6444
  if (fromComputerUse != null) {
@@ -6463,7 +6463,7 @@ function toolToMldev$3(fromObject) {
6463
6463
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
6464
6464
  }
6465
6465
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
6466
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
6466
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6467
6467
  }
6468
6468
  const fromFunctionDeclarations = getValueByPath(fromObject, [
6469
6469
  'functionDeclarations',
@@ -6484,7 +6484,7 @@ function toolToMldev$3(fromObject) {
6484
6484
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
6485
6485
  }
6486
6486
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
6487
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
6487
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6488
6488
  }
6489
6489
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
6490
6490
  if (fromUrlContext != null) {
@@ -6513,7 +6513,7 @@ function toolToVertex$2(fromObject) {
6513
6513
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
6514
6514
  }
6515
6515
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
6516
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6516
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6517
6517
  }
6518
6518
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
6519
6519
  if (fromGoogleSearch != null) {
@@ -6564,7 +6564,7 @@ function toolToVertex$2(fromObject) {
6564
6564
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
6565
6565
  }
6566
6566
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
6567
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6567
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6568
6568
  }
6569
6569
  return toObject;
6570
6570
  }
@@ -7856,7 +7856,7 @@ class Files extends BaseModule {
7856
7856
  function audioTranscriptionConfigToMldev$1(fromObject) {
7857
7857
  const toObject = {};
7858
7858
  if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
7859
- throw new Error('languageCodes parameter is not supported in Gemini API.');
7859
+ throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7860
7860
  }
7861
7861
  return toObject;
7862
7862
  }
@@ -7867,23 +7867,23 @@ function authConfigToMldev$2(fromObject) {
7867
7867
  setValueByPath(toObject, ['apiKey'], fromApiKey);
7868
7868
  }
7869
7869
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
7870
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
7870
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7871
7871
  }
7872
7872
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
7873
- throw new Error('authType parameter is not supported in Gemini API.');
7873
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7874
7874
  }
7875
7875
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
7876
7876
  undefined) {
7877
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
7877
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7878
7878
  }
7879
7879
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
7880
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
7880
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7881
7881
  }
7882
7882
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
7883
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
7883
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7884
7884
  }
7885
7885
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
7886
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
7886
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7887
7887
  }
7888
7888
  return toObject;
7889
7889
  }
@@ -7894,7 +7894,7 @@ function blobToMldev$2(fromObject) {
7894
7894
  setValueByPath(toObject, ['data'], fromData);
7895
7895
  }
7896
7896
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
7897
- throw new Error('displayName parameter is not supported in Gemini API.');
7897
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7898
7898
  }
7899
7899
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
7900
7900
  if (fromMimeType != null) {
@@ -7941,7 +7941,7 @@ function contentToVertex$1(fromObject) {
7941
7941
  function fileDataToMldev$2(fromObject) {
7942
7942
  const toObject = {};
7943
7943
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
7944
- throw new Error('displayName parameter is not supported in Gemini API.');
7944
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7945
7945
  }
7946
7946
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
7947
7947
  if (fromFileUri != null) {
@@ -7968,10 +7968,10 @@ function functionCallToMldev$2(fromObject) {
7968
7968
  setValueByPath(toObject, ['name'], fromName);
7969
7969
  }
7970
7970
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
7971
- throw new Error('partialArgs parameter is not supported in Gemini API.');
7971
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7972
7972
  }
7973
7973
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
7974
- throw new Error('willContinue parameter is not supported in Gemini API.');
7974
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7975
7975
  }
7976
7976
  return toObject;
7977
7977
  }
@@ -8099,7 +8099,7 @@ function generationConfigToVertex$1(fromObject) {
8099
8099
  }
8100
8100
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
8101
8101
  undefined) {
8102
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8102
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8103
8103
  }
8104
8104
  return toObject;
8105
8105
  }
@@ -8122,10 +8122,10 @@ function googleSearchToMldev$2(fromObject) {
8122
8122
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
8123
8123
  }
8124
8124
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
8125
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
8125
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8126
8126
  }
8127
8127
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
8128
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
8128
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8129
8129
  }
8130
8130
  const fromTimeRangeFilter = getValueByPath(fromObject, [
8131
8131
  'timeRangeFilter',
@@ -8244,7 +8244,7 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
8244
8244
  setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
8245
8245
  }
8246
8246
  if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
8247
- throw new Error('explicitVadSignal parameter is not supported in Gemini API.');
8247
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8248
8248
  }
8249
8249
  const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
8250
8250
  if (parentObject !== undefined && fromAvatarConfig != null) {
@@ -8262,6 +8262,12 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
8262
8262
  }
8263
8263
  setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
8264
8264
  }
8265
+ const fromStreamTranslationConfig = getValueByPath(fromObject, [
8266
+ 'streamTranslationConfig',
8267
+ ]);
8268
+ if (parentObject !== undefined && fromStreamTranslationConfig != null) {
8269
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'streamTranslationConfig'], fromStreamTranslationConfig);
8270
+ }
8265
8271
  return toObject;
8266
8272
  }
8267
8273
  function liveConnectConfigToVertex(fromObject, parentObject) {
@@ -8394,6 +8400,9 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
8394
8400
  }
8395
8401
  setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
8396
8402
  }
8403
+ if (getValueByPath(fromObject, ['streamTranslationConfig']) !== undefined) {
8404
+ throw new Error('streamTranslationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8405
+ }
8397
8406
  return toObject;
8398
8407
  }
8399
8408
  function liveConnectParametersToMldev(apiClient, fromObject) {
@@ -8715,13 +8724,13 @@ function partToVertex$1(fromObject) {
8715
8724
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
8716
8725
  }
8717
8726
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
8718
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8727
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8719
8728
  }
8720
8729
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
8721
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8730
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8722
8731
  }
8723
8732
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
8724
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8733
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8725
8734
  }
8726
8735
  return toObject;
8727
8736
  }
@@ -8732,7 +8741,7 @@ function safetySettingToMldev$2(fromObject) {
8732
8741
  setValueByPath(toObject, ['category'], fromCategory);
8733
8742
  }
8734
8743
  if (getValueByPath(fromObject, ['method']) !== undefined) {
8735
- throw new Error('method parameter is not supported in Gemini API.');
8744
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8736
8745
  }
8737
8746
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
8738
8747
  if (fromThreshold != null) {
@@ -8747,14 +8756,14 @@ function sessionResumptionConfigToMldev$1(fromObject) {
8747
8756
  setValueByPath(toObject, ['handle'], fromHandle);
8748
8757
  }
8749
8758
  if (getValueByPath(fromObject, ['transparent']) !== undefined) {
8750
- throw new Error('transparent parameter is not supported in Gemini API.');
8759
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8751
8760
  }
8752
8761
  return toObject;
8753
8762
  }
8754
8763
  function toolToMldev$2(fromObject) {
8755
8764
  const toObject = {};
8756
8765
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
8757
- throw new Error('retrieval parameter is not supported in Gemini API.');
8766
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8758
8767
  }
8759
8768
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
8760
8769
  if (fromComputerUse != null) {
@@ -8779,7 +8788,7 @@ function toolToMldev$2(fromObject) {
8779
8788
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
8780
8789
  }
8781
8790
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
8782
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
8791
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8783
8792
  }
8784
8793
  const fromFunctionDeclarations = getValueByPath(fromObject, [
8785
8794
  'functionDeclarations',
@@ -8800,7 +8809,7 @@ function toolToMldev$2(fromObject) {
8800
8809
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
8801
8810
  }
8802
8811
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
8803
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
8812
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8804
8813
  }
8805
8814
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
8806
8815
  if (fromUrlContext != null) {
@@ -8829,7 +8838,7 @@ function toolToVertex$1(fromObject) {
8829
8838
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
8830
8839
  }
8831
8840
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
8832
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8841
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8833
8842
  }
8834
8843
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
8835
8844
  if (fromGoogleSearch != null) {
@@ -8880,7 +8889,7 @@ function toolToVertex$1(fromObject) {
8880
8889
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
8881
8890
  }
8882
8891
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
8883
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8892
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8884
8893
  }
8885
8894
  return toObject;
8886
8895
  }
@@ -8997,23 +9006,23 @@ function authConfigToMldev$1(fromObject, _rootObject) {
8997
9006
  setValueByPath(toObject, ['apiKey'], fromApiKey);
8998
9007
  }
8999
9008
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
9000
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
9009
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9001
9010
  }
9002
9011
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
9003
- throw new Error('authType parameter is not supported in Gemini API.');
9012
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9004
9013
  }
9005
9014
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
9006
9015
  undefined) {
9007
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
9016
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9008
9017
  }
9009
9018
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
9010
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
9019
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9011
9020
  }
9012
9021
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
9013
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
9022
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9014
9023
  }
9015
9024
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
9016
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
9025
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9017
9026
  }
9018
9027
  return toObject;
9019
9028
  }
@@ -9024,7 +9033,7 @@ function blobToMldev$1(fromObject, _rootObject) {
9024
9033
  setValueByPath(toObject, ['data'], fromData);
9025
9034
  }
9026
9035
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
9027
- throw new Error('displayName parameter is not supported in Gemini API.');
9036
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9028
9037
  }
9029
9038
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
9030
9039
  if (fromMimeType != null) {
@@ -9221,13 +9230,13 @@ function controlReferenceConfigToVertex(fromObject, _rootObject) {
9221
9230
  function countTokensConfigToMldev(fromObject, _rootObject) {
9222
9231
  const toObject = {};
9223
9232
  if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) {
9224
- throw new Error('systemInstruction parameter is not supported in Gemini API.');
9233
+ throw new Error('systemInstruction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9225
9234
  }
9226
9235
  if (getValueByPath(fromObject, ['tools']) !== undefined) {
9227
- throw new Error('tools parameter is not supported in Gemini API.');
9236
+ throw new Error('tools parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9228
9237
  }
9229
9238
  if (getValueByPath(fromObject, ['generationConfig']) !== undefined) {
9230
- throw new Error('generationConfig parameter is not supported in Gemini API.');
9239
+ throw new Error('generationConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9231
9240
  }
9232
9241
  return toObject;
9233
9242
  }
@@ -9528,16 +9537,16 @@ function embedContentConfigToMldev(fromObject, parentObject, _rootObject) {
9528
9537
  setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
9529
9538
  }
9530
9539
  if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
9531
- throw new Error('mimeType parameter is not supported in Gemini API.');
9540
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9532
9541
  }
9533
9542
  if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
9534
- throw new Error('autoTruncate parameter is not supported in Gemini API.');
9543
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9535
9544
  }
9536
9545
  if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
9537
- throw new Error('documentOcr parameter is not supported in Gemini API.');
9546
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9538
9547
  }
9539
9548
  if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
9540
- throw new Error('audioTrackExtraction parameter is not supported in Gemini API.');
9549
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9541
9550
  }
9542
9551
  return toObject;
9543
9552
  }
@@ -9821,7 +9830,7 @@ function endpointFromVertex(fromObject, _rootObject) {
9821
9830
  function fileDataToMldev$1(fromObject, _rootObject) {
9822
9831
  const toObject = {};
9823
9832
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
9824
- throw new Error('displayName parameter is not supported in Gemini API.');
9833
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9825
9834
  }
9826
9835
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
9827
9836
  if (fromFileUri != null) {
@@ -9848,10 +9857,10 @@ function functionCallToMldev$1(fromObject, _rootObject) {
9848
9857
  setValueByPath(toObject, ['name'], fromName);
9849
9858
  }
9850
9859
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
9851
- throw new Error('partialArgs parameter is not supported in Gemini API.');
9860
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9852
9861
  }
9853
9862
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
9854
- throw new Error('willContinue parameter is not supported in Gemini API.');
9863
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9855
9864
  }
9856
9865
  return toObject;
9857
9866
  }
@@ -9869,7 +9878,7 @@ function functionCallingConfigToMldev(fromObject, _rootObject) {
9869
9878
  }
9870
9879
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
9871
9880
  undefined) {
9872
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
9881
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9873
9882
  }
9874
9883
  return toObject;
9875
9884
  }
@@ -9956,10 +9965,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
9956
9965
  setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
9957
9966
  }
9958
9967
  if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
9959
- throw new Error('routingConfig parameter is not supported in Gemini API.');
9968
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9960
9969
  }
9961
9970
  if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
9962
- throw new Error('modelSelectionConfig parameter is not supported in Gemini API.');
9971
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9963
9972
  }
9964
9973
  const fromSafetySettings = getValueByPath(fromObject, [
9965
9974
  'safetySettings',
@@ -9988,7 +9997,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
9988
9997
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(fromToolConfig));
9989
9998
  }
9990
9999
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
9991
- throw new Error('labels parameter is not supported in Gemini API.');
10000
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9992
10001
  }
9993
10002
  const fromCachedContent = getValueByPath(fromObject, [
9994
10003
  'cachedContent',
@@ -10013,7 +10022,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
10013
10022
  setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
10014
10023
  }
10015
10024
  if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
10016
- throw new Error('audioTimestamp parameter is not supported in Gemini API.');
10025
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10017
10026
  }
10018
10027
  const fromThinkingConfig = getValueByPath(fromObject, [
10019
10028
  'thinkingConfig',
@@ -10032,7 +10041,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
10032
10041
  setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
10033
10042
  }
10034
10043
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
10035
- throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
10044
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10036
10045
  }
10037
10046
  const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
10038
10047
  if (parentObject !== undefined && fromServiceTier != null) {
@@ -10204,7 +10213,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
10204
10213
  }
10205
10214
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
10206
10215
  undefined) {
10207
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
10216
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
10208
10217
  }
10209
10218
  const fromModelArmorConfig = getValueByPath(fromObject, [
10210
10219
  'modelArmorConfig',
@@ -10353,10 +10362,10 @@ function generateContentResponseFromVertex(fromObject, _rootObject) {
10353
10362
  function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
10354
10363
  const toObject = {};
10355
10364
  if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
10356
- throw new Error('outputGcsUri parameter is not supported in Gemini API.');
10365
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10357
10366
  }
10358
10367
  if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) {
10359
- throw new Error('negativePrompt parameter is not supported in Gemini API.');
10368
+ throw new Error('negativePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10360
10369
  }
10361
10370
  const fromNumberOfImages = getValueByPath(fromObject, [
10362
10371
  'numberOfImages',
@@ -10375,7 +10384,7 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
10375
10384
  setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale);
10376
10385
  }
10377
10386
  if (getValueByPath(fromObject, ['seed']) !== undefined) {
10378
- throw new Error('seed parameter is not supported in Gemini API.');
10387
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10379
10388
  }
10380
10389
  const fromSafetyFilterLevel = getValueByPath(fromObject, [
10381
10390
  'safetyFilterLevel',
@@ -10418,17 +10427,17 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
10418
10427
  setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
10419
10428
  }
10420
10429
  if (getValueByPath(fromObject, ['addWatermark']) !== undefined) {
10421
- throw new Error('addWatermark parameter is not supported in Gemini API.');
10430
+ throw new Error('addWatermark parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10422
10431
  }
10423
10432
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
10424
- throw new Error('labels parameter is not supported in Gemini API.');
10433
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10425
10434
  }
10426
10435
  const fromImageSize = getValueByPath(fromObject, ['imageSize']);
10427
10436
  if (parentObject !== undefined && fromImageSize != null) {
10428
10437
  setValueByPath(parentObject, ['parameters', 'sampleImageSize'], fromImageSize);
10429
10438
  }
10430
10439
  if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {
10431
- throw new Error('enhancePrompt parameter is not supported in Gemini API.');
10440
+ throw new Error('enhancePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10432
10441
  }
10433
10442
  return toObject;
10434
10443
  }
@@ -10621,10 +10630,10 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10621
10630
  setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos);
10622
10631
  }
10623
10632
  if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
10624
- throw new Error('outputGcsUri parameter is not supported in Gemini API.');
10633
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10625
10634
  }
10626
10635
  if (getValueByPath(fromObject, ['fps']) !== undefined) {
10627
- throw new Error('fps parameter is not supported in Gemini API.');
10636
+ throw new Error('fps parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10628
10637
  }
10629
10638
  const fromDurationSeconds = getValueByPath(fromObject, [
10630
10639
  'durationSeconds',
@@ -10633,7 +10642,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10633
10642
  setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds);
10634
10643
  }
10635
10644
  if (getValueByPath(fromObject, ['seed']) !== undefined) {
10636
- throw new Error('seed parameter is not supported in Gemini API.');
10645
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10637
10646
  }
10638
10647
  const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
10639
10648
  if (parentObject !== undefined && fromAspectRatio != null) {
@@ -10650,7 +10659,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10650
10659
  setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
10651
10660
  }
10652
10661
  if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {
10653
- throw new Error('pubsubTopic parameter is not supported in Gemini API.');
10662
+ throw new Error('pubsubTopic parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10654
10663
  }
10655
10664
  const fromNegativePrompt = getValueByPath(fromObject, [
10656
10665
  'negativePrompt',
@@ -10665,7 +10674,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10665
10674
  setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
10666
10675
  }
10667
10676
  if (getValueByPath(fromObject, ['generateAudio']) !== undefined) {
10668
- throw new Error('generateAudio parameter is not supported in Gemini API.');
10677
+ throw new Error('generateAudio parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10669
10678
  }
10670
10679
  const fromLastFrame = getValueByPath(fromObject, ['lastFrame']);
10671
10680
  if (parentObject !== undefined && fromLastFrame != null) {
@@ -10684,13 +10693,13 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10684
10693
  setValueByPath(parentObject, ['instances[0]', 'referenceImages'], transformedList);
10685
10694
  }
10686
10695
  if (getValueByPath(fromObject, ['mask']) !== undefined) {
10687
- throw new Error('mask parameter is not supported in Gemini API.');
10696
+ throw new Error('mask parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10688
10697
  }
10689
10698
  if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
10690
- throw new Error('compressionQuality parameter is not supported in Gemini API.');
10699
+ throw new Error('compressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10691
10700
  }
10692
10701
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
10693
- throw new Error('labels parameter is not supported in Gemini API.');
10702
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10694
10703
  }
10695
10704
  const fromWebhookConfig = getValueByPath(fromObject, [
10696
10705
  'webhookConfig',
@@ -10699,7 +10708,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10699
10708
  setValueByPath(parentObject, ['webhookConfig'], fromWebhookConfig);
10700
10709
  }
10701
10710
  if (getValueByPath(fromObject, ['resizeMode']) !== undefined) {
10702
- throw new Error('resizeMode parameter is not supported in Gemini API.');
10711
+ throw new Error('resizeMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10703
10712
  }
10704
10713
  return toObject;
10705
10714
  }
@@ -10796,7 +10805,7 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
10796
10805
  setValueByPath(parentObject, ['labels'], fromLabels);
10797
10806
  }
10798
10807
  if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
10799
- throw new Error('webhookConfig parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
10808
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
10800
10809
  }
10801
10810
  const fromResizeMode = getValueByPath(fromObject, ['resizeMode']);
10802
10811
  if (parentObject !== undefined && fromResizeMode != null) {
@@ -11195,7 +11204,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
11195
11204
  }
11196
11205
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
11197
11206
  undefined) {
11198
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11207
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11199
11208
  }
11200
11209
  return toObject;
11201
11210
  }
@@ -11234,10 +11243,10 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
11234
11243
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
11235
11244
  }
11236
11245
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
11237
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
11246
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11238
11247
  }
11239
11248
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
11240
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
11249
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11241
11250
  }
11242
11251
  const fromTimeRangeFilter = getValueByPath(fromObject, [
11243
11252
  'timeRangeFilter',
@@ -11258,20 +11267,20 @@ function imageConfigToMldev(fromObject, _rootObject) {
11258
11267
  setValueByPath(toObject, ['imageSize'], fromImageSize);
11259
11268
  }
11260
11269
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
11261
- throw new Error('personGeneration parameter is not supported in Gemini API.');
11270
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11262
11271
  }
11263
11272
  if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
11264
- throw new Error('prominentPeople parameter is not supported in Gemini API.');
11273
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11265
11274
  }
11266
11275
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
11267
- throw new Error('outputMimeType parameter is not supported in Gemini API.');
11276
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11268
11277
  }
11269
11278
  if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
11270
11279
  undefined) {
11271
- throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
11280
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11272
11281
  }
11273
11282
  if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
11274
- throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
11283
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11275
11284
  }
11276
11285
  return toObject;
11277
11286
  }
@@ -11352,7 +11361,7 @@ function imageFromVertex(fromObject, _rootObject) {
11352
11361
  function imageToMldev(fromObject, _rootObject) {
11353
11362
  const toObject = {};
11354
11363
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
11355
- throw new Error('gcsUri parameter is not supported in Gemini API.');
11364
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11356
11365
  }
11357
11366
  const fromImageBytes = getValueByPath(fromObject, ['imageBytes']);
11358
11367
  if (fromImageBytes != null) {
@@ -11755,13 +11764,13 @@ function partToVertex(fromObject, _rootObject) {
11755
11764
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
11756
11765
  }
11757
11766
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
11758
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11767
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11759
11768
  }
11760
11769
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
11761
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11770
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11762
11771
  }
11763
11772
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
11764
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11773
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11765
11774
  }
11766
11775
  return toObject;
11767
11776
  }
@@ -11984,7 +11993,7 @@ function safetySettingToMldev$1(fromObject, _rootObject) {
11984
11993
  setValueByPath(toObject, ['category'], fromCategory);
11985
11994
  }
11986
11995
  if (getValueByPath(fromObject, ['method']) !== undefined) {
11987
- throw new Error('method parameter is not supported in Gemini API.');
11996
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11988
11997
  }
11989
11998
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
11990
11999
  if (fromThreshold != null) {
@@ -12118,14 +12127,14 @@ function toolConfigToVertex(fromObject, _rootObject) {
12118
12127
  }
12119
12128
  if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
12120
12129
  undefined) {
12121
- throw new Error('includeServerSideToolInvocations parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12130
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12122
12131
  }
12123
12132
  return toObject;
12124
12133
  }
12125
12134
  function toolToMldev$1(fromObject, rootObject) {
12126
12135
  const toObject = {};
12127
12136
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
12128
- throw new Error('retrieval parameter is not supported in Gemini API.');
12137
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12129
12138
  }
12130
12139
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
12131
12140
  if (fromComputerUse != null) {
@@ -12150,7 +12159,7 @@ function toolToMldev$1(fromObject, rootObject) {
12150
12159
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
12151
12160
  }
12152
12161
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
12153
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
12162
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12154
12163
  }
12155
12164
  const fromFunctionDeclarations = getValueByPath(fromObject, [
12156
12165
  'functionDeclarations',
@@ -12171,7 +12180,7 @@ function toolToMldev$1(fromObject, rootObject) {
12171
12180
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
12172
12181
  }
12173
12182
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
12174
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
12183
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12175
12184
  }
12176
12185
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
12177
12186
  if (fromUrlContext != null) {
@@ -12200,7 +12209,7 @@ function toolToVertex(fromObject, _rootObject) {
12200
12209
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
12201
12210
  }
12202
12211
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
12203
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12212
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12204
12213
  }
12205
12214
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
12206
12215
  if (fromGoogleSearch != null) {
@@ -12251,7 +12260,7 @@ function toolToVertex(fromObject, _rootObject) {
12251
12260
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
12252
12261
  }
12253
12262
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
12254
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12263
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12255
12264
  }
12256
12265
  return toObject;
12257
12266
  }
@@ -12814,7 +12823,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
12814
12823
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
12815
12824
  const USER_AGENT_HEADER = 'User-Agent';
12816
12825
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
12817
- const SDK_VERSION = '2.1.0'; // x-release-please-version
12826
+ const SDK_VERSION = '2.3.0'; // x-release-please-version
12818
12827
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
12819
12828
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
12820
12829
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -14710,7 +14719,7 @@ class Models extends BaseModule {
14710
14719
  if (this.apiClient.isVertexAI()) {
14711
14720
  if (!actualParams.config.queryBase) {
14712
14721
  if ((_a = actualParams.config) === null || _a === void 0 ? void 0 : _a.filter) {
14713
- throw new Error('Filtering tuned models list for Gemini Enterprise Agent Platform (previously known as Vertex AI) is not currently supported');
14722
+ throw new Error('Filtering tuned models list is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
14714
14723
  }
14715
14724
  else {
14716
14725
  actualParams.config.filter = 'labels.tune-type:*';
@@ -16166,7 +16175,7 @@ class Operations extends BaseModule {
16166
16175
  function audioTranscriptionConfigToMldev(fromObject) {
16167
16176
  const toObject = {};
16168
16177
  if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
16169
- throw new Error('languageCodes parameter is not supported in Gemini API.');
16178
+ throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16170
16179
  }
16171
16180
  return toObject;
16172
16181
  }
@@ -16177,23 +16186,23 @@ function authConfigToMldev(fromObject) {
16177
16186
  setValueByPath(toObject, ['apiKey'], fromApiKey);
16178
16187
  }
16179
16188
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
16180
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
16189
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16181
16190
  }
16182
16191
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
16183
- throw new Error('authType parameter is not supported in Gemini API.');
16192
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16184
16193
  }
16185
16194
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
16186
16195
  undefined) {
16187
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
16196
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16188
16197
  }
16189
16198
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
16190
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
16199
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16191
16200
  }
16192
16201
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
16193
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
16202
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16194
16203
  }
16195
16204
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
16196
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
16205
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16197
16206
  }
16198
16207
  return toObject;
16199
16208
  }
@@ -16204,7 +16213,7 @@ function blobToMldev(fromObject) {
16204
16213
  setValueByPath(toObject, ['data'], fromData);
16205
16214
  }
16206
16215
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
16207
- throw new Error('displayName parameter is not supported in Gemini API.');
16216
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16208
16217
  }
16209
16218
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
16210
16219
  if (fromMimeType != null) {
@@ -16271,7 +16280,7 @@ function createAuthTokenParametersToMldev(apiClient, fromObject) {
16271
16280
  function fileDataToMldev(fromObject) {
16272
16281
  const toObject = {};
16273
16282
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
16274
- throw new Error('displayName parameter is not supported in Gemini API.');
16283
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16275
16284
  }
16276
16285
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
16277
16286
  if (fromFileUri != null) {
@@ -16298,10 +16307,10 @@ function functionCallToMldev(fromObject) {
16298
16307
  setValueByPath(toObject, ['name'], fromName);
16299
16308
  }
16300
16309
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
16301
- throw new Error('partialArgs parameter is not supported in Gemini API.');
16310
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16302
16311
  }
16303
16312
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
16304
- throw new Error('willContinue parameter is not supported in Gemini API.');
16313
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16305
16314
  }
16306
16315
  return toObject;
16307
16316
  }
@@ -16324,10 +16333,10 @@ function googleSearchToMldev(fromObject) {
16324
16333
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
16325
16334
  }
16326
16335
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
16327
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
16336
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16328
16337
  }
16329
16338
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
16330
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
16339
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16331
16340
  }
16332
16341
  const fromTimeRangeFilter = getValueByPath(fromObject, [
16333
16342
  'timeRangeFilter',
@@ -16446,7 +16455,7 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
16446
16455
  setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
16447
16456
  }
16448
16457
  if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
16449
- throw new Error('explicitVadSignal parameter is not supported in Gemini API.');
16458
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16450
16459
  }
16451
16460
  const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
16452
16461
  if (parentObject !== undefined && fromAvatarConfig != null) {
@@ -16464,6 +16473,12 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
16464
16473
  }
16465
16474
  setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
16466
16475
  }
16476
+ const fromStreamTranslationConfig = getValueByPath(fromObject, [
16477
+ 'streamTranslationConfig',
16478
+ ]);
16479
+ if (parentObject !== undefined && fromStreamTranslationConfig != null) {
16480
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'streamTranslationConfig'], fromStreamTranslationConfig);
16481
+ }
16467
16482
  return toObject;
16468
16483
  }
16469
16484
  function liveConnectConstraintsToMldev(apiClient, fromObject) {
@@ -16557,7 +16572,7 @@ function safetySettingToMldev(fromObject) {
16557
16572
  setValueByPath(toObject, ['category'], fromCategory);
16558
16573
  }
16559
16574
  if (getValueByPath(fromObject, ['method']) !== undefined) {
16560
- throw new Error('method parameter is not supported in Gemini API.');
16575
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16561
16576
  }
16562
16577
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
16563
16578
  if (fromThreshold != null) {
@@ -16572,14 +16587,14 @@ function sessionResumptionConfigToMldev(fromObject) {
16572
16587
  setValueByPath(toObject, ['handle'], fromHandle);
16573
16588
  }
16574
16589
  if (getValueByPath(fromObject, ['transparent']) !== undefined) {
16575
- throw new Error('transparent parameter is not supported in Gemini API.');
16590
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16576
16591
  }
16577
16592
  return toObject;
16578
16593
  }
16579
16594
  function toolToMldev(fromObject) {
16580
16595
  const toObject = {};
16581
16596
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
16582
- throw new Error('retrieval parameter is not supported in Gemini API.');
16597
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16583
16598
  }
16584
16599
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
16585
16600
  if (fromComputerUse != null) {
@@ -16604,7 +16619,7 @@ function toolToMldev(fromObject) {
16604
16619
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
16605
16620
  }
16606
16621
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
16607
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
16622
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16608
16623
  }
16609
16624
  const fromFunctionDeclarations = getValueByPath(fromObject, [
16610
16625
  'functionDeclarations',
@@ -16625,7 +16640,7 @@ function toolToMldev(fromObject) {
16625
16640
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
16626
16641
  }
16627
16642
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
16628
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
16643
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16629
16644
  }
16630
16645
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
16631
16646
  if (fromUrlContext != null) {
@@ -18724,10 +18739,14 @@ class BaseInteractions extends APIResource {
18724
18739
  });
18725
18740
  const isStreaming = (_a = params.stream) !== null && _a !== void 0 ? _a : false;
18726
18741
  const promise = this._client.post(path `/${api_version}/interactions`, Object.assign(Object.assign(Object.assign({ body }, options), { stream: isStreaming }), (needsLegacyLyriaShim && isStreaming ? { __streamClass: LegacyLyriaStream } : {})));
18727
- if (needsLegacyLyriaShim && !isStreaming) {
18728
- return promise._thenUnwrap((data) => coerceLegacyInteractionResponse(data));
18742
+ if (isStreaming) {
18743
+ return promise;
18729
18744
  }
18730
- return promise;
18745
+ let nonStreaming = promise;
18746
+ if (needsLegacyLyriaShim) {
18747
+ nonStreaming = nonStreaming._thenUnwrap((data) => coerceLegacyInteractionResponse(data));
18748
+ }
18749
+ return nonStreaming._thenUnwrap(addOutputProperties);
18731
18750
  }
18732
18751
  /**
18733
18752
  * Deletes the interaction by id.
@@ -18756,17 +18775,64 @@ class BaseInteractions extends APIResource {
18756
18775
  */
18757
18776
  cancel(id, params = {}, options) {
18758
18777
  const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
18759
- return this._client.post(path `/${api_version}/interactions/${id}/cancel`, options);
18778
+ return this._client.post(path `/${api_version}/interactions/${id}/cancel`, options)._thenUnwrap(addOutputProperties);
18760
18779
  }
18761
18780
  get(id, params = {}, options) {
18762
18781
  var _a;
18763
18782
  const _b = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _b, query = __rest(_b, ["api_version"]);
18764
- 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 }));
18783
+ 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 }));
18784
+ if (params === null || params === void 0 ? void 0 : params.stream) {
18785
+ return response;
18786
+ }
18787
+ return response._thenUnwrap(addOutputProperties);
18765
18788
  }
18766
18789
  }
18767
18790
  BaseInteractions._key = Object.freeze(['interactions']);
18768
18791
  class Interactions extends BaseInteractions {
18769
18792
  }
18793
+ function addOutputProperties(interaction) {
18794
+ var _a, _b;
18795
+ const steps = (_a = interaction.steps) !== null && _a !== void 0 ? _a : [];
18796
+ let firstTrailing = steps.length;
18797
+ while (firstTrailing > 0 && steps[firstTrailing - 1].type === 'model_output') {
18798
+ firstTrailing--;
18799
+ }
18800
+ const modelSteps = steps.slice(firstTrailing);
18801
+ const output = modelSteps.flatMap((step) => { var _a; return (_a = step.content) !== null && _a !== void 0 ? _a : []; });
18802
+ const textParts = [];
18803
+ for (let i = output.length - 1; i >= 0; i--) {
18804
+ const content = output[i];
18805
+ if (content.type !== 'text')
18806
+ break;
18807
+ textParts.push((_b = content.text) !== null && _b !== void 0 ? _b : '');
18808
+ }
18809
+ const output_text = textParts.reverse().join('');
18810
+ let output_image;
18811
+ let output_audio;
18812
+ let output_video;
18813
+ for (let i = steps.length - 1; i >= 0; i--) {
18814
+ const step = steps[i];
18815
+ const anyStep = step;
18816
+ if (anyStep.type === 'user_input') {
18817
+ break;
18818
+ }
18819
+ if (anyStep.type === 'model_output' && anyStep.content) {
18820
+ for (let j = anyStep.content.length - 1; j >= 0; j--) {
18821
+ const content = anyStep.content[j];
18822
+ if (content.type === 'image' && !output_image) {
18823
+ output_image = content;
18824
+ }
18825
+ if (content.type === 'audio' && !output_audio) {
18826
+ output_audio = content;
18827
+ }
18828
+ if (content.type === 'video' && !output_video) {
18829
+ output_video = content;
18830
+ }
18831
+ }
18832
+ }
18833
+ }
18834
+ 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 }));
18835
+ }
18770
18836
 
18771
18837
  /**
18772
18838
  * @license
@@ -19726,7 +19792,7 @@ function cancelTuningJobResponseFromVertex(fromObject, _rootObject) {
19726
19792
  function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19727
19793
  const toObject = {};
19728
19794
  if (getValueByPath(fromObject, ['validationDataset']) !== undefined) {
19729
- throw new Error('validationDataset parameter is not supported in Gemini API.');
19795
+ throw new Error('validationDataset parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19730
19796
  }
19731
19797
  const fromTunedModelDisplayName = getValueByPath(fromObject, [
19732
19798
  'tunedModelDisplayName',
@@ -19735,7 +19801,7 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19735
19801
  setValueByPath(parentObject, ['displayName'], fromTunedModelDisplayName);
19736
19802
  }
19737
19803
  if (getValueByPath(fromObject, ['description']) !== undefined) {
19738
- throw new Error('description parameter is not supported in Gemini API.');
19804
+ throw new Error('description parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19739
19805
  }
19740
19806
  const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
19741
19807
  if (parentObject !== undefined && fromEpochCount != null) {
@@ -19749,20 +19815,20 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19749
19815
  }
19750
19816
  if (getValueByPath(fromObject, ['exportLastCheckpointOnly']) !==
19751
19817
  undefined) {
19752
- throw new Error('exportLastCheckpointOnly parameter is not supported in Gemini API.');
19818
+ throw new Error('exportLastCheckpointOnly parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19753
19819
  }
19754
19820
  if (getValueByPath(fromObject, ['preTunedModelCheckpointId']) !==
19755
19821
  undefined) {
19756
- throw new Error('preTunedModelCheckpointId parameter is not supported in Gemini API.');
19822
+ throw new Error('preTunedModelCheckpointId parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19757
19823
  }
19758
19824
  if (getValueByPath(fromObject, ['adapterSize']) !== undefined) {
19759
- throw new Error('adapterSize parameter is not supported in Gemini API.');
19825
+ throw new Error('adapterSize parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19760
19826
  }
19761
19827
  if (getValueByPath(fromObject, ['tuningMode']) !== undefined) {
19762
- throw new Error('tuningMode parameter is not supported in Gemini API.');
19828
+ throw new Error('tuningMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19763
19829
  }
19764
19830
  if (getValueByPath(fromObject, ['customBaseModel']) !== undefined) {
19765
- throw new Error('customBaseModel parameter is not supported in Gemini API.');
19831
+ throw new Error('customBaseModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19766
19832
  }
19767
19833
  const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
19768
19834
  if (parentObject !== undefined && fromBatchSize != null) {
@@ -19773,25 +19839,25 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19773
19839
  setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'learningRate'], fromLearningRate);
19774
19840
  }
19775
19841
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
19776
- throw new Error('labels parameter is not supported in Gemini API.');
19842
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19777
19843
  }
19778
19844
  if (getValueByPath(fromObject, ['beta']) !== undefined) {
19779
- throw new Error('beta parameter is not supported in Gemini API.');
19845
+ throw new Error('beta parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19780
19846
  }
19781
19847
  if (getValueByPath(fromObject, ['baseTeacherModel']) !== undefined) {
19782
- throw new Error('baseTeacherModel parameter is not supported in Gemini API.');
19848
+ throw new Error('baseTeacherModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19783
19849
  }
19784
19850
  if (getValueByPath(fromObject, ['tunedTeacherModelSource']) !== undefined) {
19785
- throw new Error('tunedTeacherModelSource parameter is not supported in Gemini API.');
19851
+ throw new Error('tunedTeacherModelSource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19786
19852
  }
19787
19853
  if (getValueByPath(fromObject, ['sftLossWeightMultiplier']) !== undefined) {
19788
- throw new Error('sftLossWeightMultiplier parameter is not supported in Gemini API.');
19854
+ throw new Error('sftLossWeightMultiplier parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19789
19855
  }
19790
19856
  if (getValueByPath(fromObject, ['outputUri']) !== undefined) {
19791
- throw new Error('outputUri parameter is not supported in Gemini API.');
19857
+ throw new Error('outputUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19792
19858
  }
19793
19859
  if (getValueByPath(fromObject, ['encryptionSpec']) !== undefined) {
19794
- throw new Error('encryptionSpec parameter is not supported in Gemini API.');
19860
+ throw new Error('encryptionSpec parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19795
19861
  }
19796
19862
  return toObject;
19797
19863
  }
@@ -20185,10 +20251,10 @@ function tunedModelFromMldev(fromObject, _rootObject) {
20185
20251
  function tuningDatasetToMldev(fromObject, _rootObject) {
20186
20252
  const toObject = {};
20187
20253
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
20188
- throw new Error('gcsUri parameter is not supported in Gemini API.');
20254
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
20189
20255
  }
20190
20256
  if (getValueByPath(fromObject, ['vertexDatasetResource']) !== undefined) {
20191
- throw new Error('vertexDatasetResource parameter is not supported in Gemini API.');
20257
+ throw new Error('vertexDatasetResource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
20192
20258
  }
20193
20259
  const fromExamples = getValueByPath(fromObject, ['examples']);
20194
20260
  if (fromExamples != null) {
@@ -20261,7 +20327,7 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
20261
20327
  }
20262
20328
  }
20263
20329
  if (getValueByPath(fromObject, ['examples']) !== undefined) {
20264
- throw new Error('examples parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
20330
+ throw new Error('examples parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
20265
20331
  }
20266
20332
  return toObject;
20267
20333
  }
@@ -21319,6 +21385,7 @@ class GoogleGenAI {
21319
21385
  if (this._interactions !== undefined) {
21320
21386
  return this._interactions;
21321
21387
  }
21388
+ console.warn('GoogleGenAI.interactions: Interactions usage is experimental and may change in future versions.');
21322
21389
  this._interactions = this.getNextGenClient().interactions;
21323
21390
  return this._interactions;
21324
21391
  }