@google/genai 1.13.0 → 1.15.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.
@@ -1425,6 +1425,8 @@ export declare interface CreateTuningJobConfig {
1425
1425
  learningRateMultiplier?: number;
1426
1426
  /** If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. */
1427
1427
  exportLastCheckpointOnly?: boolean;
1428
+ /** The optional checkpoint id of the pre-tuned model to use for tuning, if applicable. */
1429
+ preTunedModelCheckpointId?: string;
1428
1430
  /** Adapter size for tuning. */
1429
1431
  adapterSize?: AdapterSize;
1430
1432
  /** The batch size hyperparameter for tuning. If not set, a default of 4 or 16 will be used based on the number of training examples. */
@@ -1435,7 +1437,7 @@ export declare interface CreateTuningJobConfig {
1435
1437
 
1436
1438
  /** Supervised fine-tuning job creation parameters - optional fields. */
1437
1439
  export declare interface CreateTuningJobParameters {
1438
- /** The base model that is being tuned, e.g., "gemini-1.0-pro-002". */
1440
+ /** The base model that is being tuned, e.g., "gemini-2.5-flash". */
1439
1441
  baseModel: string;
1440
1442
  /** Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file. */
1441
1443
  trainingDataset: TuningDataset;
@@ -1443,6 +1445,18 @@ export declare interface CreateTuningJobParameters {
1443
1445
  config?: CreateTuningJobConfig;
1444
1446
  }
1445
1447
 
1448
+ /** Supervised fine-tuning job creation parameters - optional fields. */
1449
+ export declare interface CreateTuningJobParametersPrivate {
1450
+ /** The base model that is being tuned, e.g., "gemini-2.5-flash". */
1451
+ baseModel?: string;
1452
+ /** The PreTunedModel that is being tuned. */
1453
+ preTunedModel?: PreTunedModel;
1454
+ /** Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file. */
1455
+ trainingDataset: TuningDataset;
1456
+ /** Configuration for the tuning job. */
1457
+ config?: CreateTuningJobConfig;
1458
+ }
1459
+
1446
1460
  /**
1447
1461
  * Creates a `Content` object with a user role from a `PartListUnion` object or `string`.
1448
1462
  */
@@ -1612,34 +1626,6 @@ export declare interface DistillationDataStats {
1612
1626
  trainingDatasetStats?: DatasetStats;
1613
1627
  }
1614
1628
 
1615
- /** Hyperparameters for Distillation. */
1616
- export declare interface DistillationHyperParameters {
1617
- /** Optional. Adapter size for distillation. */
1618
- adapterSize?: AdapterSize;
1619
- /** Optional. Number of complete passes the model makes over the entire training dataset during training. */
1620
- epochCount?: string;
1621
- /** Optional. Multiplier for adjusting the default learning rate. */
1622
- learningRateMultiplier?: number;
1623
- }
1624
-
1625
- /** Tuning Spec for Distillation. */
1626
- export declare interface DistillationSpec {
1627
- /** 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). */
1628
- baseTeacherModel?: string;
1629
- /** Optional. Hyperparameters for Distillation. */
1630
- hyperParameters?: DistillationHyperParameters;
1631
- /** Deprecated. A path in a Cloud Storage bucket, which will be treated as the root output directory of the distillation pipeline. It is used by the system to generate the paths of output artifacts. */
1632
- pipelineRootDirectory?: string;
1633
- /** The student model that is being tuned, e.g., "google/gemma-2b-1.1-it". Deprecated. Use base_model instead. */
1634
- studentModel?: string;
1635
- /** Deprecated. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file. */
1636
- trainingDatasetUri?: string;
1637
- /** The resource name of the Tuned teacher model. Format: `projects/{project}/locations/{location}/models/{model}`. */
1638
- tunedTeacherModelSource?: string;
1639
- /** Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. */
1640
- validationDatasetUri?: string;
1641
- }
1642
-
1643
1629
  export declare type DownloadableFileUnion = string | File_2 | GeneratedVideo | Video;
1644
1630
 
1645
1631
  declare interface Downloader {
@@ -1895,9 +1881,19 @@ export declare enum EndSensitivity {
1895
1881
 
1896
1882
  /** Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. */
1897
1883
  export declare interface EnterpriseWebSearch {
1884
+ /** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. */
1885
+ excludeDomains?: string[];
1886
+ }
1887
+
1888
+ /** An entity representing the segmented area. */
1889
+ export declare interface EntityLabel {
1890
+ /** The label of the segmented entity. */
1891
+ label?: string;
1892
+ /** The confidence score of the detected label. */
1893
+ score?: number;
1898
1894
  }
1899
1895
 
1900
- /** Required. The environment being operated. */
1896
+ /** The environment being operated. */
1901
1897
  export declare enum Environment {
1902
1898
  /**
1903
1899
  * Defaults to browser.
@@ -2331,6 +2327,22 @@ export declare enum FunctionResponseScheduling {
2331
2327
  INTERRUPT = "INTERRUPT"
2332
2328
  }
2333
2329
 
2330
+ /** Input example for preference optimization. */
2331
+ export declare interface GeminiPreferenceExample {
2332
+ /** List of completions for a given prompt. */
2333
+ completions?: GeminiPreferenceExampleCompletion[];
2334
+ /** Multi-turn contents that represents the Prompt. */
2335
+ contents?: Content[];
2336
+ }
2337
+
2338
+ /** Completion and its preference score. */
2339
+ export declare interface GeminiPreferenceExampleCompletion {
2340
+ /** Single turn completion for the given prompt. */
2341
+ completion?: Content;
2342
+ /** The score for the given completion. */
2343
+ score?: number;
2344
+ }
2345
+
2334
2346
  /** Optional model configuration parameters.
2335
2347
 
2336
2348
  For more information, see `Content generation parameters
@@ -2698,6 +2710,14 @@ export declare interface GeneratedImage {
2698
2710
  enhancedPrompt?: string;
2699
2711
  }
2700
2712
 
2713
+ /** A generated image mask. */
2714
+ export declare interface GeneratedImageMask {
2715
+ /** The generated image mask. */
2716
+ mask?: Image_2;
2717
+ /** The detected entities on the segmented area. */
2718
+ labels?: EntityLabel[];
2719
+ }
2720
+
2701
2721
  /** A generated video. */
2702
2722
  export declare interface GeneratedVideo {
2703
2723
  /** The output video */
@@ -2836,6 +2856,12 @@ export declare interface GenerateVideosConfig {
2836
2856
  generateAudio?: boolean;
2837
2857
  /** Image to use as the last frame of generated videos. Only supported for image to video use cases. */
2838
2858
  lastFrame?: Image_2;
2859
+ /** The images to use as the references to generate the videos.
2860
+ If this field is provided, the text prompt field must also be provided.
2861
+ The image, video, or last_frame field are not supported. Each image must
2862
+ be associated with a type. Veo 2 supports up to 3 asset images *or* 1
2863
+ style image. */
2864
+ referenceImages?: VideoGenerationReferenceImage[];
2839
2865
  /** Compression quality of the generated videos. */
2840
2866
  compressionQuality?: VideoCompressionQuality;
2841
2867
  }
@@ -2960,7 +2986,7 @@ export declare interface GenerationConfigRoutingConfigManualRoutingMode {
2960
2986
  export declare interface GenerationConfigThinkingConfig {
2961
2987
  /** Optional. Indicates whether to include thoughts in the response. If true, thoughts are returned only when available. */
2962
2988
  includeThoughts?: boolean;
2963
- /** Optional. Indicates the thinking budget in tokens. This is only applied when enable_thinking is true. */
2989
+ /** Optional. Indicates the thinking budget in tokens. */
2964
2990
  thinkingBudget?: number;
2965
2991
  }
2966
2992
 
@@ -3236,6 +3262,9 @@ export declare interface GoogleSearch {
3236
3262
  If customers set a start time, they must set an end time (and vice versa).
3237
3263
  */
3238
3264
  timeRangeFilter?: Interval;
3265
+ /** Optional. List of domains to be excluded from the search results.
3266
+ The default limit is 2000 domains. */
3267
+ excludeDomains?: string[];
3239
3268
  }
3240
3269
 
3241
3270
  /** Tool to retrieve public web data for grounding, powered by Google. */
@@ -3256,14 +3285,64 @@ export declare interface GoogleTypeDate {
3256
3285
 
3257
3286
  /** Grounding chunk. */
3258
3287
  export declare interface GroundingChunk {
3288
+ /** Grounding chunk from Google Maps. */
3289
+ maps?: GroundingChunkMaps;
3259
3290
  /** Grounding chunk from context retrieved by the retrieval tools. */
3260
3291
  retrievedContext?: GroundingChunkRetrievedContext;
3261
3292
  /** Grounding chunk from the web. */
3262
3293
  web?: GroundingChunkWeb;
3263
3294
  }
3264
3295
 
3296
+ /** Chunk from Google Maps. */
3297
+ export declare interface GroundingChunkMaps {
3298
+ /** Sources used to generate the place answer. This includes review snippets and photos that were used to generate the answer, as well as uris to flag content. */
3299
+ placeAnswerSources?: GroundingChunkMapsPlaceAnswerSources;
3300
+ /** This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place. */
3301
+ placeId?: string;
3302
+ /** Text of the chunk. */
3303
+ text?: string;
3304
+ /** Title of the chunk. */
3305
+ title?: string;
3306
+ /** URI reference of the chunk. */
3307
+ uri?: string;
3308
+ }
3309
+
3310
+ /** Sources used to generate the place answer. */
3311
+ export declare interface GroundingChunkMapsPlaceAnswerSources {
3312
+ /** A link where users can flag a problem with the generated answer. */
3313
+ flagContentUri?: string;
3314
+ /** Snippets of reviews that are used to generate the answer. */
3315
+ reviewSnippets?: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet[];
3316
+ }
3317
+
3318
+ /** Author attribution for a photo or review. */
3319
+ export declare interface GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution {
3320
+ /** Name of the author of the Photo or Review. */
3321
+ displayName?: string;
3322
+ /** Profile photo URI of the author of the Photo or Review. */
3323
+ photoUri?: string;
3324
+ /** URI of the author of the Photo or Review. */
3325
+ uri?: string;
3326
+ }
3327
+
3328
+ /** Encapsulates a review snippet. */
3329
+ export declare interface GroundingChunkMapsPlaceAnswerSourcesReviewSnippet {
3330
+ /** This review's author. */
3331
+ authorAttribution?: GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution;
3332
+ /** A link where users can flag a problem with the review. */
3333
+ flagContentUri?: string;
3334
+ /** A link to show the review on Google Maps. */
3335
+ googleMapsUri?: string;
3336
+ /** A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country. */
3337
+ relativePublishTimeDescription?: string;
3338
+ /** A reference representing this place review which may be used to look up this place review again. */
3339
+ review?: string;
3340
+ }
3341
+
3265
3342
  /** Chunk from context retrieved by the retrieval tools. */
3266
3343
  export declare interface GroundingChunkRetrievedContext {
3344
+ /** Output only. The full document name for the referenced Vertex AI Search document. */
3345
+ documentName?: string;
3267
3346
  /** Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool. */
3268
3347
  ragChunk?: RagChunk;
3269
3348
  /** Text of the attribution. */
@@ -3286,6 +3365,8 @@ export declare interface GroundingChunkWeb {
3286
3365
 
3287
3366
  /** Metadata returned to client when grounding is enabled. */
3288
3367
  export declare interface GroundingMetadata {
3368
+ /** Optional. Output only. Resource name of the Google Maps widget context token to be used with the PlacesContextElement widget to render contextual data. This is populated only for Google Maps grounding. */
3369
+ googleMapsWidgetContextToken?: string;
3289
3370
  /** List of supporting references retrieved from specified grounding source. */
3290
3371
  groundingChunks?: GroundingChunk[];
3291
3372
  /** Optional. List of grounding support. */
@@ -5080,6 +5161,27 @@ export declare class Models extends BaseModule {
5080
5161
  * ```
5081
5162
  */
5082
5163
  recontextImage(params: types.RecontextImageParameters): Promise<types.RecontextImageResponse>;
5164
+ /**
5165
+ * Segments an image, creating a mask of a specified area.
5166
+ *
5167
+ * @param params - The parameters for segmenting an image.
5168
+ * @return The response from the API.
5169
+ *
5170
+ * @example
5171
+ * ```ts
5172
+ * const response = await ai.models.segmentImage({
5173
+ * model: 'image-segmentation-001',
5174
+ * source: {
5175
+ * image: image,
5176
+ * },
5177
+ * config: {
5178
+ * mode: 'foreground',
5179
+ * },
5180
+ * });
5181
+ * console.log(response?.generatedMasks?.[0]?.mask?.imageBytes);
5182
+ * ```
5183
+ */
5184
+ segmentImage(params: types.SegmentImageParameters): Promise<types.SegmentImageResponse>;
5083
5185
  /**
5084
5186
  * Fetches information about a model by name.
5085
5187
  *
@@ -5484,6 +5586,36 @@ export declare interface PrebuiltVoiceConfig {
5484
5586
  voiceName?: string;
5485
5587
  }
5486
5588
 
5589
+ /** Statistics computed for datasets used for preference optimization. */
5590
+ export declare interface PreferenceOptimizationDataStats {
5591
+ /** Output only. Dataset distributions for scores variance per example. */
5592
+ scoreVariancePerExampleDistribution?: DatasetDistribution;
5593
+ /** Output only. Dataset distributions for scores. */
5594
+ scoresDistribution?: DatasetDistribution;
5595
+ /** Output only. Number of billable tokens in the tuning dataset. */
5596
+ totalBillableTokenCount?: string;
5597
+ /** Output only. Number of examples in the tuning dataset. */
5598
+ tuningDatasetExampleCount?: string;
5599
+ /** Output only. Number of tuning steps for this Tuning Job. */
5600
+ tuningStepCount?: string;
5601
+ /** Output only. Sample user examples in the training dataset. */
5602
+ userDatasetExamples?: GeminiPreferenceExample[];
5603
+ /** Output only. Dataset distributions for the user input tokens. */
5604
+ userInputTokenDistribution?: DatasetDistribution;
5605
+ /** Output only. Dataset distributions for the user output tokens. */
5606
+ userOutputTokenDistribution?: DatasetDistribution;
5607
+ }
5608
+
5609
+ /** A pre-tuned model for continuous tuning. */
5610
+ export declare interface PreTunedModel {
5611
+ /** Output only. The name of the base model this PreTunedModel was tuned from. */
5612
+ baseModel?: string;
5613
+ /** Optional. The source checkpoint id. If not specified, the default checkpoint will be used. */
5614
+ checkpointId?: string;
5615
+ /** The resource name of the Model. E.g., a model resource name with a specified version id or alias: `projects/{project}/locations/{location}/models/{model}@{version_id}` `projects/{project}/locations/{location}/models/{model}@{alias}` Or, omit the version id to use the default version: `projects/{project}/locations/{location}/models/{model}` */
5616
+ tunedModelName?: string;
5617
+ }
5618
+
5487
5619
  /** Config for proactivity features. */
5488
5620
  export declare interface ProactivityConfig {
5489
5621
  /** If enabled, the model can reject responding to the last prompt. For
@@ -5892,6 +6024,12 @@ export declare interface Schema {
5892
6024
 
5893
6025
  export declare type SchemaUnion = Schema | unknown;
5894
6026
 
6027
+ /** An image mask representing a brush scribble. */
6028
+ export declare interface ScribbleImage {
6029
+ /** The brush scribble to guide segmentation. Valid for the interactive mode. */
6030
+ image?: Image_2;
6031
+ }
6032
+
5895
6033
  /** Google search entry point. */
5896
6034
  export declare interface SearchEntryPoint {
5897
6035
  /** Optional. Web content snippet that can be embedded in a web page or an app webview. */
@@ -5913,6 +6051,75 @@ export declare interface Segment {
5913
6051
  text?: string;
5914
6052
  }
5915
6053
 
6054
+ /** Configuration for segmenting an image. */
6055
+ export declare interface SegmentImageConfig {
6056
+ /** Used to override HTTP request options. */
6057
+ httpOptions?: HttpOptions;
6058
+ /** Abort signal which can be used to cancel the request.
6059
+
6060
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
6061
+ operation will not cancel the request in the service. You will still
6062
+ be charged usage for any applicable operations.
6063
+ */
6064
+ abortSignal?: AbortSignal;
6065
+ /** The segmentation mode to use. */
6066
+ mode?: SegmentMode;
6067
+ /** The maximum number of predictions to return up to, by top
6068
+ confidence score. */
6069
+ maxPredictions?: number;
6070
+ /** The confidence score threshold for the detections as a decimal
6071
+ value. Only predictions with a confidence score higher than this
6072
+ threshold will be returned. */
6073
+ confidenceThreshold?: number;
6074
+ /** A decimal value representing how much dilation to apply to the
6075
+ masks. 0 for no dilation. 1.0 means the masked area covers the whole
6076
+ image. */
6077
+ maskDilation?: number;
6078
+ /** The binary color threshold to apply to the masks. The threshold
6079
+ can be set to a decimal value between 0 and 255 non-inclusive.
6080
+ Set to -1 for no binary color thresholding. */
6081
+ binaryColorThreshold?: number;
6082
+ }
6083
+
6084
+ /** The parameters for segmenting an image. */
6085
+ export declare interface SegmentImageParameters {
6086
+ /** ID of the model to use. For a list of models, see `Google models
6087
+ <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_. */
6088
+ model: string;
6089
+ /** A set of source input(s) for image segmentation. */
6090
+ source: SegmentImageSource;
6091
+ /** Configuration for image segmentation. */
6092
+ config?: SegmentImageConfig;
6093
+ }
6094
+
6095
+ /** The output images response. */
6096
+ export declare class SegmentImageResponse {
6097
+ /** List of generated image masks.
6098
+ */
6099
+ generatedMasks?: GeneratedImageMask[];
6100
+ }
6101
+
6102
+ /** A set of source input(s) for image segmentation. */
6103
+ export declare interface SegmentImageSource {
6104
+ /** A text prompt for guiding the model during image segmentation.
6105
+ Required for prompt mode and semantic mode, disallowed for other modes. */
6106
+ prompt?: string;
6107
+ /** The image to be segmented. */
6108
+ image?: Image_2;
6109
+ /** The brush scribble to guide segmentation.
6110
+ Required for the interactive mode, disallowed for other modes. */
6111
+ scribbleImage?: ScribbleImage;
6112
+ }
6113
+
6114
+ /** Enum that represents the segmentation mode. */
6115
+ export declare enum SegmentMode {
6116
+ FOREGROUND = "FOREGROUND",
6117
+ BACKGROUND = "BACKGROUND",
6118
+ PROMPT = "PROMPT",
6119
+ SEMANTIC = "SEMANTIC",
6120
+ INTERACTIVE = "INTERACTIVE"
6121
+ }
6122
+
5916
6123
  /** Parameters for sending a message within a chat session.
5917
6124
 
5918
6125
  These parameters are used with the `chat.sendMessage()` method.
@@ -6216,9 +6423,13 @@ export declare enum SubjectReferenceType {
6216
6423
  export declare interface SupervisedHyperParameters {
6217
6424
  /** Optional. Adapter size for tuning. */
6218
6425
  adapterSize?: AdapterSize;
6426
+ /** Optional. Batch size for tuning. This feature is only available for open source models. */
6427
+ batchSize?: string;
6219
6428
  /** Optional. Number of complete passes the model makes over the entire training dataset during training. */
6220
6429
  epochCount?: string;
6221
- /** Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. */
6430
+ /** Optional. Learning rate for tuning. Mutually exclusive with `learning_rate_multiplier`. This feature is only available for open source models. */
6431
+ learningRate?: number;
6432
+ /** Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. This feature is only available for 1P models. */
6222
6433
  learningRateMultiplier?: number;
6223
6434
  }
6224
6435
 
@@ -6290,6 +6501,8 @@ export declare interface SupervisedTuningSpec {
6290
6501
  hyperParameters?: SupervisedHyperParameters;
6291
6502
  /** 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. */
6292
6503
  trainingDatasetUri?: string;
6504
+ /** Tuning mode. */
6505
+ tuningMode?: TuningMode;
6293
6506
  /** 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. */
6294
6507
  validationDatasetUri?: string;
6295
6508
  }
@@ -6449,10 +6662,12 @@ export declare interface Tool {
6449
6662
  googleMaps?: GoogleMaps;
6450
6663
  /** Optional. Tool to support URL context retrieval. */
6451
6664
  urlContext?: UrlContext;
6665
+ /** Optional. Tool to support the model interacting directly with the
6666
+ computer. If enabled, it automatically populates computer-use specific
6667
+ Function Declarations. */
6668
+ computerUse?: ToolComputerUse;
6452
6669
  /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
6453
6670
  codeExecution?: ToolCodeExecution;
6454
- /** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
6455
- computerUse?: ToolComputerUse;
6456
6671
  }
6457
6672
 
6458
6673
  /** 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. */
@@ -6507,7 +6722,7 @@ export declare interface Transcription {
6507
6722
  }
6508
6723
 
6509
6724
  export declare interface TunedModel {
6510
- /** Output only. The resource name of the TunedModel. Format: `projects/{project}/locations/{location}/models/{model}`. */
6725
+ /** Output only. The resource name of the TunedModel. Format: `projects/{project}/locations/{location}/models/{model}@{version_id}` When tuning from a base model, the version_id will be 1. For continuous tuning, the version id will be incremented by 1 from the last version id in the parent model. E.g., `projects/{project}/locations/{location}/models/{model}@{last_version_id + 1}` */
6511
6726
  model?: string;
6512
6727
  /** Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. */
6513
6728
  endpoint?: string;
@@ -6558,6 +6773,8 @@ export declare interface TuningDataset {
6558
6773
  export declare interface TuningDataStats {
6559
6774
  /** Output only. Statistics for distillation. */
6560
6775
  distillationDataStats?: DistillationDataStats;
6776
+ /** Output only. Statistics for preference optimization. */
6777
+ preferenceOptimizationDataStats?: PreferenceOptimizationDataStats;
6561
6778
  /** The SFT Tuning data stats. */
6562
6779
  supervisedTuningDataStats?: SupervisedTuningDataStats;
6563
6780
  }
@@ -6593,6 +6810,8 @@ export declare interface TuningJob {
6593
6810
  baseModel?: string;
6594
6811
  /** Output only. The tuned model resources associated with this TuningJob. */
6595
6812
  tunedModel?: TunedModel;
6813
+ /** The pre-tuned model for continuous tuning. */
6814
+ preTunedModel?: PreTunedModel;
6596
6815
  /** Tuning Spec for Supervised Fine Tuning. */
6597
6816
  supervisedTuningSpec?: SupervisedTuningSpec;
6598
6817
  /** Output only. The tuning data statistics associated with this TuningJob. */
@@ -6601,24 +6820,38 @@ export declare interface TuningJob {
6601
6820
  encryptionSpec?: EncryptionSpec;
6602
6821
  /** Tuning Spec for open sourced and third party Partner models. */
6603
6822
  partnerModelTuningSpec?: PartnerModelTuningSpec;
6604
- /** Tuning Spec for Distillation. */
6605
- distillationSpec?: DistillationSpec;
6823
+ /** Optional. The user-provided path to custom model weights. Set this field to tune a custom model. The path must be a Cloud Storage directory that contains the model weights in .safetensors format along with associated model metadata files. If this field is set, the base_model field must still be set to indicate which base model the custom model is derived from. This feature is only available for open source models. */
6824
+ customBaseModel?: string;
6606
6825
  /** Output only. The Experiment associated with this TuningJob. */
6607
6826
  experiment?: string;
6608
6827
  /** Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. */
6609
6828
  labels?: Record<string, string>;
6829
+ /** Optional. Cloud Storage path to the directory where tuning job outputs are written to. This field is only available and required for open source models. */
6830
+ outputUri?: string;
6610
6831
  /** Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. */
6611
6832
  pipelineJob?: string;
6612
- /** Output only. Reserved for future use. */
6613
- satisfiesPzi?: boolean;
6614
- /** Output only. Reserved for future use. */
6615
- satisfiesPzs?: boolean;
6616
6833
  /** The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent Users starting the pipeline must have the `iam.serviceAccounts.actAs` permission on this service account. */
6617
6834
  serviceAccount?: string;
6618
6835
  /** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
6619
6836
  tunedModelDisplayName?: string;
6620
6837
  }
6621
6838
 
6839
+ /** Tuning mode. */
6840
+ export declare enum TuningMode {
6841
+ /**
6842
+ * Tuning mode is unspecified.
6843
+ */
6844
+ TUNING_MODE_UNSPECIFIED = "TUNING_MODE_UNSPECIFIED",
6845
+ /**
6846
+ * Full fine-tuning mode.
6847
+ */
6848
+ TUNING_MODE_FULL = "TUNING_MODE_FULL",
6849
+ /**
6850
+ * PEFT adapter tuning mode.
6851
+ */
6852
+ TUNING_MODE_PEFT_ADAPTER = "TUNING_MODE_PEFT_ADAPTER"
6853
+ }
6854
+
6622
6855
  /** A long-running operation. */
6623
6856
  export declare interface TuningOperation {
6624
6857
  /** Used to retain the full HTTP response. */
@@ -6751,7 +6984,6 @@ declare namespace types {
6751
6984
  Mode,
6752
6985
  AuthType,
6753
6986
  ApiSpec,
6754
- Environment,
6755
6987
  UrlRetrievalStatus,
6756
6988
  FinishReason,
6757
6989
  HarmProbability,
@@ -6761,10 +6993,12 @@ declare namespace types {
6761
6993
  Modality,
6762
6994
  MediaResolution,
6763
6995
  JobState,
6996
+ TuningMode,
6764
6997
  AdapterSize,
6765
6998
  FeatureSelectionPreference,
6766
6999
  Behavior,
6767
7000
  DynamicRetrievalConfigMode,
7001
+ Environment,
6768
7002
  FunctionCallingConfigMode,
6769
7003
  SafetyFilterLevel,
6770
7004
  PersonGeneration,
@@ -6773,6 +7007,7 @@ declare namespace types {
6773
7007
  ControlReferenceType,
6774
7008
  SubjectReferenceType,
6775
7009
  EditMode,
7010
+ SegmentMode,
6776
7011
  VideoCompressionQuality,
6777
7012
  FileState,
6778
7013
  FileSource,
@@ -6812,6 +7047,7 @@ declare namespace types {
6812
7047
  AuthConfig,
6813
7048
  GoogleMaps,
6814
7049
  UrlContext,
7050
+ ToolComputerUse,
6815
7051
  ApiAuthApiKeyConfig,
6816
7052
  ApiAuth,
6817
7053
  ExternalApiElasticSearchParams,
@@ -6829,7 +7065,6 @@ declare namespace types {
6829
7065
  VertexRagStore,
6830
7066
  Retrieval,
6831
7067
  ToolCodeExecution,
6832
- ToolComputerUse,
6833
7068
  Tool,
6834
7069
  FunctionCallingConfig,
6835
7070
  LatLng,
@@ -6854,6 +7089,10 @@ declare namespace types {
6854
7089
  CitationMetadata,
6855
7090
  UrlMetadata,
6856
7091
  UrlContextMetadata,
7092
+ GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
7093
+ GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
7094
+ GroundingChunkMapsPlaceAnswerSources,
7095
+ GroundingChunkMaps,
6857
7096
  RagChunkPageSpan,
6858
7097
  RagChunk,
6859
7098
  GroundingChunkRetrievedContext,
@@ -6899,6 +7138,13 @@ declare namespace types {
6899
7138
  RecontextImageConfig,
6900
7139
  RecontextImageParameters,
6901
7140
  RecontextImageResponse,
7141
+ ScribbleImage,
7142
+ SegmentImageSource,
7143
+ SegmentImageConfig,
7144
+ SegmentImageParameters,
7145
+ EntityLabel,
7146
+ GeneratedImageMask,
7147
+ SegmentImageResponse,
6902
7148
  GetModelConfig,
6903
7149
  GetModelParameters,
6904
7150
  Endpoint,
@@ -6923,6 +7169,7 @@ declare namespace types {
6923
7169
  TokensInfo,
6924
7170
  ComputeTokensResponse,
6925
7171
  Video,
7172
+ VideoGenerationReferenceImage,
6926
7173
  GenerateVideosConfig,
6927
7174
  GenerateVideosParameters,
6928
7175
  GeneratedVideo,
@@ -6932,20 +7179,22 @@ declare namespace types {
6932
7179
  TunedModelCheckpoint,
6933
7180
  TunedModel,
6934
7181
  GoogleRpcStatus,
7182
+ PreTunedModel,
6935
7183
  SupervisedHyperParameters,
6936
7184
  SupervisedTuningSpec,
6937
7185
  DatasetDistributionDistributionBucket,
6938
7186
  DatasetDistribution,
6939
7187
  DatasetStats,
6940
7188
  DistillationDataStats,
7189
+ GeminiPreferenceExampleCompletion,
7190
+ GeminiPreferenceExample,
7191
+ PreferenceOptimizationDataStats,
6941
7192
  SupervisedTuningDatasetDistributionDatasetBucket,
6942
7193
  SupervisedTuningDatasetDistribution,
6943
7194
  SupervisedTuningDataStats,
6944
7195
  TuningDataStats,
6945
7196
  EncryptionSpec,
6946
7197
  PartnerModelTuningSpec,
6947
- DistillationHyperParameters,
6948
- DistillationSpec,
6949
7198
  TuningJob,
6950
7199
  ListTuningJobsConfig,
6951
7200
  ListTuningJobsParameters,
@@ -6954,7 +7203,7 @@ declare namespace types {
6954
7203
  TuningDataset,
6955
7204
  TuningValidationDataset,
6956
7205
  CreateTuningJobConfig,
6957
- CreateTuningJobParameters,
7206
+ CreateTuningJobParametersPrivate,
6958
7207
  TuningOperation,
6959
7208
  CreateCachedContentConfig,
6960
7209
  CreateCachedContentParameters,
@@ -7046,8 +7295,8 @@ declare namespace types {
7046
7295
  ActivityStart,
7047
7296
  ActivityEnd,
7048
7297
  LiveClientRealtimeInput,
7049
- LiveSendRealtimeInputParameters,
7050
7298
  LiveClientToolResponse,
7299
+ LiveSendRealtimeInputParameters,
7051
7300
  LiveClientMessage,
7052
7301
  LiveConnectConfig,
7053
7302
  LiveConnectParameters,
@@ -7077,6 +7326,7 @@ declare namespace types {
7077
7326
  LiveConnectConstraints,
7078
7327
  CreateAuthTokenConfig,
7079
7328
  CreateAuthTokenParameters,
7329
+ CreateTuningJobParameters,
7080
7330
  BlobImageUnion,
7081
7331
  PartUnion,
7082
7332
  PartListUnion,
@@ -7384,6 +7634,17 @@ export declare enum VideoCompressionQuality {
7384
7634
  LOSSLESS = "LOSSLESS"
7385
7635
  }
7386
7636
 
7637
+ /** A reference image for video generation. */
7638
+ export declare interface VideoGenerationReferenceImage {
7639
+ /** The reference image.
7640
+ */
7641
+ image?: Image_2;
7642
+ /** The type of the reference image, which defines how the reference
7643
+ image will be used to generate the video. Supported values are 'asset'
7644
+ or 'style'. */
7645
+ referenceType?: string;
7646
+ }
7647
+
7387
7648
  /** Describes how the video in the Part should be used by the model. */
7388
7649
  export declare interface VideoMetadata {
7389
7650
  /** The frame rate of the video sent to the model. If not specified, the