@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.
@@ -3767,23 +3767,23 @@ function authConfigToMldev$4(fromObject) {
3767
3767
  setValueByPath(toObject, ['apiKey'], fromApiKey);
3768
3768
  }
3769
3769
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
3770
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
3770
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3771
3771
  }
3772
3772
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
3773
- throw new Error('authType parameter is not supported in Gemini API.');
3773
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3774
3774
  }
3775
3775
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
3776
3776
  undefined) {
3777
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
3777
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3778
3778
  }
3779
3779
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
3780
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
3780
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3781
3781
  }
3782
3782
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
3783
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
3783
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3784
3784
  }
3785
3785
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
3786
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
3786
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
3787
3787
  }
3788
3788
  return toObject;
3789
3789
  }
@@ -3864,14 +3864,14 @@ function batchJobDestinationToVertex(fromObject) {
3864
3864
  setValueByPath(toObject, ['bigqueryDestination', 'outputUri'], fromBigqueryUri);
3865
3865
  }
3866
3866
  if (getValueByPath(fromObject, ['fileName']) !== undefined) {
3867
- throw new Error('fileName parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3867
+ throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3868
3868
  }
3869
3869
  if (getValueByPath(fromObject, ['inlinedResponses']) !== undefined) {
3870
- throw new Error('inlinedResponses parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3870
+ throw new Error('inlinedResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3871
3871
  }
3872
3872
  if (getValueByPath(fromObject, ['inlinedEmbedContentResponses']) !==
3873
3873
  undefined) {
3874
- throw new Error('inlinedEmbedContentResponses parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
3874
+ throw new Error('inlinedEmbedContentResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
3875
3875
  }
3876
3876
  const fromVertexDataset = getValueByPath(fromObject, [
3877
3877
  'vertexDataset',
@@ -4016,13 +4016,13 @@ function batchJobSourceFromVertex(fromObject) {
4016
4016
  function batchJobSourceToMldev(apiClient, fromObject) {
4017
4017
  const toObject = {};
4018
4018
  if (getValueByPath(fromObject, ['format']) !== undefined) {
4019
- throw new Error('format parameter is not supported in Gemini API.');
4019
+ throw new Error('format parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4020
4020
  }
4021
4021
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
4022
- throw new Error('gcsUri parameter is not supported in Gemini API.');
4022
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4023
4023
  }
4024
4024
  if (getValueByPath(fromObject, ['bigqueryUri']) !== undefined) {
4025
- throw new Error('bigqueryUri parameter is not supported in Gemini API.');
4025
+ throw new Error('bigqueryUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4026
4026
  }
4027
4027
  const fromFileName = getValueByPath(fromObject, ['fileName']);
4028
4028
  if (fromFileName != null) {
@@ -4041,7 +4041,7 @@ function batchJobSourceToMldev(apiClient, fromObject) {
4041
4041
  setValueByPath(toObject, ['requests', 'requests'], transformedList);
4042
4042
  }
4043
4043
  if (getValueByPath(fromObject, ['vertexDatasetName']) !== undefined) {
4044
- throw new Error('vertexDatasetName parameter is not supported in Gemini API.');
4044
+ throw new Error('vertexDatasetName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4045
4045
  }
4046
4046
  return toObject;
4047
4047
  }
@@ -4060,10 +4060,10 @@ function batchJobSourceToVertex(fromObject) {
4060
4060
  setValueByPath(toObject, ['bigquerySource', 'inputUri'], fromBigqueryUri);
4061
4061
  }
4062
4062
  if (getValueByPath(fromObject, ['fileName']) !== undefined) {
4063
- throw new Error('fileName parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4063
+ throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4064
4064
  }
4065
4065
  if (getValueByPath(fromObject, ['inlinedRequests']) !== undefined) {
4066
- throw new Error('inlinedRequests parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4066
+ throw new Error('inlinedRequests parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4067
4067
  }
4068
4068
  const fromVertexDatasetName = getValueByPath(fromObject, [
4069
4069
  'vertexDatasetName',
@@ -4080,7 +4080,7 @@ function blobToMldev$4(fromObject) {
4080
4080
  setValueByPath(toObject, ['data'], fromData);
4081
4081
  }
4082
4082
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
4083
- throw new Error('displayName parameter is not supported in Gemini API.');
4083
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4084
4084
  }
4085
4085
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
4086
4086
  if (fromMimeType != null) {
@@ -4203,7 +4203,7 @@ function createBatchJobConfigToMldev(fromObject, parentObject) {
4203
4203
  setValueByPath(parentObject, ['batch', 'displayName'], fromDisplayName);
4204
4204
  }
4205
4205
  if (getValueByPath(fromObject, ['dest']) !== undefined) {
4206
- throw new Error('dest parameter is not supported in Gemini API.');
4206
+ throw new Error('dest parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4207
4207
  }
4208
4208
  const fromWebhookConfig = getValueByPath(fromObject, [
4209
4209
  'webhookConfig',
@@ -4224,7 +4224,7 @@ function createBatchJobConfigToVertex(fromObject, parentObject) {
4224
4224
  setValueByPath(parentObject, ['outputConfig'], batchJobDestinationToVertex(tBatchJobDestination(fromDest)));
4225
4225
  }
4226
4226
  if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
4227
- throw new Error('webhookConfig parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
4227
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
4228
4228
  }
4229
4229
  return toObject;
4230
4230
  }
@@ -4380,16 +4380,16 @@ function embedContentConfigToMldev$1(fromObject, parentObject) {
4380
4380
  setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
4381
4381
  }
4382
4382
  if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
4383
- throw new Error('mimeType parameter is not supported in Gemini API.');
4383
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4384
4384
  }
4385
4385
  if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
4386
- throw new Error('autoTruncate parameter is not supported in Gemini API.');
4386
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4387
4387
  }
4388
4388
  if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
4389
- throw new Error('documentOcr parameter is not supported in Gemini API.');
4389
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4390
4390
  }
4391
4391
  if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
4392
- throw new Error('audioTrackExtraction parameter is not supported in Gemini API.');
4392
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4393
4393
  }
4394
4394
  return toObject;
4395
4395
  }
@@ -4410,7 +4410,7 @@ function embeddingsBatchJobSourceToMldev(apiClient, fromObject) {
4410
4410
  function fileDataToMldev$4(fromObject) {
4411
4411
  const toObject = {};
4412
4412
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
4413
- throw new Error('displayName parameter is not supported in Gemini API.');
4413
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4414
4414
  }
4415
4415
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
4416
4416
  if (fromFileUri != null) {
@@ -4437,10 +4437,10 @@ function functionCallToMldev$4(fromObject) {
4437
4437
  setValueByPath(toObject, ['name'], fromName);
4438
4438
  }
4439
4439
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
4440
- throw new Error('partialArgs parameter is not supported in Gemini API.');
4440
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4441
4441
  }
4442
4442
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
4443
- throw new Error('willContinue parameter is not supported in Gemini API.');
4443
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4444
4444
  }
4445
4445
  return toObject;
4446
4446
  }
@@ -4458,7 +4458,7 @@ function functionCallingConfigToMldev$2(fromObject) {
4458
4458
  }
4459
4459
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
4460
4460
  undefined) {
4461
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
4461
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4462
4462
  }
4463
4463
  return toObject;
4464
4464
  }
@@ -4545,10 +4545,10 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4545
4545
  setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
4546
4546
  }
4547
4547
  if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
4548
- throw new Error('routingConfig parameter is not supported in Gemini API.');
4548
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4549
4549
  }
4550
4550
  if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
4551
- throw new Error('modelSelectionConfig parameter is not supported in Gemini API.');
4551
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4552
4552
  }
4553
4553
  const fromSafetySettings = getValueByPath(fromObject, [
4554
4554
  'safetySettings',
@@ -4577,7 +4577,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4577
4577
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$2(fromToolConfig));
4578
4578
  }
4579
4579
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
4580
- throw new Error('labels parameter is not supported in Gemini API.');
4580
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4581
4581
  }
4582
4582
  const fromCachedContent = getValueByPath(fromObject, [
4583
4583
  'cachedContent',
@@ -4602,7 +4602,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4602
4602
  setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
4603
4603
  }
4604
4604
  if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
4605
- throw new Error('audioTimestamp parameter is not supported in Gemini API.');
4605
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4606
4606
  }
4607
4607
  const fromThinkingConfig = getValueByPath(fromObject, [
4608
4608
  'thinkingConfig',
@@ -4621,7 +4621,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
4621
4621
  setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
4622
4622
  }
4623
4623
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
4624
- throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
4624
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4625
4625
  }
4626
4626
  const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
4627
4627
  if (parentObject !== undefined && fromServiceTier != null) {
@@ -4708,10 +4708,10 @@ function googleSearchToMldev$4(fromObject) {
4708
4708
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
4709
4709
  }
4710
4710
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
4711
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
4711
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4712
4712
  }
4713
4713
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
4714
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
4714
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4715
4715
  }
4716
4716
  const fromTimeRangeFilter = getValueByPath(fromObject, [
4717
4717
  'timeRangeFilter',
@@ -4732,20 +4732,20 @@ function imageConfigToMldev$1(fromObject) {
4732
4732
  setValueByPath(toObject, ['imageSize'], fromImageSize);
4733
4733
  }
4734
4734
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
4735
- throw new Error('personGeneration parameter is not supported in Gemini API.');
4735
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4736
4736
  }
4737
4737
  if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
4738
- throw new Error('prominentPeople parameter is not supported in Gemini API.');
4738
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4739
4739
  }
4740
4740
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
4741
- throw new Error('outputMimeType parameter is not supported in Gemini API.');
4741
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4742
4742
  }
4743
4743
  if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
4744
4744
  undefined) {
4745
- throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
4745
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4746
4746
  }
4747
4747
  if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
4748
- throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
4748
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4749
4749
  }
4750
4750
  return toObject;
4751
4751
  }
@@ -4802,7 +4802,7 @@ function listBatchJobsConfigToMldev(fromObject, parentObject) {
4802
4802
  setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
4803
4803
  }
4804
4804
  if (getValueByPath(fromObject, ['filter']) !== undefined) {
4805
- throw new Error('filter parameter is not supported in Gemini API.');
4805
+ throw new Error('filter parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4806
4806
  }
4807
4807
  return toObject;
4808
4808
  }
@@ -4971,7 +4971,7 @@ function safetySettingToMldev$3(fromObject) {
4971
4971
  setValueByPath(toObject, ['category'], fromCategory);
4972
4972
  }
4973
4973
  if (getValueByPath(fromObject, ['method']) !== undefined) {
4974
- throw new Error('method parameter is not supported in Gemini API.');
4974
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
4975
4975
  }
4976
4976
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
4977
4977
  if (fromThreshold != null) {
@@ -5002,7 +5002,7 @@ function toolConfigToMldev$2(fromObject) {
5002
5002
  function toolToMldev$4(fromObject) {
5003
5003
  const toObject = {};
5004
5004
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
5005
- throw new Error('retrieval parameter is not supported in Gemini API.');
5005
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5006
5006
  }
5007
5007
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
5008
5008
  if (fromComputerUse != null) {
@@ -5027,7 +5027,7 @@ function toolToMldev$4(fromObject) {
5027
5027
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
5028
5028
  }
5029
5029
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
5030
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
5030
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5031
5031
  }
5032
5032
  const fromFunctionDeclarations = getValueByPath(fromObject, [
5033
5033
  'functionDeclarations',
@@ -5048,7 +5048,7 @@ function toolToMldev$4(fromObject) {
5048
5048
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
5049
5049
  }
5050
5050
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
5051
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
5051
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5052
5052
  }
5053
5053
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
5054
5054
  if (fromUrlContext != null) {
@@ -5795,23 +5795,23 @@ function authConfigToMldev$3(fromObject) {
5795
5795
  setValueByPath(toObject, ['apiKey'], fromApiKey);
5796
5796
  }
5797
5797
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
5798
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
5798
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5799
5799
  }
5800
5800
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
5801
- throw new Error('authType parameter is not supported in Gemini API.');
5801
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5802
5802
  }
5803
5803
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
5804
5804
  undefined) {
5805
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
5805
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5806
5806
  }
5807
5807
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
5808
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
5808
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5809
5809
  }
5810
5810
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
5811
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
5811
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5812
5812
  }
5813
5813
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
5814
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
5814
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5815
5815
  }
5816
5816
  return toObject;
5817
5817
  }
@@ -5822,7 +5822,7 @@ function blobToMldev$3(fromObject) {
5822
5822
  setValueByPath(toObject, ['data'], fromData);
5823
5823
  }
5824
5824
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
5825
- throw new Error('displayName parameter is not supported in Gemini API.');
5825
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5826
5826
  }
5827
5827
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
5828
5828
  if (fromMimeType != null) {
@@ -5911,7 +5911,7 @@ function createCachedContentConfigToMldev(fromObject, parentObject) {
5911
5911
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$1(fromToolConfig));
5912
5912
  }
5913
5913
  if (getValueByPath(fromObject, ['kmsKeyName']) !== undefined) {
5914
- throw new Error('kmsKeyName parameter is not supported in Gemini API.');
5914
+ throw new Error('kmsKeyName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
5915
5915
  }
5916
5916
  return toObject;
5917
5917
  }
@@ -6028,7 +6028,7 @@ function deleteCachedContentResponseFromVertex(fromObject) {
6028
6028
  function fileDataToMldev$3(fromObject) {
6029
6029
  const toObject = {};
6030
6030
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
6031
- throw new Error('displayName parameter is not supported in Gemini API.');
6031
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6032
6032
  }
6033
6033
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
6034
6034
  if (fromFileUri != null) {
@@ -6055,10 +6055,10 @@ function functionCallToMldev$3(fromObject) {
6055
6055
  setValueByPath(toObject, ['name'], fromName);
6056
6056
  }
6057
6057
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
6058
- throw new Error('partialArgs parameter is not supported in Gemini API.');
6058
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6059
6059
  }
6060
6060
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
6061
- throw new Error('willContinue parameter is not supported in Gemini API.');
6061
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6062
6062
  }
6063
6063
  return toObject;
6064
6064
  }
@@ -6076,7 +6076,7 @@ function functionCallingConfigToMldev$1(fromObject) {
6076
6076
  }
6077
6077
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
6078
6078
  undefined) {
6079
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
6079
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6080
6080
  }
6081
6081
  return toObject;
6082
6082
  }
@@ -6115,10 +6115,10 @@ function googleSearchToMldev$3(fromObject) {
6115
6115
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
6116
6116
  }
6117
6117
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
6118
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
6118
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6119
6119
  }
6120
6120
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
6121
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
6121
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6122
6122
  }
6123
6123
  const fromTimeRangeFilter = getValueByPath(fromObject, [
6124
6124
  'timeRangeFilter',
@@ -6355,13 +6355,13 @@ function partToVertex$2(fromObject) {
6355
6355
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
6356
6356
  }
6357
6357
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
6358
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6358
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6359
6359
  }
6360
6360
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
6361
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6361
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6362
6362
  }
6363
6363
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
6364
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6364
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6365
6365
  }
6366
6366
  return toObject;
6367
6367
  }
@@ -6401,14 +6401,14 @@ function toolConfigToVertex$1(fromObject) {
6401
6401
  }
6402
6402
  if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
6403
6403
  undefined) {
6404
- throw new Error('includeServerSideToolInvocations parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6404
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6405
6405
  }
6406
6406
  return toObject;
6407
6407
  }
6408
6408
  function toolToMldev$3(fromObject) {
6409
6409
  const toObject = {};
6410
6410
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
6411
- throw new Error('retrieval parameter is not supported in Gemini API.');
6411
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6412
6412
  }
6413
6413
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
6414
6414
  if (fromComputerUse != null) {
@@ -6433,7 +6433,7 @@ function toolToMldev$3(fromObject) {
6433
6433
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
6434
6434
  }
6435
6435
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
6436
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
6436
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6437
6437
  }
6438
6438
  const fromFunctionDeclarations = getValueByPath(fromObject, [
6439
6439
  'functionDeclarations',
@@ -6454,7 +6454,7 @@ function toolToMldev$3(fromObject) {
6454
6454
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
6455
6455
  }
6456
6456
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
6457
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
6457
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
6458
6458
  }
6459
6459
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
6460
6460
  if (fromUrlContext != null) {
@@ -6483,7 +6483,7 @@ function toolToVertex$2(fromObject) {
6483
6483
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
6484
6484
  }
6485
6485
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
6486
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6486
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6487
6487
  }
6488
6488
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
6489
6489
  if (fromGoogleSearch != null) {
@@ -6534,7 +6534,7 @@ function toolToVertex$2(fromObject) {
6534
6534
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
6535
6535
  }
6536
6536
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
6537
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
6537
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6538
6538
  }
6539
6539
  return toObject;
6540
6540
  }
@@ -7826,7 +7826,7 @@ class Files extends BaseModule {
7826
7826
  function audioTranscriptionConfigToMldev$1(fromObject) {
7827
7827
  const toObject = {};
7828
7828
  if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
7829
- throw new Error('languageCodes parameter is not supported in Gemini API.');
7829
+ throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7830
7830
  }
7831
7831
  return toObject;
7832
7832
  }
@@ -7837,23 +7837,23 @@ function authConfigToMldev$2(fromObject) {
7837
7837
  setValueByPath(toObject, ['apiKey'], fromApiKey);
7838
7838
  }
7839
7839
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
7840
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
7840
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7841
7841
  }
7842
7842
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
7843
- throw new Error('authType parameter is not supported in Gemini API.');
7843
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7844
7844
  }
7845
7845
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
7846
7846
  undefined) {
7847
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
7847
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7848
7848
  }
7849
7849
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
7850
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
7850
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7851
7851
  }
7852
7852
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
7853
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
7853
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7854
7854
  }
7855
7855
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
7856
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
7856
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7857
7857
  }
7858
7858
  return toObject;
7859
7859
  }
@@ -7864,7 +7864,7 @@ function blobToMldev$2(fromObject) {
7864
7864
  setValueByPath(toObject, ['data'], fromData);
7865
7865
  }
7866
7866
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
7867
- throw new Error('displayName parameter is not supported in Gemini API.');
7867
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7868
7868
  }
7869
7869
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
7870
7870
  if (fromMimeType != null) {
@@ -7911,7 +7911,7 @@ function contentToVertex$1(fromObject) {
7911
7911
  function fileDataToMldev$2(fromObject) {
7912
7912
  const toObject = {};
7913
7913
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
7914
- throw new Error('displayName parameter is not supported in Gemini API.');
7914
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7915
7915
  }
7916
7916
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
7917
7917
  if (fromFileUri != null) {
@@ -7938,10 +7938,10 @@ function functionCallToMldev$2(fromObject) {
7938
7938
  setValueByPath(toObject, ['name'], fromName);
7939
7939
  }
7940
7940
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
7941
- throw new Error('partialArgs parameter is not supported in Gemini API.');
7941
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7942
7942
  }
7943
7943
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
7944
- throw new Error('willContinue parameter is not supported in Gemini API.');
7944
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
7945
7945
  }
7946
7946
  return toObject;
7947
7947
  }
@@ -8069,7 +8069,7 @@ function generationConfigToVertex$1(fromObject) {
8069
8069
  }
8070
8070
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
8071
8071
  undefined) {
8072
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8072
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8073
8073
  }
8074
8074
  return toObject;
8075
8075
  }
@@ -8092,10 +8092,10 @@ function googleSearchToMldev$2(fromObject) {
8092
8092
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
8093
8093
  }
8094
8094
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
8095
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
8095
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8096
8096
  }
8097
8097
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
8098
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
8098
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8099
8099
  }
8100
8100
  const fromTimeRangeFilter = getValueByPath(fromObject, [
8101
8101
  'timeRangeFilter',
@@ -8214,7 +8214,7 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
8214
8214
  setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
8215
8215
  }
8216
8216
  if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
8217
- throw new Error('explicitVadSignal parameter is not supported in Gemini API.');
8217
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8218
8218
  }
8219
8219
  const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
8220
8220
  if (parentObject !== undefined && fromAvatarConfig != null) {
@@ -8685,13 +8685,13 @@ function partToVertex$1(fromObject) {
8685
8685
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
8686
8686
  }
8687
8687
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
8688
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8688
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8689
8689
  }
8690
8690
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
8691
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8691
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8692
8692
  }
8693
8693
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
8694
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8694
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8695
8695
  }
8696
8696
  return toObject;
8697
8697
  }
@@ -8702,7 +8702,7 @@ function safetySettingToMldev$2(fromObject) {
8702
8702
  setValueByPath(toObject, ['category'], fromCategory);
8703
8703
  }
8704
8704
  if (getValueByPath(fromObject, ['method']) !== undefined) {
8705
- throw new Error('method parameter is not supported in Gemini API.');
8705
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8706
8706
  }
8707
8707
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
8708
8708
  if (fromThreshold != null) {
@@ -8717,14 +8717,14 @@ function sessionResumptionConfigToMldev$1(fromObject) {
8717
8717
  setValueByPath(toObject, ['handle'], fromHandle);
8718
8718
  }
8719
8719
  if (getValueByPath(fromObject, ['transparent']) !== undefined) {
8720
- throw new Error('transparent parameter is not supported in Gemini API.');
8720
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8721
8721
  }
8722
8722
  return toObject;
8723
8723
  }
8724
8724
  function toolToMldev$2(fromObject) {
8725
8725
  const toObject = {};
8726
8726
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
8727
- throw new Error('retrieval parameter is not supported in Gemini API.');
8727
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8728
8728
  }
8729
8729
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
8730
8730
  if (fromComputerUse != null) {
@@ -8749,7 +8749,7 @@ function toolToMldev$2(fromObject) {
8749
8749
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
8750
8750
  }
8751
8751
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
8752
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
8752
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8753
8753
  }
8754
8754
  const fromFunctionDeclarations = getValueByPath(fromObject, [
8755
8755
  'functionDeclarations',
@@ -8770,7 +8770,7 @@ function toolToMldev$2(fromObject) {
8770
8770
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
8771
8771
  }
8772
8772
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
8773
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
8773
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8774
8774
  }
8775
8775
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
8776
8776
  if (fromUrlContext != null) {
@@ -8799,7 +8799,7 @@ function toolToVertex$1(fromObject) {
8799
8799
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
8800
8800
  }
8801
8801
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
8802
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8802
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8803
8803
  }
8804
8804
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
8805
8805
  if (fromGoogleSearch != null) {
@@ -8850,7 +8850,7 @@ function toolToVertex$1(fromObject) {
8850
8850
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
8851
8851
  }
8852
8852
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
8853
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8853
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8854
8854
  }
8855
8855
  return toObject;
8856
8856
  }
@@ -8967,23 +8967,23 @@ function authConfigToMldev$1(fromObject, _rootObject) {
8967
8967
  setValueByPath(toObject, ['apiKey'], fromApiKey);
8968
8968
  }
8969
8969
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
8970
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
8970
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8971
8971
  }
8972
8972
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
8973
- throw new Error('authType parameter is not supported in Gemini API.');
8973
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8974
8974
  }
8975
8975
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
8976
8976
  undefined) {
8977
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
8977
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8978
8978
  }
8979
8979
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
8980
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
8980
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8981
8981
  }
8982
8982
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
8983
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
8983
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8984
8984
  }
8985
8985
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
8986
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
8986
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8987
8987
  }
8988
8988
  return toObject;
8989
8989
  }
@@ -8994,7 +8994,7 @@ function blobToMldev$1(fromObject, _rootObject) {
8994
8994
  setValueByPath(toObject, ['data'], fromData);
8995
8995
  }
8996
8996
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
8997
- throw new Error('displayName parameter is not supported in Gemini API.');
8997
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8998
8998
  }
8999
8999
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
9000
9000
  if (fromMimeType != null) {
@@ -9191,13 +9191,13 @@ function controlReferenceConfigToVertex(fromObject, _rootObject) {
9191
9191
  function countTokensConfigToMldev(fromObject, _rootObject) {
9192
9192
  const toObject = {};
9193
9193
  if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) {
9194
- throw new Error('systemInstruction parameter is not supported in Gemini API.');
9194
+ throw new Error('systemInstruction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9195
9195
  }
9196
9196
  if (getValueByPath(fromObject, ['tools']) !== undefined) {
9197
- throw new Error('tools parameter is not supported in Gemini API.');
9197
+ throw new Error('tools parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9198
9198
  }
9199
9199
  if (getValueByPath(fromObject, ['generationConfig']) !== undefined) {
9200
- throw new Error('generationConfig parameter is not supported in Gemini API.');
9200
+ throw new Error('generationConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9201
9201
  }
9202
9202
  return toObject;
9203
9203
  }
@@ -9498,16 +9498,16 @@ function embedContentConfigToMldev(fromObject, parentObject, _rootObject) {
9498
9498
  setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
9499
9499
  }
9500
9500
  if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
9501
- throw new Error('mimeType parameter is not supported in Gemini API.');
9501
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9502
9502
  }
9503
9503
  if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
9504
- throw new Error('autoTruncate parameter is not supported in Gemini API.');
9504
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9505
9505
  }
9506
9506
  if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
9507
- throw new Error('documentOcr parameter is not supported in Gemini API.');
9507
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9508
9508
  }
9509
9509
  if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
9510
- throw new Error('audioTrackExtraction parameter is not supported in Gemini API.');
9510
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9511
9511
  }
9512
9512
  return toObject;
9513
9513
  }
@@ -9791,7 +9791,7 @@ function endpointFromVertex(fromObject, _rootObject) {
9791
9791
  function fileDataToMldev$1(fromObject, _rootObject) {
9792
9792
  const toObject = {};
9793
9793
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
9794
- throw new Error('displayName parameter is not supported in Gemini API.');
9794
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9795
9795
  }
9796
9796
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
9797
9797
  if (fromFileUri != null) {
@@ -9818,10 +9818,10 @@ function functionCallToMldev$1(fromObject, _rootObject) {
9818
9818
  setValueByPath(toObject, ['name'], fromName);
9819
9819
  }
9820
9820
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
9821
- throw new Error('partialArgs parameter is not supported in Gemini API.');
9821
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9822
9822
  }
9823
9823
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
9824
- throw new Error('willContinue parameter is not supported in Gemini API.');
9824
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9825
9825
  }
9826
9826
  return toObject;
9827
9827
  }
@@ -9839,7 +9839,7 @@ function functionCallingConfigToMldev(fromObject, _rootObject) {
9839
9839
  }
9840
9840
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
9841
9841
  undefined) {
9842
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
9842
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9843
9843
  }
9844
9844
  return toObject;
9845
9845
  }
@@ -9926,10 +9926,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
9926
9926
  setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
9927
9927
  }
9928
9928
  if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
9929
- throw new Error('routingConfig parameter is not supported in Gemini API.');
9929
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9930
9930
  }
9931
9931
  if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
9932
- throw new Error('modelSelectionConfig parameter is not supported in Gemini API.');
9932
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9933
9933
  }
9934
9934
  const fromSafetySettings = getValueByPath(fromObject, [
9935
9935
  'safetySettings',
@@ -9958,7 +9958,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
9958
9958
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(fromToolConfig));
9959
9959
  }
9960
9960
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
9961
- throw new Error('labels parameter is not supported in Gemini API.');
9961
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9962
9962
  }
9963
9963
  const fromCachedContent = getValueByPath(fromObject, [
9964
9964
  'cachedContent',
@@ -9983,7 +9983,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
9983
9983
  setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
9984
9984
  }
9985
9985
  if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
9986
- throw new Error('audioTimestamp parameter is not supported in Gemini API.');
9986
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9987
9987
  }
9988
9988
  const fromThinkingConfig = getValueByPath(fromObject, [
9989
9989
  'thinkingConfig',
@@ -10002,7 +10002,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
10002
10002
  setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
10003
10003
  }
10004
10004
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
10005
- throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
10005
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10006
10006
  }
10007
10007
  const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
10008
10008
  if (parentObject !== undefined && fromServiceTier != null) {
@@ -10174,7 +10174,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
10174
10174
  }
10175
10175
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
10176
10176
  undefined) {
10177
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
10177
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
10178
10178
  }
10179
10179
  const fromModelArmorConfig = getValueByPath(fromObject, [
10180
10180
  'modelArmorConfig',
@@ -10323,10 +10323,10 @@ function generateContentResponseFromVertex(fromObject, _rootObject) {
10323
10323
  function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
10324
10324
  const toObject = {};
10325
10325
  if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
10326
- throw new Error('outputGcsUri parameter is not supported in Gemini API.');
10326
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10327
10327
  }
10328
10328
  if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) {
10329
- throw new Error('negativePrompt parameter is not supported in Gemini API.');
10329
+ throw new Error('negativePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10330
10330
  }
10331
10331
  const fromNumberOfImages = getValueByPath(fromObject, [
10332
10332
  'numberOfImages',
@@ -10345,7 +10345,7 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
10345
10345
  setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale);
10346
10346
  }
10347
10347
  if (getValueByPath(fromObject, ['seed']) !== undefined) {
10348
- throw new Error('seed parameter is not supported in Gemini API.');
10348
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10349
10349
  }
10350
10350
  const fromSafetyFilterLevel = getValueByPath(fromObject, [
10351
10351
  'safetyFilterLevel',
@@ -10388,17 +10388,17 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
10388
10388
  setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
10389
10389
  }
10390
10390
  if (getValueByPath(fromObject, ['addWatermark']) !== undefined) {
10391
- throw new Error('addWatermark parameter is not supported in Gemini API.');
10391
+ throw new Error('addWatermark parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10392
10392
  }
10393
10393
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
10394
- throw new Error('labels parameter is not supported in Gemini API.');
10394
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10395
10395
  }
10396
10396
  const fromImageSize = getValueByPath(fromObject, ['imageSize']);
10397
10397
  if (parentObject !== undefined && fromImageSize != null) {
10398
10398
  setValueByPath(parentObject, ['parameters', 'sampleImageSize'], fromImageSize);
10399
10399
  }
10400
10400
  if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {
10401
- throw new Error('enhancePrompt parameter is not supported in Gemini API.');
10401
+ throw new Error('enhancePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10402
10402
  }
10403
10403
  return toObject;
10404
10404
  }
@@ -10591,10 +10591,10 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10591
10591
  setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos);
10592
10592
  }
10593
10593
  if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
10594
- throw new Error('outputGcsUri parameter is not supported in Gemini API.');
10594
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10595
10595
  }
10596
10596
  if (getValueByPath(fromObject, ['fps']) !== undefined) {
10597
- throw new Error('fps parameter is not supported in Gemini API.');
10597
+ throw new Error('fps parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10598
10598
  }
10599
10599
  const fromDurationSeconds = getValueByPath(fromObject, [
10600
10600
  'durationSeconds',
@@ -10603,7 +10603,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10603
10603
  setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds);
10604
10604
  }
10605
10605
  if (getValueByPath(fromObject, ['seed']) !== undefined) {
10606
- throw new Error('seed parameter is not supported in Gemini API.');
10606
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10607
10607
  }
10608
10608
  const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
10609
10609
  if (parentObject !== undefined && fromAspectRatio != null) {
@@ -10620,7 +10620,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10620
10620
  setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
10621
10621
  }
10622
10622
  if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {
10623
- throw new Error('pubsubTopic parameter is not supported in Gemini API.');
10623
+ throw new Error('pubsubTopic parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10624
10624
  }
10625
10625
  const fromNegativePrompt = getValueByPath(fromObject, [
10626
10626
  'negativePrompt',
@@ -10635,7 +10635,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10635
10635
  setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
10636
10636
  }
10637
10637
  if (getValueByPath(fromObject, ['generateAudio']) !== undefined) {
10638
- throw new Error('generateAudio parameter is not supported in Gemini API.');
10638
+ throw new Error('generateAudio parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10639
10639
  }
10640
10640
  const fromLastFrame = getValueByPath(fromObject, ['lastFrame']);
10641
10641
  if (parentObject !== undefined && fromLastFrame != null) {
@@ -10654,13 +10654,13 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10654
10654
  setValueByPath(parentObject, ['instances[0]', 'referenceImages'], transformedList);
10655
10655
  }
10656
10656
  if (getValueByPath(fromObject, ['mask']) !== undefined) {
10657
- throw new Error('mask parameter is not supported in Gemini API.');
10657
+ throw new Error('mask parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10658
10658
  }
10659
10659
  if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
10660
- throw new Error('compressionQuality parameter is not supported in Gemini API.');
10660
+ throw new Error('compressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10661
10661
  }
10662
10662
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
10663
- throw new Error('labels parameter is not supported in Gemini API.');
10663
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10664
10664
  }
10665
10665
  const fromWebhookConfig = getValueByPath(fromObject, [
10666
10666
  'webhookConfig',
@@ -10669,7 +10669,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10669
10669
  setValueByPath(parentObject, ['webhookConfig'], fromWebhookConfig);
10670
10670
  }
10671
10671
  if (getValueByPath(fromObject, ['resizeMode']) !== undefined) {
10672
- throw new Error('resizeMode parameter is not supported in Gemini API.');
10672
+ throw new Error('resizeMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10673
10673
  }
10674
10674
  return toObject;
10675
10675
  }
@@ -10766,7 +10766,7 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
10766
10766
  setValueByPath(parentObject, ['labels'], fromLabels);
10767
10767
  }
10768
10768
  if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
10769
- throw new Error('webhookConfig parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
10769
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
10770
10770
  }
10771
10771
  const fromResizeMode = getValueByPath(fromObject, ['resizeMode']);
10772
10772
  if (parentObject !== undefined && fromResizeMode != null) {
@@ -11165,7 +11165,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
11165
11165
  }
11166
11166
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
11167
11167
  undefined) {
11168
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11168
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11169
11169
  }
11170
11170
  return toObject;
11171
11171
  }
@@ -11204,10 +11204,10 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
11204
11204
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
11205
11205
  }
11206
11206
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
11207
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
11207
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11208
11208
  }
11209
11209
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
11210
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
11210
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11211
11211
  }
11212
11212
  const fromTimeRangeFilter = getValueByPath(fromObject, [
11213
11213
  'timeRangeFilter',
@@ -11228,20 +11228,20 @@ function imageConfigToMldev(fromObject, _rootObject) {
11228
11228
  setValueByPath(toObject, ['imageSize'], fromImageSize);
11229
11229
  }
11230
11230
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
11231
- throw new Error('personGeneration parameter is not supported in Gemini API.');
11231
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11232
11232
  }
11233
11233
  if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
11234
- throw new Error('prominentPeople parameter is not supported in Gemini API.');
11234
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11235
11235
  }
11236
11236
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
11237
- throw new Error('outputMimeType parameter is not supported in Gemini API.');
11237
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11238
11238
  }
11239
11239
  if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
11240
11240
  undefined) {
11241
- throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
11241
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11242
11242
  }
11243
11243
  if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
11244
- throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
11244
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11245
11245
  }
11246
11246
  return toObject;
11247
11247
  }
@@ -11322,7 +11322,7 @@ function imageFromVertex(fromObject, _rootObject) {
11322
11322
  function imageToMldev(fromObject, _rootObject) {
11323
11323
  const toObject = {};
11324
11324
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
11325
- throw new Error('gcsUri parameter is not supported in Gemini API.');
11325
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11326
11326
  }
11327
11327
  const fromImageBytes = getValueByPath(fromObject, ['imageBytes']);
11328
11328
  if (fromImageBytes != null) {
@@ -11725,13 +11725,13 @@ function partToVertex(fromObject, _rootObject) {
11725
11725
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
11726
11726
  }
11727
11727
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
11728
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11728
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11729
11729
  }
11730
11730
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
11731
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11731
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11732
11732
  }
11733
11733
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
11734
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11734
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11735
11735
  }
11736
11736
  return toObject;
11737
11737
  }
@@ -11954,7 +11954,7 @@ function safetySettingToMldev$1(fromObject, _rootObject) {
11954
11954
  setValueByPath(toObject, ['category'], fromCategory);
11955
11955
  }
11956
11956
  if (getValueByPath(fromObject, ['method']) !== undefined) {
11957
- throw new Error('method parameter is not supported in Gemini API.');
11957
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11958
11958
  }
11959
11959
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
11960
11960
  if (fromThreshold != null) {
@@ -12088,14 +12088,14 @@ function toolConfigToVertex(fromObject, _rootObject) {
12088
12088
  }
12089
12089
  if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
12090
12090
  undefined) {
12091
- throw new Error('includeServerSideToolInvocations parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12091
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12092
12092
  }
12093
12093
  return toObject;
12094
12094
  }
12095
12095
  function toolToMldev$1(fromObject, rootObject) {
12096
12096
  const toObject = {};
12097
12097
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
12098
- throw new Error('retrieval parameter is not supported in Gemini API.');
12098
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12099
12099
  }
12100
12100
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
12101
12101
  if (fromComputerUse != null) {
@@ -12120,7 +12120,7 @@ function toolToMldev$1(fromObject, rootObject) {
12120
12120
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
12121
12121
  }
12122
12122
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
12123
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
12123
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12124
12124
  }
12125
12125
  const fromFunctionDeclarations = getValueByPath(fromObject, [
12126
12126
  'functionDeclarations',
@@ -12141,7 +12141,7 @@ function toolToMldev$1(fromObject, rootObject) {
12141
12141
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
12142
12142
  }
12143
12143
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
12144
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
12144
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12145
12145
  }
12146
12146
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
12147
12147
  if (fromUrlContext != null) {
@@ -12170,7 +12170,7 @@ function toolToVertex(fromObject, _rootObject) {
12170
12170
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
12171
12171
  }
12172
12172
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
12173
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12173
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12174
12174
  }
12175
12175
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
12176
12176
  if (fromGoogleSearch != null) {
@@ -12221,7 +12221,7 @@ function toolToVertex(fromObject, _rootObject) {
12221
12221
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
12222
12222
  }
12223
12223
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
12224
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12224
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12225
12225
  }
12226
12226
  return toObject;
12227
12227
  }
@@ -12784,7 +12784,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
12784
12784
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
12785
12785
  const USER_AGENT_HEADER = 'User-Agent';
12786
12786
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
12787
- const SDK_VERSION = '2.1.0'; // x-release-please-version
12787
+ const SDK_VERSION = '2.2.0'; // x-release-please-version
12788
12788
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
12789
12789
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
12790
12790
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -14680,7 +14680,7 @@ class Models extends BaseModule {
14680
14680
  if (this.apiClient.isVertexAI()) {
14681
14681
  if (!actualParams.config.queryBase) {
14682
14682
  if ((_a = actualParams.config) === null || _a === void 0 ? void 0 : _a.filter) {
14683
- throw new Error('Filtering tuned models list for Gemini Enterprise Agent Platform (previously known as Vertex AI) is not currently supported');
14683
+ throw new Error('Filtering tuned models list is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
14684
14684
  }
14685
14685
  else {
14686
14686
  actualParams.config.filter = 'labels.tune-type:*';
@@ -16136,7 +16136,7 @@ class Operations extends BaseModule {
16136
16136
  function audioTranscriptionConfigToMldev(fromObject) {
16137
16137
  const toObject = {};
16138
16138
  if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
16139
- throw new Error('languageCodes parameter is not supported in Gemini API.');
16139
+ throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16140
16140
  }
16141
16141
  return toObject;
16142
16142
  }
@@ -16147,23 +16147,23 @@ function authConfigToMldev(fromObject) {
16147
16147
  setValueByPath(toObject, ['apiKey'], fromApiKey);
16148
16148
  }
16149
16149
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
16150
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
16150
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16151
16151
  }
16152
16152
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
16153
- throw new Error('authType parameter is not supported in Gemini API.');
16153
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16154
16154
  }
16155
16155
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
16156
16156
  undefined) {
16157
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
16157
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16158
16158
  }
16159
16159
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
16160
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
16160
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16161
16161
  }
16162
16162
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
16163
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
16163
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16164
16164
  }
16165
16165
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
16166
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
16166
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16167
16167
  }
16168
16168
  return toObject;
16169
16169
  }
@@ -16174,7 +16174,7 @@ function blobToMldev(fromObject) {
16174
16174
  setValueByPath(toObject, ['data'], fromData);
16175
16175
  }
16176
16176
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
16177
- throw new Error('displayName parameter is not supported in Gemini API.');
16177
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16178
16178
  }
16179
16179
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
16180
16180
  if (fromMimeType != null) {
@@ -16241,7 +16241,7 @@ function createAuthTokenParametersToMldev(apiClient, fromObject) {
16241
16241
  function fileDataToMldev(fromObject) {
16242
16242
  const toObject = {};
16243
16243
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
16244
- throw new Error('displayName parameter is not supported in Gemini API.');
16244
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16245
16245
  }
16246
16246
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
16247
16247
  if (fromFileUri != null) {
@@ -16268,10 +16268,10 @@ function functionCallToMldev(fromObject) {
16268
16268
  setValueByPath(toObject, ['name'], fromName);
16269
16269
  }
16270
16270
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
16271
- throw new Error('partialArgs parameter is not supported in Gemini API.');
16271
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16272
16272
  }
16273
16273
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
16274
- throw new Error('willContinue parameter is not supported in Gemini API.');
16274
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16275
16275
  }
16276
16276
  return toObject;
16277
16277
  }
@@ -16294,10 +16294,10 @@ function googleSearchToMldev(fromObject) {
16294
16294
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
16295
16295
  }
16296
16296
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
16297
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
16297
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16298
16298
  }
16299
16299
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
16300
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
16300
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16301
16301
  }
16302
16302
  const fromTimeRangeFilter = getValueByPath(fromObject, [
16303
16303
  'timeRangeFilter',
@@ -16416,7 +16416,7 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
16416
16416
  setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
16417
16417
  }
16418
16418
  if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
16419
- throw new Error('explicitVadSignal parameter is not supported in Gemini API.');
16419
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16420
16420
  }
16421
16421
  const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
16422
16422
  if (parentObject !== undefined && fromAvatarConfig != null) {
@@ -16527,7 +16527,7 @@ function safetySettingToMldev(fromObject) {
16527
16527
  setValueByPath(toObject, ['category'], fromCategory);
16528
16528
  }
16529
16529
  if (getValueByPath(fromObject, ['method']) !== undefined) {
16530
- throw new Error('method parameter is not supported in Gemini API.');
16530
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16531
16531
  }
16532
16532
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
16533
16533
  if (fromThreshold != null) {
@@ -16542,14 +16542,14 @@ function sessionResumptionConfigToMldev(fromObject) {
16542
16542
  setValueByPath(toObject, ['handle'], fromHandle);
16543
16543
  }
16544
16544
  if (getValueByPath(fromObject, ['transparent']) !== undefined) {
16545
- throw new Error('transparent parameter is not supported in Gemini API.');
16545
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16546
16546
  }
16547
16547
  return toObject;
16548
16548
  }
16549
16549
  function toolToMldev(fromObject) {
16550
16550
  const toObject = {};
16551
16551
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
16552
- throw new Error('retrieval parameter is not supported in Gemini API.');
16552
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16553
16553
  }
16554
16554
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
16555
16555
  if (fromComputerUse != null) {
@@ -16574,7 +16574,7 @@ function toolToMldev(fromObject) {
16574
16574
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
16575
16575
  }
16576
16576
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
16577
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
16577
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16578
16578
  }
16579
16579
  const fromFunctionDeclarations = getValueByPath(fromObject, [
16580
16580
  'functionDeclarations',
@@ -16595,7 +16595,7 @@ function toolToMldev(fromObject) {
16595
16595
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
16596
16596
  }
16597
16597
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
16598
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
16598
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16599
16599
  }
16600
16600
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
16601
16601
  if (fromUrlContext != null) {
@@ -19517,7 +19517,7 @@ function cancelTuningJobResponseFromVertex(fromObject, _rootObject) {
19517
19517
  function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19518
19518
  const toObject = {};
19519
19519
  if (getValueByPath(fromObject, ['validationDataset']) !== undefined) {
19520
- throw new Error('validationDataset parameter is not supported in Gemini API.');
19520
+ throw new Error('validationDataset parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19521
19521
  }
19522
19522
  const fromTunedModelDisplayName = getValueByPath(fromObject, [
19523
19523
  'tunedModelDisplayName',
@@ -19526,7 +19526,7 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19526
19526
  setValueByPath(parentObject, ['displayName'], fromTunedModelDisplayName);
19527
19527
  }
19528
19528
  if (getValueByPath(fromObject, ['description']) !== undefined) {
19529
- throw new Error('description parameter is not supported in Gemini API.');
19529
+ throw new Error('description parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19530
19530
  }
19531
19531
  const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
19532
19532
  if (parentObject !== undefined && fromEpochCount != null) {
@@ -19540,20 +19540,20 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19540
19540
  }
19541
19541
  if (getValueByPath(fromObject, ['exportLastCheckpointOnly']) !==
19542
19542
  undefined) {
19543
- throw new Error('exportLastCheckpointOnly parameter is not supported in Gemini API.');
19543
+ throw new Error('exportLastCheckpointOnly parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19544
19544
  }
19545
19545
  if (getValueByPath(fromObject, ['preTunedModelCheckpointId']) !==
19546
19546
  undefined) {
19547
- throw new Error('preTunedModelCheckpointId parameter is not supported in Gemini API.');
19547
+ throw new Error('preTunedModelCheckpointId parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19548
19548
  }
19549
19549
  if (getValueByPath(fromObject, ['adapterSize']) !== undefined) {
19550
- throw new Error('adapterSize parameter is not supported in Gemini API.');
19550
+ throw new Error('adapterSize parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19551
19551
  }
19552
19552
  if (getValueByPath(fromObject, ['tuningMode']) !== undefined) {
19553
- throw new Error('tuningMode parameter is not supported in Gemini API.');
19553
+ throw new Error('tuningMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19554
19554
  }
19555
19555
  if (getValueByPath(fromObject, ['customBaseModel']) !== undefined) {
19556
- throw new Error('customBaseModel parameter is not supported in Gemini API.');
19556
+ throw new Error('customBaseModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19557
19557
  }
19558
19558
  const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
19559
19559
  if (parentObject !== undefined && fromBatchSize != null) {
@@ -19564,25 +19564,25 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19564
19564
  setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'learningRate'], fromLearningRate);
19565
19565
  }
19566
19566
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
19567
- throw new Error('labels parameter is not supported in Gemini API.');
19567
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19568
19568
  }
19569
19569
  if (getValueByPath(fromObject, ['beta']) !== undefined) {
19570
- throw new Error('beta parameter is not supported in Gemini API.');
19570
+ throw new Error('beta parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19571
19571
  }
19572
19572
  if (getValueByPath(fromObject, ['baseTeacherModel']) !== undefined) {
19573
- throw new Error('baseTeacherModel parameter is not supported in Gemini API.');
19573
+ throw new Error('baseTeacherModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19574
19574
  }
19575
19575
  if (getValueByPath(fromObject, ['tunedTeacherModelSource']) !== undefined) {
19576
- throw new Error('tunedTeacherModelSource parameter is not supported in Gemini API.');
19576
+ throw new Error('tunedTeacherModelSource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19577
19577
  }
19578
19578
  if (getValueByPath(fromObject, ['sftLossWeightMultiplier']) !== undefined) {
19579
- throw new Error('sftLossWeightMultiplier parameter is not supported in Gemini API.');
19579
+ throw new Error('sftLossWeightMultiplier parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19580
19580
  }
19581
19581
  if (getValueByPath(fromObject, ['outputUri']) !== undefined) {
19582
- throw new Error('outputUri parameter is not supported in Gemini API.');
19582
+ throw new Error('outputUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19583
19583
  }
19584
19584
  if (getValueByPath(fromObject, ['encryptionSpec']) !== undefined) {
19585
- throw new Error('encryptionSpec parameter is not supported in Gemini API.');
19585
+ throw new Error('encryptionSpec parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19586
19586
  }
19587
19587
  return toObject;
19588
19588
  }
@@ -19976,10 +19976,10 @@ function tunedModelFromMldev(fromObject, _rootObject) {
19976
19976
  function tuningDatasetToMldev(fromObject, _rootObject) {
19977
19977
  const toObject = {};
19978
19978
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
19979
- throw new Error('gcsUri parameter is not supported in Gemini API.');
19979
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19980
19980
  }
19981
19981
  if (getValueByPath(fromObject, ['vertexDatasetResource']) !== undefined) {
19982
- throw new Error('vertexDatasetResource parameter is not supported in Gemini API.');
19982
+ throw new Error('vertexDatasetResource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19983
19983
  }
19984
19984
  const fromExamples = getValueByPath(fromObject, ['examples']);
19985
19985
  if (fromExamples != null) {
@@ -20052,7 +20052,7 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
20052
20052
  }
20053
20053
  }
20054
20054
  if (getValueByPath(fromObject, ['examples']) !== undefined) {
20055
- throw new Error('examples parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
20055
+ throw new Error('examples parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
20056
20056
  }
20057
20057
  return toObject;
20058
20058
  }