@google/genai 2.1.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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) {
@@ -8232,6 +8232,12 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
8232
8232
  }
8233
8233
  setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
8234
8234
  }
8235
+ const fromStreamTranslationConfig = getValueByPath(fromObject, [
8236
+ 'streamTranslationConfig',
8237
+ ]);
8238
+ if (parentObject !== undefined && fromStreamTranslationConfig != null) {
8239
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'streamTranslationConfig'], fromStreamTranslationConfig);
8240
+ }
8235
8241
  return toObject;
8236
8242
  }
8237
8243
  function liveConnectConfigToVertex(fromObject, parentObject) {
@@ -8364,6 +8370,9 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
8364
8370
  }
8365
8371
  setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
8366
8372
  }
8373
+ if (getValueByPath(fromObject, ['streamTranslationConfig']) !== undefined) {
8374
+ throw new Error('streamTranslationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8375
+ }
8367
8376
  return toObject;
8368
8377
  }
8369
8378
  function liveConnectParametersToMldev(apiClient, fromObject) {
@@ -8685,13 +8694,13 @@ function partToVertex$1(fromObject) {
8685
8694
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
8686
8695
  }
8687
8696
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
8688
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8697
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8689
8698
  }
8690
8699
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
8691
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8700
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8692
8701
  }
8693
8702
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
8694
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8703
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8695
8704
  }
8696
8705
  return toObject;
8697
8706
  }
@@ -8702,7 +8711,7 @@ function safetySettingToMldev$2(fromObject) {
8702
8711
  setValueByPath(toObject, ['category'], fromCategory);
8703
8712
  }
8704
8713
  if (getValueByPath(fromObject, ['method']) !== undefined) {
8705
- throw new Error('method parameter is not supported in Gemini API.');
8714
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8706
8715
  }
8707
8716
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
8708
8717
  if (fromThreshold != null) {
@@ -8717,14 +8726,14 @@ function sessionResumptionConfigToMldev$1(fromObject) {
8717
8726
  setValueByPath(toObject, ['handle'], fromHandle);
8718
8727
  }
8719
8728
  if (getValueByPath(fromObject, ['transparent']) !== undefined) {
8720
- throw new Error('transparent parameter is not supported in Gemini API.');
8729
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8721
8730
  }
8722
8731
  return toObject;
8723
8732
  }
8724
8733
  function toolToMldev$2(fromObject) {
8725
8734
  const toObject = {};
8726
8735
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
8727
- throw new Error('retrieval parameter is not supported in Gemini API.');
8736
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8728
8737
  }
8729
8738
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
8730
8739
  if (fromComputerUse != null) {
@@ -8749,7 +8758,7 @@ function toolToMldev$2(fromObject) {
8749
8758
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
8750
8759
  }
8751
8760
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
8752
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
8761
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8753
8762
  }
8754
8763
  const fromFunctionDeclarations = getValueByPath(fromObject, [
8755
8764
  'functionDeclarations',
@@ -8770,7 +8779,7 @@ function toolToMldev$2(fromObject) {
8770
8779
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
8771
8780
  }
8772
8781
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
8773
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
8782
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8774
8783
  }
8775
8784
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
8776
8785
  if (fromUrlContext != null) {
@@ -8799,7 +8808,7 @@ function toolToVertex$1(fromObject) {
8799
8808
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
8800
8809
  }
8801
8810
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
8802
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8811
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8803
8812
  }
8804
8813
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
8805
8814
  if (fromGoogleSearch != null) {
@@ -8850,7 +8859,7 @@ function toolToVertex$1(fromObject) {
8850
8859
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
8851
8860
  }
8852
8861
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
8853
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
8862
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8854
8863
  }
8855
8864
  return toObject;
8856
8865
  }
@@ -8967,23 +8976,23 @@ function authConfigToMldev$1(fromObject, _rootObject) {
8967
8976
  setValueByPath(toObject, ['apiKey'], fromApiKey);
8968
8977
  }
8969
8978
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
8970
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
8979
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8971
8980
  }
8972
8981
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
8973
- throw new Error('authType parameter is not supported in Gemini API.');
8982
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8974
8983
  }
8975
8984
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
8976
8985
  undefined) {
8977
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
8986
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8978
8987
  }
8979
8988
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
8980
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
8989
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8981
8990
  }
8982
8991
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
8983
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
8992
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8984
8993
  }
8985
8994
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
8986
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
8995
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8987
8996
  }
8988
8997
  return toObject;
8989
8998
  }
@@ -8994,7 +9003,7 @@ function blobToMldev$1(fromObject, _rootObject) {
8994
9003
  setValueByPath(toObject, ['data'], fromData);
8995
9004
  }
8996
9005
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
8997
- throw new Error('displayName parameter is not supported in Gemini API.');
9006
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
8998
9007
  }
8999
9008
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
9000
9009
  if (fromMimeType != null) {
@@ -9191,13 +9200,13 @@ function controlReferenceConfigToVertex(fromObject, _rootObject) {
9191
9200
  function countTokensConfigToMldev(fromObject, _rootObject) {
9192
9201
  const toObject = {};
9193
9202
  if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) {
9194
- throw new Error('systemInstruction parameter is not supported in Gemini API.');
9203
+ throw new Error('systemInstruction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9195
9204
  }
9196
9205
  if (getValueByPath(fromObject, ['tools']) !== undefined) {
9197
- throw new Error('tools parameter is not supported in Gemini API.');
9206
+ throw new Error('tools parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9198
9207
  }
9199
9208
  if (getValueByPath(fromObject, ['generationConfig']) !== undefined) {
9200
- throw new Error('generationConfig parameter is not supported in Gemini API.');
9209
+ throw new Error('generationConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9201
9210
  }
9202
9211
  return toObject;
9203
9212
  }
@@ -9498,16 +9507,16 @@ function embedContentConfigToMldev(fromObject, parentObject, _rootObject) {
9498
9507
  setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
9499
9508
  }
9500
9509
  if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
9501
- throw new Error('mimeType parameter is not supported in Gemini API.');
9510
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9502
9511
  }
9503
9512
  if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
9504
- throw new Error('autoTruncate parameter is not supported in Gemini API.');
9513
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9505
9514
  }
9506
9515
  if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
9507
- throw new Error('documentOcr parameter is not supported in Gemini API.');
9516
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9508
9517
  }
9509
9518
  if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
9510
- throw new Error('audioTrackExtraction parameter is not supported in Gemini API.');
9519
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9511
9520
  }
9512
9521
  return toObject;
9513
9522
  }
@@ -9791,7 +9800,7 @@ function endpointFromVertex(fromObject, _rootObject) {
9791
9800
  function fileDataToMldev$1(fromObject, _rootObject) {
9792
9801
  const toObject = {};
9793
9802
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
9794
- throw new Error('displayName parameter is not supported in Gemini API.');
9803
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9795
9804
  }
9796
9805
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
9797
9806
  if (fromFileUri != null) {
@@ -9818,10 +9827,10 @@ function functionCallToMldev$1(fromObject, _rootObject) {
9818
9827
  setValueByPath(toObject, ['name'], fromName);
9819
9828
  }
9820
9829
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
9821
- throw new Error('partialArgs parameter is not supported in Gemini API.');
9830
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9822
9831
  }
9823
9832
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
9824
- throw new Error('willContinue parameter is not supported in Gemini API.');
9833
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9825
9834
  }
9826
9835
  return toObject;
9827
9836
  }
@@ -9839,7 +9848,7 @@ function functionCallingConfigToMldev(fromObject, _rootObject) {
9839
9848
  }
9840
9849
  if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
9841
9850
  undefined) {
9842
- throw new Error('streamFunctionCallArguments parameter is not supported in Gemini API.');
9851
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9843
9852
  }
9844
9853
  return toObject;
9845
9854
  }
@@ -9926,10 +9935,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
9926
9935
  setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
9927
9936
  }
9928
9937
  if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
9929
- throw new Error('routingConfig parameter is not supported in Gemini API.');
9938
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9930
9939
  }
9931
9940
  if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
9932
- throw new Error('modelSelectionConfig parameter is not supported in Gemini API.');
9941
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9933
9942
  }
9934
9943
  const fromSafetySettings = getValueByPath(fromObject, [
9935
9944
  'safetySettings',
@@ -9958,7 +9967,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
9958
9967
  setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(fromToolConfig));
9959
9968
  }
9960
9969
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
9961
- throw new Error('labels parameter is not supported in Gemini API.');
9970
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9962
9971
  }
9963
9972
  const fromCachedContent = getValueByPath(fromObject, [
9964
9973
  'cachedContent',
@@ -9983,7 +9992,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
9983
9992
  setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
9984
9993
  }
9985
9994
  if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
9986
- throw new Error('audioTimestamp parameter is not supported in Gemini API.');
9995
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
9987
9996
  }
9988
9997
  const fromThinkingConfig = getValueByPath(fromObject, [
9989
9998
  'thinkingConfig',
@@ -10002,7 +10011,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
10002
10011
  setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
10003
10012
  }
10004
10013
  if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
10005
- throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
10014
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10006
10015
  }
10007
10016
  const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
10008
10017
  if (parentObject !== undefined && fromServiceTier != null) {
@@ -10174,7 +10183,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
10174
10183
  }
10175
10184
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
10176
10185
  undefined) {
10177
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
10186
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
10178
10187
  }
10179
10188
  const fromModelArmorConfig = getValueByPath(fromObject, [
10180
10189
  'modelArmorConfig',
@@ -10323,10 +10332,10 @@ function generateContentResponseFromVertex(fromObject, _rootObject) {
10323
10332
  function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
10324
10333
  const toObject = {};
10325
10334
  if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
10326
- throw new Error('outputGcsUri parameter is not supported in Gemini API.');
10335
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10327
10336
  }
10328
10337
  if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) {
10329
- throw new Error('negativePrompt parameter is not supported in Gemini API.');
10338
+ throw new Error('negativePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10330
10339
  }
10331
10340
  const fromNumberOfImages = getValueByPath(fromObject, [
10332
10341
  'numberOfImages',
@@ -10345,7 +10354,7 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
10345
10354
  setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale);
10346
10355
  }
10347
10356
  if (getValueByPath(fromObject, ['seed']) !== undefined) {
10348
- throw new Error('seed parameter is not supported in Gemini API.');
10357
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10349
10358
  }
10350
10359
  const fromSafetyFilterLevel = getValueByPath(fromObject, [
10351
10360
  'safetyFilterLevel',
@@ -10388,17 +10397,17 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
10388
10397
  setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
10389
10398
  }
10390
10399
  if (getValueByPath(fromObject, ['addWatermark']) !== undefined) {
10391
- throw new Error('addWatermark parameter is not supported in Gemini API.');
10400
+ throw new Error('addWatermark parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10392
10401
  }
10393
10402
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
10394
- throw new Error('labels parameter is not supported in Gemini API.');
10403
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10395
10404
  }
10396
10405
  const fromImageSize = getValueByPath(fromObject, ['imageSize']);
10397
10406
  if (parentObject !== undefined && fromImageSize != null) {
10398
10407
  setValueByPath(parentObject, ['parameters', 'sampleImageSize'], fromImageSize);
10399
10408
  }
10400
10409
  if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {
10401
- throw new Error('enhancePrompt parameter is not supported in Gemini API.');
10410
+ throw new Error('enhancePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10402
10411
  }
10403
10412
  return toObject;
10404
10413
  }
@@ -10591,10 +10600,10 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10591
10600
  setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos);
10592
10601
  }
10593
10602
  if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
10594
- throw new Error('outputGcsUri parameter is not supported in Gemini API.');
10603
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10595
10604
  }
10596
10605
  if (getValueByPath(fromObject, ['fps']) !== undefined) {
10597
- throw new Error('fps parameter is not supported in Gemini API.');
10606
+ throw new Error('fps parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10598
10607
  }
10599
10608
  const fromDurationSeconds = getValueByPath(fromObject, [
10600
10609
  'durationSeconds',
@@ -10603,7 +10612,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10603
10612
  setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds);
10604
10613
  }
10605
10614
  if (getValueByPath(fromObject, ['seed']) !== undefined) {
10606
- throw new Error('seed parameter is not supported in Gemini API.');
10615
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10607
10616
  }
10608
10617
  const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
10609
10618
  if (parentObject !== undefined && fromAspectRatio != null) {
@@ -10620,7 +10629,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10620
10629
  setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
10621
10630
  }
10622
10631
  if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {
10623
- throw new Error('pubsubTopic parameter is not supported in Gemini API.');
10632
+ throw new Error('pubsubTopic parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10624
10633
  }
10625
10634
  const fromNegativePrompt = getValueByPath(fromObject, [
10626
10635
  'negativePrompt',
@@ -10635,7 +10644,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10635
10644
  setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
10636
10645
  }
10637
10646
  if (getValueByPath(fromObject, ['generateAudio']) !== undefined) {
10638
- throw new Error('generateAudio parameter is not supported in Gemini API.');
10647
+ throw new Error('generateAudio parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10639
10648
  }
10640
10649
  const fromLastFrame = getValueByPath(fromObject, ['lastFrame']);
10641
10650
  if (parentObject !== undefined && fromLastFrame != null) {
@@ -10654,13 +10663,13 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10654
10663
  setValueByPath(parentObject, ['instances[0]', 'referenceImages'], transformedList);
10655
10664
  }
10656
10665
  if (getValueByPath(fromObject, ['mask']) !== undefined) {
10657
- throw new Error('mask parameter is not supported in Gemini API.');
10666
+ throw new Error('mask parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10658
10667
  }
10659
10668
  if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
10660
- throw new Error('compressionQuality parameter is not supported in Gemini API.');
10669
+ throw new Error('compressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10661
10670
  }
10662
10671
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
10663
- throw new Error('labels parameter is not supported in Gemini API.');
10672
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10664
10673
  }
10665
10674
  const fromWebhookConfig = getValueByPath(fromObject, [
10666
10675
  'webhookConfig',
@@ -10669,7 +10678,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
10669
10678
  setValueByPath(parentObject, ['webhookConfig'], fromWebhookConfig);
10670
10679
  }
10671
10680
  if (getValueByPath(fromObject, ['resizeMode']) !== undefined) {
10672
- throw new Error('resizeMode parameter is not supported in Gemini API.');
10681
+ throw new Error('resizeMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
10673
10682
  }
10674
10683
  return toObject;
10675
10684
  }
@@ -10766,7 +10775,7 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
10766
10775
  setValueByPath(parentObject, ['labels'], fromLabels);
10767
10776
  }
10768
10777
  if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
10769
- throw new Error('webhookConfig parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
10778
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
10770
10779
  }
10771
10780
  const fromResizeMode = getValueByPath(fromObject, ['resizeMode']);
10772
10781
  if (parentObject !== undefined && fromResizeMode != null) {
@@ -11165,7 +11174,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
11165
11174
  }
11166
11175
  if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
11167
11176
  undefined) {
11168
- throw new Error('enableEnhancedCivicAnswers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11177
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11169
11178
  }
11170
11179
  return toObject;
11171
11180
  }
@@ -11204,10 +11213,10 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
11204
11213
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
11205
11214
  }
11206
11215
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
11207
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
11216
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11208
11217
  }
11209
11218
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
11210
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
11219
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11211
11220
  }
11212
11221
  const fromTimeRangeFilter = getValueByPath(fromObject, [
11213
11222
  'timeRangeFilter',
@@ -11228,20 +11237,20 @@ function imageConfigToMldev(fromObject, _rootObject) {
11228
11237
  setValueByPath(toObject, ['imageSize'], fromImageSize);
11229
11238
  }
11230
11239
  if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
11231
- throw new Error('personGeneration parameter is not supported in Gemini API.');
11240
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11232
11241
  }
11233
11242
  if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
11234
- throw new Error('prominentPeople parameter is not supported in Gemini API.');
11243
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11235
11244
  }
11236
11245
  if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
11237
- throw new Error('outputMimeType parameter is not supported in Gemini API.');
11246
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11238
11247
  }
11239
11248
  if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
11240
11249
  undefined) {
11241
- throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
11250
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11242
11251
  }
11243
11252
  if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
11244
- throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
11253
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11245
11254
  }
11246
11255
  return toObject;
11247
11256
  }
@@ -11322,7 +11331,7 @@ function imageFromVertex(fromObject, _rootObject) {
11322
11331
  function imageToMldev(fromObject, _rootObject) {
11323
11332
  const toObject = {};
11324
11333
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
11325
- throw new Error('gcsUri parameter is not supported in Gemini API.');
11334
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11326
11335
  }
11327
11336
  const fromImageBytes = getValueByPath(fromObject, ['imageBytes']);
11328
11337
  if (fromImageBytes != null) {
@@ -11725,13 +11734,13 @@ function partToVertex(fromObject, _rootObject) {
11725
11734
  setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
11726
11735
  }
11727
11736
  if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
11728
- throw new Error('toolCall parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11737
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11729
11738
  }
11730
11739
  if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
11731
- throw new Error('toolResponse parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11740
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11732
11741
  }
11733
11742
  if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
11734
- throw new Error('partMetadata parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
11743
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11735
11744
  }
11736
11745
  return toObject;
11737
11746
  }
@@ -11954,7 +11963,7 @@ function safetySettingToMldev$1(fromObject, _rootObject) {
11954
11963
  setValueByPath(toObject, ['category'], fromCategory);
11955
11964
  }
11956
11965
  if (getValueByPath(fromObject, ['method']) !== undefined) {
11957
- throw new Error('method parameter is not supported in Gemini API.');
11966
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
11958
11967
  }
11959
11968
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
11960
11969
  if (fromThreshold != null) {
@@ -12088,14 +12097,14 @@ function toolConfigToVertex(fromObject, _rootObject) {
12088
12097
  }
12089
12098
  if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
12090
12099
  undefined) {
12091
- throw new Error('includeServerSideToolInvocations parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12100
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12092
12101
  }
12093
12102
  return toObject;
12094
12103
  }
12095
12104
  function toolToMldev$1(fromObject, rootObject) {
12096
12105
  const toObject = {};
12097
12106
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
12098
- throw new Error('retrieval parameter is not supported in Gemini API.');
12107
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12099
12108
  }
12100
12109
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
12101
12110
  if (fromComputerUse != null) {
@@ -12120,7 +12129,7 @@ function toolToMldev$1(fromObject, rootObject) {
12120
12129
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
12121
12130
  }
12122
12131
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
12123
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
12132
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12124
12133
  }
12125
12134
  const fromFunctionDeclarations = getValueByPath(fromObject, [
12126
12135
  'functionDeclarations',
@@ -12141,7 +12150,7 @@ function toolToMldev$1(fromObject, rootObject) {
12141
12150
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
12142
12151
  }
12143
12152
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
12144
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
12153
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
12145
12154
  }
12146
12155
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
12147
12156
  if (fromUrlContext != null) {
@@ -12170,7 +12179,7 @@ function toolToVertex(fromObject, _rootObject) {
12170
12179
  setValueByPath(toObject, ['computerUse'], fromComputerUse);
12171
12180
  }
12172
12181
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
12173
- throw new Error('fileSearch parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12182
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12174
12183
  }
12175
12184
  const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
12176
12185
  if (fromGoogleSearch != null) {
@@ -12221,7 +12230,7 @@ function toolToVertex(fromObject, _rootObject) {
12221
12230
  setValueByPath(toObject, ['urlContext'], fromUrlContext);
12222
12231
  }
12223
12232
  if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
12224
- throw new Error('mcpServers parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
12233
+ throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12225
12234
  }
12226
12235
  return toObject;
12227
12236
  }
@@ -12784,7 +12793,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
12784
12793
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
12785
12794
  const USER_AGENT_HEADER = 'User-Agent';
12786
12795
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
12787
- const SDK_VERSION = '2.1.0'; // x-release-please-version
12796
+ const SDK_VERSION = '2.3.0'; // x-release-please-version
12788
12797
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
12789
12798
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
12790
12799
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -14680,7 +14689,7 @@ class Models extends BaseModule {
14680
14689
  if (this.apiClient.isVertexAI()) {
14681
14690
  if (!actualParams.config.queryBase) {
14682
14691
  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');
14692
+ throw new Error('Filtering tuned models list is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
14684
14693
  }
14685
14694
  else {
14686
14695
  actualParams.config.filter = 'labels.tune-type:*';
@@ -16136,7 +16145,7 @@ class Operations extends BaseModule {
16136
16145
  function audioTranscriptionConfigToMldev(fromObject) {
16137
16146
  const toObject = {};
16138
16147
  if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
16139
- throw new Error('languageCodes parameter is not supported in Gemini API.');
16148
+ throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16140
16149
  }
16141
16150
  return toObject;
16142
16151
  }
@@ -16147,23 +16156,23 @@ function authConfigToMldev(fromObject) {
16147
16156
  setValueByPath(toObject, ['apiKey'], fromApiKey);
16148
16157
  }
16149
16158
  if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
16150
- throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
16159
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16151
16160
  }
16152
16161
  if (getValueByPath(fromObject, ['authType']) !== undefined) {
16153
- throw new Error('authType parameter is not supported in Gemini API.');
16162
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16154
16163
  }
16155
16164
  if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
16156
16165
  undefined) {
16157
- throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
16166
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16158
16167
  }
16159
16168
  if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
16160
- throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
16169
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16161
16170
  }
16162
16171
  if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
16163
- throw new Error('oauthConfig parameter is not supported in Gemini API.');
16172
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16164
16173
  }
16165
16174
  if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
16166
- throw new Error('oidcConfig parameter is not supported in Gemini API.');
16175
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16167
16176
  }
16168
16177
  return toObject;
16169
16178
  }
@@ -16174,7 +16183,7 @@ function blobToMldev(fromObject) {
16174
16183
  setValueByPath(toObject, ['data'], fromData);
16175
16184
  }
16176
16185
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
16177
- throw new Error('displayName parameter is not supported in Gemini API.');
16186
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16178
16187
  }
16179
16188
  const fromMimeType = getValueByPath(fromObject, ['mimeType']);
16180
16189
  if (fromMimeType != null) {
@@ -16241,7 +16250,7 @@ function createAuthTokenParametersToMldev(apiClient, fromObject) {
16241
16250
  function fileDataToMldev(fromObject) {
16242
16251
  const toObject = {};
16243
16252
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
16244
- throw new Error('displayName parameter is not supported in Gemini API.');
16253
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16245
16254
  }
16246
16255
  const fromFileUri = getValueByPath(fromObject, ['fileUri']);
16247
16256
  if (fromFileUri != null) {
@@ -16268,10 +16277,10 @@ function functionCallToMldev(fromObject) {
16268
16277
  setValueByPath(toObject, ['name'], fromName);
16269
16278
  }
16270
16279
  if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
16271
- throw new Error('partialArgs parameter is not supported in Gemini API.');
16280
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16272
16281
  }
16273
16282
  if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
16274
- throw new Error('willContinue parameter is not supported in Gemini API.');
16283
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16275
16284
  }
16276
16285
  return toObject;
16277
16286
  }
@@ -16294,10 +16303,10 @@ function googleSearchToMldev(fromObject) {
16294
16303
  setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
16295
16304
  }
16296
16305
  if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
16297
- throw new Error('blockingConfidence parameter is not supported in Gemini API.');
16306
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16298
16307
  }
16299
16308
  if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
16300
- throw new Error('excludeDomains parameter is not supported in Gemini API.');
16309
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16301
16310
  }
16302
16311
  const fromTimeRangeFilter = getValueByPath(fromObject, [
16303
16312
  'timeRangeFilter',
@@ -16416,7 +16425,7 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
16416
16425
  setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
16417
16426
  }
16418
16427
  if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
16419
- throw new Error('explicitVadSignal parameter is not supported in Gemini API.');
16428
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16420
16429
  }
16421
16430
  const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
16422
16431
  if (parentObject !== undefined && fromAvatarConfig != null) {
@@ -16434,6 +16443,12 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
16434
16443
  }
16435
16444
  setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
16436
16445
  }
16446
+ const fromStreamTranslationConfig = getValueByPath(fromObject, [
16447
+ 'streamTranslationConfig',
16448
+ ]);
16449
+ if (parentObject !== undefined && fromStreamTranslationConfig != null) {
16450
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'streamTranslationConfig'], fromStreamTranslationConfig);
16451
+ }
16437
16452
  return toObject;
16438
16453
  }
16439
16454
  function liveConnectConstraintsToMldev(apiClient, fromObject) {
@@ -16527,7 +16542,7 @@ function safetySettingToMldev(fromObject) {
16527
16542
  setValueByPath(toObject, ['category'], fromCategory);
16528
16543
  }
16529
16544
  if (getValueByPath(fromObject, ['method']) !== undefined) {
16530
- throw new Error('method parameter is not supported in Gemini API.');
16545
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16531
16546
  }
16532
16547
  const fromThreshold = getValueByPath(fromObject, ['threshold']);
16533
16548
  if (fromThreshold != null) {
@@ -16542,14 +16557,14 @@ function sessionResumptionConfigToMldev(fromObject) {
16542
16557
  setValueByPath(toObject, ['handle'], fromHandle);
16543
16558
  }
16544
16559
  if (getValueByPath(fromObject, ['transparent']) !== undefined) {
16545
- throw new Error('transparent parameter is not supported in Gemini API.');
16560
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16546
16561
  }
16547
16562
  return toObject;
16548
16563
  }
16549
16564
  function toolToMldev(fromObject) {
16550
16565
  const toObject = {};
16551
16566
  if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
16552
- throw new Error('retrieval parameter is not supported in Gemini API.');
16567
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16553
16568
  }
16554
16569
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
16555
16570
  if (fromComputerUse != null) {
@@ -16574,7 +16589,7 @@ function toolToMldev(fromObject) {
16574
16589
  setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
16575
16590
  }
16576
16591
  if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
16577
- throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
16592
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16578
16593
  }
16579
16594
  const fromFunctionDeclarations = getValueByPath(fromObject, [
16580
16595
  'functionDeclarations',
@@ -16595,7 +16610,7 @@ function toolToMldev(fromObject) {
16595
16610
  setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
16596
16611
  }
16597
16612
  if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
16598
- throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
16613
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
16599
16614
  }
16600
16615
  const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
16601
16616
  if (fromUrlContext != null) {
@@ -18694,10 +18709,14 @@ class BaseInteractions extends APIResource {
18694
18709
  });
18695
18710
  const isStreaming = (_a = params.stream) !== null && _a !== void 0 ? _a : false;
18696
18711
  const promise = this._client.post(path `/${api_version}/interactions`, Object.assign(Object.assign(Object.assign({ body }, options), { stream: isStreaming }), (needsLegacyLyriaShim && isStreaming ? { __streamClass: LegacyLyriaStream } : {})));
18697
- if (needsLegacyLyriaShim && !isStreaming) {
18698
- return promise._thenUnwrap((data) => coerceLegacyInteractionResponse(data));
18712
+ if (isStreaming) {
18713
+ return promise;
18699
18714
  }
18700
- return promise;
18715
+ let nonStreaming = promise;
18716
+ if (needsLegacyLyriaShim) {
18717
+ nonStreaming = nonStreaming._thenUnwrap((data) => coerceLegacyInteractionResponse(data));
18718
+ }
18719
+ return nonStreaming._thenUnwrap(addOutputProperties);
18701
18720
  }
18702
18721
  /**
18703
18722
  * Deletes the interaction by id.
@@ -18726,17 +18745,64 @@ class BaseInteractions extends APIResource {
18726
18745
  */
18727
18746
  cancel(id, params = {}, options) {
18728
18747
  const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
18729
- return this._client.post(path `/${api_version}/interactions/${id}/cancel`, options);
18748
+ return this._client.post(path `/${api_version}/interactions/${id}/cancel`, options)._thenUnwrap(addOutputProperties);
18730
18749
  }
18731
18750
  get(id, params = {}, options) {
18732
18751
  var _a;
18733
18752
  const _b = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _b, query = __rest(_b, ["api_version"]);
18734
- return this._client.get(path `/${api_version}/interactions/${id}`, Object.assign(Object.assign({ query }, options), { stream: (_a = params === null || params === void 0 ? void 0 : params.stream) !== null && _a !== void 0 ? _a : false }));
18753
+ const response = this._client.get(path `/${api_version}/interactions/${id}`, Object.assign(Object.assign({ query }, options), { stream: (_a = params === null || params === void 0 ? void 0 : params.stream) !== null && _a !== void 0 ? _a : false }));
18754
+ if (params === null || params === void 0 ? void 0 : params.stream) {
18755
+ return response;
18756
+ }
18757
+ return response._thenUnwrap(addOutputProperties);
18735
18758
  }
18736
18759
  }
18737
18760
  BaseInteractions._key = Object.freeze(['interactions']);
18738
18761
  class Interactions extends BaseInteractions {
18739
18762
  }
18763
+ function addOutputProperties(interaction) {
18764
+ var _a, _b;
18765
+ const steps = (_a = interaction.steps) !== null && _a !== void 0 ? _a : [];
18766
+ let firstTrailing = steps.length;
18767
+ while (firstTrailing > 0 && steps[firstTrailing - 1].type === 'model_output') {
18768
+ firstTrailing--;
18769
+ }
18770
+ const modelSteps = steps.slice(firstTrailing);
18771
+ const output = modelSteps.flatMap((step) => { var _a; return (_a = step.content) !== null && _a !== void 0 ? _a : []; });
18772
+ const textParts = [];
18773
+ for (let i = output.length - 1; i >= 0; i--) {
18774
+ const content = output[i];
18775
+ if (content.type !== 'text')
18776
+ break;
18777
+ textParts.push((_b = content.text) !== null && _b !== void 0 ? _b : '');
18778
+ }
18779
+ const output_text = textParts.reverse().join('');
18780
+ let output_image;
18781
+ let output_audio;
18782
+ let output_video;
18783
+ for (let i = steps.length - 1; i >= 0; i--) {
18784
+ const step = steps[i];
18785
+ const anyStep = step;
18786
+ if (anyStep.type === 'user_input') {
18787
+ break;
18788
+ }
18789
+ if (anyStep.type === 'model_output' && anyStep.content) {
18790
+ for (let j = anyStep.content.length - 1; j >= 0; j--) {
18791
+ const content = anyStep.content[j];
18792
+ if (content.type === 'image' && !output_image) {
18793
+ output_image = content;
18794
+ }
18795
+ if (content.type === 'audio' && !output_audio) {
18796
+ output_audio = content;
18797
+ }
18798
+ if (content.type === 'video' && !output_video) {
18799
+ output_video = content;
18800
+ }
18801
+ }
18802
+ }
18803
+ }
18804
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, interaction), (output_text && { output_text })), (output_image && { output_image })), (output_audio && { output_audio })), (output_video && { output_video }));
18805
+ }
18740
18806
 
18741
18807
  /**
18742
18808
  * @license
@@ -19517,7 +19583,7 @@ function cancelTuningJobResponseFromVertex(fromObject, _rootObject) {
19517
19583
  function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19518
19584
  const toObject = {};
19519
19585
  if (getValueByPath(fromObject, ['validationDataset']) !== undefined) {
19520
- throw new Error('validationDataset parameter is not supported in Gemini API.');
19586
+ throw new Error('validationDataset parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19521
19587
  }
19522
19588
  const fromTunedModelDisplayName = getValueByPath(fromObject, [
19523
19589
  'tunedModelDisplayName',
@@ -19526,7 +19592,7 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19526
19592
  setValueByPath(parentObject, ['displayName'], fromTunedModelDisplayName);
19527
19593
  }
19528
19594
  if (getValueByPath(fromObject, ['description']) !== undefined) {
19529
- throw new Error('description parameter is not supported in Gemini API.');
19595
+ throw new Error('description parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19530
19596
  }
19531
19597
  const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
19532
19598
  if (parentObject !== undefined && fromEpochCount != null) {
@@ -19540,20 +19606,20 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19540
19606
  }
19541
19607
  if (getValueByPath(fromObject, ['exportLastCheckpointOnly']) !==
19542
19608
  undefined) {
19543
- throw new Error('exportLastCheckpointOnly parameter is not supported in Gemini API.');
19609
+ throw new Error('exportLastCheckpointOnly parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19544
19610
  }
19545
19611
  if (getValueByPath(fromObject, ['preTunedModelCheckpointId']) !==
19546
19612
  undefined) {
19547
- throw new Error('preTunedModelCheckpointId parameter is not supported in Gemini API.');
19613
+ throw new Error('preTunedModelCheckpointId parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19548
19614
  }
19549
19615
  if (getValueByPath(fromObject, ['adapterSize']) !== undefined) {
19550
- throw new Error('adapterSize parameter is not supported in Gemini API.');
19616
+ throw new Error('adapterSize parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19551
19617
  }
19552
19618
  if (getValueByPath(fromObject, ['tuningMode']) !== undefined) {
19553
- throw new Error('tuningMode parameter is not supported in Gemini API.');
19619
+ throw new Error('tuningMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19554
19620
  }
19555
19621
  if (getValueByPath(fromObject, ['customBaseModel']) !== undefined) {
19556
- throw new Error('customBaseModel parameter is not supported in Gemini API.');
19622
+ throw new Error('customBaseModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19557
19623
  }
19558
19624
  const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
19559
19625
  if (parentObject !== undefined && fromBatchSize != null) {
@@ -19564,25 +19630,25 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
19564
19630
  setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'learningRate'], fromLearningRate);
19565
19631
  }
19566
19632
  if (getValueByPath(fromObject, ['labels']) !== undefined) {
19567
- throw new Error('labels parameter is not supported in Gemini API.');
19633
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19568
19634
  }
19569
19635
  if (getValueByPath(fromObject, ['beta']) !== undefined) {
19570
- throw new Error('beta parameter is not supported in Gemini API.');
19636
+ throw new Error('beta parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19571
19637
  }
19572
19638
  if (getValueByPath(fromObject, ['baseTeacherModel']) !== undefined) {
19573
- throw new Error('baseTeacherModel parameter is not supported in Gemini API.');
19639
+ throw new Error('baseTeacherModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19574
19640
  }
19575
19641
  if (getValueByPath(fromObject, ['tunedTeacherModelSource']) !== undefined) {
19576
- throw new Error('tunedTeacherModelSource parameter is not supported in Gemini API.');
19642
+ throw new Error('tunedTeacherModelSource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19577
19643
  }
19578
19644
  if (getValueByPath(fromObject, ['sftLossWeightMultiplier']) !== undefined) {
19579
- throw new Error('sftLossWeightMultiplier parameter is not supported in Gemini API.');
19645
+ throw new Error('sftLossWeightMultiplier parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19580
19646
  }
19581
19647
  if (getValueByPath(fromObject, ['outputUri']) !== undefined) {
19582
- throw new Error('outputUri parameter is not supported in Gemini API.');
19648
+ throw new Error('outputUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19583
19649
  }
19584
19650
  if (getValueByPath(fromObject, ['encryptionSpec']) !== undefined) {
19585
- throw new Error('encryptionSpec parameter is not supported in Gemini API.');
19651
+ throw new Error('encryptionSpec parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19586
19652
  }
19587
19653
  return toObject;
19588
19654
  }
@@ -19976,10 +20042,10 @@ function tunedModelFromMldev(fromObject, _rootObject) {
19976
20042
  function tuningDatasetToMldev(fromObject, _rootObject) {
19977
20043
  const toObject = {};
19978
20044
  if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
19979
- throw new Error('gcsUri parameter is not supported in Gemini API.');
20045
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19980
20046
  }
19981
20047
  if (getValueByPath(fromObject, ['vertexDatasetResource']) !== undefined) {
19982
- throw new Error('vertexDatasetResource parameter is not supported in Gemini API.');
20048
+ throw new Error('vertexDatasetResource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
19983
20049
  }
19984
20050
  const fromExamples = getValueByPath(fromObject, ['examples']);
19985
20051
  if (fromExamples != null) {
@@ -20052,7 +20118,7 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
20052
20118
  }
20053
20119
  }
20054
20120
  if (getValueByPath(fromObject, ['examples']) !== undefined) {
20055
- throw new Error('examples parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).');
20121
+ throw new Error('examples parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
20056
20122
  }
20057
20123
  return toObject;
20058
20124
  }
@@ -20918,6 +20984,7 @@ class GoogleGenAI {
20918
20984
  if (this._interactions !== undefined) {
20919
20985
  return this._interactions;
20920
20986
  }
20987
+ console.warn('GoogleGenAI.interactions: Interactions usage is experimental and may change in future versions.');
20921
20988
  this._interactions = this.getNextGenClient().interactions;
20922
20989
  return this._interactions;
20923
20990
  }