@google/genai 1.12.0 → 1.14.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
  */
@@ -1599,6 +1613,8 @@ export declare class DeleteModelResponse {
1599
1613
 
1600
1614
  /** The return value of delete operation. */
1601
1615
  export declare interface DeleteResourceJob {
1616
+ /** Used to retain the full HTTP response. */
1617
+ sdkHttpResponse?: HttpResponse;
1602
1618
  name?: string;
1603
1619
  done?: boolean;
1604
1620
  error?: JobError;
@@ -1610,34 +1626,6 @@ export declare interface DistillationDataStats {
1610
1626
  trainingDatasetStats?: DatasetStats;
1611
1627
  }
1612
1628
 
1613
- /** Hyperparameters for Distillation. */
1614
- export declare interface DistillationHyperParameters {
1615
- /** Optional. Adapter size for distillation. */
1616
- adapterSize?: AdapterSize;
1617
- /** Optional. Number of complete passes the model makes over the entire training dataset during training. */
1618
- epochCount?: string;
1619
- /** Optional. Multiplier for adjusting the default learning rate. */
1620
- learningRateMultiplier?: number;
1621
- }
1622
-
1623
- /** Tuning Spec for Distillation. */
1624
- export declare interface DistillationSpec {
1625
- /** 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). */
1626
- baseTeacherModel?: string;
1627
- /** Optional. Hyperparameters for Distillation. */
1628
- hyperParameters?: DistillationHyperParameters;
1629
- /** 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. */
1630
- pipelineRootDirectory?: string;
1631
- /** The student model that is being tuned, e.g., "google/gemma-2b-1.1-it". Deprecated. Use base_model instead. */
1632
- studentModel?: string;
1633
- /** Deprecated. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file. */
1634
- trainingDatasetUri?: string;
1635
- /** The resource name of the Tuned teacher model. Format: `projects/{project}/locations/{location}/models/{model}`. */
1636
- tunedTeacherModelSource?: string;
1637
- /** Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. */
1638
- validationDatasetUri?: string;
1639
- }
1640
-
1641
1629
  export declare type DownloadableFileUnion = string | File_2 | GeneratedVideo | Video;
1642
1630
 
1643
1631
  declare interface Downloader {
@@ -1893,9 +1881,11 @@ export declare enum EndSensitivity {
1893
1881
 
1894
1882
  /** Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. */
1895
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[];
1896
1886
  }
1897
1887
 
1898
- /** Required. The environment being operated. */
1888
+ /** The environment being operated. */
1899
1889
  export declare enum Environment {
1900
1890
  /**
1901
1891
  * Defaults to browser.
@@ -2329,6 +2319,22 @@ export declare enum FunctionResponseScheduling {
2329
2319
  INTERRUPT = "INTERRUPT"
2330
2320
  }
2331
2321
 
2322
+ /** Input example for preference optimization. */
2323
+ export declare interface GeminiPreferenceExample {
2324
+ /** List of completions for a given prompt. */
2325
+ completions?: GeminiPreferenceExampleCompletion[];
2326
+ /** Multi-turn contents that represents the Prompt. */
2327
+ contents?: Content[];
2328
+ }
2329
+
2330
+ /** Completion and its preference score. */
2331
+ export declare interface GeminiPreferenceExampleCompletion {
2332
+ /** Single turn completion for the given prompt. */
2333
+ completion?: Content;
2334
+ /** The score for the given completion. */
2335
+ score?: number;
2336
+ }
2337
+
2332
2338
  /** Optional model configuration parameters.
2333
2339
 
2334
2340
  For more information, see `Content generation parameters
@@ -2501,9 +2507,6 @@ export declare class GenerateContentResponse {
2501
2507
  /** Timestamp when the request is made to the server.
2502
2508
  */
2503
2509
  createTime?: string;
2504
- /** Identifier for each response.
2505
- */
2506
- responseId?: string;
2507
2510
  /** The history of automatic function calling.
2508
2511
  */
2509
2512
  automaticFunctionCallingHistory?: Content[];
@@ -2511,6 +2514,8 @@ export declare class GenerateContentResponse {
2511
2514
  modelVersion?: string;
2512
2515
  /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */
2513
2516
  promptFeedback?: GenerateContentResponsePromptFeedback;
2517
+ /** Output only. response_id is used to identify each response. It is the encoding of the event_id. */
2518
+ responseId?: string;
2514
2519
  /** Usage metadata about the response(s). */
2515
2520
  usageMetadata?: GenerateContentResponseUsageMetadata;
2516
2521
  /**
@@ -2959,7 +2964,7 @@ export declare interface GenerationConfigRoutingConfigManualRoutingMode {
2959
2964
  export declare interface GenerationConfigThinkingConfig {
2960
2965
  /** Optional. Indicates whether to include thoughts in the response. If true, thoughts are returned only when available. */
2961
2966
  includeThoughts?: boolean;
2962
- /** Optional. Indicates the thinking budget in tokens. This is only applied when enable_thinking is true. */
2967
+ /** Optional. Indicates the thinking budget in tokens. */
2963
2968
  thinkingBudget?: number;
2964
2969
  }
2965
2970
 
@@ -3235,6 +3240,9 @@ export declare interface GoogleSearch {
3235
3240
  If customers set a start time, they must set an end time (and vice versa).
3236
3241
  */
3237
3242
  timeRangeFilter?: Interval;
3243
+ /** Optional. List of domains to be excluded from the search results.
3244
+ The default limit is 2000 domains. */
3245
+ excludeDomains?: string[];
3238
3246
  }
3239
3247
 
3240
3248
  /** Tool to retrieve public web data for grounding, powered by Google. */
@@ -3255,14 +3263,64 @@ export declare interface GoogleTypeDate {
3255
3263
 
3256
3264
  /** Grounding chunk. */
3257
3265
  export declare interface GroundingChunk {
3266
+ /** Grounding chunk from Google Maps. */
3267
+ maps?: GroundingChunkMaps;
3258
3268
  /** Grounding chunk from context retrieved by the retrieval tools. */
3259
3269
  retrievedContext?: GroundingChunkRetrievedContext;
3260
3270
  /** Grounding chunk from the web. */
3261
3271
  web?: GroundingChunkWeb;
3262
3272
  }
3263
3273
 
3274
+ /** Chunk from Google Maps. */
3275
+ export declare interface GroundingChunkMaps {
3276
+ /** 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. */
3277
+ placeAnswerSources?: GroundingChunkMapsPlaceAnswerSources;
3278
+ /** This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place. */
3279
+ placeId?: string;
3280
+ /** Text of the chunk. */
3281
+ text?: string;
3282
+ /** Title of the chunk. */
3283
+ title?: string;
3284
+ /** URI reference of the chunk. */
3285
+ uri?: string;
3286
+ }
3287
+
3288
+ /** Sources used to generate the place answer. */
3289
+ export declare interface GroundingChunkMapsPlaceAnswerSources {
3290
+ /** A link where users can flag a problem with the generated answer. */
3291
+ flagContentUri?: string;
3292
+ /** Snippets of reviews that are used to generate the answer. */
3293
+ reviewSnippets?: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet[];
3294
+ }
3295
+
3296
+ /** Author attribution for a photo or review. */
3297
+ export declare interface GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution {
3298
+ /** Name of the author of the Photo or Review. */
3299
+ displayName?: string;
3300
+ /** Profile photo URI of the author of the Photo or Review. */
3301
+ photoUri?: string;
3302
+ /** URI of the author of the Photo or Review. */
3303
+ uri?: string;
3304
+ }
3305
+
3306
+ /** Encapsulates a review snippet. */
3307
+ export declare interface GroundingChunkMapsPlaceAnswerSourcesReviewSnippet {
3308
+ /** This review's author. */
3309
+ authorAttribution?: GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution;
3310
+ /** A link where users can flag a problem with the review. */
3311
+ flagContentUri?: string;
3312
+ /** A link to show the review on Google Maps. */
3313
+ googleMapsUri?: string;
3314
+ /** A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country. */
3315
+ relativePublishTimeDescription?: string;
3316
+ /** A reference representing this place review which may be used to look up this place review again. */
3317
+ review?: string;
3318
+ }
3319
+
3264
3320
  /** Chunk from context retrieved by the retrieval tools. */
3265
3321
  export declare interface GroundingChunkRetrievedContext {
3322
+ /** Output only. The full document name for the referenced Vertex AI Search document. */
3323
+ documentName?: string;
3266
3324
  /** Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool. */
3267
3325
  ragChunk?: RagChunk;
3268
3326
  /** Text of the attribution. */
@@ -3285,6 +3343,8 @@ export declare interface GroundingChunkWeb {
3285
3343
 
3286
3344
  /** Metadata returned to client when grounding is enabled. */
3287
3345
  export declare interface GroundingMetadata {
3346
+ /** 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. */
3347
+ googleMapsWidgetContextToken?: string;
3288
3348
  /** List of supporting references retrieved from specified grounding source. */
3289
3349
  groundingChunks?: GroundingChunk[];
3290
3350
  /** Optional. List of grounding support. */
@@ -4295,6 +4355,8 @@ export declare interface LiveMusicGenerationConfig {
4295
4355
  muteDrums?: boolean;
4296
4356
  /** Whether the audio output should contain only bass and drums. */
4297
4357
  onlyBassAndDrums?: boolean;
4358
+ /** The mode of music generation. Default mode is QUALITY. */
4359
+ musicGenerationMode?: MusicGenerationMode;
4298
4360
  }
4299
4361
 
4300
4362
  /** The playback control signal to apply to the music generation. */
@@ -5038,6 +5100,45 @@ export declare class Models extends BaseModule {
5038
5100
  private generateImagesInternal;
5039
5101
  private editImageInternal;
5040
5102
  private upscaleImageInternal;
5103
+ /**
5104
+ * Recontextualizes an image.
5105
+ *
5106
+ * There are two types of recontextualization currently supported:
5107
+ * 1) Imagen Product Recontext - Generate images of products in new scenes
5108
+ * and contexts.
5109
+ * 2) Virtual Try-On: Generate images of persons modeling fashion products.
5110
+ *
5111
+ * @param params - The parameters for recontextualizing an image.
5112
+ * @return The response from the API.
5113
+ *
5114
+ * @example
5115
+ * ```ts
5116
+ * const response1 = await ai.models.recontextImage({
5117
+ * model: 'imagen-product-recontext-preview-06-30',
5118
+ * source: {
5119
+ * prompt: 'In a modern kitchen setting.',
5120
+ * productImages: [productImage],
5121
+ * },
5122
+ * config: {
5123
+ * numberOfImages: 1,
5124
+ * },
5125
+ * });
5126
+ * console.log(response1?.generatedImages?.[0]?.image?.imageBytes);
5127
+ *
5128
+ * const response2 = await ai.models.recontextImage({
5129
+ * model: 'virtual-try-on-preview-08-04',
5130
+ * source: {
5131
+ * personImage: personImage,
5132
+ * productImages: [productImage],
5133
+ * },
5134
+ * config: {
5135
+ * numberOfImages: 1,
5136
+ * },
5137
+ * });
5138
+ * console.log(response2?.generatedImages?.[0]?.image?.imageBytes);
5139
+ * ```
5140
+ */
5141
+ recontextImage(params: types.RecontextImageParameters): Promise<types.RecontextImageResponse>;
5041
5142
  /**
5042
5143
  * Fetches information about a model by name.
5043
5144
  *
@@ -5152,6 +5253,29 @@ export declare interface MultiSpeakerVoiceConfig {
5152
5253
  speakerVoiceConfigs?: SpeakerVoiceConfig[];
5153
5254
  }
5154
5255
 
5256
+ /** The mode of music generation. */
5257
+ export declare enum MusicGenerationMode {
5258
+ /**
5259
+ * Rely on the server default generation mode.
5260
+ */
5261
+ MUSIC_GENERATION_MODE_UNSPECIFIED = "MUSIC_GENERATION_MODE_UNSPECIFIED",
5262
+ /**
5263
+ * Steer text prompts to regions of latent space with higher quality
5264
+ music.
5265
+ */
5266
+ QUALITY = "QUALITY",
5267
+ /**
5268
+ * Steer text prompts to regions of latent space with a larger
5269
+ diversity of music.
5270
+ */
5271
+ DIVERSITY = "DIVERSITY",
5272
+ /**
5273
+ * Steer text prompts to regions of latent space more likely to
5274
+ generate music with vocals.
5275
+ */
5276
+ VOCALIZATION = "VOCALIZATION"
5277
+ }
5278
+
5155
5279
  /** A long-running operation. */
5156
5280
  export declare interface Operation<T> {
5157
5281
  /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */
@@ -5419,6 +5543,36 @@ export declare interface PrebuiltVoiceConfig {
5419
5543
  voiceName?: string;
5420
5544
  }
5421
5545
 
5546
+ /** Statistics computed for datasets used for preference optimization. */
5547
+ export declare interface PreferenceOptimizationDataStats {
5548
+ /** Output only. Dataset distributions for scores variance per example. */
5549
+ scoreVariancePerExampleDistribution?: DatasetDistribution;
5550
+ /** Output only. Dataset distributions for scores. */
5551
+ scoresDistribution?: DatasetDistribution;
5552
+ /** Output only. Number of billable tokens in the tuning dataset. */
5553
+ totalBillableTokenCount?: string;
5554
+ /** Output only. Number of examples in the tuning dataset. */
5555
+ tuningDatasetExampleCount?: string;
5556
+ /** Output only. Number of tuning steps for this Tuning Job. */
5557
+ tuningStepCount?: string;
5558
+ /** Output only. Sample user examples in the training dataset. */
5559
+ userDatasetExamples?: GeminiPreferenceExample[];
5560
+ /** Output only. Dataset distributions for the user input tokens. */
5561
+ userInputTokenDistribution?: DatasetDistribution;
5562
+ /** Output only. Dataset distributions for the user output tokens. */
5563
+ userOutputTokenDistribution?: DatasetDistribution;
5564
+ }
5565
+
5566
+ /** A pre-tuned model for continuous tuning. */
5567
+ export declare interface PreTunedModel {
5568
+ /** Output only. The name of the base model this PreTunedModel was tuned from. */
5569
+ baseModel?: string;
5570
+ /** Optional. The source checkpoint id. If not specified, the default checkpoint will be used. */
5571
+ checkpointId?: string;
5572
+ /** 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}` */
5573
+ tunedModelName?: string;
5574
+ }
5575
+
5422
5576
  /** Config for proactivity features. */
5423
5577
  export declare interface ProactivityConfig {
5424
5578
  /** If enabled, the model can reject responding to the last prompt. For
@@ -5427,6 +5581,12 @@ export declare interface ProactivityConfig {
5427
5581
  proactiveAudio?: boolean;
5428
5582
  }
5429
5583
 
5584
+ /** An image of the product. */
5585
+ export declare interface ProductImage {
5586
+ /** An image of the product to be recontextualized. */
5587
+ productImage?: Image_2;
5588
+ }
5589
+
5430
5590
  /** A RagChunk includes the content of a chunk of a RagFile, and associated metadata. */
5431
5591
  export declare interface RagChunk {
5432
5592
  /** If populated, represents where the chunk starts and ends in the document. */
@@ -5522,6 +5682,69 @@ export declare interface RealtimeInputConfig {
5522
5682
  turnCoverage?: TurnCoverage;
5523
5683
  }
5524
5684
 
5685
+ /** Configuration for recontextualizing an image. */
5686
+ export declare interface RecontextImageConfig {
5687
+ /** Used to override HTTP request options. */
5688
+ httpOptions?: HttpOptions;
5689
+ /** Abort signal which can be used to cancel the request.
5690
+
5691
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
5692
+ operation will not cancel the request in the service. You will still
5693
+ be charged usage for any applicable operations.
5694
+ */
5695
+ abortSignal?: AbortSignal;
5696
+ /** Number of images to generate. */
5697
+ numberOfImages?: number;
5698
+ /** The number of sampling steps. A higher value has better image
5699
+ quality, while a lower value has better latency. */
5700
+ baseSteps?: number;
5701
+ /** Cloud Storage URI used to store the generated images. */
5702
+ outputGcsUri?: string;
5703
+ /** Random seed for image generation. */
5704
+ seed?: number;
5705
+ /** Filter level for safety filtering. */
5706
+ safetyFilterLevel?: SafetyFilterLevel;
5707
+ /** Whether allow to generate person images, and restrict to specific
5708
+ ages. */
5709
+ personGeneration?: PersonGeneration;
5710
+ /** MIME type of the generated image. */
5711
+ outputMimeType?: string;
5712
+ /** Compression quality of the generated image (for ``image/jpeg``
5713
+ only). */
5714
+ outputCompressionQuality?: number;
5715
+ /** Whether to use the prompt rewriting logic. */
5716
+ enhancePrompt?: boolean;
5717
+ }
5718
+
5719
+ /** The parameters for recontextualizing an image. */
5720
+ export declare interface RecontextImageParameters {
5721
+ /** ID of the model to use. For a list of models, see `Google models
5722
+ <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_. */
5723
+ model: string;
5724
+ /** A set of source input(s) for image recontextualization. */
5725
+ source: RecontextImageSource;
5726
+ /** Configuration for image recontextualization. */
5727
+ config?: RecontextImageConfig;
5728
+ }
5729
+
5730
+ /** The output images response. */
5731
+ export declare class RecontextImageResponse {
5732
+ /** List of generated images. */
5733
+ generatedImages?: GeneratedImage[];
5734
+ }
5735
+
5736
+ /** A set of source input(s) for image recontextualization. */
5737
+ export declare interface RecontextImageSource {
5738
+ /** A text prompt for guiding the model during image
5739
+ recontextualization. Not supported for Virtual Try-On. */
5740
+ prompt?: string;
5741
+ /** Image of the person or subject who will be wearing the
5742
+ product(s). */
5743
+ personImage?: Image_2;
5744
+ /** A list of product images. */
5745
+ productImages?: ProductImage[];
5746
+ }
5747
+
5525
5748
  export declare type ReferenceImage = RawReferenceImage | MaskReferenceImage | ControlReferenceImage | StyleReferenceImage | SubjectReferenceImage;
5526
5749
 
5527
5750
  /** Private class that represents a Reference image that is sent to API. */
@@ -6082,9 +6305,13 @@ export declare enum SubjectReferenceType {
6082
6305
  export declare interface SupervisedHyperParameters {
6083
6306
  /** Optional. Adapter size for tuning. */
6084
6307
  adapterSize?: AdapterSize;
6308
+ /** Optional. Batch size for tuning. This feature is only available for open source models. */
6309
+ batchSize?: string;
6085
6310
  /** Optional. Number of complete passes the model makes over the entire training dataset during training. */
6086
6311
  epochCount?: string;
6087
- /** Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. */
6312
+ /** Optional. Learning rate for tuning. Mutually exclusive with `learning_rate_multiplier`. This feature is only available for open source models. */
6313
+ learningRate?: number;
6314
+ /** Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. This feature is only available for 1P models. */
6088
6315
  learningRateMultiplier?: number;
6089
6316
  }
6090
6317
 
@@ -6156,6 +6383,8 @@ export declare interface SupervisedTuningSpec {
6156
6383
  hyperParameters?: SupervisedHyperParameters;
6157
6384
  /** 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. */
6158
6385
  trainingDatasetUri?: string;
6386
+ /** Tuning mode. */
6387
+ tuningMode?: TuningMode;
6159
6388
  /** 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. */
6160
6389
  validationDatasetUri?: string;
6161
6390
  }
@@ -6315,10 +6544,12 @@ export declare interface Tool {
6315
6544
  googleMaps?: GoogleMaps;
6316
6545
  /** Optional. Tool to support URL context retrieval. */
6317
6546
  urlContext?: UrlContext;
6547
+ /** Optional. Tool to support the model interacting directly with the
6548
+ computer. If enabled, it automatically populates computer-use specific
6549
+ Function Declarations. */
6550
+ computerUse?: ToolComputerUse;
6318
6551
  /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
6319
6552
  codeExecution?: ToolCodeExecution;
6320
- /** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
6321
- computerUse?: ToolComputerUse;
6322
6553
  }
6323
6554
 
6324
6555
  /** 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. */
@@ -6373,7 +6604,7 @@ export declare interface Transcription {
6373
6604
  }
6374
6605
 
6375
6606
  export declare interface TunedModel {
6376
- /** Output only. The resource name of the TunedModel. Format: `projects/{project}/locations/{location}/models/{model}`. */
6607
+ /** 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}` */
6377
6608
  model?: string;
6378
6609
  /** Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. */
6379
6610
  endpoint?: string;
@@ -6424,6 +6655,8 @@ export declare interface TuningDataset {
6424
6655
  export declare interface TuningDataStats {
6425
6656
  /** Output only. Statistics for distillation. */
6426
6657
  distillationDataStats?: DistillationDataStats;
6658
+ /** Output only. Statistics for preference optimization. */
6659
+ preferenceOptimizationDataStats?: PreferenceOptimizationDataStats;
6427
6660
  /** The SFT Tuning data stats. */
6428
6661
  supervisedTuningDataStats?: SupervisedTuningDataStats;
6429
6662
  }
@@ -6459,6 +6692,8 @@ export declare interface TuningJob {
6459
6692
  baseModel?: string;
6460
6693
  /** Output only. The tuned model resources associated with this TuningJob. */
6461
6694
  tunedModel?: TunedModel;
6695
+ /** The pre-tuned model for continuous tuning. */
6696
+ preTunedModel?: PreTunedModel;
6462
6697
  /** Tuning Spec for Supervised Fine Tuning. */
6463
6698
  supervisedTuningSpec?: SupervisedTuningSpec;
6464
6699
  /** Output only. The tuning data statistics associated with this TuningJob. */
@@ -6467,24 +6702,38 @@ export declare interface TuningJob {
6467
6702
  encryptionSpec?: EncryptionSpec;
6468
6703
  /** Tuning Spec for open sourced and third party Partner models. */
6469
6704
  partnerModelTuningSpec?: PartnerModelTuningSpec;
6470
- /** Tuning Spec for Distillation. */
6471
- distillationSpec?: DistillationSpec;
6705
+ /** 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. */
6706
+ customBaseModel?: string;
6472
6707
  /** Output only. The Experiment associated with this TuningJob. */
6473
6708
  experiment?: string;
6474
6709
  /** 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. */
6475
6710
  labels?: Record<string, string>;
6711
+ /** 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. */
6712
+ outputUri?: string;
6476
6713
  /** Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. */
6477
6714
  pipelineJob?: string;
6478
- /** Output only. Reserved for future use. */
6479
- satisfiesPzi?: boolean;
6480
- /** Output only. Reserved for future use. */
6481
- satisfiesPzs?: boolean;
6482
6715
  /** 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. */
6483
6716
  serviceAccount?: string;
6484
6717
  /** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
6485
6718
  tunedModelDisplayName?: string;
6486
6719
  }
6487
6720
 
6721
+ /** Tuning mode. */
6722
+ export declare enum TuningMode {
6723
+ /**
6724
+ * Tuning mode is unspecified.
6725
+ */
6726
+ TUNING_MODE_UNSPECIFIED = "TUNING_MODE_UNSPECIFIED",
6727
+ /**
6728
+ * Full fine-tuning mode.
6729
+ */
6730
+ TUNING_MODE_FULL = "TUNING_MODE_FULL",
6731
+ /**
6732
+ * PEFT adapter tuning mode.
6733
+ */
6734
+ TUNING_MODE_PEFT_ADAPTER = "TUNING_MODE_PEFT_ADAPTER"
6735
+ }
6736
+
6488
6737
  /** A long-running operation. */
6489
6738
  export declare interface TuningOperation {
6490
6739
  /** Used to retain the full HTTP response. */
@@ -6617,7 +6866,6 @@ declare namespace types {
6617
6866
  Mode,
6618
6867
  AuthType,
6619
6868
  ApiSpec,
6620
- Environment,
6621
6869
  UrlRetrievalStatus,
6622
6870
  FinishReason,
6623
6871
  HarmProbability,
@@ -6627,10 +6875,12 @@ declare namespace types {
6627
6875
  Modality,
6628
6876
  MediaResolution,
6629
6877
  JobState,
6878
+ TuningMode,
6630
6879
  AdapterSize,
6631
6880
  FeatureSelectionPreference,
6632
6881
  Behavior,
6633
6882
  DynamicRetrievalConfigMode,
6883
+ Environment,
6634
6884
  FunctionCallingConfigMode,
6635
6885
  SafetyFilterLevel,
6636
6886
  PersonGeneration,
@@ -6649,6 +6899,7 @@ declare namespace types {
6649
6899
  TurnCoverage,
6650
6900
  FunctionResponseScheduling,
6651
6901
  Scale,
6902
+ MusicGenerationMode,
6652
6903
  LiveMusicPlaybackControl,
6653
6904
  VideoMetadata,
6654
6905
  Blob_2 as Blob,
@@ -6677,6 +6928,7 @@ declare namespace types {
6677
6928
  AuthConfig,
6678
6929
  GoogleMaps,
6679
6930
  UrlContext,
6931
+ ToolComputerUse,
6680
6932
  ApiAuthApiKeyConfig,
6681
6933
  ApiAuth,
6682
6934
  ExternalApiElasticSearchParams,
@@ -6694,7 +6946,6 @@ declare namespace types {
6694
6946
  VertexRagStore,
6695
6947
  Retrieval,
6696
6948
  ToolCodeExecution,
6697
- ToolComputerUse,
6698
6949
  Tool,
6699
6950
  FunctionCallingConfig,
6700
6951
  LatLng,
@@ -6719,6 +6970,10 @@ declare namespace types {
6719
6970
  CitationMetadata,
6720
6971
  UrlMetadata,
6721
6972
  UrlContextMetadata,
6973
+ GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
6974
+ GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
6975
+ GroundingChunkMapsPlaceAnswerSources,
6976
+ GroundingChunkMaps,
6722
6977
  RagChunkPageSpan,
6723
6978
  RagChunk,
6724
6979
  GroundingChunkRetrievedContext,
@@ -6759,6 +7014,11 @@ declare namespace types {
6759
7014
  EditImageConfig,
6760
7015
  EditImageResponse,
6761
7016
  UpscaleImageResponse,
7017
+ ProductImage,
7018
+ RecontextImageSource,
7019
+ RecontextImageConfig,
7020
+ RecontextImageParameters,
7021
+ RecontextImageResponse,
6762
7022
  GetModelConfig,
6763
7023
  GetModelParameters,
6764
7024
  Endpoint,
@@ -6792,20 +7052,22 @@ declare namespace types {
6792
7052
  TunedModelCheckpoint,
6793
7053
  TunedModel,
6794
7054
  GoogleRpcStatus,
7055
+ PreTunedModel,
6795
7056
  SupervisedHyperParameters,
6796
7057
  SupervisedTuningSpec,
6797
7058
  DatasetDistributionDistributionBucket,
6798
7059
  DatasetDistribution,
6799
7060
  DatasetStats,
6800
7061
  DistillationDataStats,
7062
+ GeminiPreferenceExampleCompletion,
7063
+ GeminiPreferenceExample,
7064
+ PreferenceOptimizationDataStats,
6801
7065
  SupervisedTuningDatasetDistributionDatasetBucket,
6802
7066
  SupervisedTuningDatasetDistribution,
6803
7067
  SupervisedTuningDataStats,
6804
7068
  TuningDataStats,
6805
7069
  EncryptionSpec,
6806
7070
  PartnerModelTuningSpec,
6807
- DistillationHyperParameters,
6808
- DistillationSpec,
6809
7071
  TuningJob,
6810
7072
  ListTuningJobsConfig,
6811
7073
  ListTuningJobsParameters,
@@ -6814,7 +7076,7 @@ declare namespace types {
6814
7076
  TuningDataset,
6815
7077
  TuningValidationDataset,
6816
7078
  CreateTuningJobConfig,
6817
- CreateTuningJobParameters,
7079
+ CreateTuningJobParametersPrivate,
6818
7080
  TuningOperation,
6819
7081
  CreateCachedContentConfig,
6820
7082
  CreateCachedContentParameters,
@@ -6906,8 +7168,8 @@ declare namespace types {
6906
7168
  ActivityStart,
6907
7169
  ActivityEnd,
6908
7170
  LiveClientRealtimeInput,
6909
- LiveSendRealtimeInputParameters,
6910
7171
  LiveClientToolResponse,
7172
+ LiveSendRealtimeInputParameters,
6911
7173
  LiveClientMessage,
6912
7174
  LiveConnectConfig,
6913
7175
  LiveConnectParameters,
@@ -6937,6 +7199,7 @@ declare namespace types {
6937
7199
  LiveConnectConstraints,
6938
7200
  CreateAuthTokenConfig,
6939
7201
  CreateAuthTokenParameters,
7202
+ CreateTuningJobParameters,
6940
7203
  BlobImageUnion,
6941
7204
  PartUnion,
6942
7205
  PartListUnion,
@@ -7135,7 +7398,15 @@ export declare enum UrlRetrievalStatus {
7135
7398
  /**
7136
7399
  * Url retrieval is failed due to error.
7137
7400
  */
7138
- URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR"
7401
+ URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR",
7402
+ /**
7403
+ * Url retrieval is failed because the content is behind paywall.
7404
+ */
7405
+ URL_RETRIEVAL_STATUS_PAYWALL = "URL_RETRIEVAL_STATUS_PAYWALL",
7406
+ /**
7407
+ * Url retrieval is failed because the content is unsafe.
7408
+ */
7409
+ URL_RETRIEVAL_STATUS_UNSAFE = "URL_RETRIEVAL_STATUS_UNSAFE"
7139
7410
  }
7140
7411
 
7141
7412
  /** Usage metadata about response(s). */