@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.
package/dist/genai.d.ts CHANGED
@@ -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
 
@@ -3223,6 +3228,9 @@ export declare interface GoogleSearch {
3223
3228
  If customers set a start time, they must set an end time (and vice versa).
3224
3229
  */
3225
3230
  timeRangeFilter?: Interval;
3231
+ /** Optional. List of domains to be excluded from the search results.
3232
+ The default limit is 2000 domains. */
3233
+ excludeDomains?: string[];
3226
3234
  }
3227
3235
 
3228
3236
  /** Tool to retrieve public web data for grounding, powered by Google. */
@@ -3243,14 +3251,64 @@ export declare interface GoogleTypeDate {
3243
3251
 
3244
3252
  /** Grounding chunk. */
3245
3253
  export declare interface GroundingChunk {
3254
+ /** Grounding chunk from Google Maps. */
3255
+ maps?: GroundingChunkMaps;
3246
3256
  /** Grounding chunk from context retrieved by the retrieval tools. */
3247
3257
  retrievedContext?: GroundingChunkRetrievedContext;
3248
3258
  /** Grounding chunk from the web. */
3249
3259
  web?: GroundingChunkWeb;
3250
3260
  }
3251
3261
 
3262
+ /** Chunk from Google Maps. */
3263
+ export declare interface GroundingChunkMaps {
3264
+ /** 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. */
3265
+ placeAnswerSources?: GroundingChunkMapsPlaceAnswerSources;
3266
+ /** This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place. */
3267
+ placeId?: string;
3268
+ /** Text of the chunk. */
3269
+ text?: string;
3270
+ /** Title of the chunk. */
3271
+ title?: string;
3272
+ /** URI reference of the chunk. */
3273
+ uri?: string;
3274
+ }
3275
+
3276
+ /** Sources used to generate the place answer. */
3277
+ export declare interface GroundingChunkMapsPlaceAnswerSources {
3278
+ /** A link where users can flag a problem with the generated answer. */
3279
+ flagContentUri?: string;
3280
+ /** Snippets of reviews that are used to generate the answer. */
3281
+ reviewSnippets?: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet[];
3282
+ }
3283
+
3284
+ /** Author attribution for a photo or review. */
3285
+ export declare interface GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution {
3286
+ /** Name of the author of the Photo or Review. */
3287
+ displayName?: string;
3288
+ /** Profile photo URI of the author of the Photo or Review. */
3289
+ photoUri?: string;
3290
+ /** URI of the author of the Photo or Review. */
3291
+ uri?: string;
3292
+ }
3293
+
3294
+ /** Encapsulates a review snippet. */
3295
+ export declare interface GroundingChunkMapsPlaceAnswerSourcesReviewSnippet {
3296
+ /** This review's author. */
3297
+ authorAttribution?: GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution;
3298
+ /** A link where users can flag a problem with the review. */
3299
+ flagContentUri?: string;
3300
+ /** A link to show the review on Google Maps. */
3301
+ googleMapsUri?: string;
3302
+ /** A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country. */
3303
+ relativePublishTimeDescription?: string;
3304
+ /** A reference representing this place review which may be used to look up this place review again. */
3305
+ review?: string;
3306
+ }
3307
+
3252
3308
  /** Chunk from context retrieved by the retrieval tools. */
3253
3309
  export declare interface GroundingChunkRetrievedContext {
3310
+ /** Output only. The full document name for the referenced Vertex AI Search document. */
3311
+ documentName?: string;
3254
3312
  /** Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool. */
3255
3313
  ragChunk?: RagChunk;
3256
3314
  /** Text of the attribution. */
@@ -3273,6 +3331,8 @@ export declare interface GroundingChunkWeb {
3273
3331
 
3274
3332
  /** Metadata returned to client when grounding is enabled. */
3275
3333
  export declare interface GroundingMetadata {
3334
+ /** 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. */
3335
+ googleMapsWidgetContextToken?: string;
3276
3336
  /** List of supporting references retrieved from specified grounding source. */
3277
3337
  groundingChunks?: GroundingChunk[];
3278
3338
  /** Optional. List of grounding support. */
@@ -4283,6 +4343,8 @@ export declare interface LiveMusicGenerationConfig {
4283
4343
  muteDrums?: boolean;
4284
4344
  /** Whether the audio output should contain only bass and drums. */
4285
4345
  onlyBassAndDrums?: boolean;
4346
+ /** The mode of music generation. Default mode is QUALITY. */
4347
+ musicGenerationMode?: MusicGenerationMode;
4286
4348
  }
4287
4349
 
4288
4350
  /** The playback control signal to apply to the music generation. */
@@ -5026,6 +5088,45 @@ export declare class Models extends BaseModule {
5026
5088
  private generateImagesInternal;
5027
5089
  private editImageInternal;
5028
5090
  private upscaleImageInternal;
5091
+ /**
5092
+ * Recontextualizes an image.
5093
+ *
5094
+ * There are two types of recontextualization currently supported:
5095
+ * 1) Imagen Product Recontext - Generate images of products in new scenes
5096
+ * and contexts.
5097
+ * 2) Virtual Try-On: Generate images of persons modeling fashion products.
5098
+ *
5099
+ * @param params - The parameters for recontextualizing an image.
5100
+ * @return The response from the API.
5101
+ *
5102
+ * @example
5103
+ * ```ts
5104
+ * const response1 = await ai.models.recontextImage({
5105
+ * model: 'imagen-product-recontext-preview-06-30',
5106
+ * source: {
5107
+ * prompt: 'In a modern kitchen setting.',
5108
+ * productImages: [productImage],
5109
+ * },
5110
+ * config: {
5111
+ * numberOfImages: 1,
5112
+ * },
5113
+ * });
5114
+ * console.log(response1?.generatedImages?.[0]?.image?.imageBytes);
5115
+ *
5116
+ * const response2 = await ai.models.recontextImage({
5117
+ * model: 'virtual-try-on-preview-08-04',
5118
+ * source: {
5119
+ * personImage: personImage,
5120
+ * productImages: [productImage],
5121
+ * },
5122
+ * config: {
5123
+ * numberOfImages: 1,
5124
+ * },
5125
+ * });
5126
+ * console.log(response2?.generatedImages?.[0]?.image?.imageBytes);
5127
+ * ```
5128
+ */
5129
+ recontextImage(params: types.RecontextImageParameters): Promise<types.RecontextImageResponse>;
5029
5130
  /**
5030
5131
  * Fetches information about a model by name.
5031
5132
  *
@@ -5140,6 +5241,29 @@ export declare interface MultiSpeakerVoiceConfig {
5140
5241
  speakerVoiceConfigs?: SpeakerVoiceConfig[];
5141
5242
  }
5142
5243
 
5244
+ /** The mode of music generation. */
5245
+ export declare enum MusicGenerationMode {
5246
+ /**
5247
+ * Rely on the server default generation mode.
5248
+ */
5249
+ MUSIC_GENERATION_MODE_UNSPECIFIED = "MUSIC_GENERATION_MODE_UNSPECIFIED",
5250
+ /**
5251
+ * Steer text prompts to regions of latent space with higher quality
5252
+ music.
5253
+ */
5254
+ QUALITY = "QUALITY",
5255
+ /**
5256
+ * Steer text prompts to regions of latent space with a larger
5257
+ diversity of music.
5258
+ */
5259
+ DIVERSITY = "DIVERSITY",
5260
+ /**
5261
+ * Steer text prompts to regions of latent space more likely to
5262
+ generate music with vocals.
5263
+ */
5264
+ VOCALIZATION = "VOCALIZATION"
5265
+ }
5266
+
5143
5267
  /** A long-running operation. */
5144
5268
  export declare interface Operation<T> {
5145
5269
  /** 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}`. */
@@ -5407,6 +5531,36 @@ export declare interface PrebuiltVoiceConfig {
5407
5531
  voiceName?: string;
5408
5532
  }
5409
5533
 
5534
+ /** Statistics computed for datasets used for preference optimization. */
5535
+ export declare interface PreferenceOptimizationDataStats {
5536
+ /** Output only. Dataset distributions for scores variance per example. */
5537
+ scoreVariancePerExampleDistribution?: DatasetDistribution;
5538
+ /** Output only. Dataset distributions for scores. */
5539
+ scoresDistribution?: DatasetDistribution;
5540
+ /** Output only. Number of billable tokens in the tuning dataset. */
5541
+ totalBillableTokenCount?: string;
5542
+ /** Output only. Number of examples in the tuning dataset. */
5543
+ tuningDatasetExampleCount?: string;
5544
+ /** Output only. Number of tuning steps for this Tuning Job. */
5545
+ tuningStepCount?: string;
5546
+ /** Output only. Sample user examples in the training dataset. */
5547
+ userDatasetExamples?: GeminiPreferenceExample[];
5548
+ /** Output only. Dataset distributions for the user input tokens. */
5549
+ userInputTokenDistribution?: DatasetDistribution;
5550
+ /** Output only. Dataset distributions for the user output tokens. */
5551
+ userOutputTokenDistribution?: DatasetDistribution;
5552
+ }
5553
+
5554
+ /** A pre-tuned model for continuous tuning. */
5555
+ export declare interface PreTunedModel {
5556
+ /** Output only. The name of the base model this PreTunedModel was tuned from. */
5557
+ baseModel?: string;
5558
+ /** Optional. The source checkpoint id. If not specified, the default checkpoint will be used. */
5559
+ checkpointId?: string;
5560
+ /** 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}` */
5561
+ tunedModelName?: string;
5562
+ }
5563
+
5410
5564
  /** Config for proactivity features. */
5411
5565
  export declare interface ProactivityConfig {
5412
5566
  /** If enabled, the model can reject responding to the last prompt. For
@@ -5415,6 +5569,12 @@ export declare interface ProactivityConfig {
5415
5569
  proactiveAudio?: boolean;
5416
5570
  }
5417
5571
 
5572
+ /** An image of the product. */
5573
+ export declare interface ProductImage {
5574
+ /** An image of the product to be recontextualized. */
5575
+ productImage?: Image_2;
5576
+ }
5577
+
5418
5578
  /** A RagChunk includes the content of a chunk of a RagFile, and associated metadata. */
5419
5579
  export declare interface RagChunk {
5420
5580
  /** If populated, represents where the chunk starts and ends in the document. */
@@ -5510,6 +5670,69 @@ export declare interface RealtimeInputConfig {
5510
5670
  turnCoverage?: TurnCoverage;
5511
5671
  }
5512
5672
 
5673
+ /** Configuration for recontextualizing an image. */
5674
+ export declare interface RecontextImageConfig {
5675
+ /** Used to override HTTP request options. */
5676
+ httpOptions?: HttpOptions;
5677
+ /** Abort signal which can be used to cancel the request.
5678
+
5679
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
5680
+ operation will not cancel the request in the service. You will still
5681
+ be charged usage for any applicable operations.
5682
+ */
5683
+ abortSignal?: AbortSignal;
5684
+ /** Number of images to generate. */
5685
+ numberOfImages?: number;
5686
+ /** The number of sampling steps. A higher value has better image
5687
+ quality, while a lower value has better latency. */
5688
+ baseSteps?: number;
5689
+ /** Cloud Storage URI used to store the generated images. */
5690
+ outputGcsUri?: string;
5691
+ /** Random seed for image generation. */
5692
+ seed?: number;
5693
+ /** Filter level for safety filtering. */
5694
+ safetyFilterLevel?: SafetyFilterLevel;
5695
+ /** Whether allow to generate person images, and restrict to specific
5696
+ ages. */
5697
+ personGeneration?: PersonGeneration;
5698
+ /** MIME type of the generated image. */
5699
+ outputMimeType?: string;
5700
+ /** Compression quality of the generated image (for ``image/jpeg``
5701
+ only). */
5702
+ outputCompressionQuality?: number;
5703
+ /** Whether to use the prompt rewriting logic. */
5704
+ enhancePrompt?: boolean;
5705
+ }
5706
+
5707
+ /** The parameters for recontextualizing an image. */
5708
+ export declare interface RecontextImageParameters {
5709
+ /** ID of the model to use. For a list of models, see `Google models
5710
+ <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_. */
5711
+ model: string;
5712
+ /** A set of source input(s) for image recontextualization. */
5713
+ source: RecontextImageSource;
5714
+ /** Configuration for image recontextualization. */
5715
+ config?: RecontextImageConfig;
5716
+ }
5717
+
5718
+ /** The output images response. */
5719
+ export declare class RecontextImageResponse {
5720
+ /** List of generated images. */
5721
+ generatedImages?: GeneratedImage[];
5722
+ }
5723
+
5724
+ /** A set of source input(s) for image recontextualization. */
5725
+ export declare interface RecontextImageSource {
5726
+ /** A text prompt for guiding the model during image
5727
+ recontextualization. Not supported for Virtual Try-On. */
5728
+ prompt?: string;
5729
+ /** Image of the person or subject who will be wearing the
5730
+ product(s). */
5731
+ personImage?: Image_2;
5732
+ /** A list of product images. */
5733
+ productImages?: ProductImage[];
5734
+ }
5735
+
5513
5736
  export declare type ReferenceImage = RawReferenceImage | MaskReferenceImage | ControlReferenceImage | StyleReferenceImage | SubjectReferenceImage;
5514
5737
 
5515
5738
  /** Private class that represents a Reference image that is sent to API. */
@@ -6070,9 +6293,13 @@ export declare enum SubjectReferenceType {
6070
6293
  export declare interface SupervisedHyperParameters {
6071
6294
  /** Optional. Adapter size for tuning. */
6072
6295
  adapterSize?: AdapterSize;
6296
+ /** Optional. Batch size for tuning. This feature is only available for open source models. */
6297
+ batchSize?: string;
6073
6298
  /** Optional. Number of complete passes the model makes over the entire training dataset during training. */
6074
6299
  epochCount?: string;
6075
- /** Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. */
6300
+ /** Optional. Learning rate for tuning. Mutually exclusive with `learning_rate_multiplier`. This feature is only available for open source models. */
6301
+ learningRate?: number;
6302
+ /** Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. This feature is only available for 1P models. */
6076
6303
  learningRateMultiplier?: number;
6077
6304
  }
6078
6305
 
@@ -6144,6 +6371,8 @@ export declare interface SupervisedTuningSpec {
6144
6371
  hyperParameters?: SupervisedHyperParameters;
6145
6372
  /** 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. */
6146
6373
  trainingDatasetUri?: string;
6374
+ /** Tuning mode. */
6375
+ tuningMode?: TuningMode;
6147
6376
  /** 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. */
6148
6377
  validationDatasetUri?: string;
6149
6378
  }
@@ -6303,10 +6532,12 @@ export declare interface Tool {
6303
6532
  googleMaps?: GoogleMaps;
6304
6533
  /** Optional. Tool to support URL context retrieval. */
6305
6534
  urlContext?: UrlContext;
6535
+ /** Optional. Tool to support the model interacting directly with the
6536
+ computer. If enabled, it automatically populates computer-use specific
6537
+ Function Declarations. */
6538
+ computerUse?: ToolComputerUse;
6306
6539
  /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
6307
6540
  codeExecution?: ToolCodeExecution;
6308
- /** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
6309
- computerUse?: ToolComputerUse;
6310
6541
  }
6311
6542
 
6312
6543
  /** 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. */
@@ -6361,7 +6592,7 @@ export declare interface Transcription {
6361
6592
  }
6362
6593
 
6363
6594
  export declare interface TunedModel {
6364
- /** Output only. The resource name of the TunedModel. Format: `projects/{project}/locations/{location}/models/{model}`. */
6595
+ /** 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}` */
6365
6596
  model?: string;
6366
6597
  /** Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. */
6367
6598
  endpoint?: string;
@@ -6412,6 +6643,8 @@ export declare interface TuningDataset {
6412
6643
  export declare interface TuningDataStats {
6413
6644
  /** Output only. Statistics for distillation. */
6414
6645
  distillationDataStats?: DistillationDataStats;
6646
+ /** Output only. Statistics for preference optimization. */
6647
+ preferenceOptimizationDataStats?: PreferenceOptimizationDataStats;
6415
6648
  /** The SFT Tuning data stats. */
6416
6649
  supervisedTuningDataStats?: SupervisedTuningDataStats;
6417
6650
  }
@@ -6447,6 +6680,8 @@ export declare interface TuningJob {
6447
6680
  baseModel?: string;
6448
6681
  /** Output only. The tuned model resources associated with this TuningJob. */
6449
6682
  tunedModel?: TunedModel;
6683
+ /** The pre-tuned model for continuous tuning. */
6684
+ preTunedModel?: PreTunedModel;
6450
6685
  /** Tuning Spec for Supervised Fine Tuning. */
6451
6686
  supervisedTuningSpec?: SupervisedTuningSpec;
6452
6687
  /** Output only. The tuning data statistics associated with this TuningJob. */
@@ -6455,24 +6690,38 @@ export declare interface TuningJob {
6455
6690
  encryptionSpec?: EncryptionSpec;
6456
6691
  /** Tuning Spec for open sourced and third party Partner models. */
6457
6692
  partnerModelTuningSpec?: PartnerModelTuningSpec;
6458
- /** Tuning Spec for Distillation. */
6459
- distillationSpec?: DistillationSpec;
6693
+ /** 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. */
6694
+ customBaseModel?: string;
6460
6695
  /** Output only. The Experiment associated with this TuningJob. */
6461
6696
  experiment?: string;
6462
6697
  /** 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. */
6463
6698
  labels?: Record<string, string>;
6699
+ /** 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. */
6700
+ outputUri?: string;
6464
6701
  /** Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. */
6465
6702
  pipelineJob?: string;
6466
- /** Output only. Reserved for future use. */
6467
- satisfiesPzi?: boolean;
6468
- /** Output only. Reserved for future use. */
6469
- satisfiesPzs?: boolean;
6470
6703
  /** 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. */
6471
6704
  serviceAccount?: string;
6472
6705
  /** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
6473
6706
  tunedModelDisplayName?: string;
6474
6707
  }
6475
6708
 
6709
+ /** Tuning mode. */
6710
+ export declare enum TuningMode {
6711
+ /**
6712
+ * Tuning mode is unspecified.
6713
+ */
6714
+ TUNING_MODE_UNSPECIFIED = "TUNING_MODE_UNSPECIFIED",
6715
+ /**
6716
+ * Full fine-tuning mode.
6717
+ */
6718
+ TUNING_MODE_FULL = "TUNING_MODE_FULL",
6719
+ /**
6720
+ * PEFT adapter tuning mode.
6721
+ */
6722
+ TUNING_MODE_PEFT_ADAPTER = "TUNING_MODE_PEFT_ADAPTER"
6723
+ }
6724
+
6476
6725
  /** A long-running operation. */
6477
6726
  export declare interface TuningOperation {
6478
6727
  /** Used to retain the full HTTP response. */
@@ -6605,7 +6854,6 @@ declare namespace types {
6605
6854
  Mode,
6606
6855
  AuthType,
6607
6856
  ApiSpec,
6608
- Environment,
6609
6857
  UrlRetrievalStatus,
6610
6858
  FinishReason,
6611
6859
  HarmProbability,
@@ -6615,10 +6863,12 @@ declare namespace types {
6615
6863
  Modality,
6616
6864
  MediaResolution,
6617
6865
  JobState,
6866
+ TuningMode,
6618
6867
  AdapterSize,
6619
6868
  FeatureSelectionPreference,
6620
6869
  Behavior,
6621
6870
  DynamicRetrievalConfigMode,
6871
+ Environment,
6622
6872
  FunctionCallingConfigMode,
6623
6873
  SafetyFilterLevel,
6624
6874
  PersonGeneration,
@@ -6637,6 +6887,7 @@ declare namespace types {
6637
6887
  TurnCoverage,
6638
6888
  FunctionResponseScheduling,
6639
6889
  Scale,
6890
+ MusicGenerationMode,
6640
6891
  LiveMusicPlaybackControl,
6641
6892
  VideoMetadata,
6642
6893
  Blob_2 as Blob,
@@ -6665,6 +6916,7 @@ declare namespace types {
6665
6916
  AuthConfig,
6666
6917
  GoogleMaps,
6667
6918
  UrlContext,
6919
+ ToolComputerUse,
6668
6920
  ApiAuthApiKeyConfig,
6669
6921
  ApiAuth,
6670
6922
  ExternalApiElasticSearchParams,
@@ -6682,7 +6934,6 @@ declare namespace types {
6682
6934
  VertexRagStore,
6683
6935
  Retrieval,
6684
6936
  ToolCodeExecution,
6685
- ToolComputerUse,
6686
6937
  Tool,
6687
6938
  FunctionCallingConfig,
6688
6939
  LatLng,
@@ -6707,6 +6958,10 @@ declare namespace types {
6707
6958
  CitationMetadata,
6708
6959
  UrlMetadata,
6709
6960
  UrlContextMetadata,
6961
+ GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
6962
+ GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
6963
+ GroundingChunkMapsPlaceAnswerSources,
6964
+ GroundingChunkMaps,
6710
6965
  RagChunkPageSpan,
6711
6966
  RagChunk,
6712
6967
  GroundingChunkRetrievedContext,
@@ -6747,6 +7002,11 @@ declare namespace types {
6747
7002
  EditImageConfig,
6748
7003
  EditImageResponse,
6749
7004
  UpscaleImageResponse,
7005
+ ProductImage,
7006
+ RecontextImageSource,
7007
+ RecontextImageConfig,
7008
+ RecontextImageParameters,
7009
+ RecontextImageResponse,
6750
7010
  GetModelConfig,
6751
7011
  GetModelParameters,
6752
7012
  Endpoint,
@@ -6780,20 +7040,22 @@ declare namespace types {
6780
7040
  TunedModelCheckpoint,
6781
7041
  TunedModel,
6782
7042
  GoogleRpcStatus,
7043
+ PreTunedModel,
6783
7044
  SupervisedHyperParameters,
6784
7045
  SupervisedTuningSpec,
6785
7046
  DatasetDistributionDistributionBucket,
6786
7047
  DatasetDistribution,
6787
7048
  DatasetStats,
6788
7049
  DistillationDataStats,
7050
+ GeminiPreferenceExampleCompletion,
7051
+ GeminiPreferenceExample,
7052
+ PreferenceOptimizationDataStats,
6789
7053
  SupervisedTuningDatasetDistributionDatasetBucket,
6790
7054
  SupervisedTuningDatasetDistribution,
6791
7055
  SupervisedTuningDataStats,
6792
7056
  TuningDataStats,
6793
7057
  EncryptionSpec,
6794
7058
  PartnerModelTuningSpec,
6795
- DistillationHyperParameters,
6796
- DistillationSpec,
6797
7059
  TuningJob,
6798
7060
  ListTuningJobsConfig,
6799
7061
  ListTuningJobsParameters,
@@ -6802,7 +7064,7 @@ declare namespace types {
6802
7064
  TuningDataset,
6803
7065
  TuningValidationDataset,
6804
7066
  CreateTuningJobConfig,
6805
- CreateTuningJobParameters,
7067
+ CreateTuningJobParametersPrivate,
6806
7068
  TuningOperation,
6807
7069
  CreateCachedContentConfig,
6808
7070
  CreateCachedContentParameters,
@@ -6894,8 +7156,8 @@ declare namespace types {
6894
7156
  ActivityStart,
6895
7157
  ActivityEnd,
6896
7158
  LiveClientRealtimeInput,
6897
- LiveSendRealtimeInputParameters,
6898
7159
  LiveClientToolResponse,
7160
+ LiveSendRealtimeInputParameters,
6899
7161
  LiveClientMessage,
6900
7162
  LiveConnectConfig,
6901
7163
  LiveConnectParameters,
@@ -6925,6 +7187,7 @@ declare namespace types {
6925
7187
  LiveConnectConstraints,
6926
7188
  CreateAuthTokenConfig,
6927
7189
  CreateAuthTokenParameters,
7190
+ CreateTuningJobParameters,
6928
7191
  BlobImageUnion,
6929
7192
  PartUnion,
6930
7193
  PartListUnion,
@@ -7123,7 +7386,15 @@ export declare enum UrlRetrievalStatus {
7123
7386
  /**
7124
7387
  * Url retrieval is failed due to error.
7125
7388
  */
7126
- URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR"
7389
+ URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR",
7390
+ /**
7391
+ * Url retrieval is failed because the content is behind paywall.
7392
+ */
7393
+ URL_RETRIEVAL_STATUS_PAYWALL = "URL_RETRIEVAL_STATUS_PAYWALL",
7394
+ /**
7395
+ * Url retrieval is failed because the content is unsafe.
7396
+ */
7397
+ URL_RETRIEVAL_STATUS_UNSAFE = "URL_RETRIEVAL_STATUS_UNSAFE"
7127
7398
  }
7128
7399
 
7129
7400
  /** Usage metadata about response(s). */