@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/web/web.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
 
@@ -3228,6 +3233,9 @@ export declare interface GoogleSearch {
3228
3233
  If customers set a start time, they must set an end time (and vice versa).
3229
3234
  */
3230
3235
  timeRangeFilter?: Interval;
3236
+ /** Optional. List of domains to be excluded from the search results.
3237
+ The default limit is 2000 domains. */
3238
+ excludeDomains?: string[];
3231
3239
  }
3232
3240
 
3233
3241
  /** Tool to retrieve public web data for grounding, powered by Google. */
@@ -3248,14 +3256,64 @@ export declare interface GoogleTypeDate {
3248
3256
 
3249
3257
  /** Grounding chunk. */
3250
3258
  export declare interface GroundingChunk {
3259
+ /** Grounding chunk from Google Maps. */
3260
+ maps?: GroundingChunkMaps;
3251
3261
  /** Grounding chunk from context retrieved by the retrieval tools. */
3252
3262
  retrievedContext?: GroundingChunkRetrievedContext;
3253
3263
  /** Grounding chunk from the web. */
3254
3264
  web?: GroundingChunkWeb;
3255
3265
  }
3256
3266
 
3267
+ /** Chunk from Google Maps. */
3268
+ export declare interface GroundingChunkMaps {
3269
+ /** 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. */
3270
+ placeAnswerSources?: GroundingChunkMapsPlaceAnswerSources;
3271
+ /** This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place. */
3272
+ placeId?: string;
3273
+ /** Text of the chunk. */
3274
+ text?: string;
3275
+ /** Title of the chunk. */
3276
+ title?: string;
3277
+ /** URI reference of the chunk. */
3278
+ uri?: string;
3279
+ }
3280
+
3281
+ /** Sources used to generate the place answer. */
3282
+ export declare interface GroundingChunkMapsPlaceAnswerSources {
3283
+ /** A link where users can flag a problem with the generated answer. */
3284
+ flagContentUri?: string;
3285
+ /** Snippets of reviews that are used to generate the answer. */
3286
+ reviewSnippets?: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet[];
3287
+ }
3288
+
3289
+ /** Author attribution for a photo or review. */
3290
+ export declare interface GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution {
3291
+ /** Name of the author of the Photo or Review. */
3292
+ displayName?: string;
3293
+ /** Profile photo URI of the author of the Photo or Review. */
3294
+ photoUri?: string;
3295
+ /** URI of the author of the Photo or Review. */
3296
+ uri?: string;
3297
+ }
3298
+
3299
+ /** Encapsulates a review snippet. */
3300
+ export declare interface GroundingChunkMapsPlaceAnswerSourcesReviewSnippet {
3301
+ /** This review's author. */
3302
+ authorAttribution?: GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution;
3303
+ /** A link where users can flag a problem with the review. */
3304
+ flagContentUri?: string;
3305
+ /** A link to show the review on Google Maps. */
3306
+ googleMapsUri?: string;
3307
+ /** A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country. */
3308
+ relativePublishTimeDescription?: string;
3309
+ /** A reference representing this place review which may be used to look up this place review again. */
3310
+ review?: string;
3311
+ }
3312
+
3257
3313
  /** Chunk from context retrieved by the retrieval tools. */
3258
3314
  export declare interface GroundingChunkRetrievedContext {
3315
+ /** Output only. The full document name for the referenced Vertex AI Search document. */
3316
+ documentName?: string;
3259
3317
  /** Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool. */
3260
3318
  ragChunk?: RagChunk;
3261
3319
  /** Text of the attribution. */
@@ -3278,6 +3336,8 @@ export declare interface GroundingChunkWeb {
3278
3336
 
3279
3337
  /** Metadata returned to client when grounding is enabled. */
3280
3338
  export declare interface GroundingMetadata {
3339
+ /** 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. */
3340
+ googleMapsWidgetContextToken?: string;
3281
3341
  /** List of supporting references retrieved from specified grounding source. */
3282
3342
  groundingChunks?: GroundingChunk[];
3283
3343
  /** Optional. List of grounding support. */
@@ -4288,6 +4348,8 @@ export declare interface LiveMusicGenerationConfig {
4288
4348
  muteDrums?: boolean;
4289
4349
  /** Whether the audio output should contain only bass and drums. */
4290
4350
  onlyBassAndDrums?: boolean;
4351
+ /** The mode of music generation. Default mode is QUALITY. */
4352
+ musicGenerationMode?: MusicGenerationMode;
4291
4353
  }
4292
4354
 
4293
4355
  /** The playback control signal to apply to the music generation. */
@@ -5031,6 +5093,45 @@ export declare class Models extends BaseModule {
5031
5093
  private generateImagesInternal;
5032
5094
  private editImageInternal;
5033
5095
  private upscaleImageInternal;
5096
+ /**
5097
+ * Recontextualizes an image.
5098
+ *
5099
+ * There are two types of recontextualization currently supported:
5100
+ * 1) Imagen Product Recontext - Generate images of products in new scenes
5101
+ * and contexts.
5102
+ * 2) Virtual Try-On: Generate images of persons modeling fashion products.
5103
+ *
5104
+ * @param params - The parameters for recontextualizing an image.
5105
+ * @return The response from the API.
5106
+ *
5107
+ * @example
5108
+ * ```ts
5109
+ * const response1 = await ai.models.recontextImage({
5110
+ * model: 'imagen-product-recontext-preview-06-30',
5111
+ * source: {
5112
+ * prompt: 'In a modern kitchen setting.',
5113
+ * productImages: [productImage],
5114
+ * },
5115
+ * config: {
5116
+ * numberOfImages: 1,
5117
+ * },
5118
+ * });
5119
+ * console.log(response1?.generatedImages?.[0]?.image?.imageBytes);
5120
+ *
5121
+ * const response2 = await ai.models.recontextImage({
5122
+ * model: 'virtual-try-on-preview-08-04',
5123
+ * source: {
5124
+ * personImage: personImage,
5125
+ * productImages: [productImage],
5126
+ * },
5127
+ * config: {
5128
+ * numberOfImages: 1,
5129
+ * },
5130
+ * });
5131
+ * console.log(response2?.generatedImages?.[0]?.image?.imageBytes);
5132
+ * ```
5133
+ */
5134
+ recontextImage(params: types.RecontextImageParameters): Promise<types.RecontextImageResponse>;
5034
5135
  /**
5035
5136
  * Fetches information about a model by name.
5036
5137
  *
@@ -5145,6 +5246,29 @@ export declare interface MultiSpeakerVoiceConfig {
5145
5246
  speakerVoiceConfigs?: SpeakerVoiceConfig[];
5146
5247
  }
5147
5248
 
5249
+ /** The mode of music generation. */
5250
+ export declare enum MusicGenerationMode {
5251
+ /**
5252
+ * Rely on the server default generation mode.
5253
+ */
5254
+ MUSIC_GENERATION_MODE_UNSPECIFIED = "MUSIC_GENERATION_MODE_UNSPECIFIED",
5255
+ /**
5256
+ * Steer text prompts to regions of latent space with higher quality
5257
+ music.
5258
+ */
5259
+ QUALITY = "QUALITY",
5260
+ /**
5261
+ * Steer text prompts to regions of latent space with a larger
5262
+ diversity of music.
5263
+ */
5264
+ DIVERSITY = "DIVERSITY",
5265
+ /**
5266
+ * Steer text prompts to regions of latent space more likely to
5267
+ generate music with vocals.
5268
+ */
5269
+ VOCALIZATION = "VOCALIZATION"
5270
+ }
5271
+
5148
5272
  /** A long-running operation. */
5149
5273
  export declare interface Operation<T> {
5150
5274
  /** 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}`. */
@@ -5412,6 +5536,36 @@ export declare interface PrebuiltVoiceConfig {
5412
5536
  voiceName?: string;
5413
5537
  }
5414
5538
 
5539
+ /** Statistics computed for datasets used for preference optimization. */
5540
+ export declare interface PreferenceOptimizationDataStats {
5541
+ /** Output only. Dataset distributions for scores variance per example. */
5542
+ scoreVariancePerExampleDistribution?: DatasetDistribution;
5543
+ /** Output only. Dataset distributions for scores. */
5544
+ scoresDistribution?: DatasetDistribution;
5545
+ /** Output only. Number of billable tokens in the tuning dataset. */
5546
+ totalBillableTokenCount?: string;
5547
+ /** Output only. Number of examples in the tuning dataset. */
5548
+ tuningDatasetExampleCount?: string;
5549
+ /** Output only. Number of tuning steps for this Tuning Job. */
5550
+ tuningStepCount?: string;
5551
+ /** Output only. Sample user examples in the training dataset. */
5552
+ userDatasetExamples?: GeminiPreferenceExample[];
5553
+ /** Output only. Dataset distributions for the user input tokens. */
5554
+ userInputTokenDistribution?: DatasetDistribution;
5555
+ /** Output only. Dataset distributions for the user output tokens. */
5556
+ userOutputTokenDistribution?: DatasetDistribution;
5557
+ }
5558
+
5559
+ /** A pre-tuned model for continuous tuning. */
5560
+ export declare interface PreTunedModel {
5561
+ /** Output only. The name of the base model this PreTunedModel was tuned from. */
5562
+ baseModel?: string;
5563
+ /** Optional. The source checkpoint id. If not specified, the default checkpoint will be used. */
5564
+ checkpointId?: string;
5565
+ /** 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}` */
5566
+ tunedModelName?: string;
5567
+ }
5568
+
5415
5569
  /** Config for proactivity features. */
5416
5570
  export declare interface ProactivityConfig {
5417
5571
  /** If enabled, the model can reject responding to the last prompt. For
@@ -5420,6 +5574,12 @@ export declare interface ProactivityConfig {
5420
5574
  proactiveAudio?: boolean;
5421
5575
  }
5422
5576
 
5577
+ /** An image of the product. */
5578
+ export declare interface ProductImage {
5579
+ /** An image of the product to be recontextualized. */
5580
+ productImage?: Image_2;
5581
+ }
5582
+
5423
5583
  /** A RagChunk includes the content of a chunk of a RagFile, and associated metadata. */
5424
5584
  export declare interface RagChunk {
5425
5585
  /** If populated, represents where the chunk starts and ends in the document. */
@@ -5515,6 +5675,69 @@ export declare interface RealtimeInputConfig {
5515
5675
  turnCoverage?: TurnCoverage;
5516
5676
  }
5517
5677
 
5678
+ /** Configuration for recontextualizing an image. */
5679
+ export declare interface RecontextImageConfig {
5680
+ /** Used to override HTTP request options. */
5681
+ httpOptions?: HttpOptions;
5682
+ /** Abort signal which can be used to cancel the request.
5683
+
5684
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
5685
+ operation will not cancel the request in the service. You will still
5686
+ be charged usage for any applicable operations.
5687
+ */
5688
+ abortSignal?: AbortSignal;
5689
+ /** Number of images to generate. */
5690
+ numberOfImages?: number;
5691
+ /** The number of sampling steps. A higher value has better image
5692
+ quality, while a lower value has better latency. */
5693
+ baseSteps?: number;
5694
+ /** Cloud Storage URI used to store the generated images. */
5695
+ outputGcsUri?: string;
5696
+ /** Random seed for image generation. */
5697
+ seed?: number;
5698
+ /** Filter level for safety filtering. */
5699
+ safetyFilterLevel?: SafetyFilterLevel;
5700
+ /** Whether allow to generate person images, and restrict to specific
5701
+ ages. */
5702
+ personGeneration?: PersonGeneration;
5703
+ /** MIME type of the generated image. */
5704
+ outputMimeType?: string;
5705
+ /** Compression quality of the generated image (for ``image/jpeg``
5706
+ only). */
5707
+ outputCompressionQuality?: number;
5708
+ /** Whether to use the prompt rewriting logic. */
5709
+ enhancePrompt?: boolean;
5710
+ }
5711
+
5712
+ /** The parameters for recontextualizing an image. */
5713
+ export declare interface RecontextImageParameters {
5714
+ /** ID of the model to use. For a list of models, see `Google models
5715
+ <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_. */
5716
+ model: string;
5717
+ /** A set of source input(s) for image recontextualization. */
5718
+ source: RecontextImageSource;
5719
+ /** Configuration for image recontextualization. */
5720
+ config?: RecontextImageConfig;
5721
+ }
5722
+
5723
+ /** The output images response. */
5724
+ export declare class RecontextImageResponse {
5725
+ /** List of generated images. */
5726
+ generatedImages?: GeneratedImage[];
5727
+ }
5728
+
5729
+ /** A set of source input(s) for image recontextualization. */
5730
+ export declare interface RecontextImageSource {
5731
+ /** A text prompt for guiding the model during image
5732
+ recontextualization. Not supported for Virtual Try-On. */
5733
+ prompt?: string;
5734
+ /** Image of the person or subject who will be wearing the
5735
+ product(s). */
5736
+ personImage?: Image_2;
5737
+ /** A list of product images. */
5738
+ productImages?: ProductImage[];
5739
+ }
5740
+
5518
5741
  export declare type ReferenceImage = RawReferenceImage | MaskReferenceImage | ControlReferenceImage | StyleReferenceImage | SubjectReferenceImage;
5519
5742
 
5520
5743
  /** Private class that represents a Reference image that is sent to API. */
@@ -6075,9 +6298,13 @@ export declare enum SubjectReferenceType {
6075
6298
  export declare interface SupervisedHyperParameters {
6076
6299
  /** Optional. Adapter size for tuning. */
6077
6300
  adapterSize?: AdapterSize;
6301
+ /** Optional. Batch size for tuning. This feature is only available for open source models. */
6302
+ batchSize?: string;
6078
6303
  /** Optional. Number of complete passes the model makes over the entire training dataset during training. */
6079
6304
  epochCount?: string;
6080
- /** Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. */
6305
+ /** Optional. Learning rate for tuning. Mutually exclusive with `learning_rate_multiplier`. This feature is only available for open source models. */
6306
+ learningRate?: number;
6307
+ /** Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. This feature is only available for 1P models. */
6081
6308
  learningRateMultiplier?: number;
6082
6309
  }
6083
6310
 
@@ -6149,6 +6376,8 @@ export declare interface SupervisedTuningSpec {
6149
6376
  hyperParameters?: SupervisedHyperParameters;
6150
6377
  /** 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. */
6151
6378
  trainingDatasetUri?: string;
6379
+ /** Tuning mode. */
6380
+ tuningMode?: TuningMode;
6152
6381
  /** 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. */
6153
6382
  validationDatasetUri?: string;
6154
6383
  }
@@ -6308,10 +6537,12 @@ export declare interface Tool {
6308
6537
  googleMaps?: GoogleMaps;
6309
6538
  /** Optional. Tool to support URL context retrieval. */
6310
6539
  urlContext?: UrlContext;
6540
+ /** Optional. Tool to support the model interacting directly with the
6541
+ computer. If enabled, it automatically populates computer-use specific
6542
+ Function Declarations. */
6543
+ computerUse?: ToolComputerUse;
6311
6544
  /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
6312
6545
  codeExecution?: ToolCodeExecution;
6313
- /** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
6314
- computerUse?: ToolComputerUse;
6315
6546
  }
6316
6547
 
6317
6548
  /** 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. */
@@ -6366,7 +6597,7 @@ export declare interface Transcription {
6366
6597
  }
6367
6598
 
6368
6599
  export declare interface TunedModel {
6369
- /** Output only. The resource name of the TunedModel. Format: `projects/{project}/locations/{location}/models/{model}`. */
6600
+ /** 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}` */
6370
6601
  model?: string;
6371
6602
  /** Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. */
6372
6603
  endpoint?: string;
@@ -6417,6 +6648,8 @@ export declare interface TuningDataset {
6417
6648
  export declare interface TuningDataStats {
6418
6649
  /** Output only. Statistics for distillation. */
6419
6650
  distillationDataStats?: DistillationDataStats;
6651
+ /** Output only. Statistics for preference optimization. */
6652
+ preferenceOptimizationDataStats?: PreferenceOptimizationDataStats;
6420
6653
  /** The SFT Tuning data stats. */
6421
6654
  supervisedTuningDataStats?: SupervisedTuningDataStats;
6422
6655
  }
@@ -6452,6 +6685,8 @@ export declare interface TuningJob {
6452
6685
  baseModel?: string;
6453
6686
  /** Output only. The tuned model resources associated with this TuningJob. */
6454
6687
  tunedModel?: TunedModel;
6688
+ /** The pre-tuned model for continuous tuning. */
6689
+ preTunedModel?: PreTunedModel;
6455
6690
  /** Tuning Spec for Supervised Fine Tuning. */
6456
6691
  supervisedTuningSpec?: SupervisedTuningSpec;
6457
6692
  /** Output only. The tuning data statistics associated with this TuningJob. */
@@ -6460,24 +6695,38 @@ export declare interface TuningJob {
6460
6695
  encryptionSpec?: EncryptionSpec;
6461
6696
  /** Tuning Spec for open sourced and third party Partner models. */
6462
6697
  partnerModelTuningSpec?: PartnerModelTuningSpec;
6463
- /** Tuning Spec for Distillation. */
6464
- distillationSpec?: DistillationSpec;
6698
+ /** 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. */
6699
+ customBaseModel?: string;
6465
6700
  /** Output only. The Experiment associated with this TuningJob. */
6466
6701
  experiment?: string;
6467
6702
  /** 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. */
6468
6703
  labels?: Record<string, string>;
6704
+ /** 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. */
6705
+ outputUri?: string;
6469
6706
  /** Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. */
6470
6707
  pipelineJob?: string;
6471
- /** Output only. Reserved for future use. */
6472
- satisfiesPzi?: boolean;
6473
- /** Output only. Reserved for future use. */
6474
- satisfiesPzs?: boolean;
6475
6708
  /** 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. */
6476
6709
  serviceAccount?: string;
6477
6710
  /** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
6478
6711
  tunedModelDisplayName?: string;
6479
6712
  }
6480
6713
 
6714
+ /** Tuning mode. */
6715
+ export declare enum TuningMode {
6716
+ /**
6717
+ * Tuning mode is unspecified.
6718
+ */
6719
+ TUNING_MODE_UNSPECIFIED = "TUNING_MODE_UNSPECIFIED",
6720
+ /**
6721
+ * Full fine-tuning mode.
6722
+ */
6723
+ TUNING_MODE_FULL = "TUNING_MODE_FULL",
6724
+ /**
6725
+ * PEFT adapter tuning mode.
6726
+ */
6727
+ TUNING_MODE_PEFT_ADAPTER = "TUNING_MODE_PEFT_ADAPTER"
6728
+ }
6729
+
6481
6730
  /** A long-running operation. */
6482
6731
  export declare interface TuningOperation {
6483
6732
  /** Used to retain the full HTTP response. */
@@ -6610,7 +6859,6 @@ declare namespace types {
6610
6859
  Mode,
6611
6860
  AuthType,
6612
6861
  ApiSpec,
6613
- Environment,
6614
6862
  UrlRetrievalStatus,
6615
6863
  FinishReason,
6616
6864
  HarmProbability,
@@ -6620,10 +6868,12 @@ declare namespace types {
6620
6868
  Modality,
6621
6869
  MediaResolution,
6622
6870
  JobState,
6871
+ TuningMode,
6623
6872
  AdapterSize,
6624
6873
  FeatureSelectionPreference,
6625
6874
  Behavior,
6626
6875
  DynamicRetrievalConfigMode,
6876
+ Environment,
6627
6877
  FunctionCallingConfigMode,
6628
6878
  SafetyFilterLevel,
6629
6879
  PersonGeneration,
@@ -6642,6 +6892,7 @@ declare namespace types {
6642
6892
  TurnCoverage,
6643
6893
  FunctionResponseScheduling,
6644
6894
  Scale,
6895
+ MusicGenerationMode,
6645
6896
  LiveMusicPlaybackControl,
6646
6897
  VideoMetadata,
6647
6898
  Blob_2 as Blob,
@@ -6670,6 +6921,7 @@ declare namespace types {
6670
6921
  AuthConfig,
6671
6922
  GoogleMaps,
6672
6923
  UrlContext,
6924
+ ToolComputerUse,
6673
6925
  ApiAuthApiKeyConfig,
6674
6926
  ApiAuth,
6675
6927
  ExternalApiElasticSearchParams,
@@ -6687,7 +6939,6 @@ declare namespace types {
6687
6939
  VertexRagStore,
6688
6940
  Retrieval,
6689
6941
  ToolCodeExecution,
6690
- ToolComputerUse,
6691
6942
  Tool,
6692
6943
  FunctionCallingConfig,
6693
6944
  LatLng,
@@ -6712,6 +6963,10 @@ declare namespace types {
6712
6963
  CitationMetadata,
6713
6964
  UrlMetadata,
6714
6965
  UrlContextMetadata,
6966
+ GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
6967
+ GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
6968
+ GroundingChunkMapsPlaceAnswerSources,
6969
+ GroundingChunkMaps,
6715
6970
  RagChunkPageSpan,
6716
6971
  RagChunk,
6717
6972
  GroundingChunkRetrievedContext,
@@ -6752,6 +7007,11 @@ declare namespace types {
6752
7007
  EditImageConfig,
6753
7008
  EditImageResponse,
6754
7009
  UpscaleImageResponse,
7010
+ ProductImage,
7011
+ RecontextImageSource,
7012
+ RecontextImageConfig,
7013
+ RecontextImageParameters,
7014
+ RecontextImageResponse,
6755
7015
  GetModelConfig,
6756
7016
  GetModelParameters,
6757
7017
  Endpoint,
@@ -6785,20 +7045,22 @@ declare namespace types {
6785
7045
  TunedModelCheckpoint,
6786
7046
  TunedModel,
6787
7047
  GoogleRpcStatus,
7048
+ PreTunedModel,
6788
7049
  SupervisedHyperParameters,
6789
7050
  SupervisedTuningSpec,
6790
7051
  DatasetDistributionDistributionBucket,
6791
7052
  DatasetDistribution,
6792
7053
  DatasetStats,
6793
7054
  DistillationDataStats,
7055
+ GeminiPreferenceExampleCompletion,
7056
+ GeminiPreferenceExample,
7057
+ PreferenceOptimizationDataStats,
6794
7058
  SupervisedTuningDatasetDistributionDatasetBucket,
6795
7059
  SupervisedTuningDatasetDistribution,
6796
7060
  SupervisedTuningDataStats,
6797
7061
  TuningDataStats,
6798
7062
  EncryptionSpec,
6799
7063
  PartnerModelTuningSpec,
6800
- DistillationHyperParameters,
6801
- DistillationSpec,
6802
7064
  TuningJob,
6803
7065
  ListTuningJobsConfig,
6804
7066
  ListTuningJobsParameters,
@@ -6807,7 +7069,7 @@ declare namespace types {
6807
7069
  TuningDataset,
6808
7070
  TuningValidationDataset,
6809
7071
  CreateTuningJobConfig,
6810
- CreateTuningJobParameters,
7072
+ CreateTuningJobParametersPrivate,
6811
7073
  TuningOperation,
6812
7074
  CreateCachedContentConfig,
6813
7075
  CreateCachedContentParameters,
@@ -6899,8 +7161,8 @@ declare namespace types {
6899
7161
  ActivityStart,
6900
7162
  ActivityEnd,
6901
7163
  LiveClientRealtimeInput,
6902
- LiveSendRealtimeInputParameters,
6903
7164
  LiveClientToolResponse,
7165
+ LiveSendRealtimeInputParameters,
6904
7166
  LiveClientMessage,
6905
7167
  LiveConnectConfig,
6906
7168
  LiveConnectParameters,
@@ -6930,6 +7192,7 @@ declare namespace types {
6930
7192
  LiveConnectConstraints,
6931
7193
  CreateAuthTokenConfig,
6932
7194
  CreateAuthTokenParameters,
7195
+ CreateTuningJobParameters,
6933
7196
  BlobImageUnion,
6934
7197
  PartUnion,
6935
7198
  PartListUnion,
@@ -7128,7 +7391,15 @@ export declare enum UrlRetrievalStatus {
7128
7391
  /**
7129
7392
  * Url retrieval is failed due to error.
7130
7393
  */
7131
- URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR"
7394
+ URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR",
7395
+ /**
7396
+ * Url retrieval is failed because the content is behind paywall.
7397
+ */
7398
+ URL_RETRIEVAL_STATUS_PAYWALL = "URL_RETRIEVAL_STATUS_PAYWALL",
7399
+ /**
7400
+ * Url retrieval is failed because the content is unsafe.
7401
+ */
7402
+ URL_RETRIEVAL_STATUS_UNSAFE = "URL_RETRIEVAL_STATUS_UNSAFE"
7132
7403
  }
7133
7404
 
7134
7405
  /** Usage metadata about response(s). */