@google/genai 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -3737,23 +3737,23 @@ function authConfigToMldev$4(fromObject) {
3737
3737
  setValueByPath(toObject, ['apiKey'], fromApiKey);
3738
3738
  }
3739
3739
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
3740
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
3740
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3741
3741
  }
3742
3742
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
3743
- throw new Error('authType parameter is not supported in Gemini API.');
3743
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3744
3744
  }
3745
3745
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
3746
3746
  undefined) {
3747
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
3747
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3748
3748
  }
3749
3749
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
3750
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
3750
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3751
3751
  }
3752
3752
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
3753
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
3753
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3754
3754
  }
3755
3755
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
3756
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
3756
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3757
3757
  }
3758
3758
  return toObject;
3759
3759
  }
@@ -3834,14 +3834,14 @@ function batchJobDestinationToVertex(fromObject) {
3834
3834
  setValueByPath(toObject, ['bigqueryDestination', 'outputUri'], fromBigqueryUri);
3835
3835
  }
3836
3836
  if (getValueByPath(fromObject, ['fileName']) !== undefined) {
3837
- throw new Error('fileName parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3837
+ throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3838
3838
  }
3839
3839
  if (getValueByPath(fromObject, ['inlinedResponses']) !== undefined) {
3840
- throw new Error('inlinedResponses parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3840
+ throw new Error('inlinedResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3841
3841
  }
3842
3842
  if (getValueByPath(fromObject, ['inlinedEmbedContentResponses']) !==
3843
3843
  undefined) {
3844
- throw new Error('inlinedEmbedContentResponses parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3844
+ throw new Error('inlinedEmbedContentResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3845
3845
  }
3846
3846
  const fromVertexDataset = getValueByPath(fromObject, [
3847
3847
  'vertexDataset',
@@ -3986,13 +3986,13 @@ function batchJobSourceFromVertex(fromObject) {
3986
3986
  function batchJobSourceToMldev(apiClient, fromObject) {
3987
3987
  const toObject = {};
3988
3988
  if (getValueByPath(fromObject, ['format']) !== undefined) {
3989
- throw new Error('format parameter is not supported in Gemini API.');
3989
+ throw new Error('format parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3990
3990
  }
3991
3991
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
3992
- throw new Error('gcsUri parameter is not supported in Gemini API.');
3992
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3993
3993
  }
3994
3994
  if (getValueByPath(fromObject, ['bigqueryUri']) !== undefined) {
3995
- throw new Error('bigqueryUri parameter is not supported in Gemini API.');
3995
+ throw new Error('bigqueryUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3996
3996
  }
3997
3997
  const fromFileName = getValueByPath(fromObject, ['fileName']);
3998
3998
  if (fromFileName != null) {
@@ -4011,7 +4011,7 @@ function batchJobSourceToMldev(apiClient, fromObject) {
4011
4011
  setValueByPath(toObject, ['requests', 'requests'], transformedList);
4012
4012
  }
4013
4013
  if (getValueByPath(fromObject, ['vertexDatasetName']) !== undefined) {
4014
- throw new Error('vertexDatasetName parameter is not supported in Gemini API.');
4014
+ throw new Error('vertexDatasetName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4015
4015
  }
4016
4016
  return toObject;
4017
4017
  }
@@ -4030,10 +4030,10 @@ function batchJobSourceToVertex(fromObject) {
4030
4030
  setValueByPath(toObject, ['bigquerySource', 'inputUri'], fromBigqueryUri);
4031
4031
  }
4032
4032
  if (getValueByPath(fromObject, ['fileName']) !== undefined) {
4033
- throw new Error('fileName parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4033
+ throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4034
4034
  }
4035
4035
  if (getValueByPath(fromObject, ['inlinedRequests']) !== undefined) {
4036
- throw new Error('inlinedRequests parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4036
+ throw new Error('inlinedRequests parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4037
4037
  }
4038
4038
  const fromVertexDatasetName = getValueByPath(fromObject, [
4039
4039
  'vertexDatasetName',
@@ -4050,7 +4050,7 @@ function blobToMldev$4(fromObject) {
4050
4050
  setValueByPath(toObject, ['data'], fromData);
4051
4051
  }
4052
4052
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
4053
- throw new Error('displayName parameter is not supported in Gemini API.');
4053
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4054
4054
  }
4055
4055
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
4056
4056
  if (fromMimeType != null) {
@@ -4173,7 +4173,7 @@ function createBatchJobConfigToMldev(fromObject, parentObject) {
4173
4173
  setValueByPath(parentObject, ['batch', 'displayName'], fromDisplayName);
4174
4174
  }
4175
4175
  if (getValueByPath(fromObject, ['dest']) !== undefined) {
4176
- throw new Error('dest parameter is not supported in Gemini API.');
4176
+ throw new Error('dest parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4177
4177
  }
4178
4178
  const fromWebhookConfig = getValueByPath(fromObject, [
4179
4179
  'webhookConfig',
@@ -4194,7 +4194,7 @@ function createBatchJobConfigToVertex(fromObject, parentObject) {
4194
4194
  setValueByPath(parentObject, ['outputConfig'], batchJobDestinationToVertex(tBatchJobDestination(fromDest)));
4195
4195
  }
4196
4196
  if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
4197
- throw new Error('webhookConfig parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4197
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4198
4198
  }
4199
4199
  return toObject;
4200
4200
  }
@@ -4350,16 +4350,16 @@ function embedContentConfigToMldev$1(fromObject, parentObject) {
4350
4350
  setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
4351
4351
  }
4352
4352
  if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
4353
- throw new Error('mimeType parameter is not supported in Gemini API.');
4353
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4354
4354
  }
4355
4355
  if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
4356
- throw new Error('autoTruncate parameter is not supported in Gemini API.');
4356
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4357
4357
  }
4358
4358
  if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
4359
- throw new Error('documentOcr parameter is not supported in Gemini API.');
4359
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4360
4360
  }
4361
4361
  if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
4362
- throw new Error('audioTrackExtraction parameter is not supported in Gemini API.');
4362
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4363
4363
  }
4364
4364
  return toObject;
4365
4365
  }
@@ -4380,7 +4380,7 @@ function embeddingsBatchJobSourceToMldev(apiClient, fromObject) {
4380
4380
  function fileDataToMldev$4(fromObject) {
4381
4381
  const toObject = {};
4382
4382
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
4383
- throw new Error('displayName parameter is not supported in Gemini API.');
4383
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4384
4384
  }
4385
4385
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
4386
4386
  if (fromFileUri != null) {
@@ -4407,10 +4407,10 @@ function functionCallToMldev$4(fromObject) {
4407
4407
  setValueByPath(toObject, ['name'], fromName);
4408
4408
  }
4409
4409
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
4410
- throw new Error('partialArgs parameter is not supported in Gemini API.');
4410
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4411
4411
  }
4412
4412
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
4413
- throw new Error('willContinue parameter is not supported in Gemini API.');
4413
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4414
4414
  }
4415
4415
  return toObject;
4416
4416
  }
@@ -4428,7 +4428,7 @@ function functionCallingConfigToMldev$2(fromObject) {
4428
4428
  }
4429
4429
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
4430
4430
  undefined) {
4431
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
4431
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4432
4432
  }
4433
4433
  return toObject;
4434
4434
  }
@@ -4515,10 +4515,10 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4515
4515
  setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
4516
4516
  }
4517
4517
  if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
4518
- throw new Error('routingConfig parameter is not supported in Gemini API.');
4518
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4519
4519
  }
4520
4520
  if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
4521
- throw new Error('modelSelectionConfig parameter is not supported in Gemini API.');
4521
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4522
4522
  }
4523
4523
  const fromSafetySettings = getValueByPath(fromObject, [
4524
4524
  'safetySettings',
@@ -4547,7 +4547,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4547
4547
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$2(fromToolConfig));
4548
4548
  }
4549
4549
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
4550
- throw new Error('labels parameter is not supported in Gemini API.');
4550
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4551
4551
  }
4552
4552
  const fromCachedContent = getValueByPath(fromObject, [
4553
4553
  'cachedContent',
@@ -4572,7 +4572,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4572
4572
  setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
4573
4573
  }
4574
4574
  if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
4575
- throw new Error('audioTimestamp parameter is not supported in Gemini API.');
4575
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4576
4576
  }
4577
4577
  const fromThinkingConfig = getValueByPath(fromObject, [
4578
4578
  'thinkingConfig',
@@ -4591,7 +4591,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4591
4591
  setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
4592
4592
  }
4593
4593
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
4594
- throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
4594
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4595
4595
  }
4596
4596
  const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
4597
4597
  if (parentObject !== undefined && fromServiceTier != null) {
@@ -4678,10 +4678,10 @@ function googleSearchToMldev$4(fromObject) {
4678
4678
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
4679
4679
  }
4680
4680
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
4681
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
4681
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4682
4682
  }
4683
4683
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
4684
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
4684
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4685
4685
  }
4686
4686
  const fromTimeRangeFilter = getValueByPath(fromObject, [
4687
4687
  'timeRangeFilter',
@@ -4702,20 +4702,20 @@ function imageConfigToMldev$1(fromObject) {
4702
4702
  setValueByPath(toObject, ['imageSize'], fromImageSize);
4703
4703
  }
4704
4704
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
4705
- throw new Error('personGeneration parameter is not supported in Gemini API.');
4705
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4706
4706
  }
4707
4707
  if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
4708
- throw new Error('prominentPeople parameter is not supported in Gemini API.');
4708
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4709
4709
  }
4710
4710
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
4711
- throw new Error('outputMimeType parameter is not supported in Gemini API.');
4711
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4712
4712
  }
4713
4713
  if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
4714
4714
  undefined) {
4715
- throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
4715
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4716
4716
  }
4717
4717
  if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
4718
- throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
4718
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4719
4719
  }
4720
4720
  return toObject;
4721
4721
  }
@@ -4772,7 +4772,7 @@ function listBatchJobsConfigToMldev(fromObject, parentObject) {
4772
4772
  setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
4773
4773
  }
4774
4774
  if (getValueByPath(fromObject, ['filter']) !== undefined) {
4775
- throw new Error('filter parameter is not supported in Gemini API.');
4775
+ throw new Error('filter parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4776
4776
  }
4777
4777
  return toObject;
4778
4778
  }
@@ -4941,7 +4941,7 @@ function safetySettingToMldev$3(fromObject) {
4941
4941
  setValueByPath(toObject, ['category'], fromCategory);
4942
4942
  }
4943
4943
  if (getValueByPath(fromObject, ['method']) !== undefined) {
4944
- throw new Error('method parameter is not supported in Gemini API.');
4944
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4945
4945
  }
4946
4946
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
4947
4947
  if (fromThreshold != null) {
@@ -4972,7 +4972,7 @@ function toolConfigToMldev$2(fromObject) {
4972
4972
  function toolToMldev$4(fromObject) {
4973
4973
  const toObject = {};
4974
4974
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
4975
- throw new Error('retrieval parameter is not supported in Gemini API.');
4975
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4976
4976
  }
4977
4977
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
4978
4978
  if (fromComputerUse != null) {
@@ -4997,7 +4997,7 @@ function toolToMldev$4(fromObject) {
4997
4997
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
4998
4998
  }
4999
4999
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
5000
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
5000
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5001
5001
  }
5002
5002
  const fromFunctionDeclarations = getValueByPath(fromObject, [
5003
5003
  'functionDeclarations',
@@ -5018,7 +5018,7 @@ function toolToMldev$4(fromObject) {
5018
5018
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
5019
5019
  }
5020
5020
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
5021
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
5021
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5022
5022
  }
5023
5023
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
5024
5024
  if (fromUrlContext != null) {
@@ -5765,23 +5765,23 @@ function authConfigToMldev$3(fromObject) {
5765
5765
  setValueByPath(toObject, ['apiKey'], fromApiKey);
5766
5766
  }
5767
5767
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
5768
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
5768
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5769
5769
  }
5770
5770
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
5771
- throw new Error('authType parameter is not supported in Gemini API.');
5771
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5772
5772
  }
5773
5773
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
5774
5774
  undefined) {
5775
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
5775
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5776
5776
  }
5777
5777
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
5778
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
5778
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5779
5779
  }
5780
5780
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
5781
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
5781
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5782
5782
  }
5783
5783
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
5784
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
5784
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5785
5785
  }
5786
5786
  return toObject;
5787
5787
  }
@@ -5792,7 +5792,7 @@ function blobToMldev$3(fromObject) {
5792
5792
  setValueByPath(toObject, ['data'], fromData);
5793
5793
  }
5794
5794
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
5795
- throw new Error('displayName parameter is not supported in Gemini API.');
5795
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5796
5796
  }
5797
5797
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
5798
5798
  if (fromMimeType != null) {
@@ -5881,7 +5881,7 @@ function createCachedContentConfigToMldev(fromObject, parentObject) {
5881
5881
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$1(fromToolConfig));
5882
5882
  }
5883
5883
  if (getValueByPath(fromObject, ['kmsKeyName']) !== undefined) {
5884
- throw new Error('kmsKeyName parameter is not supported in Gemini API.');
5884
+ throw new Error('kmsKeyName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5885
5885
  }
5886
5886
  return toObject;
5887
5887
  }
@@ -5998,7 +5998,7 @@ function deleteCachedContentResponseFromVertex(fromObject) {
5998
5998
  function fileDataToMldev$3(fromObject) {
5999
5999
  const toObject = {};
6000
6000
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
6001
- throw new Error('displayName parameter is not supported in Gemini API.');
6001
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6002
6002
  }
6003
6003
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
6004
6004
  if (fromFileUri != null) {
@@ -6025,10 +6025,10 @@ function functionCallToMldev$3(fromObject) {
6025
6025
  setValueByPath(toObject, ['name'], fromName);
6026
6026
  }
6027
6027
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
6028
- throw new Error('partialArgs parameter is not supported in Gemini API.');
6028
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6029
6029
  }
6030
6030
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
6031
- throw new Error('willContinue parameter is not supported in Gemini API.');
6031
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6032
6032
  }
6033
6033
  return toObject;
6034
6034
  }
@@ -6046,7 +6046,7 @@ function functionCallingConfigToMldev$1(fromObject) {
6046
6046
  }
6047
6047
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
6048
6048
  undefined) {
6049
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
6049
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6050
6050
  }
6051
6051
  return toObject;
6052
6052
  }
@@ -6085,10 +6085,10 @@ function googleSearchToMldev$3(fromObject) {
6085
6085
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
6086
6086
  }
6087
6087
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
6088
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
6088
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6089
6089
  }
6090
6090
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
6091
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
6091
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6092
6092
  }
6093
6093
  const fromTimeRangeFilter = getValueByPath(fromObject, [
6094
6094
  'timeRangeFilter',
@@ -6325,13 +6325,13 @@ function partToVertex$2(fromObject) {
6325
6325
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
6326
6326
  }
6327
6327
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
6328
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6328
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6329
6329
  }
6330
6330
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
6331
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6331
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6332
6332
  }
6333
6333
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
6334
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6334
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6335
6335
  }
6336
6336
  return toObject;
6337
6337
  }
@@ -6371,14 +6371,14 @@ function toolConfigToVertex$1(fromObject) {
6371
6371
  }
6372
6372
  if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
6373
6373
  undefined) {
6374
- throw new Error('includeServerSideToolInvocations parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6374
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6375
6375
  }
6376
6376
  return toObject;
6377
6377
  }
6378
6378
  function toolToMldev$3(fromObject) {
6379
6379
  const toObject = {};
6380
6380
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
6381
- throw new Error('retrieval parameter is not supported in Gemini API.');
6381
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6382
6382
  }
6383
6383
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
6384
6384
  if (fromComputerUse != null) {
@@ -6403,7 +6403,7 @@ function toolToMldev$3(fromObject) {
6403
6403
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
6404
6404
  }
6405
6405
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
6406
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
6406
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6407
6407
  }
6408
6408
  const fromFunctionDeclarations = getValueByPath(fromObject, [
6409
6409
  'functionDeclarations',
@@ -6424,7 +6424,7 @@ function toolToMldev$3(fromObject) {
6424
6424
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
6425
6425
  }
6426
6426
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
6427
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
6427
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6428
6428
  }
6429
6429
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
6430
6430
  if (fromUrlContext != null) {
@@ -6453,7 +6453,7 @@ function toolToVertex$2(fromObject) {
6453
6453
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
6454
6454
  }
6455
6455
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
6456
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6456
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6457
6457
  }
6458
6458
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
6459
6459
  if (fromGoogleSearch != null) {
@@ -6504,7 +6504,7 @@ function toolToVertex$2(fromObject) {
6504
6504
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
6505
6505
  }
6506
6506
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
6507
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6507
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6508
6508
  }
6509
6509
  return toObject;
6510
6510
  }
@@ -7594,7 +7594,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
7594
7594
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
7595
7595
  const USER_AGENT_HEADER = 'User-Agent';
7596
7596
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
7597
- const SDK_VERSION = '2.1.0'; // x-release-please-version
7597
+ const SDK_VERSION = '2.2.0'; // x-release-please-version
7598
7598
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
7599
7599
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
7600
7600
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -11477,7 +11477,7 @@ GeminiNextGenAPIClient.Webhooks = Webhooks;
11477
11477
  function audioTranscriptionConfigToMldev$1(fromObject) {
11478
11478
  const toObject = {};
11479
11479
  if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
11480
- throw new Error('languageCodes parameter is not supported in Gemini API.');
11480
+ throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11481
11481
  }
11482
11482
  return toObject;
11483
11483
  }
@@ -11488,23 +11488,23 @@ function authConfigToMldev$2(fromObject) {
11488
11488
  setValueByPath(toObject, ['apiKey'], fromApiKey);
11489
11489
  }
11490
11490
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
11491
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
11491
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11492
11492
  }
11493
11493
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
11494
- throw new Error('authType parameter is not supported in Gemini API.');
11494
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11495
11495
  }
11496
11496
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
11497
11497
  undefined) {
11498
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
11498
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11499
11499
  }
11500
11500
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
11501
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
11501
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11502
11502
  }
11503
11503
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
11504
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
11504
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11505
11505
  }
11506
11506
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
11507
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
11507
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11508
11508
  }
11509
11509
  return toObject;
11510
11510
  }
@@ -11515,7 +11515,7 @@ function blobToMldev$2(fromObject) {
11515
11515
  setValueByPath(toObject, ['data'], fromData);
11516
11516
  }
11517
11517
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
11518
- throw new Error('displayName parameter is not supported in Gemini API.');
11518
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11519
11519
  }
11520
11520
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
11521
11521
  if (fromMimeType != null) {
@@ -11562,7 +11562,7 @@ function contentToVertex$1(fromObject) {
11562
11562
  function fileDataToMldev$2(fromObject) {
11563
11563
  const toObject = {};
11564
11564
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
11565
- throw new Error('displayName parameter is not supported in Gemini API.');
11565
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11566
11566
  }
11567
11567
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
11568
11568
  if (fromFileUri != null) {
@@ -11589,10 +11589,10 @@ function functionCallToMldev$2(fromObject) {
11589
11589
  setValueByPath(toObject, ['name'], fromName);
11590
11590
  }
11591
11591
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
11592
- throw new Error('partialArgs parameter is not supported in Gemini API.');
11592
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11593
11593
  }
11594
11594
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
11595
- throw new Error('willContinue parameter is not supported in Gemini API.');
11595
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11596
11596
  }
11597
11597
  return toObject;
11598
11598
  }
@@ -11720,7 +11720,7 @@ function generationConfigToVertex$1(fromObject) {
11720
11720
  }
11721
11721
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
11722
11722
  undefined) {
11723
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11723
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11724
11724
  }
11725
11725
  return toObject;
11726
11726
  }
@@ -11743,10 +11743,10 @@ function googleSearchToMldev$2(fromObject) {
11743
11743
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
11744
11744
  }
11745
11745
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
11746
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
11746
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11747
11747
  }
11748
11748
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
11749
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
11749
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11750
11750
  }
11751
11751
  const fromTimeRangeFilter = getValueByPath(fromObject, [
11752
11752
  'timeRangeFilter',
@@ -11865,7 +11865,7 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
11865
11865
  setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
11866
11866
  }
11867
11867
  if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
11868
- throw new Error('explicitVadSignal parameter is not supported in Gemini API.');
11868
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11869
11869
  }
11870
11870
  const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
11871
11871
  if (parentObject !== undefined && fromAvatarConfig != null) {
@@ -12336,13 +12336,13 @@ function partToVertex$1(fromObject) {
12336
12336
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
12337
12337
  }
12338
12338
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
12339
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12339
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12340
12340
  }
12341
12341
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
12342
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12342
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12343
12343
  }
12344
12344
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
12345
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12345
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12346
12346
  }
12347
12347
  return toObject;
12348
12348
  }
@@ -12353,7 +12353,7 @@ function safetySettingToMldev$2(fromObject) {
12353
12353
  setValueByPath(toObject, ['category'], fromCategory);
12354
12354
  }
12355
12355
  if (getValueByPath(fromObject, ['method']) !== undefined) {
12356
- throw new Error('method parameter is not supported in Gemini API.');
12356
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12357
12357
  }
12358
12358
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
12359
12359
  if (fromThreshold != null) {
@@ -12368,14 +12368,14 @@ function sessionResumptionConfigToMldev$1(fromObject) {
12368
12368
  setValueByPath(toObject, ['handle'], fromHandle);
12369
12369
  }
12370
12370
  if (getValueByPath(fromObject, ['transparent']) !== undefined) {
12371
- throw new Error('transparent parameter is not supported in Gemini API.');
12371
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12372
12372
  }
12373
12373
  return toObject;
12374
12374
  }
12375
12375
  function toolToMldev$2(fromObject) {
12376
12376
  const toObject = {};
12377
12377
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
12378
- throw new Error('retrieval parameter is not supported in Gemini API.');
12378
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12379
12379
  }
12380
12380
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
12381
12381
  if (fromComputerUse != null) {
@@ -12400,7 +12400,7 @@ function toolToMldev$2(fromObject) {
12400
12400
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
12401
12401
  }
12402
12402
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
12403
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
12403
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12404
12404
  }
12405
12405
  const fromFunctionDeclarations = getValueByPath(fromObject, [
12406
12406
  'functionDeclarations',
@@ -12421,7 +12421,7 @@ function toolToMldev$2(fromObject) {
12421
12421
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
12422
12422
  }
12423
12423
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
12424
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
12424
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12425
12425
  }
12426
12426
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
12427
12427
  if (fromUrlContext != null) {
@@ -12450,7 +12450,7 @@ function toolToVertex$1(fromObject) {
12450
12450
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
12451
12451
  }
12452
12452
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
12453
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12453
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12454
12454
  }
12455
12455
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
12456
12456
  if (fromGoogleSearch != null) {
@@ -12501,7 +12501,7 @@ function toolToVertex$1(fromObject) {
12501
12501
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
12502
12502
  }
12503
12503
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
12504
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12504
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12505
12505
  }
12506
12506
  return toObject;
12507
12507
  }
@@ -12618,23 +12618,23 @@ function authConfigToMldev$1(fromObject, _rootObject) {
12618
12618
  setValueByPath(toObject, ['apiKey'], fromApiKey);
12619
12619
  }
12620
12620
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
12621
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
12621
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12622
12622
  }
12623
12623
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
12624
- throw new Error('authType parameter is not supported in Gemini API.');
12624
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12625
12625
  }
12626
12626
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
12627
12627
  undefined) {
12628
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
12628
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12629
12629
  }
12630
12630
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
12631
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
12631
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12632
12632
  }
12633
12633
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
12634
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
12634
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12635
12635
  }
12636
12636
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
12637
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
12637
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12638
12638
  }
12639
12639
  return toObject;
12640
12640
  }
@@ -12645,7 +12645,7 @@ function blobToMldev$1(fromObject, _rootObject) {
12645
12645
  setValueByPath(toObject, ['data'], fromData);
12646
12646
  }
12647
12647
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
12648
- throw new Error('displayName parameter is not supported in Gemini API.');
12648
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12649
12649
  }
12650
12650
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
12651
12651
  if (fromMimeType != null) {
@@ -12842,13 +12842,13 @@ function controlReferenceConfigToVertex(fromObject, _rootObject) {
12842
12842
  function countTokensConfigToMldev(fromObject, _rootObject) {
12843
12843
  const toObject = {};
12844
12844
  if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) {
12845
- throw new Error('systemInstruction parameter is not supported in Gemini API.');
12845
+ throw new Error('systemInstruction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12846
12846
  }
12847
12847
  if (getValueByPath(fromObject, ['tools']) !== undefined) {
12848
- throw new Error('tools parameter is not supported in Gemini API.');
12848
+ throw new Error('tools parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12849
12849
  }
12850
12850
  if (getValueByPath(fromObject, ['generationConfig']) !== undefined) {
12851
- throw new Error('generationConfig parameter is not supported in Gemini API.');
12851
+ throw new Error('generationConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12852
12852
  }
12853
12853
  return toObject;
12854
12854
  }
@@ -13149,16 +13149,16 @@ function embedContentConfigToMldev(fromObject, parentObject, _rootObject) {
13149
13149
  setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
13150
13150
  }
13151
13151
  if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
13152
- throw new Error('mimeType parameter is not supported in Gemini API.');
13152
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13153
13153
  }
13154
13154
  if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
13155
- throw new Error('autoTruncate parameter is not supported in Gemini API.');
13155
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13156
13156
  }
13157
13157
  if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
13158
- throw new Error('documentOcr parameter is not supported in Gemini API.');
13158
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13159
13159
  }
13160
13160
  if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
13161
- throw new Error('audioTrackExtraction parameter is not supported in Gemini API.');
13161
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13162
13162
  }
13163
13163
  return toObject;
13164
13164
  }
@@ -13442,7 +13442,7 @@ function endpointFromVertex(fromObject, _rootObject) {
13442
13442
  function fileDataToMldev$1(fromObject, _rootObject) {
13443
13443
  const toObject = {};
13444
13444
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
13445
- throw new Error('displayName parameter is not supported in Gemini API.');
13445
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13446
13446
  }
13447
13447
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
13448
13448
  if (fromFileUri != null) {
@@ -13469,10 +13469,10 @@ function functionCallToMldev$1(fromObject, _rootObject) {
13469
13469
  setValueByPath(toObject, ['name'], fromName);
13470
13470
  }
13471
13471
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
13472
- throw new Error('partialArgs parameter is not supported in Gemini API.');
13472
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13473
13473
  }
13474
13474
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
13475
- throw new Error('willContinue parameter is not supported in Gemini API.');
13475
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13476
13476
  }
13477
13477
  return toObject;
13478
13478
  }
@@ -13490,7 +13490,7 @@ function functionCallingConfigToMldev(fromObject, _rootObject) {
13490
13490
  }
13491
13491
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
13492
13492
  undefined) {
13493
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
13493
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13494
13494
  }
13495
13495
  return toObject;
13496
13496
  }
@@ -13577,10 +13577,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
13577
13577
  setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
13578
13578
  }
13579
13579
  if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
13580
- throw new Error('routingConfig parameter is not supported in Gemini API.');
13580
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13581
13581
  }
13582
13582
  if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
13583
- throw new Error('modelSelectionConfig parameter is not supported in Gemini API.');
13583
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13584
13584
  }
13585
13585
  const fromSafetySettings = getValueByPath(fromObject, [
13586
13586
  'safetySettings',
@@ -13609,7 +13609,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
13609
13609
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(fromToolConfig));
13610
13610
  }
13611
13611
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
13612
- throw new Error('labels parameter is not supported in Gemini API.');
13612
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13613
13613
  }
13614
13614
  const fromCachedContent = getValueByPath(fromObject, [
13615
13615
  'cachedContent',
@@ -13634,7 +13634,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
13634
13634
  setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
13635
13635
  }
13636
13636
  if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
13637
- throw new Error('audioTimestamp parameter is not supported in Gemini API.');
13637
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13638
13638
  }
13639
13639
  const fromThinkingConfig = getValueByPath(fromObject, [
13640
13640
  'thinkingConfig',
@@ -13653,7 +13653,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
13653
13653
  setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
13654
13654
  }
13655
13655
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
13656
- throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
13656
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13657
13657
  }
13658
13658
  const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
13659
13659
  if (parentObject !== undefined && fromServiceTier != null) {
@@ -13825,7 +13825,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
13825
13825
  }
13826
13826
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
13827
13827
  undefined) {
13828
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
13828
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
13829
13829
  }
13830
13830
  const fromModelArmorConfig = getValueByPath(fromObject, [
13831
13831
  'modelArmorConfig',
@@ -13974,10 +13974,10 @@ function generateContentResponseFromVertex(fromObject, _rootObject) {
13974
13974
  function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
13975
13975
  const toObject = {};
13976
13976
  if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
13977
- throw new Error('outputGcsUri parameter is not supported in Gemini API.');
13977
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13978
13978
  }
13979
13979
  if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) {
13980
- throw new Error('negativePrompt parameter is not supported in Gemini API.');
13980
+ throw new Error('negativePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13981
13981
  }
13982
13982
  const fromNumberOfImages = getValueByPath(fromObject, [
13983
13983
  'numberOfImages',
@@ -13996,7 +13996,7 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
13996
13996
  setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale);
13997
13997
  }
13998
13998
  if (getValueByPath(fromObject, ['seed']) !== undefined) {
13999
- throw new Error('seed parameter is not supported in Gemini API.');
13999
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14000
14000
  }
14001
14001
  const fromSafetyFilterLevel = getValueByPath(fromObject, [
14002
14002
  'safetyFilterLevel',
@@ -14039,17 +14039,17 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
14039
14039
  setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
14040
14040
  }
14041
14041
  if (getValueByPath(fromObject, ['addWatermark']) !== undefined) {
14042
- throw new Error('addWatermark parameter is not supported in Gemini API.');
14042
+ throw new Error('addWatermark parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14043
14043
  }
14044
14044
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
14045
- throw new Error('labels parameter is not supported in Gemini API.');
14045
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14046
14046
  }
14047
14047
  const fromImageSize = getValueByPath(fromObject, ['imageSize']);
14048
14048
  if (parentObject !== undefined && fromImageSize != null) {
14049
14049
  setValueByPath(parentObject, ['parameters', 'sampleImageSize'], fromImageSize);
14050
14050
  }
14051
14051
  if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {
14052
- throw new Error('enhancePrompt parameter is not supported in Gemini API.');
14052
+ throw new Error('enhancePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14053
14053
  }
14054
14054
  return toObject;
14055
14055
  }
@@ -14242,10 +14242,10 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
14242
14242
  setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos);
14243
14243
  }
14244
14244
  if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
14245
- throw new Error('outputGcsUri parameter is not supported in Gemini API.');
14245
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14246
14246
  }
14247
14247
  if (getValueByPath(fromObject, ['fps']) !== undefined) {
14248
- throw new Error('fps parameter is not supported in Gemini API.');
14248
+ throw new Error('fps parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14249
14249
  }
14250
14250
  const fromDurationSeconds = getValueByPath(fromObject, [
14251
14251
  'durationSeconds',
@@ -14254,7 +14254,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
14254
14254
  setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds);
14255
14255
  }
14256
14256
  if (getValueByPath(fromObject, ['seed']) !== undefined) {
14257
- throw new Error('seed parameter is not supported in Gemini API.');
14257
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14258
14258
  }
14259
14259
  const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
14260
14260
  if (parentObject !== undefined && fromAspectRatio != null) {
@@ -14271,7 +14271,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
14271
14271
  setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
14272
14272
  }
14273
14273
  if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {
14274
- throw new Error('pubsubTopic parameter is not supported in Gemini API.');
14274
+ throw new Error('pubsubTopic parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14275
14275
  }
14276
14276
  const fromNegativePrompt = getValueByPath(fromObject, [
14277
14277
  'negativePrompt',
@@ -14286,7 +14286,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
14286
14286
  setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
14287
14287
  }
14288
14288
  if (getValueByPath(fromObject, ['generateAudio']) !== undefined) {
14289
- throw new Error('generateAudio parameter is not supported in Gemini API.');
14289
+ throw new Error('generateAudio parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14290
14290
  }
14291
14291
  const fromLastFrame = getValueByPath(fromObject, ['lastFrame']);
14292
14292
  if (parentObject !== undefined && fromLastFrame != null) {
@@ -14305,13 +14305,13 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
14305
14305
  setValueByPath(parentObject, ['instances[0]', 'referenceImages'], transformedList);
14306
14306
  }
14307
14307
  if (getValueByPath(fromObject, ['mask']) !== undefined) {
14308
- throw new Error('mask parameter is not supported in Gemini API.');
14308
+ throw new Error('mask parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14309
14309
  }
14310
14310
  if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
14311
- throw new Error('compressionQuality parameter is not supported in Gemini API.');
14311
+ throw new Error('compressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14312
14312
  }
14313
14313
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
14314
- throw new Error('labels parameter is not supported in Gemini API.');
14314
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14315
14315
  }
14316
14316
  const fromWebhookConfig = getValueByPath(fromObject, [
14317
14317
  'webhookConfig',
@@ -14320,7 +14320,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
14320
14320
  setValueByPath(parentObject, ['webhookConfig'], fromWebhookConfig);
14321
14321
  }
14322
14322
  if (getValueByPath(fromObject, ['resizeMode']) !== undefined) {
14323
- throw new Error('resizeMode parameter is not supported in Gemini API.');
14323
+ throw new Error('resizeMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14324
14324
  }
14325
14325
  return toObject;
14326
14326
  }
@@ -14417,7 +14417,7 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
14417
14417
  setValueByPath(parentObject, ['labels'], fromLabels);
14418
14418
  }
14419
14419
  if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
14420
- throw new Error('webhookConfig parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
14420
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
14421
14421
  }
14422
14422
  const fromResizeMode = getValueByPath(fromObject, ['resizeMode']);
14423
14423
  if (parentObject !== undefined && fromResizeMode != null) {
@@ -14816,7 +14816,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
14816
14816
  }
14817
14817
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
14818
14818
  undefined) {
14819
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
14819
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
14820
14820
  }
14821
14821
  return toObject;
14822
14822
  }
@@ -14855,10 +14855,10 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
14855
14855
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
14856
14856
  }
14857
14857
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
14858
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
14858
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14859
14859
  }
14860
14860
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
14861
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
14861
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14862
14862
  }
14863
14863
  const fromTimeRangeFilter = getValueByPath(fromObject, [
14864
14864
  'timeRangeFilter',
@@ -14879,20 +14879,20 @@ function imageConfigToMldev(fromObject, _rootObject) {
14879
14879
  setValueByPath(toObject, ['imageSize'], fromImageSize);
14880
14880
  }
14881
14881
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
14882
- throw new Error('personGeneration parameter is not supported in Gemini API.');
14882
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14883
14883
  }
14884
14884
  if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
14885
- throw new Error('prominentPeople parameter is not supported in Gemini API.');
14885
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14886
14886
  }
14887
14887
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
14888
- throw new Error('outputMimeType parameter is not supported in Gemini API.');
14888
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14889
14889
  }
14890
14890
  if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
14891
14891
  undefined) {
14892
- throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
14892
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14893
14893
  }
14894
14894
  if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
14895
- throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
14895
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14896
14896
  }
14897
14897
  return toObject;
14898
14898
  }
@@ -14973,7 +14973,7 @@ function imageFromVertex(fromObject, _rootObject) {
14973
14973
  function imageToMldev(fromObject, _rootObject) {
14974
14974
  const toObject = {};
14975
14975
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
14976
- throw new Error('gcsUri parameter is not supported in Gemini API.');
14976
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14977
14977
  }
14978
14978
  const fromImageBytes = getValueByPath(fromObject, ['imageBytes']);
14979
14979
  if (fromImageBytes != null) {
@@ -15376,13 +15376,13 @@ function partToVertex(fromObject, _rootObject) {
15376
15376
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
15377
15377
  }
15378
15378
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
15379
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
15379
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
15380
15380
  }
15381
15381
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
15382
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
15382
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
15383
15383
  }
15384
15384
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
15385
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
15385
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
15386
15386
  }
15387
15387
  return toObject;
15388
15388
  }
@@ -15605,7 +15605,7 @@ function safetySettingToMldev$1(fromObject, _rootObject) {
15605
15605
  setValueByPath(toObject, ['category'], fromCategory);
15606
15606
  }
15607
15607
  if (getValueByPath(fromObject, ['method']) !== undefined) {
15608
- throw new Error('method parameter is not supported in Gemini API.');
15608
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
15609
15609
  }
15610
15610
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
15611
15611
  if (fromThreshold != null) {
@@ -15739,14 +15739,14 @@ function toolConfigToVertex(fromObject, _rootObject) {
15739
15739
  }
15740
15740
  if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
15741
15741
  undefined) {
15742
- throw new Error('includeServerSideToolInvocations parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
15742
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
15743
15743
  }
15744
15744
  return toObject;
15745
15745
  }
15746
15746
  function toolToMldev$1(fromObject, rootObject) {
15747
15747
  const toObject = {};
15748
15748
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
15749
- throw new Error('retrieval parameter is not supported in Gemini API.');
15749
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
15750
15750
  }
15751
15751
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
15752
15752
  if (fromComputerUse != null) {
@@ -15771,7 +15771,7 @@ function toolToMldev$1(fromObject, rootObject) {
15771
15771
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
15772
15772
  }
15773
15773
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
15774
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
15774
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
15775
15775
  }
15776
15776
  const fromFunctionDeclarations = getValueByPath(fromObject, [
15777
15777
  'functionDeclarations',
@@ -15792,7 +15792,7 @@ function toolToMldev$1(fromObject, rootObject) {
15792
15792
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
15793
15793
  }
15794
15794
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
15795
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
15795
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
15796
15796
  }
15797
15797
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
15798
15798
  if (fromUrlContext != null) {
@@ -15821,7 +15821,7 @@ function toolToVertex(fromObject, _rootObject) {
15821
15821
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
15822
15822
  }
15823
15823
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
15824
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
15824
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
15825
15825
  }
15826
15826
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
15827
15827
  if (fromGoogleSearch != null) {
@@ -15872,7 +15872,7 @@ function toolToVertex(fromObject, _rootObject) {
15872
15872
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
15873
15873
  }
15874
15874
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
15875
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
15875
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
15876
15876
  }
15877
15877
  return toObject;
15878
15878
  }
@@ -17389,7 +17389,7 @@ class Models extends BaseModule {
17389
17389
  if (this.apiClient.isVertexAI()) {
17390
17390
  if (!actualParams.config.queryBase) {
17391
17391
  if ((_a = actualParams.config) === null || _a === void 0 ? void 0 : _a.filter) {
17392
- throw new Error('Filtering tuned models list for Gemini Enterprise Agent Platform (previously known as Vertex AI) is not currently supported');
17392
+ throw new Error('Filtering tuned models list is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
17393
17393
  }
17394
17394
  else {
17395
17395
  actualParams.config.filter = 'labels.tune-type:*';
@@ -18845,7 +18845,7 @@ class Operations extends BaseModule {
18845
18845
  function audioTranscriptionConfigToMldev(fromObject) {
18846
18846
  const toObject = {};
18847
18847
  if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
18848
- throw new Error('languageCodes parameter is not supported in Gemini API.');
18848
+ throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18849
18849
  }
18850
18850
  return toObject;
18851
18851
  }
@@ -18856,23 +18856,23 @@ function authConfigToMldev(fromObject) {
18856
18856
  setValueByPath(toObject, ['apiKey'], fromApiKey);
18857
18857
  }
18858
18858
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
18859
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
18859
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18860
18860
  }
18861
18861
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
18862
- throw new Error('authType parameter is not supported in Gemini API.');
18862
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18863
18863
  }
18864
18864
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
18865
18865
  undefined) {
18866
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
18866
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18867
18867
  }
18868
18868
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
18869
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
18869
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18870
18870
  }
18871
18871
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
18872
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
18872
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18873
18873
  }
18874
18874
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
18875
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
18875
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18876
18876
  }
18877
18877
  return toObject;
18878
18878
  }
@@ -18883,7 +18883,7 @@ function blobToMldev(fromObject) {
18883
18883
  setValueByPath(toObject, ['data'], fromData);
18884
18884
  }
18885
18885
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
18886
- throw new Error('displayName parameter is not supported in Gemini API.');
18886
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18887
18887
  }
18888
18888
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
18889
18889
  if (fromMimeType != null) {
@@ -18950,7 +18950,7 @@ function createAuthTokenParametersToMldev(apiClient, fromObject) {
18950
18950
  function fileDataToMldev(fromObject) {
18951
18951
  const toObject = {};
18952
18952
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
18953
- throw new Error('displayName parameter is not supported in Gemini API.');
18953
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18954
18954
  }
18955
18955
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
18956
18956
  if (fromFileUri != null) {
@@ -18977,10 +18977,10 @@ function functionCallToMldev(fromObject) {
18977
18977
  setValueByPath(toObject, ['name'], fromName);
18978
18978
  }
18979
18979
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
18980
- throw new Error('partialArgs parameter is not supported in Gemini API.');
18980
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18981
18981
  }
18982
18982
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
18983
- throw new Error('willContinue parameter is not supported in Gemini API.');
18983
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18984
18984
  }
18985
18985
  return toObject;
18986
18986
  }
@@ -19003,10 +19003,10 @@ function googleSearchToMldev(fromObject) {
19003
19003
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
19004
19004
  }
19005
19005
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
19006
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
19006
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19007
19007
  }
19008
19008
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
19009
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
19009
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19010
19010
  }
19011
19011
  const fromTimeRangeFilter = getValueByPath(fromObject, [
19012
19012
  'timeRangeFilter',
@@ -19125,7 +19125,7 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
19125
19125
  setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
19126
19126
  }
19127
19127
  if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
19128
- throw new Error('explicitVadSignal parameter is not supported in Gemini API.');
19128
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19129
19129
  }
19130
19130
  const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
19131
19131
  if (parentObject !== undefined && fromAvatarConfig != null) {
@@ -19236,7 +19236,7 @@ function safetySettingToMldev(fromObject) {
19236
19236
  setValueByPath(toObject, ['category'], fromCategory);
19237
19237
  }
19238
19238
  if (getValueByPath(fromObject, ['method']) !== undefined) {
19239
- throw new Error('method parameter is not supported in Gemini API.');
19239
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19240
19240
  }
19241
19241
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
19242
19242
  if (fromThreshold != null) {
@@ -19251,14 +19251,14 @@ function sessionResumptionConfigToMldev(fromObject) {
19251
19251
  setValueByPath(toObject, ['handle'], fromHandle);
19252
19252
  }
19253
19253
  if (getValueByPath(fromObject, ['transparent']) !== undefined) {
19254
- throw new Error('transparent parameter is not supported in Gemini API.');
19254
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19255
19255
  }
19256
19256
  return toObject;
19257
19257
  }
19258
19258
  function toolToMldev(fromObject) {
19259
19259
  const toObject = {};
19260
19260
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
19261
- throw new Error('retrieval parameter is not supported in Gemini API.');
19261
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19262
19262
  }
19263
19263
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
19264
19264
  if (fromComputerUse != null) {
@@ -19283,7 +19283,7 @@ function toolToMldev(fromObject) {
19283
19283
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
19284
19284
  }
19285
19285
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
19286
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
19286
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19287
19287
  }
19288
19288
  const fromFunctionDeclarations = getValueByPath(fromObject, [
19289
19289
  'functionDeclarations',
@@ -19304,7 +19304,7 @@ function toolToMldev(fromObject) {
19304
19304
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
19305
19305
  }
19306
19306
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
19307
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
19307
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19308
19308
  }
19309
19309
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
19310
19310
  if (fromUrlContext != null) {
@@ -19638,7 +19638,7 @@ function cancelTuningJobResponseFromVertex(fromObject, _rootObject) {
19638
19638
  function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19639
19639
  const toObject = {};
19640
19640
  if (getValueByPath(fromObject, ['validationDataset']) !== undefined) {
19641
- throw new Error('validationDataset parameter is not supported in Gemini API.');
19641
+ throw new Error('validationDataset parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19642
19642
  }
19643
19643
  const fromTunedModelDisplayName = getValueByPath(fromObject, [
19644
19644
  'tunedModelDisplayName',
@@ -19647,7 +19647,7 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19647
19647
  setValueByPath(parentObject, ['displayName'], fromTunedModelDisplayName);
19648
19648
  }
19649
19649
  if (getValueByPath(fromObject, ['description']) !== undefined) {
19650
- throw new Error('description parameter is not supported in Gemini API.');
19650
+ throw new Error('description parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19651
19651
  }
19652
19652
  const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
19653
19653
  if (parentObject !== undefined && fromEpochCount != null) {
@@ -19661,20 +19661,20 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19661
19661
  }
19662
19662
  if (getValueByPath(fromObject, ['exportLastCheckpointOnly']) !==
19663
19663
  undefined) {
19664
- throw new Error('exportLastCheckpointOnly parameter is not supported in Gemini API.');
19664
+ throw new Error('exportLastCheckpointOnly parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19665
19665
  }
19666
19666
  if (getValueByPath(fromObject, ['preTunedModelCheckpointId']) !==
19667
19667
  undefined) {
19668
- throw new Error('preTunedModelCheckpointId parameter is not supported in Gemini API.');
19668
+ throw new Error('preTunedModelCheckpointId parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19669
19669
  }
19670
19670
  if (getValueByPath(fromObject, ['adapterSize']) !== undefined) {
19671
- throw new Error('adapterSize parameter is not supported in Gemini API.');
19671
+ throw new Error('adapterSize parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19672
19672
  }
19673
19673
  if (getValueByPath(fromObject, ['tuningMode']) !== undefined) {
19674
- throw new Error('tuningMode parameter is not supported in Gemini API.');
19674
+ throw new Error('tuningMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19675
19675
  }
19676
19676
  if (getValueByPath(fromObject, ['customBaseModel']) !== undefined) {
19677
- throw new Error('customBaseModel parameter is not supported in Gemini API.');
19677
+ throw new Error('customBaseModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19678
19678
  }
19679
19679
  const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
19680
19680
  if (parentObject !== undefined && fromBatchSize != null) {
@@ -19685,25 +19685,25 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19685
19685
  setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'learningRate'], fromLearningRate);
19686
19686
  }
19687
19687
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
19688
- throw new Error('labels parameter is not supported in Gemini API.');
19688
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19689
19689
  }
19690
19690
  if (getValueByPath(fromObject, ['beta']) !== undefined) {
19691
- throw new Error('beta parameter is not supported in Gemini API.');
19691
+ throw new Error('beta parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19692
19692
  }
19693
19693
  if (getValueByPath(fromObject, ['baseTeacherModel']) !== undefined) {
19694
- throw new Error('baseTeacherModel parameter is not supported in Gemini API.');
19694
+ throw new Error('baseTeacherModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19695
19695
  }
19696
19696
  if (getValueByPath(fromObject, ['tunedTeacherModelSource']) !== undefined) {
19697
- throw new Error('tunedTeacherModelSource parameter is not supported in Gemini API.');
19697
+ throw new Error('tunedTeacherModelSource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19698
19698
  }
19699
19699
  if (getValueByPath(fromObject, ['sftLossWeightMultiplier']) !== undefined) {
19700
- throw new Error('sftLossWeightMultiplier parameter is not supported in Gemini API.');
19700
+ throw new Error('sftLossWeightMultiplier parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19701
19701
  }
19702
19702
  if (getValueByPath(fromObject, ['outputUri']) !== undefined) {
19703
- throw new Error('outputUri parameter is not supported in Gemini API.');
19703
+ throw new Error('outputUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19704
19704
  }
19705
19705
  if (getValueByPath(fromObject, ['encryptionSpec']) !== undefined) {
19706
- throw new Error('encryptionSpec parameter is not supported in Gemini API.');
19706
+ throw new Error('encryptionSpec parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19707
19707
  }
19708
19708
  return toObject;
19709
19709
  }
@@ -20097,10 +20097,10 @@ function tunedModelFromMldev(fromObject, _rootObject) {
20097
20097
  function tuningDatasetToMldev(fromObject, _rootObject) {
20098
20098
  const toObject = {};
20099
20099
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
20100
- throw new Error('gcsUri parameter is not supported in Gemini API.');
20100
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
20101
20101
  }
20102
20102
  if (getValueByPath(fromObject, ['vertexDatasetResource']) !== undefined) {
20103
- throw new Error('vertexDatasetResource parameter is not supported in Gemini API.');
20103
+ throw new Error('vertexDatasetResource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
20104
20104
  }
20105
20105
  const fromExamples = getValueByPath(fromObject, ['examples']);
20106
20106
  if (fromExamples != null) {
@@ -20173,7 +20173,7 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
20173
20173
  }
20174
20174
  }
20175
20175
  if (getValueByPath(fromObject, ['examples']) !== undefined) {
20176
- throw new Error('examples parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
20176
+ throw new Error('examples parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
20177
20177
  }
20178
20178
  return toObject;
20179
20179
  }