@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.cjs CHANGED
@@ -3739,23 +3739,23 @@ function authConfigToMldev$4(fromObject) {
3739
3739
  setValueByPath(toObject, ['apiKey'], fromApiKey);
3740
3740
  }
3741
3741
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
3742
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
3742
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3743
3743
  }
3744
3744
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
3745
- throw new Error('authType parameter is not supported in Gemini API.');
3745
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3746
3746
  }
3747
3747
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
3748
3748
  undefined) {
3749
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
3749
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3750
3750
  }
3751
3751
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
3752
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
3752
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3753
3753
  }
3754
3754
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
3755
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
3755
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3756
3756
  }
3757
3757
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
3758
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
3758
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3759
3759
  }
3760
3760
  return toObject;
3761
3761
  }
@@ -3836,14 +3836,14 @@ function batchJobDestinationToVertex(fromObject) {
3836
3836
  setValueByPath(toObject, ['bigqueryDestination', 'outputUri'], fromBigqueryUri);
3837
3837
  }
3838
3838
  if (getValueByPath(fromObject, ['fileName']) !== undefined) {
3839
- throw new Error('fileName parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3839
+ throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3840
3840
  }
3841
3841
  if (getValueByPath(fromObject, ['inlinedResponses']) !== undefined) {
3842
- throw new Error('inlinedResponses parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3842
+ throw new Error('inlinedResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3843
3843
  }
3844
3844
  if (getValueByPath(fromObject, ['inlinedEmbedContentResponses']) !==
3845
3845
  undefined) {
3846
- throw new Error('inlinedEmbedContentResponses parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3846
+ throw new Error('inlinedEmbedContentResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3847
3847
  }
3848
3848
  const fromVertexDataset = getValueByPath(fromObject, [
3849
3849
  'vertexDataset',
@@ -3988,13 +3988,13 @@ function batchJobSourceFromVertex(fromObject) {
3988
3988
  function batchJobSourceToMldev(apiClient, fromObject) {
3989
3989
  const toObject = {};
3990
3990
  if (getValueByPath(fromObject, ['format']) !== undefined) {
3991
- throw new Error('format parameter is not supported in Gemini API.');
3991
+ throw new Error('format parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3992
3992
  }
3993
3993
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
3994
- throw new Error('gcsUri parameter is not supported in Gemini API.');
3994
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3995
3995
  }
3996
3996
  if (getValueByPath(fromObject, ['bigqueryUri']) !== undefined) {
3997
- throw new Error('bigqueryUri parameter is not supported in Gemini API.');
3997
+ throw new Error('bigqueryUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3998
3998
  }
3999
3999
  const fromFileName = getValueByPath(fromObject, ['fileName']);
4000
4000
  if (fromFileName != null) {
@@ -4013,7 +4013,7 @@ function batchJobSourceToMldev(apiClient, fromObject) {
4013
4013
  setValueByPath(toObject, ['requests', 'requests'], transformedList);
4014
4014
  }
4015
4015
  if (getValueByPath(fromObject, ['vertexDatasetName']) !== undefined) {
4016
- throw new Error('vertexDatasetName parameter is not supported in Gemini API.');
4016
+ throw new Error('vertexDatasetName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4017
4017
  }
4018
4018
  return toObject;
4019
4019
  }
@@ -4032,10 +4032,10 @@ function batchJobSourceToVertex(fromObject) {
4032
4032
  setValueByPath(toObject, ['bigquerySource', 'inputUri'], fromBigqueryUri);
4033
4033
  }
4034
4034
  if (getValueByPath(fromObject, ['fileName']) !== undefined) {
4035
- throw new Error('fileName parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4035
+ throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4036
4036
  }
4037
4037
  if (getValueByPath(fromObject, ['inlinedRequests']) !== undefined) {
4038
- throw new Error('inlinedRequests parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4038
+ throw new Error('inlinedRequests parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4039
4039
  }
4040
4040
  const fromVertexDatasetName = getValueByPath(fromObject, [
4041
4041
  'vertexDatasetName',
@@ -4052,7 +4052,7 @@ function blobToMldev$4(fromObject) {
4052
4052
  setValueByPath(toObject, ['data'], fromData);
4053
4053
  }
4054
4054
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
4055
- throw new Error('displayName parameter is not supported in Gemini API.');
4055
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4056
4056
  }
4057
4057
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
4058
4058
  if (fromMimeType != null) {
@@ -4175,7 +4175,7 @@ function createBatchJobConfigToMldev(fromObject, parentObject) {
4175
4175
  setValueByPath(parentObject, ['batch', 'displayName'], fromDisplayName);
4176
4176
  }
4177
4177
  if (getValueByPath(fromObject, ['dest']) !== undefined) {
4178
- throw new Error('dest parameter is not supported in Gemini API.');
4178
+ throw new Error('dest parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4179
4179
  }
4180
4180
  const fromWebhookConfig = getValueByPath(fromObject, [
4181
4181
  'webhookConfig',
@@ -4196,7 +4196,7 @@ function createBatchJobConfigToVertex(fromObject, parentObject) {
4196
4196
  setValueByPath(parentObject, ['outputConfig'], batchJobDestinationToVertex(tBatchJobDestination(fromDest)));
4197
4197
  }
4198
4198
  if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
4199
- throw new Error('webhookConfig parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4199
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4200
4200
  }
4201
4201
  return toObject;
4202
4202
  }
@@ -4352,16 +4352,16 @@ function embedContentConfigToMldev$1(fromObject, parentObject) {
4352
4352
  setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
4353
4353
  }
4354
4354
  if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
4355
- throw new Error('mimeType parameter is not supported in Gemini API.');
4355
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4356
4356
  }
4357
4357
  if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
4358
- throw new Error('autoTruncate parameter is not supported in Gemini API.');
4358
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4359
4359
  }
4360
4360
  if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
4361
- throw new Error('documentOcr parameter is not supported in Gemini API.');
4361
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4362
4362
  }
4363
4363
  if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
4364
- throw new Error('audioTrackExtraction parameter is not supported in Gemini API.');
4364
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4365
4365
  }
4366
4366
  return toObject;
4367
4367
  }
@@ -4382,7 +4382,7 @@ function embeddingsBatchJobSourceToMldev(apiClient, fromObject) {
4382
4382
  function fileDataToMldev$4(fromObject) {
4383
4383
  const toObject = {};
4384
4384
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
4385
- throw new Error('displayName parameter is not supported in Gemini API.');
4385
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4386
4386
  }
4387
4387
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
4388
4388
  if (fromFileUri != null) {
@@ -4409,10 +4409,10 @@ function functionCallToMldev$4(fromObject) {
4409
4409
  setValueByPath(toObject, ['name'], fromName);
4410
4410
  }
4411
4411
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
4412
- throw new Error('partialArgs parameter is not supported in Gemini API.');
4412
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4413
4413
  }
4414
4414
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
4415
- throw new Error('willContinue parameter is not supported in Gemini API.');
4415
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4416
4416
  }
4417
4417
  return toObject;
4418
4418
  }
@@ -4430,7 +4430,7 @@ function functionCallingConfigToMldev$2(fromObject) {
4430
4430
  }
4431
4431
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
4432
4432
  undefined) {
4433
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
4433
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4434
4434
  }
4435
4435
  return toObject;
4436
4436
  }
@@ -4517,10 +4517,10 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4517
4517
  setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
4518
4518
  }
4519
4519
  if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
4520
- throw new Error('routingConfig parameter is not supported in Gemini API.');
4520
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4521
4521
  }
4522
4522
  if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
4523
- throw new Error('modelSelectionConfig parameter is not supported in Gemini API.');
4523
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4524
4524
  }
4525
4525
  const fromSafetySettings = getValueByPath(fromObject, [
4526
4526
  'safetySettings',
@@ -4549,7 +4549,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4549
4549
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$2(fromToolConfig));
4550
4550
  }
4551
4551
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
4552
- throw new Error('labels parameter is not supported in Gemini API.');
4552
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4553
4553
  }
4554
4554
  const fromCachedContent = getValueByPath(fromObject, [
4555
4555
  'cachedContent',
@@ -4574,7 +4574,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4574
4574
  setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
4575
4575
  }
4576
4576
  if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
4577
- throw new Error('audioTimestamp parameter is not supported in Gemini API.');
4577
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4578
4578
  }
4579
4579
  const fromThinkingConfig = getValueByPath(fromObject, [
4580
4580
  'thinkingConfig',
@@ -4593,7 +4593,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4593
4593
  setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
4594
4594
  }
4595
4595
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
4596
- throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
4596
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4597
4597
  }
4598
4598
  const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
4599
4599
  if (parentObject !== undefined && fromServiceTier != null) {
@@ -4680,10 +4680,10 @@ function googleSearchToMldev$4(fromObject) {
4680
4680
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
4681
4681
  }
4682
4682
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
4683
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
4683
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4684
4684
  }
4685
4685
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
4686
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
4686
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4687
4687
  }
4688
4688
  const fromTimeRangeFilter = getValueByPath(fromObject, [
4689
4689
  'timeRangeFilter',
@@ -4704,20 +4704,20 @@ function imageConfigToMldev$1(fromObject) {
4704
4704
  setValueByPath(toObject, ['imageSize'], fromImageSize);
4705
4705
  }
4706
4706
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
4707
- throw new Error('personGeneration parameter is not supported in Gemini API.');
4707
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4708
4708
  }
4709
4709
  if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
4710
- throw new Error('prominentPeople parameter is not supported in Gemini API.');
4710
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4711
4711
  }
4712
4712
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
4713
- throw new Error('outputMimeType parameter is not supported in Gemini API.');
4713
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4714
4714
  }
4715
4715
  if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
4716
4716
  undefined) {
4717
- throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
4717
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4718
4718
  }
4719
4719
  if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
4720
- throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
4720
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4721
4721
  }
4722
4722
  return toObject;
4723
4723
  }
@@ -4774,7 +4774,7 @@ function listBatchJobsConfigToMldev(fromObject, parentObject) {
4774
4774
  setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
4775
4775
  }
4776
4776
  if (getValueByPath(fromObject, ['filter']) !== undefined) {
4777
- throw new Error('filter parameter is not supported in Gemini API.');
4777
+ throw new Error('filter parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4778
4778
  }
4779
4779
  return toObject;
4780
4780
  }
@@ -4943,7 +4943,7 @@ function safetySettingToMldev$3(fromObject) {
4943
4943
  setValueByPath(toObject, ['category'], fromCategory);
4944
4944
  }
4945
4945
  if (getValueByPath(fromObject, ['method']) !== undefined) {
4946
- throw new Error('method parameter is not supported in Gemini API.');
4946
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4947
4947
  }
4948
4948
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
4949
4949
  if (fromThreshold != null) {
@@ -4974,7 +4974,7 @@ function toolConfigToMldev$2(fromObject) {
4974
4974
  function toolToMldev$4(fromObject) {
4975
4975
  const toObject = {};
4976
4976
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
4977
- throw new Error('retrieval parameter is not supported in Gemini API.');
4977
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4978
4978
  }
4979
4979
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
4980
4980
  if (fromComputerUse != null) {
@@ -4999,7 +4999,7 @@ function toolToMldev$4(fromObject) {
4999
4999
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
5000
5000
  }
5001
5001
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
5002
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
5002
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5003
5003
  }
5004
5004
  const fromFunctionDeclarations = getValueByPath(fromObject, [
5005
5005
  'functionDeclarations',
@@ -5020,7 +5020,7 @@ function toolToMldev$4(fromObject) {
5020
5020
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
5021
5021
  }
5022
5022
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
5023
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
5023
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5024
5024
  }
5025
5025
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
5026
5026
  if (fromUrlContext != null) {
@@ -5767,23 +5767,23 @@ function authConfigToMldev$3(fromObject) {
5767
5767
  setValueByPath(toObject, ['apiKey'], fromApiKey);
5768
5768
  }
5769
5769
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
5770
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
5770
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5771
5771
  }
5772
5772
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
5773
- throw new Error('authType parameter is not supported in Gemini API.');
5773
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5774
5774
  }
5775
5775
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
5776
5776
  undefined) {
5777
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
5777
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5778
5778
  }
5779
5779
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
5780
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
5780
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5781
5781
  }
5782
5782
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
5783
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
5783
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5784
5784
  }
5785
5785
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
5786
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
5786
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5787
5787
  }
5788
5788
  return toObject;
5789
5789
  }
@@ -5794,7 +5794,7 @@ function blobToMldev$3(fromObject) {
5794
5794
  setValueByPath(toObject, ['data'], fromData);
5795
5795
  }
5796
5796
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
5797
- throw new Error('displayName parameter is not supported in Gemini API.');
5797
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5798
5798
  }
5799
5799
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
5800
5800
  if (fromMimeType != null) {
@@ -5883,7 +5883,7 @@ function createCachedContentConfigToMldev(fromObject, parentObject) {
5883
5883
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$1(fromToolConfig));
5884
5884
  }
5885
5885
  if (getValueByPath(fromObject, ['kmsKeyName']) !== undefined) {
5886
- throw new Error('kmsKeyName parameter is not supported in Gemini API.');
5886
+ throw new Error('kmsKeyName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5887
5887
  }
5888
5888
  return toObject;
5889
5889
  }
@@ -6000,7 +6000,7 @@ function deleteCachedContentResponseFromVertex(fromObject) {
6000
6000
  function fileDataToMldev$3(fromObject) {
6001
6001
  const toObject = {};
6002
6002
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
6003
- throw new Error('displayName parameter is not supported in Gemini API.');
6003
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6004
6004
  }
6005
6005
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
6006
6006
  if (fromFileUri != null) {
@@ -6027,10 +6027,10 @@ function functionCallToMldev$3(fromObject) {
6027
6027
  setValueByPath(toObject, ['name'], fromName);
6028
6028
  }
6029
6029
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
6030
- throw new Error('partialArgs parameter is not supported in Gemini API.');
6030
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6031
6031
  }
6032
6032
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
6033
- throw new Error('willContinue parameter is not supported in Gemini API.');
6033
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6034
6034
  }
6035
6035
  return toObject;
6036
6036
  }
@@ -6048,7 +6048,7 @@ function functionCallingConfigToMldev$1(fromObject) {
6048
6048
  }
6049
6049
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
6050
6050
  undefined) {
6051
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
6051
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6052
6052
  }
6053
6053
  return toObject;
6054
6054
  }
@@ -6087,10 +6087,10 @@ function googleSearchToMldev$3(fromObject) {
6087
6087
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
6088
6088
  }
6089
6089
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
6090
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
6090
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6091
6091
  }
6092
6092
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
6093
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
6093
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6094
6094
  }
6095
6095
  const fromTimeRangeFilter = getValueByPath(fromObject, [
6096
6096
  'timeRangeFilter',
@@ -6327,13 +6327,13 @@ function partToVertex$2(fromObject) {
6327
6327
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
6328
6328
  }
6329
6329
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
6330
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6330
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6331
6331
  }
6332
6332
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
6333
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6333
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6334
6334
  }
6335
6335
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
6336
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6336
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6337
6337
  }
6338
6338
  return toObject;
6339
6339
  }
@@ -6373,14 +6373,14 @@ function toolConfigToVertex$1(fromObject) {
6373
6373
  }
6374
6374
  if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
6375
6375
  undefined) {
6376
- throw new Error('includeServerSideToolInvocations parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6376
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6377
6377
  }
6378
6378
  return toObject;
6379
6379
  }
6380
6380
  function toolToMldev$3(fromObject) {
6381
6381
  const toObject = {};
6382
6382
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
6383
- throw new Error('retrieval parameter is not supported in Gemini API.');
6383
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6384
6384
  }
6385
6385
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
6386
6386
  if (fromComputerUse != null) {
@@ -6405,7 +6405,7 @@ function toolToMldev$3(fromObject) {
6405
6405
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
6406
6406
  }
6407
6407
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
6408
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
6408
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6409
6409
  }
6410
6410
  const fromFunctionDeclarations = getValueByPath(fromObject, [
6411
6411
  'functionDeclarations',
@@ -6426,7 +6426,7 @@ function toolToMldev$3(fromObject) {
6426
6426
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
6427
6427
  }
6428
6428
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
6429
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
6429
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6430
6430
  }
6431
6431
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
6432
6432
  if (fromUrlContext != null) {
@@ -6455,7 +6455,7 @@ function toolToVertex$2(fromObject) {
6455
6455
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
6456
6456
  }
6457
6457
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
6458
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6458
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6459
6459
  }
6460
6460
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
6461
6461
  if (fromGoogleSearch != null) {
@@ -6506,7 +6506,7 @@ function toolToVertex$2(fromObject) {
6506
6506
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
6507
6507
  }
6508
6508
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
6509
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6509
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6510
6510
  }
6511
6511
  return toObject;
6512
6512
  }
@@ -7596,7 +7596,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
7596
7596
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
7597
7597
  const USER_AGENT_HEADER = 'User-Agent';
7598
7598
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
7599
- const SDK_VERSION = '2.1.0'; // x-release-please-version
7599
+ const SDK_VERSION = '2.2.0'; // x-release-please-version
7600
7600
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
7601
7601
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
7602
7602
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -11479,7 +11479,7 @@ GeminiNextGenAPIClient.Webhooks = Webhooks;
11479
11479
  function audioTranscriptionConfigToMldev$1(fromObject) {
11480
11480
  const toObject = {};
11481
11481
  if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
11482
- throw new Error('languageCodes parameter is not supported in Gemini API.');
11482
+ throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11483
11483
  }
11484
11484
  return toObject;
11485
11485
  }
@@ -11490,23 +11490,23 @@ function authConfigToMldev$2(fromObject) {
11490
11490
  setValueByPath(toObject, ['apiKey'], fromApiKey);
11491
11491
  }
11492
11492
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
11493
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
11493
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11494
11494
  }
11495
11495
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
11496
- throw new Error('authType parameter is not supported in Gemini API.');
11496
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11497
11497
  }
11498
11498
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
11499
11499
  undefined) {
11500
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
11500
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11501
11501
  }
11502
11502
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
11503
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
11503
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11504
11504
  }
11505
11505
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
11506
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
11506
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11507
11507
  }
11508
11508
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
11509
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
11509
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11510
11510
  }
11511
11511
  return toObject;
11512
11512
  }
@@ -11517,7 +11517,7 @@ function blobToMldev$2(fromObject) {
11517
11517
  setValueByPath(toObject, ['data'], fromData);
11518
11518
  }
11519
11519
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
11520
- throw new Error('displayName parameter is not supported in Gemini API.');
11520
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11521
11521
  }
11522
11522
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
11523
11523
  if (fromMimeType != null) {
@@ -11564,7 +11564,7 @@ function contentToVertex$1(fromObject) {
11564
11564
  function fileDataToMldev$2(fromObject) {
11565
11565
  const toObject = {};
11566
11566
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
11567
- throw new Error('displayName parameter is not supported in Gemini API.');
11567
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11568
11568
  }
11569
11569
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
11570
11570
  if (fromFileUri != null) {
@@ -11591,10 +11591,10 @@ function functionCallToMldev$2(fromObject) {
11591
11591
  setValueByPath(toObject, ['name'], fromName);
11592
11592
  }
11593
11593
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
11594
- throw new Error('partialArgs parameter is not supported in Gemini API.');
11594
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11595
11595
  }
11596
11596
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
11597
- throw new Error('willContinue parameter is not supported in Gemini API.');
11597
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11598
11598
  }
11599
11599
  return toObject;
11600
11600
  }
@@ -11722,7 +11722,7 @@ function generationConfigToVertex$1(fromObject) {
11722
11722
  }
11723
11723
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
11724
11724
  undefined) {
11725
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11725
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11726
11726
  }
11727
11727
  return toObject;
11728
11728
  }
@@ -11745,10 +11745,10 @@ function googleSearchToMldev$2(fromObject) {
11745
11745
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
11746
11746
  }
11747
11747
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
11748
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
11748
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11749
11749
  }
11750
11750
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
11751
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
11751
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11752
11752
  }
11753
11753
  const fromTimeRangeFilter = getValueByPath(fromObject, [
11754
11754
  'timeRangeFilter',
@@ -11867,7 +11867,7 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
11867
11867
  setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
11868
11868
  }
11869
11869
  if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
11870
- throw new Error('explicitVadSignal parameter is not supported in Gemini API.');
11870
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11871
11871
  }
11872
11872
  const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
11873
11873
  if (parentObject !== undefined && fromAvatarConfig != null) {
@@ -12338,13 +12338,13 @@ function partToVertex$1(fromObject) {
12338
12338
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
12339
12339
  }
12340
12340
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
12341
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12341
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12342
12342
  }
12343
12343
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
12344
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12344
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12345
12345
  }
12346
12346
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
12347
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12347
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12348
12348
  }
12349
12349
  return toObject;
12350
12350
  }
@@ -12355,7 +12355,7 @@ function safetySettingToMldev$2(fromObject) {
12355
12355
  setValueByPath(toObject, ['category'], fromCategory);
12356
12356
  }
12357
12357
  if (getValueByPath(fromObject, ['method']) !== undefined) {
12358
- throw new Error('method parameter is not supported in Gemini API.');
12358
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12359
12359
  }
12360
12360
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
12361
12361
  if (fromThreshold != null) {
@@ -12370,14 +12370,14 @@ function sessionResumptionConfigToMldev$1(fromObject) {
12370
12370
  setValueByPath(toObject, ['handle'], fromHandle);
12371
12371
  }
12372
12372
  if (getValueByPath(fromObject, ['transparent']) !== undefined) {
12373
- throw new Error('transparent parameter is not supported in Gemini API.');
12373
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12374
12374
  }
12375
12375
  return toObject;
12376
12376
  }
12377
12377
  function toolToMldev$2(fromObject) {
12378
12378
  const toObject = {};
12379
12379
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
12380
- throw new Error('retrieval parameter is not supported in Gemini API.');
12380
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12381
12381
  }
12382
12382
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
12383
12383
  if (fromComputerUse != null) {
@@ -12402,7 +12402,7 @@ function toolToMldev$2(fromObject) {
12402
12402
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
12403
12403
  }
12404
12404
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
12405
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
12405
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12406
12406
  }
12407
12407
  const fromFunctionDeclarations = getValueByPath(fromObject, [
12408
12408
  'functionDeclarations',
@@ -12423,7 +12423,7 @@ function toolToMldev$2(fromObject) {
12423
12423
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
12424
12424
  }
12425
12425
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
12426
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
12426
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12427
12427
  }
12428
12428
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
12429
12429
  if (fromUrlContext != null) {
@@ -12452,7 +12452,7 @@ function toolToVertex$1(fromObject) {
12452
12452
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
12453
12453
  }
12454
12454
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
12455
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12455
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12456
12456
  }
12457
12457
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
12458
12458
  if (fromGoogleSearch != null) {
@@ -12503,7 +12503,7 @@ function toolToVertex$1(fromObject) {
12503
12503
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
12504
12504
  }
12505
12505
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
12506
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12506
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12507
12507
  }
12508
12508
  return toObject;
12509
12509
  }
@@ -12620,23 +12620,23 @@ function authConfigToMldev$1(fromObject, _rootObject) {
12620
12620
  setValueByPath(toObject, ['apiKey'], fromApiKey);
12621
12621
  }
12622
12622
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
12623
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
12623
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12624
12624
  }
12625
12625
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
12626
- throw new Error('authType parameter is not supported in Gemini API.');
12626
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12627
12627
  }
12628
12628
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
12629
12629
  undefined) {
12630
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
12630
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12631
12631
  }
12632
12632
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
12633
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
12633
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12634
12634
  }
12635
12635
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
12636
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
12636
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12637
12637
  }
12638
12638
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
12639
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
12639
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12640
12640
  }
12641
12641
  return toObject;
12642
12642
  }
@@ -12647,7 +12647,7 @@ function blobToMldev$1(fromObject, _rootObject) {
12647
12647
  setValueByPath(toObject, ['data'], fromData);
12648
12648
  }
12649
12649
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
12650
- throw new Error('displayName parameter is not supported in Gemini API.');
12650
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12651
12651
  }
12652
12652
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
12653
12653
  if (fromMimeType != null) {
@@ -12844,13 +12844,13 @@ function controlReferenceConfigToVertex(fromObject, _rootObject) {
12844
12844
  function countTokensConfigToMldev(fromObject, _rootObject) {
12845
12845
  const toObject = {};
12846
12846
  if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) {
12847
- throw new Error('systemInstruction parameter is not supported in Gemini API.');
12847
+ throw new Error('systemInstruction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12848
12848
  }
12849
12849
  if (getValueByPath(fromObject, ['tools']) !== undefined) {
12850
- throw new Error('tools parameter is not supported in Gemini API.');
12850
+ throw new Error('tools parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12851
12851
  }
12852
12852
  if (getValueByPath(fromObject, ['generationConfig']) !== undefined) {
12853
- throw new Error('generationConfig parameter is not supported in Gemini API.');
12853
+ throw new Error('generationConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12854
12854
  }
12855
12855
  return toObject;
12856
12856
  }
@@ -13151,16 +13151,16 @@ function embedContentConfigToMldev(fromObject, parentObject, _rootObject) {
13151
13151
  setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
13152
13152
  }
13153
13153
  if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
13154
- throw new Error('mimeType parameter is not supported in Gemini API.');
13154
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13155
13155
  }
13156
13156
  if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
13157
- throw new Error('autoTruncate parameter is not supported in Gemini API.');
13157
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13158
13158
  }
13159
13159
  if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
13160
- throw new Error('documentOcr parameter is not supported in Gemini API.');
13160
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13161
13161
  }
13162
13162
  if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
13163
- throw new Error('audioTrackExtraction parameter is not supported in Gemini API.');
13163
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13164
13164
  }
13165
13165
  return toObject;
13166
13166
  }
@@ -13444,7 +13444,7 @@ function endpointFromVertex(fromObject, _rootObject) {
13444
13444
  function fileDataToMldev$1(fromObject, _rootObject) {
13445
13445
  const toObject = {};
13446
13446
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
13447
- throw new Error('displayName parameter is not supported in Gemini API.');
13447
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13448
13448
  }
13449
13449
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
13450
13450
  if (fromFileUri != null) {
@@ -13471,10 +13471,10 @@ function functionCallToMldev$1(fromObject, _rootObject) {
13471
13471
  setValueByPath(toObject, ['name'], fromName);
13472
13472
  }
13473
13473
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
13474
- throw new Error('partialArgs parameter is not supported in Gemini API.');
13474
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13475
13475
  }
13476
13476
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
13477
- throw new Error('willContinue parameter is not supported in Gemini API.');
13477
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13478
13478
  }
13479
13479
  return toObject;
13480
13480
  }
@@ -13492,7 +13492,7 @@ function functionCallingConfigToMldev(fromObject, _rootObject) {
13492
13492
  }
13493
13493
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
13494
13494
  undefined) {
13495
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
13495
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13496
13496
  }
13497
13497
  return toObject;
13498
13498
  }
@@ -13579,10 +13579,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
13579
13579
  setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
13580
13580
  }
13581
13581
  if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
13582
- throw new Error('routingConfig parameter is not supported in Gemini API.');
13582
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13583
13583
  }
13584
13584
  if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
13585
- throw new Error('modelSelectionConfig parameter is not supported in Gemini API.');
13585
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13586
13586
  }
13587
13587
  const fromSafetySettings = getValueByPath(fromObject, [
13588
13588
  'safetySettings',
@@ -13611,7 +13611,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
13611
13611
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(fromToolConfig));
13612
13612
  }
13613
13613
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
13614
- throw new Error('labels parameter is not supported in Gemini API.');
13614
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13615
13615
  }
13616
13616
  const fromCachedContent = getValueByPath(fromObject, [
13617
13617
  'cachedContent',
@@ -13636,7 +13636,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
13636
13636
  setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
13637
13637
  }
13638
13638
  if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
13639
- throw new Error('audioTimestamp parameter is not supported in Gemini API.');
13639
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13640
13640
  }
13641
13641
  const fromThinkingConfig = getValueByPath(fromObject, [
13642
13642
  'thinkingConfig',
@@ -13655,7 +13655,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
13655
13655
  setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
13656
13656
  }
13657
13657
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
13658
- throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
13658
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13659
13659
  }
13660
13660
  const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
13661
13661
  if (parentObject !== undefined && fromServiceTier != null) {
@@ -13827,7 +13827,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
13827
13827
  }
13828
13828
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
13829
13829
  undefined) {
13830
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
13830
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
13831
13831
  }
13832
13832
  const fromModelArmorConfig = getValueByPath(fromObject, [
13833
13833
  'modelArmorConfig',
@@ -13976,10 +13976,10 @@ function generateContentResponseFromVertex(fromObject, _rootObject) {
13976
13976
  function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
13977
13977
  const toObject = {};
13978
13978
  if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
13979
- throw new Error('outputGcsUri parameter is not supported in Gemini API.');
13979
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13980
13980
  }
13981
13981
  if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) {
13982
- throw new Error('negativePrompt parameter is not supported in Gemini API.');
13982
+ throw new Error('negativePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
13983
13983
  }
13984
13984
  const fromNumberOfImages = getValueByPath(fromObject, [
13985
13985
  'numberOfImages',
@@ -13998,7 +13998,7 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
13998
13998
  setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale);
13999
13999
  }
14000
14000
  if (getValueByPath(fromObject, ['seed']) !== undefined) {
14001
- throw new Error('seed parameter is not supported in Gemini API.');
14001
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14002
14002
  }
14003
14003
  const fromSafetyFilterLevel = getValueByPath(fromObject, [
14004
14004
  'safetyFilterLevel',
@@ -14041,17 +14041,17 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
14041
14041
  setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
14042
14042
  }
14043
14043
  if (getValueByPath(fromObject, ['addWatermark']) !== undefined) {
14044
- throw new Error('addWatermark parameter is not supported in Gemini API.');
14044
+ throw new Error('addWatermark parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14045
14045
  }
14046
14046
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
14047
- throw new Error('labels parameter is not supported in Gemini API.');
14047
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14048
14048
  }
14049
14049
  const fromImageSize = getValueByPath(fromObject, ['imageSize']);
14050
14050
  if (parentObject !== undefined && fromImageSize != null) {
14051
14051
  setValueByPath(parentObject, ['parameters', 'sampleImageSize'], fromImageSize);
14052
14052
  }
14053
14053
  if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {
14054
- throw new Error('enhancePrompt parameter is not supported in Gemini API.');
14054
+ throw new Error('enhancePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14055
14055
  }
14056
14056
  return toObject;
14057
14057
  }
@@ -14244,10 +14244,10 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
14244
14244
  setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos);
14245
14245
  }
14246
14246
  if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
14247
- throw new Error('outputGcsUri parameter is not supported in Gemini API.');
14247
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14248
14248
  }
14249
14249
  if (getValueByPath(fromObject, ['fps']) !== undefined) {
14250
- throw new Error('fps parameter is not supported in Gemini API.');
14250
+ throw new Error('fps parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14251
14251
  }
14252
14252
  const fromDurationSeconds = getValueByPath(fromObject, [
14253
14253
  'durationSeconds',
@@ -14256,7 +14256,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
14256
14256
  setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds);
14257
14257
  }
14258
14258
  if (getValueByPath(fromObject, ['seed']) !== undefined) {
14259
- throw new Error('seed parameter is not supported in Gemini API.');
14259
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14260
14260
  }
14261
14261
  const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
14262
14262
  if (parentObject !== undefined && fromAspectRatio != null) {
@@ -14273,7 +14273,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
14273
14273
  setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
14274
14274
  }
14275
14275
  if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {
14276
- throw new Error('pubsubTopic parameter is not supported in Gemini API.');
14276
+ throw new Error('pubsubTopic parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14277
14277
  }
14278
14278
  const fromNegativePrompt = getValueByPath(fromObject, [
14279
14279
  'negativePrompt',
@@ -14288,7 +14288,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
14288
14288
  setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
14289
14289
  }
14290
14290
  if (getValueByPath(fromObject, ['generateAudio']) !== undefined) {
14291
- throw new Error('generateAudio parameter is not supported in Gemini API.');
14291
+ throw new Error('generateAudio parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14292
14292
  }
14293
14293
  const fromLastFrame = getValueByPath(fromObject, ['lastFrame']);
14294
14294
  if (parentObject !== undefined && fromLastFrame != null) {
@@ -14307,13 +14307,13 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
14307
14307
  setValueByPath(parentObject, ['instances[0]', 'referenceImages'], transformedList);
14308
14308
  }
14309
14309
  if (getValueByPath(fromObject, ['mask']) !== undefined) {
14310
- throw new Error('mask parameter is not supported in Gemini API.');
14310
+ throw new Error('mask parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14311
14311
  }
14312
14312
  if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
14313
- throw new Error('compressionQuality parameter is not supported in Gemini API.');
14313
+ throw new Error('compressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14314
14314
  }
14315
14315
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
14316
- throw new Error('labels parameter is not supported in Gemini API.');
14316
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14317
14317
  }
14318
14318
  const fromWebhookConfig = getValueByPath(fromObject, [
14319
14319
  'webhookConfig',
@@ -14322,7 +14322,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
14322
14322
  setValueByPath(parentObject, ['webhookConfig'], fromWebhookConfig);
14323
14323
  }
14324
14324
  if (getValueByPath(fromObject, ['resizeMode']) !== undefined) {
14325
- throw new Error('resizeMode parameter is not supported in Gemini API.');
14325
+ throw new Error('resizeMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14326
14326
  }
14327
14327
  return toObject;
14328
14328
  }
@@ -14419,7 +14419,7 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
14419
14419
  setValueByPath(parentObject, ['labels'], fromLabels);
14420
14420
  }
14421
14421
  if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
14422
- throw new Error('webhookConfig parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
14422
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
14423
14423
  }
14424
14424
  const fromResizeMode = getValueByPath(fromObject, ['resizeMode']);
14425
14425
  if (parentObject !== undefined && fromResizeMode != null) {
@@ -14818,7 +14818,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
14818
14818
  }
14819
14819
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
14820
14820
  undefined) {
14821
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
14821
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
14822
14822
  }
14823
14823
  return toObject;
14824
14824
  }
@@ -14857,10 +14857,10 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
14857
14857
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
14858
14858
  }
14859
14859
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
14860
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
14860
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14861
14861
  }
14862
14862
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
14863
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
14863
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14864
14864
  }
14865
14865
  const fromTimeRangeFilter = getValueByPath(fromObject, [
14866
14866
  'timeRangeFilter',
@@ -14881,20 +14881,20 @@ function imageConfigToMldev(fromObject, _rootObject) {
14881
14881
  setValueByPath(toObject, ['imageSize'], fromImageSize);
14882
14882
  }
14883
14883
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
14884
- throw new Error('personGeneration parameter is not supported in Gemini API.');
14884
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14885
14885
  }
14886
14886
  if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
14887
- throw new Error('prominentPeople parameter is not supported in Gemini API.');
14887
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14888
14888
  }
14889
14889
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
14890
- throw new Error('outputMimeType parameter is not supported in Gemini API.');
14890
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14891
14891
  }
14892
14892
  if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
14893
14893
  undefined) {
14894
- throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
14894
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14895
14895
  }
14896
14896
  if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
14897
- throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
14897
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14898
14898
  }
14899
14899
  return toObject;
14900
14900
  }
@@ -14975,7 +14975,7 @@ function imageFromVertex(fromObject, _rootObject) {
14975
14975
  function imageToMldev(fromObject, _rootObject) {
14976
14976
  const toObject = {};
14977
14977
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
14978
- throw new Error('gcsUri parameter is not supported in Gemini API.');
14978
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
14979
14979
  }
14980
14980
  const fromImageBytes = getValueByPath(fromObject, ['imageBytes']);
14981
14981
  if (fromImageBytes != null) {
@@ -15378,13 +15378,13 @@ function partToVertex(fromObject, _rootObject) {
15378
15378
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
15379
15379
  }
15380
15380
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
15381
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
15381
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
15382
15382
  }
15383
15383
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
15384
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
15384
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
15385
15385
  }
15386
15386
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
15387
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
15387
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
15388
15388
  }
15389
15389
  return toObject;
15390
15390
  }
@@ -15607,7 +15607,7 @@ function safetySettingToMldev$1(fromObject, _rootObject) {
15607
15607
  setValueByPath(toObject, ['category'], fromCategory);
15608
15608
  }
15609
15609
  if (getValueByPath(fromObject, ['method']) !== undefined) {
15610
- throw new Error('method parameter is not supported in Gemini API.');
15610
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
15611
15611
  }
15612
15612
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
15613
15613
  if (fromThreshold != null) {
@@ -15741,14 +15741,14 @@ function toolConfigToVertex(fromObject, _rootObject) {
15741
15741
  }
15742
15742
  if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
15743
15743
  undefined) {
15744
- throw new Error('includeServerSideToolInvocations parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
15744
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
15745
15745
  }
15746
15746
  return toObject;
15747
15747
  }
15748
15748
  function toolToMldev$1(fromObject, rootObject) {
15749
15749
  const toObject = {};
15750
15750
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
15751
- throw new Error('retrieval parameter is not supported in Gemini API.');
15751
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
15752
15752
  }
15753
15753
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
15754
15754
  if (fromComputerUse != null) {
@@ -15773,7 +15773,7 @@ function toolToMldev$1(fromObject, rootObject) {
15773
15773
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
15774
15774
  }
15775
15775
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
15776
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
15776
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
15777
15777
  }
15778
15778
  const fromFunctionDeclarations = getValueByPath(fromObject, [
15779
15779
  'functionDeclarations',
@@ -15794,7 +15794,7 @@ function toolToMldev$1(fromObject, rootObject) {
15794
15794
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
15795
15795
  }
15796
15796
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
15797
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
15797
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
15798
15798
  }
15799
15799
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
15800
15800
  if (fromUrlContext != null) {
@@ -15823,7 +15823,7 @@ function toolToVertex(fromObject, _rootObject) {
15823
15823
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
15824
15824
  }
15825
15825
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
15826
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
15826
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
15827
15827
  }
15828
15828
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
15829
15829
  if (fromGoogleSearch != null) {
@@ -15874,7 +15874,7 @@ function toolToVertex(fromObject, _rootObject) {
15874
15874
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
15875
15875
  }
15876
15876
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
15877
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
15877
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
15878
15878
  }
15879
15879
  return toObject;
15880
15880
  }
@@ -17391,7 +17391,7 @@ class Models extends BaseModule {
17391
17391
  if (this.apiClient.isVertexAI()) {
17392
17392
  if (!actualParams.config.queryBase) {
17393
17393
  if ((_a = actualParams.config) === null || _a === void 0 ? void 0 : _a.filter) {
17394
- throw new Error('Filtering tuned models list for Gemini Enterprise Agent Platform (previously known as Vertex AI) is not currently supported');
17394
+ throw new Error('Filtering tuned models list is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
17395
17395
  }
17396
17396
  else {
17397
17397
  actualParams.config.filter = 'labels.tune-type:*';
@@ -18847,7 +18847,7 @@ class Operations extends BaseModule {
18847
18847
  function audioTranscriptionConfigToMldev(fromObject) {
18848
18848
  const toObject = {};
18849
18849
  if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
18850
- throw new Error('languageCodes parameter is not supported in Gemini API.');
18850
+ throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18851
18851
  }
18852
18852
  return toObject;
18853
18853
  }
@@ -18858,23 +18858,23 @@ function authConfigToMldev(fromObject) {
18858
18858
  setValueByPath(toObject, ['apiKey'], fromApiKey);
18859
18859
  }
18860
18860
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
18861
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
18861
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18862
18862
  }
18863
18863
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
18864
- throw new Error('authType parameter is not supported in Gemini API.');
18864
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18865
18865
  }
18866
18866
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
18867
18867
  undefined) {
18868
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
18868
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18869
18869
  }
18870
18870
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
18871
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
18871
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18872
18872
  }
18873
18873
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
18874
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
18874
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18875
18875
  }
18876
18876
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
18877
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
18877
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18878
18878
  }
18879
18879
  return toObject;
18880
18880
  }
@@ -18885,7 +18885,7 @@ function blobToMldev(fromObject) {
18885
18885
  setValueByPath(toObject, ['data'], fromData);
18886
18886
  }
18887
18887
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
18888
- throw new Error('displayName parameter is not supported in Gemini API.');
18888
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18889
18889
  }
18890
18890
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
18891
18891
  if (fromMimeType != null) {
@@ -18952,7 +18952,7 @@ function createAuthTokenParametersToMldev(apiClient, fromObject) {
18952
18952
  function fileDataToMldev(fromObject) {
18953
18953
  const toObject = {};
18954
18954
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
18955
- throw new Error('displayName parameter is not supported in Gemini API.');
18955
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18956
18956
  }
18957
18957
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
18958
18958
  if (fromFileUri != null) {
@@ -18979,10 +18979,10 @@ function functionCallToMldev(fromObject) {
18979
18979
  setValueByPath(toObject, ['name'], fromName);
18980
18980
  }
18981
18981
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
18982
- throw new Error('partialArgs parameter is not supported in Gemini API.');
18982
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18983
18983
  }
18984
18984
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
18985
- throw new Error('willContinue parameter is not supported in Gemini API.');
18985
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
18986
18986
  }
18987
18987
  return toObject;
18988
18988
  }
@@ -19005,10 +19005,10 @@ function googleSearchToMldev(fromObject) {
19005
19005
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
19006
19006
  }
19007
19007
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
19008
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
19008
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19009
19009
  }
19010
19010
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
19011
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
19011
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19012
19012
  }
19013
19013
  const fromTimeRangeFilter = getValueByPath(fromObject, [
19014
19014
  'timeRangeFilter',
@@ -19127,7 +19127,7 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
19127
19127
  setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
19128
19128
  }
19129
19129
  if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
19130
- throw new Error('explicitVadSignal parameter is not supported in Gemini API.');
19130
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19131
19131
  }
19132
19132
  const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
19133
19133
  if (parentObject !== undefined && fromAvatarConfig != null) {
@@ -19238,7 +19238,7 @@ function safetySettingToMldev(fromObject) {
19238
19238
  setValueByPath(toObject, ['category'], fromCategory);
19239
19239
  }
19240
19240
  if (getValueByPath(fromObject, ['method']) !== undefined) {
19241
- throw new Error('method parameter is not supported in Gemini API.');
19241
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19242
19242
  }
19243
19243
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
19244
19244
  if (fromThreshold != null) {
@@ -19253,14 +19253,14 @@ function sessionResumptionConfigToMldev(fromObject) {
19253
19253
  setValueByPath(toObject, ['handle'], fromHandle);
19254
19254
  }
19255
19255
  if (getValueByPath(fromObject, ['transparent']) !== undefined) {
19256
- throw new Error('transparent parameter is not supported in Gemini API.');
19256
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19257
19257
  }
19258
19258
  return toObject;
19259
19259
  }
19260
19260
  function toolToMldev(fromObject) {
19261
19261
  const toObject = {};
19262
19262
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
19263
- throw new Error('retrieval parameter is not supported in Gemini API.');
19263
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19264
19264
  }
19265
19265
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
19266
19266
  if (fromComputerUse != null) {
@@ -19285,7 +19285,7 @@ function toolToMldev(fromObject) {
19285
19285
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
19286
19286
  }
19287
19287
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
19288
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
19288
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19289
19289
  }
19290
19290
  const fromFunctionDeclarations = getValueByPath(fromObject, [
19291
19291
  'functionDeclarations',
@@ -19306,7 +19306,7 @@ function toolToMldev(fromObject) {
19306
19306
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
19307
19307
  }
19308
19308
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
19309
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
19309
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19310
19310
  }
19311
19311
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
19312
19312
  if (fromUrlContext != null) {
@@ -19640,7 +19640,7 @@ function cancelTuningJobResponseFromVertex(fromObject, _rootObject) {
19640
19640
  function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19641
19641
  const toObject = {};
19642
19642
  if (getValueByPath(fromObject, ['validationDataset']) !== undefined) {
19643
- throw new Error('validationDataset parameter is not supported in Gemini API.');
19643
+ throw new Error('validationDataset parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19644
19644
  }
19645
19645
  const fromTunedModelDisplayName = getValueByPath(fromObject, [
19646
19646
  'tunedModelDisplayName',
@@ -19649,7 +19649,7 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19649
19649
  setValueByPath(parentObject, ['displayName'], fromTunedModelDisplayName);
19650
19650
  }
19651
19651
  if (getValueByPath(fromObject, ['description']) !== undefined) {
19652
- throw new Error('description parameter is not supported in Gemini API.');
19652
+ throw new Error('description parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19653
19653
  }
19654
19654
  const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
19655
19655
  if (parentObject !== undefined && fromEpochCount != null) {
@@ -19663,20 +19663,20 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19663
19663
  }
19664
19664
  if (getValueByPath(fromObject, ['exportLastCheckpointOnly']) !==
19665
19665
  undefined) {
19666
- throw new Error('exportLastCheckpointOnly parameter is not supported in Gemini API.');
19666
+ throw new Error('exportLastCheckpointOnly parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19667
19667
  }
19668
19668
  if (getValueByPath(fromObject, ['preTunedModelCheckpointId']) !==
19669
19669
  undefined) {
19670
- throw new Error('preTunedModelCheckpointId parameter is not supported in Gemini API.');
19670
+ throw new Error('preTunedModelCheckpointId parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19671
19671
  }
19672
19672
  if (getValueByPath(fromObject, ['adapterSize']) !== undefined) {
19673
- throw new Error('adapterSize parameter is not supported in Gemini API.');
19673
+ throw new Error('adapterSize parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19674
19674
  }
19675
19675
  if (getValueByPath(fromObject, ['tuningMode']) !== undefined) {
19676
- throw new Error('tuningMode parameter is not supported in Gemini API.');
19676
+ throw new Error('tuningMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19677
19677
  }
19678
19678
  if (getValueByPath(fromObject, ['customBaseModel']) !== undefined) {
19679
- throw new Error('customBaseModel parameter is not supported in Gemini API.');
19679
+ throw new Error('customBaseModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19680
19680
  }
19681
19681
  const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
19682
19682
  if (parentObject !== undefined && fromBatchSize != null) {
@@ -19687,25 +19687,25 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19687
19687
  setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'learningRate'], fromLearningRate);
19688
19688
  }
19689
19689
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
19690
- throw new Error('labels parameter is not supported in Gemini API.');
19690
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19691
19691
  }
19692
19692
  if (getValueByPath(fromObject, ['beta']) !== undefined) {
19693
- throw new Error('beta parameter is not supported in Gemini API.');
19693
+ throw new Error('beta parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19694
19694
  }
19695
19695
  if (getValueByPath(fromObject, ['baseTeacherModel']) !== undefined) {
19696
- throw new Error('baseTeacherModel parameter is not supported in Gemini API.');
19696
+ throw new Error('baseTeacherModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19697
19697
  }
19698
19698
  if (getValueByPath(fromObject, ['tunedTeacherModelSource']) !== undefined) {
19699
- throw new Error('tunedTeacherModelSource parameter is not supported in Gemini API.');
19699
+ throw new Error('tunedTeacherModelSource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19700
19700
  }
19701
19701
  if (getValueByPath(fromObject, ['sftLossWeightMultiplier']) !== undefined) {
19702
- throw new Error('sftLossWeightMultiplier parameter is not supported in Gemini API.');
19702
+ throw new Error('sftLossWeightMultiplier parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19703
19703
  }
19704
19704
  if (getValueByPath(fromObject, ['outputUri']) !== undefined) {
19705
- throw new Error('outputUri parameter is not supported in Gemini API.');
19705
+ throw new Error('outputUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19706
19706
  }
19707
19707
  if (getValueByPath(fromObject, ['encryptionSpec']) !== undefined) {
19708
- throw new Error('encryptionSpec parameter is not supported in Gemini API.');
19708
+ throw new Error('encryptionSpec parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19709
19709
  }
19710
19710
  return toObject;
19711
19711
  }
@@ -20099,10 +20099,10 @@ function tunedModelFromMldev(fromObject, _rootObject) {
20099
20099
  function tuningDatasetToMldev(fromObject, _rootObject) {
20100
20100
  const toObject = {};
20101
20101
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
20102
- throw new Error('gcsUri parameter is not supported in Gemini API.');
20102
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
20103
20103
  }
20104
20104
  if (getValueByPath(fromObject, ['vertexDatasetResource']) !== undefined) {
20105
- throw new Error('vertexDatasetResource parameter is not supported in Gemini API.');
20105
+ throw new Error('vertexDatasetResource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
20106
20106
  }
20107
20107
  const fromExamples = getValueByPath(fromObject, ['examples']);
20108
20108
  if (fromExamples != null) {
@@ -20175,7 +20175,7 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
20175
20175
  }
20176
20176
  }
20177
20177
  if (getValueByPath(fromObject, ['examples']) !== undefined) {
20178
- throw new Error('examples parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
20178
+ throw new Error('examples parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
20179
20179
  }
20180
20180
  return toObject;
20181
20181
  }