@google/genai 2.9.0 → 2.11.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.
@@ -309,6 +309,70 @@ declare enum ApiSpec {
309
309
  ELASTIC_SEARCH = "ELASTIC_SEARCH"
310
310
  }
311
311
 
312
+ /** The aspect ratio for the image output. */
313
+ declare enum AspectRatio {
314
+ /**
315
+ * Default value. This value is unused.
316
+ */
317
+ ASPECT_RATIO_UNSPECIFIED = "ASPECT_RATIO_UNSPECIFIED",
318
+ /**
319
+ * 1:1 aspect ratio.
320
+ */
321
+ ASPECT_RATIO_ONE_BY_ONE = "ASPECT_RATIO_ONE_BY_ONE",
322
+ /**
323
+ * 2:3 aspect ratio.
324
+ */
325
+ ASPECT_RATIO_TWO_BY_THREE = "ASPECT_RATIO_TWO_BY_THREE",
326
+ /**
327
+ * 3:2 aspect ratio.
328
+ */
329
+ ASPECT_RATIO_THREE_BY_TWO = "ASPECT_RATIO_THREE_BY_TWO",
330
+ /**
331
+ * 3:4 aspect ratio.
332
+ */
333
+ ASPECT_RATIO_THREE_BY_FOUR = "ASPECT_RATIO_THREE_BY_FOUR",
334
+ /**
335
+ * 4:3 aspect ratio.
336
+ */
337
+ ASPECT_RATIO_FOUR_BY_THREE = "ASPECT_RATIO_FOUR_BY_THREE",
338
+ /**
339
+ * 4:5 aspect ratio.
340
+ */
341
+ ASPECT_RATIO_FOUR_BY_FIVE = "ASPECT_RATIO_FOUR_BY_FIVE",
342
+ /**
343
+ * 5:4 aspect ratio.
344
+ */
345
+ ASPECT_RATIO_FIVE_BY_FOUR = "ASPECT_RATIO_FIVE_BY_FOUR",
346
+ /**
347
+ * 9:16 aspect ratio.
348
+ */
349
+ ASPECT_RATIO_NINE_BY_SIXTEEN = "ASPECT_RATIO_NINE_BY_SIXTEEN",
350
+ /**
351
+ * 16:9 aspect ratio.
352
+ */
353
+ ASPECT_RATIO_SIXTEEN_BY_NINE = "ASPECT_RATIO_SIXTEEN_BY_NINE",
354
+ /**
355
+ * 21:9 aspect ratio.
356
+ */
357
+ ASPECT_RATIO_TWENTY_ONE_BY_NINE = "ASPECT_RATIO_TWENTY_ONE_BY_NINE",
358
+ /**
359
+ * 1:8 aspect ratio.
360
+ */
361
+ ASPECT_RATIO_ONE_BY_EIGHT = "ASPECT_RATIO_ONE_BY_EIGHT",
362
+ /**
363
+ * 8:1 aspect ratio.
364
+ */
365
+ ASPECT_RATIO_EIGHT_BY_ONE = "ASPECT_RATIO_EIGHT_BY_ONE",
366
+ /**
367
+ * 1:4 aspect ratio.
368
+ */
369
+ ASPECT_RATIO_ONE_BY_FOUR = "ASPECT_RATIO_ONE_BY_FOUR",
370
+ /**
371
+ * 4:1 aspect ratio.
372
+ */
373
+ ASPECT_RATIO_FOUR_BY_ONE = "ASPECT_RATIO_FOUR_BY_ONE"
374
+ }
375
+
312
376
  /** Representation of an audio chunk. */
313
377
  declare interface AudioChunk {
314
378
  /** Raw bytes of audio data.
@@ -320,6 +384,18 @@ declare interface AudioChunk {
320
384
  sourceMetadata?: LiveMusicSourceMetadata;
321
385
  }
322
386
 
387
+ /** Configuration for audio-specific output formatting. */
388
+ declare class AudioResponseFormat {
389
+ /** Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus). */
390
+ bitRate?: number;
391
+ /** Optional. Delivery mode for the generated content. */
392
+ delivery?: Delivery;
393
+ /** Optional. The MIME type of the audio output. */
394
+ mimeType?: string;
395
+ /** Optional. Sample rate for the generated audio in Hertz. */
396
+ sampleRate?: number;
397
+ }
398
+
323
399
  /** The audio transcription configuration in Setup. */
324
400
  declare interface AudioTranscriptionConfig {
325
401
  /** Deprecated: use LanguageAuto or LanguageHints instead. */
@@ -554,7 +630,7 @@ declare interface BatchJob {
554
630
  outputInfo?: BatchJobOutputInfo;
555
631
  }
556
632
 
557
- /** Config for `des` parameter. */
633
+ /** Config for `dest` parameter. */
558
634
  declare interface BatchJobDestination {
559
635
  /** Storage format of the output files. Must be one of:
560
636
  'jsonl', 'bigquery', 'vertex-dataset'.
@@ -626,7 +702,7 @@ declare interface BatchJobSource {
626
702
 
627
703
  declare type BatchJobSourceUnion = BatchJobSource | InlinedRequest[] | string;
628
704
 
629
- /** Specifies the function Behavior. Currently only non-blocking functions are supported. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
705
+ /** Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
630
706
  declare enum Behavior {
631
707
  /**
632
708
  * This value is unspecified.
@@ -919,13 +995,15 @@ declare interface CompletionStats {
919
995
 
920
996
  /** Composite reinforcement tuning reward config. */
921
997
  declare interface CompositeReinforcementTuningRewardConfig {
998
+ /** List of reward function configurations with weights. */
922
999
  weightedRewardConfigs?: CompositeReinforcementTuningRewardConfigWeightedRewardConfig[];
923
1000
  }
924
1001
 
925
1002
  /** Composite reinforcement tuning reward config weighted reward config. */
926
1003
  declare interface CompositeReinforcementTuningRewardConfigWeightedRewardConfig {
1004
+ /** Single reward configuration. */
927
1005
  rewardConfig?: SingleReinforcementTuningRewardConfig;
928
- /** How much this single reward contributes to the total overall reward. */
1006
+ /** How much this single reward contributes to the total overall reward. Total reward is a linear combination of single rewards with their corresponding weights, i.e., ``` total_reward = ( weight_a * reward_a + weight_b * reward_b + ... ) / (weight_a + weight_b + ...) ``` */
929
1007
  weight?: number;
930
1008
  }
931
1009
 
@@ -933,15 +1011,12 @@ declare interface CompositeReinforcementTuningRewardConfigWeightedRewardConfig {
933
1011
  declare interface ComputerUse {
934
1012
  /** Required. The environment being operated. */
935
1013
  environment?: Environment;
936
- /** By default, predefined functions are included in the final model call.
937
- Some of them can be explicitly excluded from being automatically included.
938
- This can serve two purposes:
939
- 1. Using a more restricted / different action space.
940
- 2. Improving the definitions / instructions of predefined functions. */
1014
+ /** Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions. */
941
1015
  excludedPredefinedFunctions?: string[];
942
- /** Optional. Whether enable the prompt injection detection check on computer-use request.
943
- */
1016
+ /** Optional. Enables the prompt injection detection check on computer-use request. */
944
1017
  enablePromptInjectionDetection?: boolean;
1018
+ /** Optional. Disabled safety policies for computer use. This field is not supported in Vertex AI. */
1019
+ disabledSafetyPolicies?: SafetyPolicy[];
945
1020
  }
946
1021
 
947
1022
  /** Optional parameters for computing tokens. */
@@ -1608,6 +1683,12 @@ declare interface DatasetStats {
1608
1683
  userMessagePerExampleDistribution?: DatasetDistribution;
1609
1684
  /** Output only. Dataset distributions for the user output tokens. */
1610
1685
  userOutputTokenDistribution?: DatasetDistribution;
1686
+ /** Output only. Dataset distributions for the number of contents per example. */
1687
+ contentsPerExampleDistribution?: DatasetDistribution;
1688
+ /** Output only. Sample user dataset examples in the training dataset uri for Reinforcement Tuning. */
1689
+ reinforcementTuningUserDatasetExamples?: ReinforcementTuningUserDatasetExamples;
1690
+ /** Output only. Number of billable tokens in the tuning dataset. */
1691
+ totalBillableTokenCount?: string;
1611
1692
  }
1612
1693
 
1613
1694
  /** Optional parameters for models.get method. */
@@ -1776,6 +1857,22 @@ declare interface DeleteResourceJob {
1776
1857
  error?: JobError;
1777
1858
  }
1778
1859
 
1860
+ /** Delivery mode for the generated content. */
1861
+ declare enum Delivery {
1862
+ /**
1863
+ * Default value. This value is unused.
1864
+ */
1865
+ DELIVERY_UNSPECIFIED = "DELIVERY_UNSPECIFIED",
1866
+ /**
1867
+ * Generated bytes are returned inline in the response.
1868
+ */
1869
+ INLINE = "INLINE",
1870
+ /**
1871
+ * Generated content is stored and a URI is returned.
1872
+ */
1873
+ URI = "URI"
1874
+ }
1875
+
1779
1876
  /** Statistics for distillation prompt dataset. These statistics do not include the responses sampled from the teacher model. This data type is not supported in Gemini API. */
1780
1877
  declare interface DistillationDataStats {
1781
1878
  /** Output only. Statistics computed for the training dataset. */
@@ -2605,7 +2702,7 @@ declare interface FunctionDeclaration {
2605
2702
  response?: Schema;
2606
2703
  /** Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`. */
2607
2704
  responseJsonSchema?: unknown;
2608
- /** Optional. Specifies the function Behavior. Currently only non-blocking functions are supported. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
2705
+ /** Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
2609
2706
  behavior?: Behavior;
2610
2707
  }
2611
2708
 
@@ -3322,11 +3419,11 @@ declare interface GenerationConfig {
3322
3419
  presencePenalty?: number;
3323
3420
  /** Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model's confidence in its own output and for debugging. */
3324
3421
  responseLogprobs?: boolean;
3325
- /** Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include 'text/plain' (default) and 'application/json'. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. */
3422
+ /** Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include 'text/plain' (default) and 'application/json'. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead. */
3326
3423
  responseMimeType?: string;
3327
3424
  /** Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image. */
3328
3425
  responseModalities?: Modality[];
3329
- /** Optional. Lets you to specify a schema for the model's response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. */
3426
+ /** Optional. Lets you to specify a schema for the model's response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead. */
3330
3427
  responseSchema?: Schema;
3331
3428
  /** Optional. Routing configuration. This field is not supported in Gemini API. */
3332
3429
  routingConfig?: GenerationConfigRoutingConfig;
@@ -3346,6 +3443,10 @@ declare interface GenerationConfig {
3346
3443
  topP?: number;
3347
3444
  /** Optional. Enables enhanced civic answers. It may not be available for all models. This field is not supported in Vertex AI. */
3348
3445
  enableEnhancedCivicAnswers?: boolean;
3446
+ /** Optional. New response format field for the model to configure output formatting and delivery. */
3447
+ responseFormat?: ResponseFormat[];
3448
+ /** Optional. Config for translation. This field is not supported in Vertex AI. */
3449
+ translationConfig?: TranslationConfig;
3349
3450
  }
3350
3451
 
3351
3452
  /** The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. This data type is not supported in Gemini API. */
@@ -3769,7 +3870,7 @@ declare interface GroundingMetadata {
3769
3870
  searchEntryPoint?: SearchEntryPoint;
3770
3871
  /** Web search queries for the following-up web search. */
3771
3872
  webSearchQueries?: string[];
3772
- /** Optional. Output only. A token that can be used to render a Google Maps widget with the contextual data. This field is populated only when the grounding source is Google Maps. */
3873
+ /** Optional. Output only. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and will no longer be populated once removed. A token that can be used to render a Google Maps widget with the contextual data. This field is populated only when the grounding source is Google Maps. */
3773
3874
  googleMapsWidgetContextToken?: string;
3774
3875
  /** Optional. The queries that were executed by the retrieval tools. This field is populated only when the grounding source is a retrieval tool, such as Vertex AI Search. This field is not supported in Gemini API. */
3775
3876
  retrievalQueries?: string[];
@@ -4152,10 +4253,46 @@ declare enum ImageResizeMode {
4152
4253
  PAD = "PAD"
4153
4254
  }
4154
4255
 
4256
+ /** Configuration for image-specific output formatting. */
4257
+ declare class ImageResponseFormat {
4258
+ /** Optional. The aspect ratio for the image output. */
4259
+ aspectRatio?: AspectRatio;
4260
+ /** Optional. Delivery mode for the generated content. */
4261
+ delivery?: Delivery;
4262
+ /** Optional. The size of the image output. */
4263
+ imageSize?: ImageSize;
4264
+ /** Optional. The MIME type of the image output. */
4265
+ mimeType?: string;
4266
+ }
4267
+
4155
4268
  /** Image search for grounding and related configurations. */
4156
4269
  declare interface ImageSearch {
4157
4270
  }
4158
4271
 
4272
+ /** The size of the image output. */
4273
+ declare enum ImageSize {
4274
+ /**
4275
+ * Default value. This value is unused.
4276
+ */
4277
+ IMAGE_SIZE_UNSPECIFIED = "IMAGE_SIZE_UNSPECIFIED",
4278
+ /**
4279
+ * 512px image size.
4280
+ */
4281
+ IMAGE_SIZE_FIVE_TWELVE = "IMAGE_SIZE_FIVE_TWELVE",
4282
+ /**
4283
+ * 1K image size.
4284
+ */
4285
+ IMAGE_SIZE_ONE_K = "IMAGE_SIZE_ONE_K",
4286
+ /**
4287
+ * 2K image size.
4288
+ */
4289
+ IMAGE_SIZE_TWO_K = "IMAGE_SIZE_TWO_K",
4290
+ /**
4291
+ * 4K image size.
4292
+ */
4293
+ IMAGE_SIZE_FOUR_K = "IMAGE_SIZE_FOUR_K"
4294
+ }
4295
+
4159
4296
  /** Optional parameters for importing a file. */
4160
4297
  declare interface ImportFileConfig {
4161
4298
  /** Used to override HTTP request options. */
@@ -5158,9 +5295,9 @@ declare interface LiveServerSessionResumptionUpdate {
5158
5295
  resumable?: boolean;
5159
5296
  /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.
5160
5297
 
5161
- Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).
5298
+ Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).
5162
5299
 
5163
- Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */
5300
+ Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames are likely not needed. */
5164
5301
  lastConsumedClientMessageIndex?: string;
5165
5302
  }
5166
5303
 
@@ -5168,6 +5305,11 @@ declare interface LiveServerSessionResumptionUpdate {
5168
5305
  declare interface LiveServerSetupComplete {
5169
5306
  /** The session id of the live session. */
5170
5307
  sessionId?: string;
5308
+ /** Signature of the verified consent audio. This is populated when the
5309
+ request has a ReplicatedVoiceConfig with consent_audio set, if the consent
5310
+ verification was successful. This may be used in a subsequent request
5311
+ instead of the consent_audio to verify the same consent. */
5312
+ voiceConsentSignature?: VoiceConsentSignature;
5171
5313
  }
5172
5314
 
5173
5315
  /** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */
@@ -5256,22 +5398,22 @@ declare enum MaskReferenceMode {
5256
5398
  MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
5257
5399
  }
5258
5400
 
5259
- /** Match operation to use for evaluation. */
5401
+ /** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
5260
5402
  declare enum MatchOperation {
5261
5403
  /**
5262
- * Default value. This value is unused.
5404
+ * Default value. A user error will be returned if not set.
5263
5405
  */
5264
5406
  MATCH_OPERATION_UNSPECIFIED = "MATCH_OPERATION_UNSPECIFIED",
5265
5407
  /**
5266
- * Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
5408
+ * Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
5267
5409
  */
5268
5410
  REGEX_CONTAINS = "REGEX_CONTAINS",
5269
5411
  /**
5270
- * `expression` is a substring of target.
5412
+ * The match operation returns `true` if expression is a substring of the target.
5271
5413
  */
5272
5414
  PARTIAL_MATCH = "PARTIAL_MATCH",
5273
5415
  /**
5274
- * `expression` is an exact match of target.
5416
+ * The match operation returns `true` expression is an exact match of the target.
5275
5417
  */
5276
5418
  EXACT_MATCH = "EXACT_MATCH"
5277
5419
  }
@@ -6136,39 +6278,39 @@ declare class RegisterFilesResponse {
6136
6278
  declare interface ReinforcementTuningAutoraterScorer {
6137
6279
  /** Autorater config for evaluation. */
6138
6280
  autoraterConfig?: AutoraterConfig;
6139
- /** Allows substituting `prompt`, `response`, `system_instruction` and `references.reference` (each wrapped in double curly braces) into the autorater prompt. */
6281
+ /** The prompt for an autorater to scorer the parsed sample response. This field supports the following placeholders that will be replaced before scoring: - {{prompt}} - {{response}} - {{system_instruction}} - {{references.key}} */
6140
6282
  autoraterPrompt?: string;
6141
- /** Parses autorater returned response. */
6283
+ /** Parses autorater returned response for scoring. For example, if the autorater response has reward stored in the `2.0` block, defining a parsing response config using regex `".*(.*?)"` will return a score `"2.0"`. */
6142
6284
  autoraterResponseParseConfig?: ReinforcementTuningParseResponseConfig;
6143
- /** Scores autorater responses by directly converting parsed autorater response to float reward. */
6285
+ /** Scores autorater responses by directly converting parsed autorater response to a float reward. Note: Reward is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. */
6144
6286
  parsedResponseConversionScorer?: ReinforcementTuningAutoraterScorerParsedResponseConversionScorer;
6145
- /** Scores autorater responses by using exact string match reward scorer. */
6287
+ /** Scores autorater responses by using string match reward scorer. */
6146
6288
  exactMatchScorer?: ReinforcementTuningAutoraterScorerExactMatchScorer;
6147
6289
  }
6148
6290
 
6149
- /** Scores autorater responses by using exact string match reward scorer. */
6291
+ /** Scores autorater responses by using exact string match reward scorer. This data type is not supported in Gemini API. */
6150
6292
  declare interface ReinforcementTuningAutoraterScorerExactMatchScorer {
6151
- /** Assigns this reward score if parsed response string equals the expression. */
6293
+ /** Assigns this reward score if the parsed response string equals the expression. */
6152
6294
  correctAnswerReward?: number;
6153
- /** Assigns this reward score if parsed reward value does not equal the expression. */
6295
+ /** Assigns this reward score if the parsed reward value does not equal the expression. */
6154
6296
  wrongAnswerReward?: number;
6155
- /** The string expression to match against. Supports substitution in the format of `references.reference` (wrapped in double curly braces) before matching. No regex support. */
6297
+ /** The string expression to match against for scoring. This field supports placeholders in the format of {{references.key}} that will be replaced before matching. Regex is not supported for this expression. For example, users can define an ExactMatchScorer as follows: { "correctAnswerReward": 1.0, "wrongAnswerReward": -1.0, "expression": "{{references.concise_answer}}" } When evaluating the reward for each parsed autorater response, if the prompt references in the training/validation dataset has the following fields: ``` { "example": ..., "references": { "concise_ansser": "Yes", "verbose_answer": "The answer is Yes" } } ``` The above ExactMatchScorer will be replaced as follows for scoring: ``` { "correctAnswerReward": 1.0, "wrongAnswerReward": -1.0, "expression": "Yes" } ``` If the *parsed* autorater response is equal to the string `"Yes"`, then the reward is `1.0`, otherwise the reward is `-1.0`. */
6156
6298
  expression?: string;
6157
6299
  }
6158
6300
 
6159
- /** Scores responses by directly converting parsed autorater response to float reward (reward is clipped to be within [-1, 1]). */
6301
+ /** Scores responses by directly converting the parsed autorater response to a float reward. Note: Reward is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. This data type is not supported in Gemini API. */
6160
6302
  declare class ReinforcementTuningAutoraterScorerParsedResponseConversionScorer {
6161
6303
  }
6162
6304
 
6163
- /** Scores parsed responses by calling a Cloud Run service. */
6305
+ /** ReinforcementTuningCloudRunRewardScorer allows users to implement a reward function through GCP Cloud Run. Comparing with ReinforcementTuningCodeExecutionRewardScorer that runs in a Sandbox and has no internet access, Cloud Run reward scorer is fully controlled by users. The Cloud Run service should implement the following HTTP API: HTTP method: `POST` HTTP request body: ``` { "example": ReinforcementTuningExample, "response": Content, "metadata": { "step": int "tuning_job_id": int64 } } ``` * `example` is a ReinforcementTuningExample in ProtoJSON format, (i.e., the format is the same as as one line in the training/validation dataset except that the keys must be in camel case). System instructions (i.e., `example.get("systemInstruction")`) and references (i.e., `example.get("references")`) are also included in the `example` provided that they are set in the training/validation dataset. * `response` is a Content in ProtoJSON format (i.e., keys must be in camel case), which is the same as the Online Prediction response for Gemini models. HTTP response body: { "reward": float, "user_requested_aux_info": str // Optional } where the field "user_requested_aux_info" is any (optional) string provided by users for assisting debugging. It's in snake case. This field is mostly useful when calling the GenAiTuningService.ValidateReinforcementTuningReward API, where the proto field (not Cloud Run HTTP response body) userRequestedAuxInfo will be populated if the Cloud Run reward function sets this field in the HTTP response. The following are examples for the HTTP request and response body. Example HTTP request body: ``` { "example": { "contents": [ { "role": "user", "parts": [ { "text": "What is the capital of France?" } ] } ], "references": { "answer": "Paris" } }, "response": { "parts": [ { "text": "London" } ] }, "metadata": { "step": 1, "tuning_job_id": 123456789 } } ``` Example HTTP response body: ``` { "reward": -1.0 } ``` Note: Reward output by Cloud Run reward function is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. This data type is not supported in Gemini API. */
6164
6306
  declare interface ReinforcementTuningCloudRunRewardScorer {
6165
- /** URI of the Cloud Run service that will be used to compute the reward. The Vertex AI Secure Fine Tuning Service Agent (`service-PROJECT_NUMBER@gcp-sa-vertex-tune.iam.gserviceaccount.com`, where `PROJECT_NUMBER` is the numeric project number) must be granted the permission (e.g. by granting `roles/run.invoker` in IAM) to invoke the Cloud Run service. */
6307
+ /** URI of the Cloud Run service that will be used to compute the reward. The [Vertex AI Secure Fine Tuning Service Agent](https://docs.cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent) (`service-@gcp-sa-vertex-tune.iam.gserviceaccount.com`) must be granted the permission (e.g. by granting `roles/run.invoker` in IAM) to invoke the Cloud Run service. */
6166
6308
  cloudRunUri?: string;
6167
6309
  }
6168
6310
 
6169
- /** Scores parsed responses for code execution use cases. */
6311
+ /** ReinforcementTuningCodeExecutionRewardScorer allows users to implement a function to evaluate rewards for the sample response. The function signature is as follows: ``` def evaluate(example: dict[str, Any], response: dict[str, Any]) -> float: ... ``` `example` is a ReinforcementTuningExample in ProtoJSON format, (i.e., the format is the same as as one line in the training/validation dataset except that the keys must be in camel case). System instructions (i.e., `example.get("systemInstruction")`) and references (i.e., `example.get("references")`) are also included in the `example` provided that they are set in the training/validation dataset. `response` is a Content in ProtoJSON format (i.e., keys must be in camel case), which is the same as the Online Prediction response for Gemini models. Note: Reward output by the `evaluate` function is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. This data type is not supported in Gemini API. */
6170
6312
  declare interface ReinforcementTuningCodeExecutionRewardScorer {
6171
- /** Example python code snippet which assigns reward of 1 to answer matching user provided reference answer in per prompt references map. */
6313
+ /** The python code snippet as a string for evaluating rewards. The following is an example python code snippet that returns a reward `1.0` for a parsed response matching the user-provided reference answer in per prompt references map. ``` def evaluate(example, response) -> float: response_str = response.get("parts", [])0 references = example.get("references", {}) if response_str == references.get("concise_answer"): return 1.0 return -1.0 ``` Note: Reward output by the evaluate function is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. */
6172
6314
  pythonCodeSnippet?: string;
6173
6315
  }
6174
6316
 
@@ -6178,37 +6320,39 @@ declare interface ReinforcementTuningExample {
6178
6320
  contents?: Content[];
6179
6321
  /** References for the given prompt. The key is the name of the reference, and the value is the reference itself. */
6180
6322
  references?: Record<string, string>;
6181
- /** Corresponds to `system_instruction` in user-facing GenerateContentRequest. */
6323
+ /** Corresponds to system_instruction in user-facing GenerateContentRequest. */
6182
6324
  systemInstruction?: Content;
6183
6325
  }
6184
6326
 
6185
6327
  /** Hyperparameters for Reinforcement Tuning. */
6186
6328
  declare interface ReinforcementTuningHyperParameters {
6187
- /** Number of training epochs for the tuning job. */
6329
+ /** Optional. Number of training epoches for the tuning job. */
6188
6330
  epochCount?: string;
6189
6331
  /** Learning rate multiplier for Reinforcement Learning. */
6190
6332
  learningRateMultiplier?: number;
6191
- /** Adapter size for Reinforcement Tuning. */
6333
+ /** Optional. Adapter size for Reinforcement Tuning. */
6192
6334
  adapterSize?: AdapterSize;
6193
- /** Number of different responses to generate per prompt during tuning. */
6335
+ /** Optional. Number of different responses to generate per prompt during tuning. */
6194
6336
  samplesPerPrompt?: number;
6195
- /** Batch size for the tuning job. How many prompts to process at a train step. If not set, the batch size will be determined automatically. */
6337
+ /** Optional. Batch size for the tuning job. How many prompts to process at a train step. If not set, the batch size will be determined automatically. */
6196
6338
  batchSize?: number;
6197
- /** How often (in steps) to evaluate the tuning job during training. If not set, evaluation will run per epoch. */
6339
+ /** Optional. How often at steps to evaluate the tuning job during training. If not set, evel will be run per epoch. `total_steps = epoch_count * samples_per_prompt / total_prompts_in_dataset` */
6198
6340
  evaluateInterval?: number;
6199
- /** How often (in steps) to save checkpoints during training. If not set, one checkpoint per epoch will be saved. */
6341
+ /** Optional. How often at steps to save checkpoints during training. If not set, one checkpoint per epoch will be set. ```total_steps = epoch_count * samples_per_prompt / total_prompts_in_dataset``` */
6200
6342
  checkpointInterval?: number;
6201
- /** The maximum number of tokens to generate per prompt. If not set, defaults to 32768. */
6343
+ /** Optional. The maximum number of tokens to generate per prompt. Default to 32768. */
6202
6344
  maxOutputTokens?: number;
6203
- /** Indicates the maximum thinking depth. Use with earlier models shall result in error. */
6345
+ /** Indicates the maximum thinking depth during tuning. Starting from Gemini 3.5 models, the old thinking_budget will no longer be supported and will result in a user error if set. Instead, users should use the thinking_level parameter to control the maximum thinking depth. */
6204
6346
  thinkingLevel?: ReinforcementTuningThinkingLevel;
6347
+ /** Optional. The thinking budget for the tuning job to optimize for (Gemini 2.5 only). * -1 means dynamic thinking * 0 means no thinking * > 0 means thinking budget in tokens If not set, default to -1 (dynamic thinking). */
6348
+ thinkingBudget?: number;
6205
6349
  }
6206
6350
 
6207
- /** Defines how to parse sample response for reinforcement tuning. */
6351
+ /** Defines how to parse sample response config for reinforcement tuning. The parsed response (i.e., substring) will be passed to the reward functions. For example, the input prompt might be: > "Perform step-by-step thoughts first to problem A, finally output answer in the <ans> </ans> block." The sample response from the model under tuning might look like: > "<ans>Yes</ans>" Here, users can define the following parse config: ``` { "parseType": "REGEX_EXTRACT", "regexExtractExpression": ".*(.*?)" } ``` The resulting parsed response would be `"Yes"` and will be passed to the reward functions for evaluating rewards. This data type is not supported in Gemini API. */
6208
6352
  declare class ReinforcementTuningParseResponseConfig {
6209
- /** Defines how to parse sample response. */
6353
+ /** Defines the type for parsing sample response. */
6210
6354
  parseType?: ResponseParseType;
6211
- /** Defines the regex to extract the important part of sample response. This field is only used when `parse_type` is `REGEX_EXTRACT`. */
6355
+ /** Defines the regex for extracting the important part of sample response. This field is only used when parse_type is ResponseParseType.REGEX_EXTRACT. */
6212
6356
  regexExtractExpression?: string;
6213
6357
  }
6214
6358
 
@@ -6216,16 +6360,17 @@ declare class ReinforcementTuningParseResponseConfig {
6216
6360
  declare interface ReinforcementTuningRewardInfo {
6217
6361
  /** Output only. The calculated reward for the reward function. */
6218
6362
  reward?: number;
6219
- /** Output only. The user-requested auxiliary info for the reward function. */
6363
+ /** Output only. The user-requested auxiliary info for the reward function. This field is set only if the Cloud Run reward function configured by user returns a "user_requested_aux_info". Refer to ReinforcementTuningCloudRunRewardScorer for more details. */
6220
6364
  userRequestedAuxInfo?: string;
6221
6365
  }
6222
6366
 
6223
6367
  /** Reinforcement tuning spec for tuning. */
6224
6368
  declare interface ReinforcementTuningSpec {
6369
+ /** Composite reward function configuration for reinforcement tuning. */
6225
6370
  compositeRewardConfig?: CompositeReinforcementTuningRewardConfig;
6226
- /** Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file. */
6371
+ /** Cloud Storage path to the file containing training dataset for tuning. The dataset must be formatted as a JSONL file. */
6227
6372
  trainingDatasetUri?: string;
6228
- /** Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. If no validation dataset is provided, by default the API splits 25% of the training dataset or 50 examples, whichever is larger, as the validation dataset. */
6373
+ /** Cloud Storage path to the file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. */
6229
6374
  validationDatasetUri?: string;
6230
6375
  /** Additional hyper-parameters to use during tuning. */
6231
6376
  hyperParameters?: ReinforcementTuningHyperParameters;
@@ -6233,11 +6378,11 @@ declare interface ReinforcementTuningSpec {
6233
6378
  singleRewardConfig?: SingleReinforcementTuningRewardConfig;
6234
6379
  }
6235
6380
 
6236
- /** Scores parsed responses for string matching use cases. */
6381
+ /** ReinforcementTuningStringMatchRewardScorer is used to score parsed responses for string matching use cases. For example, for math problems, users can use string match scorer to check if the correct exact answer is generated. Note: Reward returned by the string match reward function is clipped to be within `[-1, 1]` if wrongAnswerReward or correctAnswerReward are beyond the range, i.e., `reward = max(min(reward, 1.0), -1.0)`. This data type is not supported in Gemini API. */
6237
6382
  declare interface ReinforcementTuningStringMatchRewardScorer {
6238
- /** Wrong answer reward is returned if evaluator evaluates to `false`. All wrong answers get the same reward. */
6383
+ /** Wrong answer reward is returned if the parsed response is evaluated as `false`. All wrong answers get the same reward. */
6239
6384
  wrongAnswerReward?: number;
6240
- /** Correct answer reward is returned if evaluator evaluates to `true`. All correct answers get the same reward. */
6385
+ /** Correct answer rewawrd is returned if the parsed response is evaluated as `true`. All correct answers get the same reward. */
6241
6386
  correctAnswerReward?: number;
6242
6387
  /** Uses string match expression to evaluate parsed response. */
6243
6388
  stringMatchExpression?: ReinforcementTuningStringMatchRewardScorerStringMatchExpression;
@@ -6245,19 +6390,19 @@ declare interface ReinforcementTuningStringMatchRewardScorer {
6245
6390
  jsonMatchExpression?: ReinforcementTuningStringMatchRewardScorerJsonMatchExpression;
6246
6391
  }
6247
6392
 
6248
- /** Converts parsed responses to JSON format, finds the first-level matching key, then performs StringMatchExpression on the value. */
6393
+ /** JsonMatchExpression supports converting the parsed responses to JSON format, finding the value in the JSON response that matches the key_name in the first level, and performing StringMatchExpression operation on the matched JSON value. This data type is not supported in Gemini API. */
6249
6394
  declare interface ReinforcementTuningStringMatchRewardScorerJsonMatchExpression {
6250
- /** Json key name to find the value to match against. */
6395
+ /** The key name to find the value in the parsed response that's in JSON format. Only first-level key matching is supported. */
6251
6396
  keyName?: string;
6252
- /** String match expression to match against the value of json key. */
6397
+ /** String match expression to match against the extracted value from the JSON representation of the parsed response. */
6253
6398
  valueStringMatchExpression?: ReinforcementTuningStringMatchRewardScorerStringMatchExpression;
6254
6399
  }
6255
6400
 
6256
- /** Evaluates parsed response using match type against expression. */
6401
+ /** Evaluates parsed response using match type against the expression. Returns `true` if `MatchOperation(target, expression)` evaluates to `true`, and `false` otherwise. This data type is not supported in Gemini API. */
6257
6402
  declare interface ReinforcementTuningStringMatchRewardScorerStringMatchExpression {
6258
- /** Match operation to use for evaluation. */
6403
+ /** Match operation to use for evaluating rewards. */
6259
6404
  matchOperation?: MatchOperation;
6260
- /** String or regular expression to match against. Customer can also provide a references map (key/value pairs) whose value will be substituted into the expression by referencing `references.key_name` (wrapped in double curly braces). */
6405
+ /** A string or a regular expression to match against for evaluating rewards. Users can also provide a references map of `{key: value}` whose `value` will be used to replace the placeholder {{references.key}} in the expression. For example, if the following `references` are defined in the training / validation dataset: ``` { "systemInstruction": ..., "contents": ..., "references": { "concise_answer": "Yes", "verbose_answer": "The answer is Yes" } } ``` and if users define the following StringMatchExpression: { "matchOperation": "REGEX_CONTAINS", "expression": ".*{{references.concise_answer}}.*" } On evaluating the reward for each sample response, this StringMatchExpression will be substituted as: ``` { "matchOperation": "REGEX_CONTAINS", "expression": ".*Yes.*" } ``` */
6261
6406
  expression?: string;
6262
6407
  }
6263
6408
 
@@ -6277,6 +6422,12 @@ declare enum ReinforcementTuningThinkingLevel {
6277
6422
  HIGH = "HIGH"
6278
6423
  }
6279
6424
 
6425
+ /** Sample reinforcement tuning user data in the training dataset. The contents are truncated for better UI showing. This data type is not supported in Gemini API. */
6426
+ declare interface ReinforcementTuningUserDatasetExamples {
6427
+ /** List of user datasset examples showing to user. */
6428
+ userDatasetExamples?: ReinforcementTuningExample[];
6429
+ }
6430
+
6280
6431
  /** Represents a recorded session. */
6281
6432
  declare interface ReplayFile {
6282
6433
  replayId?: string;
@@ -6316,6 +6467,17 @@ declare interface ReplicatedVoiceConfig {
6316
6467
 
6317
6468
  * @remarks Encoded as base64 string. */
6318
6469
  voiceSampleAudio?: string;
6470
+ /** Recorded consent verifying ownership of the voice. This
6471
+ represents 16-bit signed little-endian wav data, with a 24kHz sampling
6472
+ rate.
6473
+ * @remarks Encoded as base64 string. */
6474
+ consentAudio?: string;
6475
+ /** Signature of a previously verified consent audio. This should be
6476
+ populated with a signature generated by the server for a previous
6477
+ request containing the consent_audio field. When provided, the
6478
+ signature is verified instead of the consent_audio field to reduce
6479
+ latency. Requests will fail if the signature is invalid or expired. */
6480
+ voiceConsentSignature?: VoiceConsentSignature;
6319
6481
  }
6320
6482
 
6321
6483
  /** Resource scope. */
@@ -6330,18 +6492,30 @@ declare enum ResourceScope {
6330
6492
  COLLECTION = "COLLECTION"
6331
6493
  }
6332
6494
 
6333
- /** Defines how to parse sample response. */
6495
+ /** Configuration for the model to configure output formatting and delivery. This data type is not supported in Gemini API. */
6496
+ declare class ResponseFormat {
6497
+ /** Audio output format. */
6498
+ audio?: AudioResponseFormat;
6499
+ /** Image output format. */
6500
+ image?: ImageResponseFormat;
6501
+ /** Text output format. */
6502
+ text?: TextResponseFormat;
6503
+ /** Video output format. */
6504
+ video?: VideoResponseFormat;
6505
+ }
6506
+
6507
+ /** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
6334
6508
  declare enum ResponseParseType {
6335
6509
  /**
6336
- * Default value. This value is unused.
6510
+ * Default value. Fallback to IDENTITY
6337
6511
  */
6338
6512
  RESPONSE_PARSE_TYPE_UNSPECIFIED = "RESPONSE_PARSE_TYPE_UNSPECIFIED",
6339
6513
  /**
6340
- * Use the sample response as is.
6514
+ * Returns the sample response as is.
6341
6515
  */
6342
6516
  IDENTITY = "IDENTITY",
6343
6517
  /**
6344
- * Use regex to extract the important part of sample response.
6518
+ * Uses regex to extract the important part of sample response. Similar to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_extract) `REGEX_EXTRACT(response, regex_extract_expression)`, but different in that if there are multiple matches, the last match will be returned.
6345
6519
  */
6346
6520
  REGEX_EXTRACT = "REGEX_EXTRACT"
6347
6521
  }
@@ -6401,6 +6575,42 @@ declare enum SafetyFilterLevel {
6401
6575
  BLOCK_NONE = "BLOCK_NONE"
6402
6576
  }
6403
6577
 
6578
+ /** SafetyPolicy */
6579
+ declare enum SafetyPolicy {
6580
+ /**
6581
+ * Unspecified safety policy.
6582
+ */
6583
+ SAFETY_POLICY_UNSPECIFIED = "SAFETY_POLICY_UNSPECIFIED",
6584
+ /**
6585
+ * Safety policy for financial transactions.
6586
+ */
6587
+ FINANCIAL_TRANSACTIONS = "FINANCIAL_TRANSACTIONS",
6588
+ /**
6589
+ * Safety policy for sensitive data modification.
6590
+ */
6591
+ SENSITIVE_DATA_MODIFICATION = "SENSITIVE_DATA_MODIFICATION",
6592
+ /**
6593
+ * Safety policy for communication tools (e.g. Gmail, Chat, Meet).
6594
+ */
6595
+ COMMUNICATION_TOOL = "COMMUNICATION_TOOL",
6596
+ /**
6597
+ * Safety policy for account creation.
6598
+ */
6599
+ ACCOUNT_CREATION = "ACCOUNT_CREATION",
6600
+ /**
6601
+ * Safety policy for data modification.
6602
+ */
6603
+ DATA_MODIFICATION = "DATA_MODIFICATION",
6604
+ /**
6605
+ * Safety policy for user consent management.
6606
+ */
6607
+ USER_CONSENT_MANAGEMENT = "USER_CONSENT_MANAGEMENT",
6608
+ /**
6609
+ * Safety policy for legal terms and agreements.
6610
+ */
6611
+ LEGAL_TERMS_AND_AGREEMENTS = "LEGAL_TERMS_AND_AGREEMENTS"
6612
+ }
6613
+
6404
6614
  /** A safety rating for a piece of content. The safety rating contains the harm category and the harm probability level. */
6405
6615
  declare interface SafetyRating {
6406
6616
  /** Output only. Indicates whether the content was blocked because of this rating. */
@@ -6721,15 +6931,15 @@ declare class SingleEmbedContentResponse {
6721
6931
  declare interface SingleReinforcementTuningRewardConfig {
6722
6932
  /** Scores parsed responses for autorater use cases by using a model to compute the reward. */
6723
6933
  autoraterScorer?: ReinforcementTuningAutoraterScorer;
6724
- /** A unique reward name used to identify each single reinforcement tuning reward. */
6934
+ /** A unique reward name for identifying each single reinforcement tuning reward. */
6725
6935
  rewardName?: string;
6726
- /** Defines how to parse sample response. */
6936
+ /** Defines how to parse sample response. For example, given a sample response for evaluating the reward, users might want to extract the text only between `` and `` in the sample response, and keeps only the last one in case there are multiple such tags. To achieve such a purpose, they can define a regex `".*(.*?)"` using the ReinforcementTuningParseResponseConfig.ResponseParseType.REGEX_EXTRACT parse type. */
6727
6937
  parseResponseConfig?: ReinforcementTuningParseResponseConfig;
6728
- /** Scores parsed responses for code execution use cases. */
6938
+ /** ReinforcementTuningCodeExecutionRewardScorer is used to score parsed responses for code execution use cases. */
6729
6939
  codeExecutionRewardScorer?: ReinforcementTuningCodeExecutionRewardScorer;
6730
- /** Scores parsed responses for simple string matching use cases against reference answer without writing python code. */
6940
+ /** ReinforcementTuningStringMatchRewardScorer is used to score parsed responses for simple string matching use cases against reference answers. */
6731
6941
  stringMatchRewardScorer?: ReinforcementTuningStringMatchRewardScorer;
6732
- /** Scores parsed responses by calling a Cloud Run service. */
6942
+ /** ReinforcementTuningCloudRunRewardScorer is used to score parsed responses by calling a Cloud Run service. */
6733
6943
  cloudRunRewardScorer?: ReinforcementTuningCloudRunRewardScorer;
6734
6944
  }
6735
6945
 
@@ -6975,6 +7185,14 @@ declare interface TestTableItem {
6975
7185
  ignoreKeys?: string[];
6976
7186
  }
6977
7187
 
7188
+ /** Configuration for text-specific output formatting. */
7189
+ declare class TextResponseFormat {
7190
+ /** Optional. The IANA standard MIME type of the response. */
7191
+ mimeType?: string;
7192
+ /** Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON. */
7193
+ schema?: unknown;
7194
+ }
7195
+
6978
7196
  /** The thinking features configuration. */
6979
7197
  declare interface ThinkingConfig {
6980
7198
  /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.
@@ -7026,9 +7244,7 @@ declare interface TokensInfo {
7026
7244
  declare interface Tool {
7027
7245
  /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. This field is not supported in Gemini API. */
7028
7246
  retrieval?: Retrieval;
7029
- /** Optional. Tool to support the model interacting directly with the
7030
- computer. If enabled, it automatically populates computer-use specific
7031
- Function Declarations. */
7247
+ /** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
7032
7248
  computerUse?: ComputerUse;
7033
7249
  /** Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora. This field is not supported in Vertex AI. */
7034
7250
  fileSearch?: FileSearch;
@@ -7051,6 +7267,8 @@ declare interface Tool {
7051
7267
  urlContext?: UrlContext;
7052
7268
  /** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
7053
7269
  mcpServers?: McpServer[];
7270
+ /** Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation. This field is not supported in Gemini API. */
7271
+ exaAiSearch?: ToolExaAiSearch;
7054
7272
  }
7055
7273
 
7056
7274
  /** A predicted server-side `ToolCall` returned from the model.
@@ -7082,6 +7300,14 @@ declare interface ToolConfig {
7082
7300
  includeServerSideToolInvocations?: boolean;
7083
7301
  }
7084
7302
 
7303
+ /** ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. This data type is not supported in Gemini API. */
7304
+ declare interface ToolExaAiSearch {
7305
+ /** Required. The API key for ExaAiSearch. */
7306
+ apiKey?: string;
7307
+ /** Optional. This field can be used to pass any parameter from the Exa.ai Search API. */
7308
+ customConfigs?: Record<string, unknown>;
7309
+ }
7310
+
7085
7311
  declare type ToolListUnion = ToolUnion[];
7086
7312
 
7087
7313
  /** ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. This data type is not supported in Gemini API. */
@@ -7173,12 +7399,9 @@ declare interface Transcription {
7173
7399
 
7174
7400
  /** Config for stream translation. */
7175
7401
  declare interface TranslationConfig {
7176
- /** If true, the model will generate audio when the target language is
7177
- spoken, essentially it will parrot the input. If false, we will not produce
7178
- audio for the target language. */
7402
+ /** Optional. If true, the model will generate audio when the target language is spoken, essentially it will parrot the input. If false, we will not produce audio for the target language. */
7179
7403
  echoTargetLanguage?: boolean;
7180
- /** The target language for translation. Supported values are BCP-47
7181
- language codes (e.g. "en", "es", "fr"). */
7404
+ /** Required. The target language for translation. Supported values are BCP-47 language codes (e.g. "en", "es", "fr"). */
7182
7405
  targetLanguageCode?: string;
7183
7406
  }
7184
7407
 
@@ -7246,6 +7469,8 @@ declare interface TuningDataStats {
7246
7469
  preferenceOptimizationDataStats?: PreferenceOptimizationDataStats;
7247
7470
  /** The SFT Tuning data stats. */
7248
7471
  supervisedTuningDataStats?: SupervisedTuningDataStats;
7472
+ /** Output only. Statistics for reinforcement tuning. */
7473
+ reinforcementTuningDataStats?: DatasetStats;
7249
7474
  }
7250
7475
 
7251
7476
  /** A single example for tuning. This data type is not supported in Vertex AI. */
@@ -7288,6 +7513,7 @@ declare interface TuningJob {
7288
7513
  preferenceOptimizationSpec?: PreferenceOptimizationSpec;
7289
7514
  /** Tuning Spec for Distillation. */
7290
7515
  distillationSpec?: DistillationSpec;
7516
+ /** Tuning Spec for Reinforcement Tuning. */
7291
7517
  reinforcementTuningSpec?: ReinforcementTuningSpec;
7292
7518
  /** Output only. The tuning data statistics associated with this TuningJob. */
7293
7519
  tuningDataStats?: TuningDataStats;
@@ -7642,10 +7868,11 @@ declare namespace types {
7642
7868
  Language,
7643
7869
  FunctionResponseScheduling,
7644
7870
  Type,
7645
- Environment,
7646
7871
  AuthType,
7647
7872
  HttpElementLocation,
7648
7873
  ApiSpec,
7874
+ Environment,
7875
+ SafetyPolicy,
7649
7876
  PhishBlockThreshold,
7650
7877
  Behavior,
7651
7878
  DynamicRetrievalConfigMode,
@@ -7666,8 +7893,14 @@ declare namespace types {
7666
7893
  ModelStage,
7667
7894
  MediaResolution,
7668
7895
  Modality,
7896
+ Delivery,
7897
+ AspectRatio,
7898
+ ImageSize,
7669
7899
  TuningMode,
7670
7900
  AdapterSize,
7901
+ ResponseParseType,
7902
+ MatchOperation,
7903
+ ReinforcementTuningThinkingLevel,
7671
7904
  JobState,
7672
7905
  TuningJobState,
7673
7906
  AggregationMetric,
@@ -7693,9 +7926,6 @@ declare namespace types {
7693
7926
  VideoGenerationMaskMode,
7694
7927
  VideoCompressionQuality,
7695
7928
  ImageResizeMode,
7696
- ResponseParseType,
7697
- MatchOperation,
7698
- ReinforcementTuningThinkingLevel,
7699
7929
  TuningMethod,
7700
7930
  FileState,
7701
7931
  FileSource,
@@ -7729,7 +7959,6 @@ declare namespace types {
7729
7959
  HttpOptions,
7730
7960
  Schema,
7731
7961
  ModelSelectionConfig,
7732
- ComputerUse,
7733
7962
  ApiKeyConfig,
7734
7963
  AuthConfigGoogleServiceAccountConfig,
7735
7964
  AuthConfigHttpBasicAuthConfig,
@@ -7753,6 +7982,7 @@ declare namespace types {
7753
7982
  RagRetrievalConfig,
7754
7983
  VertexRagStore,
7755
7984
  Retrieval,
7985
+ ComputerUse,
7756
7986
  FileSearch,
7757
7987
  WebSearch,
7758
7988
  ImageSearch,
@@ -7768,7 +7998,9 @@ declare namespace types {
7768
7998
  UrlContext,
7769
7999
  StreamableHttpTransport,
7770
8000
  McpServer,
8001
+ ToolExaAiSearch,
7771
8002
  Tool,
8003
+ VoiceConsentSignature,
7772
8004
  ReplicatedVoiceConfig,
7773
8005
  PrebuiltVoiceConfig,
7774
8006
  VoiceConfig,
@@ -7873,6 +8105,12 @@ declare namespace types {
7873
8105
  DeleteModelConfig,
7874
8106
  DeleteModelParameters,
7875
8107
  DeleteModelResponse,
8108
+ AudioResponseFormat,
8109
+ ImageResponseFormat,
8110
+ TextResponseFormat,
8111
+ VideoResponseFormat,
8112
+ ResponseFormat,
8113
+ TranslationConfig,
7876
8114
  GenerationConfig,
7877
8115
  CountTokensConfig,
7878
8116
  CountTokensParameters,
@@ -7922,6 +8160,8 @@ declare namespace types {
7922
8160
  PreTunedModel,
7923
8161
  DatasetDistributionDistributionBucket,
7924
8162
  DatasetDistribution,
8163
+ ReinforcementTuningExample,
8164
+ ReinforcementTuningUserDatasetExamples,
7925
8165
  DatasetStats,
7926
8166
  DistillationDataStats,
7927
8167
  GeminiPreferenceExampleCompletion,
@@ -7967,7 +8207,6 @@ declare namespace types {
7967
8207
  CreateTuningJobConfig,
7968
8208
  CreateTuningJobParametersPrivate,
7969
8209
  TuningOperation,
7970
- ReinforcementTuningExample,
7971
8210
  ValidateRewardConfig,
7972
8211
  ValidateRewardParameters,
7973
8212
  ReinforcementTuningRewardInfo,
@@ -8111,7 +8350,6 @@ declare namespace types {
8111
8350
  LiveClientRealtimeInput,
8112
8351
  LiveClientToolResponse,
8113
8352
  LiveClientMessage,
8114
- TranslationConfig,
8115
8353
  LiveConnectConfig,
8116
8354
  LiveConnectParameters,
8117
8355
  CreateChatParameters,
@@ -8749,6 +8987,18 @@ declare enum VideoOrientation {
8749
8987
  PORTRAIT = "PORTRAIT"
8750
8988
  }
8751
8989
 
8990
+ /** Configuration for video-specific output formatting. This data type is not supported in Gemini API. */
8991
+ declare class VideoResponseFormat {
8992
+ /** The aspect ratio for the video output. */
8993
+ aspectRatio?: AspectRatio;
8994
+ /** Optional. Delivery mode for the generated content. */
8995
+ delivery?: Delivery;
8996
+ /** Optional. The duration for the video output. */
8997
+ duration?: string;
8998
+ /** Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI. */
8999
+ gcsUri?: string;
9000
+ }
9001
+
8752
9002
  /** Voice activity signal. */
8753
9003
  declare interface VoiceActivity {
8754
9004
  /** The type of the voice activity signal. */
@@ -8788,6 +9038,13 @@ declare interface VoiceConfig {
8788
9038
  prebuiltVoiceConfig?: PrebuiltVoiceConfig;
8789
9039
  }
8790
9040
 
9041
+ /** The signature of the voice consent check. */
9042
+ declare interface VoiceConsentSignature {
9043
+ /** The signature string.
9044
+ */
9045
+ signature?: string;
9046
+ }
9047
+
8791
9048
  /** Configuration for webhook notifications.
8792
9049
 
8793
9050
  Used to configure webhook endpoints that will receive notifications