@google/genai 2.5.0 → 2.7.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.
@@ -462,6 +462,32 @@ declare interface AutomaticFunctionCallingConfig {
462
462
  ignoreCallHistory?: boolean;
463
463
  }
464
464
 
465
+ /** Autorater config used for evaluation. */
466
+ declare interface AutoraterConfig {
467
+ /** Number of samples for each instance in the dataset.
468
+ If not specified, the default is 4. Minimum value is 1, maximum value
469
+ is 32. */
470
+ samplingCount?: number;
471
+ /** Optional. Default is true. Whether to flip the candidate and baseline
472
+ responses. This is only applicable to the pairwise metric. If enabled, also
473
+ provide PairwiseMetricSpec.candidate_response_field_name and
474
+ PairwiseMetricSpec.baseline_response_field_name. When rendering
475
+ PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
476
+ fields will be flipped for half of the samples to reduce bias. */
477
+ flipEnabled?: boolean;
478
+ /** The fully qualified name of the publisher model or tuned autorater
479
+ endpoint to use.
480
+
481
+ Publisher model format:
482
+ `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
483
+
484
+ Tuned model endpoint format:
485
+ `projects/{project}/locations/{location}/endpoints/{endpoint}` */
486
+ autoraterModel?: string;
487
+ /** Configuration options for model generation and outputs. */
488
+ generationConfig?: GenerationConfig;
489
+ }
490
+
465
491
  /** Configures the avatar to be used in the session. */
466
492
  declare interface AvatarConfig {
467
493
  /** Pre-built avatar id. */
@@ -864,15 +890,13 @@ declare interface CitationMetadata {
864
890
  citations?: Citation[];
865
891
  }
866
892
 
867
- /** Result of executing the `ExecutableCode`.
868
-
869
- Generated only when the `CodeExecution` tool is used. */
893
+ /** Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. */
870
894
  declare interface CodeExecutionResult {
871
895
  /** Required. Outcome of the code execution. */
872
896
  outcome?: Outcome;
873
897
  /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */
874
898
  output?: string;
875
- /** The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. */
899
+ /** Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. This field is not supported in Vertex AI. */
876
900
  id?: string;
877
901
  }
878
902
 
@@ -888,6 +912,18 @@ declare interface CompletionStats {
888
912
  successfulForecastPointCount?: string;
889
913
  }
890
914
 
915
+ /** Composite reinforcement tuning reward config. */
916
+ declare interface CompositeReinforcementTuningRewardConfig {
917
+ weightedRewardConfigs?: CompositeReinforcementTuningRewardConfigWeightedRewardConfig[];
918
+ }
919
+
920
+ /** Composite reinforcement tuning reward config weighted reward config. */
921
+ declare interface CompositeReinforcementTuningRewardConfigWeightedRewardConfig {
922
+ rewardConfig?: SingleReinforcementTuningRewardConfig;
923
+ /** How much this single reward contributes to the total overall reward. */
924
+ weight?: number;
925
+ }
926
+
891
927
  /** Tool to support computer use. */
892
928
  declare interface ComputerUse {
893
929
  /** Required. The environment being operated. */
@@ -898,6 +934,9 @@ declare interface ComputerUse {
898
934
  1. Using a more restricted / different action space.
899
935
  2. Improving the definitions / instructions of predefined functions. */
900
936
  excludedPredefinedFunctions?: string[];
937
+ /** Optional. Whether enable the prompt injection detection check on computer-use request.
938
+ */
939
+ enablePromptInjectionDetection?: boolean;
901
940
  }
902
941
 
903
942
  /** Optional parameters for computing tokens. */
@@ -1393,7 +1432,7 @@ declare interface CreateTuningJobConfig {
1393
1432
  be charged usage for any applicable operations.
1394
1433
  */
1395
1434
  abortSignal?: AbortSignal;
1396
- /** The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING or DISTILLATION). If not set, the default method (SFT) will be used. */
1435
+ /** The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING or DISTILLATION or REINFORCEMENT_TUNING). If not set, the default method (SFT) will be used. */
1397
1436
  method?: TuningMethod;
1398
1437
  /** Validation dataset for tuning. The dataset must be formatted as a JSONL file. */
1399
1438
  validationDataset?: TuningValidationDataset;
@@ -1433,6 +1472,18 @@ declare interface CreateTuningJobConfig {
1433
1472
  outputUri?: string;
1434
1473
  /** The encryption spec of the tuning job. Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with provided encryption key. */
1435
1474
  encryptionSpec?: EncryptionSpec;
1475
+ /** Reward function configuration for reinforcement tuning. Reinforcement tuning only. */
1476
+ rewardConfig?: SingleReinforcementTuningRewardConfig;
1477
+ /** Composite reward function configuration for reinforcement tuning. Reinforcement tuning only. */
1478
+ compositeRewardConfig?: CompositeReinforcementTuningRewardConfig;
1479
+ /** Number of different responses to generate per prompt during tuning. Reinforcement tuning only. */
1480
+ samplesPerPrompt?: number;
1481
+ /** How often at steps to evaluate the tuning job during training. Reinforcement tuning only. */
1482
+ evaluateInterval?: number;
1483
+ /** How often at steps to save checkpoints during training. Reinforcement tuning only. */
1484
+ checkpointInterval?: number;
1485
+ /** The maximum number of tokens to generate per prompt. Reinforcement tuning only. */
1486
+ maxOutputTokens?: number;
1436
1487
  }
1437
1488
 
1438
1489
  /** Fine-tuning job creation parameters - optional fields. */
@@ -1722,35 +1773,51 @@ declare interface DistillationDataStats {
1722
1773
  trainingDatasetStats?: DatasetStats;
1723
1774
  }
1724
1775
 
1725
- /** Hyperparameters for distillation. */
1776
+ /** Distillation hyperparameters for tuning. */
1726
1777
  declare interface DistillationHyperParameters {
1727
- /** Optional. Adapter size for distillation. */
1778
+ /** The size of the adapter. Can be 'small', 'medium', or 'large'. */
1728
1779
  adapterSize?: AdapterSize;
1729
- /** Optional. Number of complete passes the model makes over the entire training dataset during training. */
1780
+ /** Number of complete passes the model makes over the entire training dataset
1781
+ during training. */
1730
1782
  epochCount?: string;
1731
- /** Optional. Multiplier for adjusting the default learning rate. */
1783
+ /** Multiplier for adjusting the default learning rate. */
1732
1784
  learningRateMultiplier?: number;
1733
- /** The batch size hyperparameter for tuning.
1734
- This is only supported for OSS models in Gemini Enterprise Agent Platform.
1735
- */
1736
- batchSize?: number;
1737
- /** The learning rate for tuning. OSS models only. */
1785
+ /** Generation config for Distillation teacher model sampling. Only the
1786
+ following fields are supported for distillation teacher samplings:
1787
+ - temperature
1788
+ - top_p
1789
+ - top_k
1790
+ - candidate_count
1791
+ - thinking_config */
1792
+ generationConfig?: GenerationConfig;
1793
+ /** The learning rate for distillation tuning. */
1738
1794
  learningRate?: number;
1795
+ /** Batch size for tuning. This feature is only available for open
1796
+ source models. */
1797
+ batchSize?: number;
1739
1798
  }
1740
1799
 
1741
- /** Spec for creating a distilled dataset in Vertex Dataset. This data type is not supported in Gemini API. */
1800
+ /** Distillation sampling spec for tuning. */
1742
1801
  declare interface DistillationSamplingSpec {
1743
- /** Optional. The base teacher model that is being distilled. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models). */
1802
+ /** The base teacher model that is being distilled. See [Supported
1803
+ models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models). */
1744
1804
  baseTeacherModel?: string;
1745
- /** Optional. The resource name of the Tuned teacher model. Format: `projects/{project}/locations/{location}/models/{model}`. */
1805
+ /** The resource name of the Tuned teacher model. Format:
1806
+ `projects/{project}/locations/{location}/models/{model}`. */
1746
1807
  tunedTeacherModelSource?: string;
1747
- /** Optional. Cloud Storage path to file containing validation dataset for distillation. The dataset must be formatted as a JSONL file. */
1808
+ /** Cloud Storage path to file containing validation dataset for distillation.
1809
+ The dataset must be formatted as a JSONL file. */
1748
1810
  validationDatasetUri?: string;
1811
+ /** Cloud Storage path to file containing prompt dataset for distillation.
1812
+ The dataset must be formatted as a JSONL file. */
1813
+ promptDatasetUri?: string;
1814
+ /** Hyperparameters for distillation tuning. */
1815
+ hyperparameters?: DistillationHyperParameters;
1749
1816
  }
1750
1817
 
1751
1818
  /** Distillation tuning spec for tuning. */
1752
1819
  declare interface DistillationSpec {
1753
- /** The GCS URI of the prompt dataset to use during distillation. */
1820
+ /** Optional. Cloud Storage path to file containing prompt dataset for distillation. The dataset must be formatted as a JSONL file. */
1754
1821
  promptDatasetUri?: string;
1755
1822
  /** The base teacher model that is being distilled. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models). */
1756
1823
  baseTeacherModel?: string;
@@ -1766,7 +1833,7 @@ declare interface DistillationSpec {
1766
1833
  tunedTeacherModelSource?: string;
1767
1834
  /** Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. */
1768
1835
  validationDatasetUri?: string;
1769
- /** Tuning mode for tuning. */
1836
+ /** Optional. Specifies the tuning mode for distillation (sft part). This feature is only available for open source models. */
1770
1837
  tuningMode?: TuningMode;
1771
1838
  }
1772
1839
 
@@ -1978,15 +2045,6 @@ declare interface EmbedContentBatch {
1978
2045
 
1979
2046
  /** Optional parameters for the embed_content method. */
1980
2047
  declare interface EmbedContentConfig {
1981
- /** Used to override HTTP request options. */
1982
- httpOptions?: HttpOptions;
1983
- /** Abort signal which can be used to cancel the request.
1984
-
1985
- NOTE: AbortSignal is a client-only operation. Using it to cancel an
1986
- operation will not cancel the request in the service. You will still
1987
- be charged usage for any applicable operations.
1988
- */
1989
- abortSignal?: AbortSignal;
1990
2048
  /** Type of task for which the embedding will be used.
1991
2049
  */
1992
2050
  taskType?: string;
@@ -2016,6 +2074,15 @@ declare interface EmbedContentConfig {
2016
2074
  Only applicable to Gemini Embedding 2 models.
2017
2075
  */
2018
2076
  audioTrackExtraction?: boolean;
2077
+ /** Used to override HTTP request options. */
2078
+ httpOptions?: HttpOptions;
2079
+ /** Abort signal which can be used to cancel the request.
2080
+
2081
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
2082
+ operation will not cancel the request in the service. You will still
2083
+ be charged usage for any applicable operations.
2084
+ */
2085
+ abortSignal?: AbortSignal;
2019
2086
  }
2020
2087
 
2021
2088
  /** Request-level metadata for the Gemini Enterprise Agent Platform Embed Content API. */
@@ -2148,7 +2215,15 @@ declare enum Environment {
2148
2215
  /**
2149
2216
  * Operates in a web browser.
2150
2217
  */
2151
- ENVIRONMENT_BROWSER = "ENVIRONMENT_BROWSER"
2218
+ ENVIRONMENT_BROWSER = "ENVIRONMENT_BROWSER",
2219
+ /**
2220
+ * Operates in a mobile environment.
2221
+ */
2222
+ ENVIRONMENT_MOBILE = "ENVIRONMENT_MOBILE",
2223
+ /**
2224
+ * Operates in a desktop environment.
2225
+ */
2226
+ ENVIRONMENT_DESKTOP = "ENVIRONMENT_DESKTOP"
2152
2227
  }
2153
2228
 
2154
2229
  /** The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API. */
@@ -2187,17 +2262,13 @@ declare interface ExactMatchMetricValue {
2187
2262
  score?: number;
2188
2263
  }
2189
2264
 
2190
- /** Model-generated code executed server-side, results returned to the model.
2191
-
2192
- Only generated when using the `CodeExecution` tool, in which the code will
2193
- be automatically executed, and a corresponding `CodeExecutionResult` will
2194
- also be generated. */
2265
+ /** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. */
2195
2266
  declare interface ExecutableCode {
2196
2267
  /** Required. The code to be executed. */
2197
2268
  code?: string;
2198
2269
  /** Required. Programming language of the `code`. */
2199
2270
  language?: Language;
2200
- /** Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. */
2271
+ /** Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. This field is not supported in Vertex AI. */
2201
2272
  id?: string;
2202
2273
  }
2203
2274
 
@@ -2314,22 +2385,21 @@ declare interface FileSearch {
2314
2385
 
2315
2386
  /** A collection of Documents. */
2316
2387
  declare interface FileSearchStore {
2317
- /** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
2388
+ /** Output only. Immutable. Identifier. The `FileSearchStore` resource name. It is an ID (name excluding the "fileSearchStores/" prefix) that can contain up to 40 characters that are lowercase alphanumeric or dashes (-). It is output only. The unique name will be derived from `display_name` along with a 12 character random suffix. Example: `fileSearchStores/my-awesome-file-search-store-123a456b789c` If `display_name` is not provided, the name will be randomly generated. */
2318
2389
  name?: string;
2319
- /** The human-readable display name for the FileSearchStore. */
2390
+ /** Optional. The human-readable display name for the `FileSearchStore`. The display name must be no more than 512 characters in length, including spaces. Example: "Docs on Semantic Retriever". */
2320
2391
  displayName?: string;
2321
- /** The Timestamp of when the FileSearchStore was created. */
2392
+ /** Output only. The Timestamp of when the `FileSearchStore` was created. */
2322
2393
  createTime?: string;
2323
- /** The Timestamp of when the FileSearchStore was last updated. */
2394
+ /** Output only. The Timestamp of when the `FileSearchStore` was last updated. */
2324
2395
  updateTime?: string;
2325
- /** The number of documents in the FileSearchStore that are active and ready for retrieval. */
2396
+ /** Output only. The number of documents in the `FileSearchStore` that are active and ready for retrieval. */
2326
2397
  activeDocumentsCount?: string;
2327
- /** The number of documents in the FileSearchStore that are being processed. */
2398
+ /** Output only. The number of documents in the `FileSearchStore` that are being processed. */
2328
2399
  pendingDocumentsCount?: string;
2329
- /** The number of documents in the FileSearchStore that have failed processing. */
2400
+ /** Output only. The number of documents in the `FileSearchStore` that have failed processing. */
2330
2401
  failedDocumentsCount?: string;
2331
- /** The size of raw bytes ingested into the FileSearchStore. This is the
2332
- total size of all the documents in the FileSearchStore. */
2402
+ /** Output only. The size of raw bytes ingested into the `FileSearchStore`. This is the total size of all the documents in the `FileSearchStore`. */
2333
2403
  sizeBytes?: string;
2334
2404
  /** The embedding model used by the FileSearchStore. */
2335
2405
  embeddingModel?: string;
@@ -2464,14 +2534,13 @@ declare interface FullFineTuningSpec {
2464
2534
  validationDatasetUri?: string;
2465
2535
  }
2466
2536
 
2467
- /** A function call. */
2537
+ /** A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. */
2468
2538
  declare interface FunctionCall {
2469
- /** The unique id of the function call. If populated, the client to execute the
2470
- `function_call` and return the response with the matching `id`. */
2539
+ /** Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`. */
2471
2540
  id?: string;
2472
- /** Optional. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */
2541
+ /** Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details. */
2473
2542
  args?: Record<string, unknown>;
2474
- /** Optional. The name of the function to call. Matches [FunctionDeclaration.name]. */
2543
+ /** Optional. The name of the function to call. Matches FunctionDeclaration.name. */
2475
2544
  name?: string;
2476
2545
  /** Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally. This field is not supported in Gemini API. */
2477
2546
  partialArgs?: PartialArg[];
@@ -2481,11 +2550,11 @@ declare interface FunctionCall {
2481
2550
 
2482
2551
  /** Function calling config. */
2483
2552
  declare interface FunctionCallingConfig {
2484
- /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */
2553
+ /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match FunctionDeclaration.name. With mode set to ANY, model will predict a function call from the set of function names provided. */
2485
2554
  allowedFunctionNames?: string[];
2486
2555
  /** Optional. Function calling mode. */
2487
2556
  mode?: FunctionCallingConfigMode;
2488
- /** Optional. When set to true, arguments of a single function call will be streamed out in multiple parts/contents/responses. Partial parameter results will be returned in the [FunctionCall.partial_args] field. This field is not supported in Gemini API. */
2557
+ /** Optional. When set to true, arguments of a single function call will be streamed out in multiple parts/contents/responses. Partial parameter results will be returned in the `FunctionCall.partial_args` field. This field is not supported in Gemini API. */
2489
2558
  streamFunctionCallArguments?: boolean;
2490
2559
  }
2491
2560
 
@@ -2517,7 +2586,7 @@ declare enum FunctionCallingConfigMode {
2517
2586
  declare interface FunctionDeclaration {
2518
2587
  /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */
2519
2588
  description?: string;
2520
- /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 64. */
2589
+ /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128. */
2521
2590
  name?: string;
2522
2591
  /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */
2523
2592
  parameters?: Schema;
@@ -2542,7 +2611,7 @@ declare class FunctionResponse {
2542
2611
  parts?: FunctionResponsePart[];
2543
2612
  /** Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`. */
2544
2613
  id?: string;
2545
- /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */
2614
+ /** Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name. */
2546
2615
  name?: string;
2547
2616
  /** Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. */
2548
2617
  response?: Record<string, unknown>;
@@ -3270,7 +3339,7 @@ declare interface GenerationConfig {
3270
3339
  presencePenalty?: number;
3271
3340
  /** 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. */
3272
3341
  responseLogprobs?: boolean;
3273
- /** 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. This is a preview feature. */
3342
+ /** 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. */
3274
3343
  responseMimeType?: string;
3275
3344
  /** 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. */
3276
3345
  responseModalities?: Modality[];
@@ -3677,9 +3746,9 @@ declare interface GroundingChunkRetrievedContext {
3677
3746
  customMetadata?: GroundingChunkCustomMetadata[];
3678
3747
  /** Optional. Name of the `FileSearchStore` containing the document. Example: `fileSearchStores/123`. This field is not supported in Vertex AI. */
3679
3748
  fileSearchStore?: string;
3680
- /** Optional. Page number of the retrieved context. This field is not supported in Vertex AI. */
3749
+ /** Optional. Page number of the retrieved context, if applicable. This field is not supported in Vertex AI. */
3681
3750
  pageNumber?: number;
3682
- /** Optional. Media ID. This field is not supported in Vertex AI. */
3751
+ /** Optional. The media blob resource name for multimodal file search results. Format: fileSearchStores/{file_search_store_id}/media/{blob_id}. This field is not supported in Vertex AI. */
3683
3752
  mediaId?: string;
3684
3753
  }
3685
3754
 
@@ -4288,16 +4357,11 @@ declare enum Language {
4288
4357
  PYTHON = "PYTHON"
4289
4358
  }
4290
4359
 
4291
- /** An object that represents a latitude/longitude pair.
4292
-
4293
- This is expressed as a pair of doubles to represent degrees latitude and
4294
- degrees longitude. Unless specified otherwise, this object must conform to the
4295
- <a href="https://en.wikipedia.org/wiki/World_Geodetic_System#1984_version">
4296
- WGS84 standard</a>. Values must be within normalized ranges. */
4360
+ /** An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. */
4297
4361
  declare interface LatLng {
4298
4362
  /** The latitude in degrees. It must be in the range [-90.0, +90.0]. */
4299
4363
  latitude?: number;
4300
- /** The longitude in degrees. It must be in the range [-180.0, +180.0] */
4364
+ /** The longitude in degrees. It must be in the range [-180.0, +180.0]. */
4301
4365
  longitude?: number;
4302
4366
  }
4303
4367
 
@@ -5197,7 +5261,7 @@ declare enum MaskReferenceMode {
5197
5261
  MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
5198
5262
  }
5199
5263
 
5200
- /** A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 5. This data type is not supported in Vertex AI. */
5264
+ /** A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 6. This data type is not supported in Vertex AI. */
5201
5265
  declare interface McpServer {
5202
5266
  /** The name of the MCPServer. */
5203
5267
  name?: string;
@@ -5525,15 +5589,15 @@ declare enum Outcome {
5525
5589
  */
5526
5590
  OUTCOME_UNSPECIFIED = "OUTCOME_UNSPECIFIED",
5527
5591
  /**
5528
- * Code execution completed successfully.
5592
+ * Code execution completed successfully. `output` contains the stdout, if any.
5529
5593
  */
5530
5594
  OUTCOME_OK = "OUTCOME_OK",
5531
5595
  /**
5532
- * Code execution finished but with a failure. `stderr` should contain the reason.
5596
+ * Code execution failed. `output` contains the stderr and stdout, if any.
5533
5597
  */
5534
5598
  OUTCOME_FAILED = "OUTCOME_FAILED",
5535
5599
  /**
5536
- * Code execution ran for too long, and was cancelled. There may or may not be a partial output present.
5600
+ * Code execution ran for too long, and was cancelled. There may or may not be a partial `output` present.
5537
5601
  */
5538
5602
  OUTCOME_DEADLINE_EXCEEDED = "OUTCOME_DEADLINE_EXCEEDED"
5539
5603
  }
@@ -5834,6 +5898,10 @@ declare interface RagChunk {
5834
5898
  pageSpan?: RagChunkPageSpan;
5835
5899
  /** The content of the chunk. */
5836
5900
  text?: string;
5901
+ /** The ID of the chunk. */
5902
+ chunkId?: string;
5903
+ /** The ID of the file that the chunk belongs to. */
5904
+ fileId?: string;
5837
5905
  }
5838
5906
 
5839
5907
  /** Represents where the chunk starts and ends in the document. This data type is not supported in Gemini API. */
@@ -6049,6 +6117,12 @@ declare class RegisterFilesResponse {
6049
6117
  files?: File_2[];
6050
6118
  }
6051
6119
 
6120
+ /** Reinforcement tuning autorater scorer. */
6121
+ declare interface ReinforcementTuningAutoraterScorer {
6122
+ /** Autorater config for evaluation. */
6123
+ autoraterConfig?: AutoraterConfig;
6124
+ }
6125
+
6052
6126
  /** Represents a recorded session. */
6053
6127
  declare interface ReplayFile {
6054
6128
  replayId?: string;
@@ -6114,10 +6188,9 @@ declare interface Retrieval {
6114
6188
  vertexRagStore?: VertexRagStore;
6115
6189
  }
6116
6190
 
6117
- /** Retrieval config.
6118
- */
6191
+ /** Retrieval config. */
6119
6192
  declare interface RetrievalConfig {
6120
- /** Optional. The location of the user. */
6193
+ /** The location of the user. */
6121
6194
  latLng?: LatLng;
6122
6195
  /** The language code of the user. */
6123
6196
  languageCode?: string;
@@ -6474,6 +6547,11 @@ declare class SingleEmbedContentResponse {
6474
6547
  tokenCount?: string;
6475
6548
  }
6476
6549
 
6550
+ /** Single reinforcement tuning reward config. */
6551
+ declare interface SingleReinforcementTuningRewardConfig {
6552
+ autoraterScorer?: ReinforcementTuningAutoraterScorer;
6553
+ }
6554
+
6477
6555
  /** Context window will be truncated by keeping only suffix of it.
6478
6556
 
6479
6557
  Context window will always be cut at start of USER role turn. System
@@ -6820,19 +6898,17 @@ declare interface ToolCall {
6820
6898
  args?: Record<string, unknown>;
6821
6899
  }
6822
6900
 
6823
- /** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. This data type is not supported in Gemini API. */
6901
+ /** Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. This data type is not supported in Gemini API. */
6824
6902
  declare interface ToolCodeExecution {
6825
6903
  }
6826
6904
 
6827
- /** Tool config.
6828
-
6829
- This config is shared for all tools provided in the request. */
6905
+ /** Tool config. This config is shared for all tools provided in the request. */
6830
6906
  declare interface ToolConfig {
6831
6907
  /** Optional. Retrieval config. */
6832
6908
  retrievalConfig?: RetrievalConfig;
6833
6909
  /** Optional. Function calling config. */
6834
6910
  functionCallingConfig?: FunctionCallingConfig;
6835
- /** If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool invocations. */
6911
+ /** Optional. If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool interactions. This field is not supported in Vertex AI. */
6836
6912
  includeServerSideToolInvocations?: boolean;
6837
6913
  }
6838
6914
 
@@ -7057,10 +7133,11 @@ declare interface TuningJob {
7057
7133
  tuningJobState?: TuningJobState;
7058
7134
  /** Tuning Spec for Veo Tuning. */
7059
7135
  veoTuningSpec?: VeoTuningSpec;
7060
- /** Optional. Spec for creating a distillation dataset. */
7061
- distillationSamplingSpec?: DistillationSamplingSpec;
7062
7136
  /** Output only. Tuning Job metadata. */
7063
7137
  tuningJobMetadata?: TuningJobMetadata;
7138
+ /** Tuning Spec for Veo LoRA Tuning. */
7139
+ veoLoraTuningSpec?: VeoLoraTuningSpec;
7140
+ distillationSamplingSpec?: DistillationSamplingSpec;
7064
7141
  }
7065
7142
 
7066
7143
  /** Tuning job metadata. This data type is not supported in Gemini API. */
@@ -7112,7 +7189,11 @@ declare enum TuningMethod {
7112
7189
  /**
7113
7190
  * Distillation tuning.
7114
7191
  */
7115
- DISTILLATION = "DISTILLATION"
7192
+ DISTILLATION = "DISTILLATION",
7193
+ /**
7194
+ * Reinforcement tuning.
7195
+ */
7196
+ REINFORCEMENT_TUNING = "REINFORCEMENT_TUNING"
7116
7197
  }
7117
7198
 
7118
7199
  /** Tuning mode. This enum is not supported in Gemini API. */
@@ -7145,7 +7226,23 @@ declare interface TuningOperation {
7145
7226
  error?: Record<string, unknown>;
7146
7227
  }
7147
7228
 
7148
- /** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
7229
+ /** The speed of the tuning job. Only supported for Veo 3.0 models. This enum is not supported in Gemini API. */
7230
+ declare enum TuningSpeed {
7231
+ /**
7232
+ * The default / unset value. For Veo 3.0 models, this defaults to FAST.
7233
+ */
7234
+ TUNING_SPEED_UNSPECIFIED = "TUNING_SPEED_UNSPECIFIED",
7235
+ /**
7236
+ * Regular tuning speed.
7237
+ */
7238
+ REGULAR = "REGULAR",
7239
+ /**
7240
+ * Fast tuning speed.
7241
+ */
7242
+ FAST = "FAST"
7243
+ }
7244
+
7245
+ /** The tuning task for Veo. This enum is not supported in Gemini API. */
7149
7246
  declare enum TuningTask {
7150
7247
  /**
7151
7248
  * Default value. This value is unused.
@@ -7357,8 +7454,8 @@ declare namespace types {
7357
7454
  createPartFromExecutableCode,
7358
7455
  createUserContent,
7359
7456
  createModelContent,
7360
- Language,
7361
7457
  Outcome,
7458
+ Language,
7362
7459
  FunctionResponseScheduling,
7363
7460
  Type,
7364
7461
  Environment,
@@ -7368,13 +7465,13 @@ declare namespace types {
7368
7465
  PhishBlockThreshold,
7369
7466
  Behavior,
7370
7467
  DynamicRetrievalConfigMode,
7371
- FunctionCallingConfigMode,
7372
7468
  ThinkingLevel,
7373
7469
  PersonGeneration,
7374
7470
  ProminentPeople,
7375
7471
  HarmCategory,
7376
7472
  HarmBlockMethod,
7377
7473
  HarmBlockThreshold,
7474
+ FunctionCallingConfigMode,
7378
7475
  FinishReason,
7379
7476
  HarmProbability,
7380
7477
  HarmSeverity,
@@ -7390,7 +7487,9 @@ declare namespace types {
7390
7487
  TuningJobState,
7391
7488
  AggregationMetric,
7392
7489
  PairwiseChoice,
7490
+ TuningSpeed,
7393
7491
  TuningTask,
7492
+ VideoOrientation,
7394
7493
  DocumentState,
7395
7494
  PartMediaResolutionLevel,
7396
7495
  ToolType,
@@ -7423,11 +7522,11 @@ declare namespace types {
7423
7522
  Scale,
7424
7523
  MusicGenerationMode,
7425
7524
  LiveMusicPlaybackControl,
7426
- ExecutableCode,
7427
- CodeExecutionResult,
7428
7525
  PartMediaResolution,
7429
7526
  ToolCall,
7430
7527
  ToolResponse,
7528
+ CodeExecutionResult,
7529
+ ExecutableCode,
7431
7530
  FileData,
7432
7531
  PartialArg,
7433
7532
  FunctionCall,
@@ -7483,10 +7582,6 @@ declare namespace types {
7483
7582
  StreamableHttpTransport,
7484
7583
  McpServer,
7485
7584
  Tool,
7486
- LatLng,
7487
- RetrievalConfig,
7488
- FunctionCallingConfig,
7489
- ToolConfig,
7490
7585
  ReplicatedVoiceConfig,
7491
7586
  PrebuiltVoiceConfig,
7492
7587
  VoiceConfig,
@@ -7501,6 +7596,10 @@ declare namespace types {
7501
7596
  GenerationConfigRoutingConfigManualRoutingMode,
7502
7597
  GenerationConfigRoutingConfig,
7503
7598
  SafetySetting,
7599
+ LatLng,
7600
+ RetrievalConfig,
7601
+ FunctionCallingConfig,
7602
+ ToolConfig,
7504
7603
  ModelArmorConfig,
7505
7604
  GenerateContentConfig,
7506
7605
  GenerateContentParameters,
@@ -7615,6 +7714,7 @@ declare namespace types {
7615
7714
  PreferenceOptimizationHyperParameters,
7616
7715
  PreferenceOptimizationSpec,
7617
7716
  DistillationHyperParameters,
7717
+ DistillationSamplingSpec,
7618
7718
  DistillationSpec,
7619
7719
  GoogleRpcStatus,
7620
7720
  PreTunedModel,
@@ -7650,8 +7750,8 @@ declare namespace types {
7650
7750
  FullFineTuningSpec,
7651
7751
  VeoHyperParameters,
7652
7752
  VeoTuningSpec,
7653
- DistillationSamplingSpec,
7654
7753
  TuningJobMetadata,
7754
+ VeoLoraTuningSpec,
7655
7755
  TuningJob,
7656
7756
  ListTuningJobsConfig,
7657
7757
  ListTuningJobsParameters,
@@ -7662,6 +7762,11 @@ declare namespace types {
7662
7762
  TuningExample,
7663
7763
  TuningDataset,
7664
7764
  TuningValidationDataset,
7765
+ AutoraterConfig,
7766
+ ReinforcementTuningAutoraterScorer,
7767
+ SingleReinforcementTuningRewardConfig,
7768
+ CompositeReinforcementTuningRewardConfigWeightedRewardConfig,
7769
+ CompositeReinforcementTuningRewardConfig,
7665
7770
  CreateTuningJobConfig,
7666
7771
  CreateTuningJobParametersPrivate,
7667
7772
  TuningOperation,
@@ -8192,10 +8297,26 @@ declare interface VeoHyperParameters {
8192
8297
  epochCount?: string;
8193
8298
  /** Optional. Multiplier for adjusting the default learning rate. */
8194
8299
  learningRateMultiplier?: number;
8195
- /** Optional. The tuning task. Either I2V or T2V. */
8300
+ /** The tuning task for Veo. */
8196
8301
  tuningTask?: TuningTask;
8197
8302
  /** Optional. The ratio of Google internal dataset to use in the training mixture, in range of `[0, 1)`. If `0.2`, it means 20% of Google internal dataset and 80% of user dataset will be used for training. If not set, the default value is 0.1. */
8198
8303
  veoDataMixtureRatio?: number;
8304
+ /** Optional. The adapter size for LoRA tuning. */
8305
+ adapterSize?: AdapterSize;
8306
+ /** The speed of the tuning job. Only supported for Veo 3.0 models. */
8307
+ tuningSpeed?: TuningSpeed;
8308
+ }
8309
+
8310
+ /** Tuning Spec for Veo LoRA Model Tuning. This data type is not supported in Gemini API. */
8311
+ declare interface VeoLoraTuningSpec {
8312
+ /** Optional. Hyperparameters for Veo LoRA. */
8313
+ hyperParameters?: VeoHyperParameters;
8314
+ /** Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset. */
8315
+ trainingDatasetUri?: string;
8316
+ /** Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset. */
8317
+ validationDatasetUri?: string;
8318
+ /** Optional. The orientation of the video. Defaults to LANDSCAPE. */
8319
+ videoOrientation?: VideoOrientation;
8199
8320
  }
8200
8321
 
8201
8322
  /** Tuning Spec for Veo Model Tuning. This data type is not supported in Gemini API. */
@@ -8360,6 +8481,22 @@ declare interface VideoMetadata {
8360
8481
  startOffset?: string;
8361
8482
  }
8362
8483
 
8484
+ /** The orientation of the video. Defaults to LANDSCAPE. This enum is not supported in Gemini API. */
8485
+ declare enum VideoOrientation {
8486
+ /**
8487
+ * Unspecified video orientation. Defaults to landscape.
8488
+ */
8489
+ VIDEO_ORIENTATION_UNSPECIFIED = "VIDEO_ORIENTATION_UNSPECIFIED",
8490
+ /**
8491
+ * Landscape orientation (e.g. 16:9, 1280x720).
8492
+ */
8493
+ LANDSCAPE = "LANDSCAPE",
8494
+ /**
8495
+ * Portrait orientation (e.g. 9:16, 720x1280).
8496
+ */
8497
+ PORTRAIT = "PORTRAIT"
8498
+ }
8499
+
8363
8500
  /** Voice activity signal. */
8364
8501
  declare interface VoiceActivity {
8365
8502
  /** The type of the voice activity signal. */