@google/genai 1.27.0 → 1.28.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
@@ -32,7 +32,7 @@ export declare enum ActivityHandling {
32
32
  export declare interface ActivityStart {
33
33
  }
34
34
 
35
- /** Optional. Adapter size for tuning. */
35
+ /** Adapter size for tuning. This enum is not supported in Gemini API. */
36
36
  export declare enum AdapterSize {
37
37
  /**
38
38
  * Adapter size is unspecified.
@@ -114,13 +114,13 @@ declare class ApiClient {
114
114
  setBaseUrl(url: string): void;
115
115
  private constructUrl;
116
116
  private shouldPrependVertexProjectPath;
117
- request(request: HttpRequest): Promise<HttpResponse>;
117
+ request(request: HttpRequest): Promise<types.HttpResponse>;
118
118
  private patchHttpOptions;
119
- requestStream(request: HttpRequest): Promise<AsyncGenerator<HttpResponse>>;
119
+ requestStream(request: HttpRequest): Promise<AsyncGenerator<types.HttpResponse>>;
120
120
  private includeExtraHttpOptionsToRequestInit;
121
121
  private unaryApiCall;
122
122
  private streamApiCall;
123
- processStreamResponse(response: Response): AsyncGenerator<HttpResponse>;
123
+ processStreamResponse(response: Response): AsyncGenerator<types.HttpResponse>;
124
124
  private apiCall;
125
125
  getDefaultHeaders(): Record<string, string>;
126
126
  private getHeadersInternal;
@@ -130,19 +130,19 @@ declare class ApiClient {
130
130
  *
131
131
  * @param file The string path to the file to be uploaded or a Blob object.
132
132
  * @param config Optional parameters specified in the `UploadFileConfig`
133
- * interface. @see {@link UploadFileConfig}
133
+ * interface. @see {@link types.UploadFileConfig}
134
134
  * @return A promise that resolves to a `File` object.
135
135
  * @throws An error if called on a Vertex AI client.
136
136
  * @throws An error if the `mimeType` is not provided and can not be inferred,
137
137
  */
138
- uploadFile(file: string | Blob, config?: UploadFileConfig): Promise<File_2>;
138
+ uploadFile(file: string | Blob, config?: types.UploadFileConfig): Promise<types.File>;
139
139
  /**
140
140
  * Downloads a file asynchronously to the specified path.
141
141
  *
142
142
  * @params params - The parameters for the download request, see {@link
143
- * DownloadFileParameters}
143
+ * types.DownloadFileParameters}
144
144
  */
145
- downloadFile(params: DownloadFileParameters): Promise<void>;
145
+ downloadFile(params: types.DownloadFileParameters): Promise<void>;
146
146
  private fetchUploadUrl;
147
147
  }
148
148
 
@@ -195,7 +195,7 @@ declare interface ApiClientInitOptions {
195
195
  /**
196
196
  * Optional. A set of customizable configuration for HTTP requests.
197
197
  */
198
- httpOptions?: HttpOptions;
198
+ httpOptions?: types.HttpOptions;
199
199
  /**
200
200
  * Optional. An extra string to append at the end of the User-Agent header.
201
201
  *
@@ -234,7 +234,7 @@ export declare interface ApiKeyConfig {
234
234
  apiKeyString?: string;
235
235
  }
236
236
 
237
- /** The API spec that the external API implements. */
237
+ /** The API spec that the external API implements. This enum is not supported in Gemini API. */
238
238
  export declare enum ApiSpec {
239
239
  /**
240
240
  * Unspecified API spec. This value should not be used.
@@ -333,7 +333,7 @@ export declare interface AuthToken {
333
333
  name?: string;
334
334
  }
335
335
 
336
- /** Type of auth scheme. */
336
+ /** Type of auth scheme. This enum is not supported in Gemini API. */
337
337
  export declare enum AuthType {
338
338
  AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
339
339
  /**
@@ -635,11 +635,11 @@ export declare enum Behavior {
635
635
 
636
636
  /** Content blob. */
637
637
  declare interface Blob_2 {
638
- /** Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is not currently used in the Gemini GenerateContent calls. */
639
- displayName?: string;
640
638
  /** Required. Raw bytes.
641
639
  * @remarks Encoded as base64 string. */
642
640
  data?: string;
641
+ /** Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API. */
642
+ displayName?: string;
643
643
  /** Required. The IANA standard MIME type of the source data. */
644
644
  mimeType?: string;
645
645
  }
@@ -896,8 +896,6 @@ export declare interface Candidate {
896
896
  If empty, the model has not stopped generating the tokens.
897
897
  */
898
898
  finishReason?: FinishReason;
899
- /** Metadata related to url context retrieval tool. */
900
- urlContextMetadata?: UrlContextMetadata;
901
899
  /** Output only. Average log probability score of the candidate. */
902
900
  avgLogprobs?: number;
903
901
  /** Output only. Metadata specifies sources used to ground generated content. */
@@ -908,6 +906,8 @@ export declare interface Candidate {
908
906
  logprobsResult?: LogprobsResult;
909
907
  /** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */
910
908
  safetyRatings?: SafetyRating[];
909
+ /** Output only. Metadata related to url context retrieval tool. */
910
+ urlContextMetadata?: UrlContextMetadata;
911
911
  }
912
912
 
913
913
  /**
@@ -1125,9 +1125,7 @@ export declare interface Content {
1125
1125
  /** List of parts that constitute a single message. Each part may have
1126
1126
  a different IANA MIME type. */
1127
1127
  parts?: Part[];
1128
- /** Optional. The producer of the content. Must be either 'user' or
1129
- 'model'. Useful to set for multi-turn conversations, otherwise can be
1130
- empty. If role is not specified, SDK will determine the role. */
1128
+ /** Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. */
1131
1129
  role?: string;
1132
1130
  }
1133
1131
 
@@ -1528,7 +1526,7 @@ export declare function createPartFromText(text: string): Part;
1528
1526
  */
1529
1527
  export declare function createPartFromUri(uri: string, mimeType: string): Part;
1530
1528
 
1531
- /** Supervised fine-tuning job creation request - optional fields. */
1529
+ /** Fine-tuning job creation request - optional fields. */
1532
1530
  export declare interface CreateTuningJobConfig {
1533
1531
  /** Used to override HTTP request options. */
1534
1532
  httpOptions?: HttpOptions;
@@ -1539,6 +1537,8 @@ export declare interface CreateTuningJobConfig {
1539
1537
  be charged usage for any applicable operations.
1540
1538
  */
1541
1539
  abortSignal?: AbortSignal;
1540
+ /** The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING). If not set, the default method (SFT) will be used. */
1541
+ method?: TuningMethod;
1542
1542
  /** Validation dataset for tuning. The dataset must be formatted as a JSONL file. */
1543
1543
  validationDataset?: TuningValidationDataset;
1544
1544
  /** The display name of the tuned Model. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
@@ -1549,7 +1549,7 @@ export declare interface CreateTuningJobConfig {
1549
1549
  epochCount?: number;
1550
1550
  /** Multiplier for adjusting the default learning rate. */
1551
1551
  learningRateMultiplier?: number;
1552
- /** If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. */
1552
+ /** If set to true, disable intermediate checkpoints and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints. */
1553
1553
  exportLastCheckpointOnly?: boolean;
1554
1554
  /** The optional checkpoint id of the pre-tuned model to use for tuning, if applicable. */
1555
1555
  preTunedModelCheckpointId?: string;
@@ -1561,9 +1561,11 @@ export declare interface CreateTuningJobConfig {
1561
1561
  learningRate?: number;
1562
1562
  /** 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. */
1563
1563
  labels?: Record<string, string>;
1564
+ /** Weight for KL Divergence regularization, Preference Optimization tuning only. */
1565
+ beta?: number;
1564
1566
  }
1565
1567
 
1566
- /** Supervised fine-tuning job creation parameters - optional fields. */
1568
+ /** Fine-tuning job creation parameters - optional fields. */
1567
1569
  export declare interface CreateTuningJobParameters {
1568
1570
  /** The base model that is being tuned, e.g., "gemini-2.5-flash". */
1569
1571
  baseModel: string;
@@ -1573,7 +1575,7 @@ export declare interface CreateTuningJobParameters {
1573
1575
  config?: CreateTuningJobConfig;
1574
1576
  }
1575
1577
 
1576
- /** Supervised fine-tuning job creation parameters - optional fields. */
1578
+ /** Fine-tuning job creation parameters - optional fields. */
1577
1579
  export declare interface CreateTuningJobParametersPrivate {
1578
1580
  /** The base model that is being tuned, e.g., "gemini-2.5-flash". */
1579
1581
  baseModel?: string;
@@ -2021,7 +2023,7 @@ export declare enum EndSensitivity {
2021
2023
  END_SENSITIVITY_LOW = "END_SENSITIVITY_LOW"
2022
2024
  }
2023
2025
 
2024
- /** Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. */
2026
+ /** Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. This data type is not supported in Gemini API. */
2025
2027
  export declare interface EnterpriseWebSearch {
2026
2028
  /** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. */
2027
2029
  excludeDomains?: string[];
@@ -2149,7 +2151,7 @@ export { File_2 as File }
2149
2151
 
2150
2152
  /** URI based data. */
2151
2153
  export declare interface FileData {
2152
- /** Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. It is not currently used in the Gemini GenerateContent calls. */
2154
+ /** Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API. */
2153
2155
  displayName?: string;
2154
2156
  /** Required. URI. */
2155
2157
  fileUri?: string;
@@ -3447,14 +3449,12 @@ export declare interface GoogleRpcStatus {
3447
3449
  message?: string;
3448
3450
  }
3449
3451
 
3450
- /** Tool to support Google Search in Model. Powered by Google. */
3452
+ /** GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
3451
3453
  export declare interface GoogleSearch {
3452
- /** Optional. Filter search results to a specific time range.
3453
- If customers set a start time, they must set an end time (and vice versa).
3454
- */
3455
- timeRangeFilter?: Interval;
3456
3454
  /** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: ["amazon.com", "facebook.com"]. This field is not supported in Gemini API. */
3457
3455
  excludeDomains?: string[];
3456
+ /** Optional. Filter search results to a specific time range. If customers set a start time, they must set an end time (and vice versa). This field is not supported in Vertex AI. */
3457
+ timeRangeFilter?: Interval;
3458
3458
  }
3459
3459
 
3460
3460
  /** Tool to retrieve public web data for grounding, powered by Google. */
@@ -3595,7 +3595,7 @@ export declare interface GroundingSupport {
3595
3595
  segment?: Segment;
3596
3596
  }
3597
3597
 
3598
- /** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */
3598
+ /** Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. This enum is not supported in Gemini API. */
3599
3599
  export declare enum HarmBlockMethod {
3600
3600
  /**
3601
3601
  * The harm block method is unspecified.
@@ -3611,7 +3611,7 @@ export declare enum HarmBlockMethod {
3611
3611
  PROBABILITY = "PROBABILITY"
3612
3612
  }
3613
3613
 
3614
- /** Required. The harm block threshold. */
3614
+ /** The harm block threshold. */
3615
3615
  export declare enum HarmBlockThreshold {
3616
3616
  /**
3617
3617
  * Unspecified harm block threshold.
@@ -3639,7 +3639,7 @@ export declare enum HarmBlockThreshold {
3639
3639
  OFF = "OFF"
3640
3640
  }
3641
3641
 
3642
- /** Required. Harm category. */
3642
+ /** Harm category. */
3643
3643
  export declare enum HarmCategory {
3644
3644
  /**
3645
3645
  * The harm category is unspecified.
@@ -3711,7 +3711,7 @@ export declare enum HarmProbability {
3711
3711
  HIGH = "HIGH"
3712
3712
  }
3713
3713
 
3714
- /** Output only. Harm severity levels in the content. */
3714
+ /** Output only. Harm severity levels in the content. This enum is not supported in Gemini API. */
3715
3715
  export declare enum HarmSeverity {
3716
3716
  /**
3717
3717
  * Harm severity unspecified.
@@ -3794,7 +3794,7 @@ declare interface HttpRequest {
3794
3794
  /**
3795
3795
  * Optional set of customizable configuration for HTTP requests.
3796
3796
  */
3797
- httpOptions?: HttpOptions;
3797
+ httpOptions?: types.HttpOptions;
3798
3798
  /**
3799
3799
  * Optional abort signal which can be used to cancel the request.
3800
3800
  */
@@ -3905,17 +3905,12 @@ export declare class InlinedResponse {
3905
3905
  error?: JobError;
3906
3906
  }
3907
3907
 
3908
- /** Represents a time interval, encoded as a start time (inclusive) and an end time (exclusive).
3909
-
3910
- The start time must be less than or equal to the end time.
3911
- When the start equals the end time, the interval is an empty interval.
3912
- (matches no time)
3913
- When both start and end are unspecified, the interval matches any time. */
3908
+ /** Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. */
3914
3909
  export declare interface Interval {
3915
- /** The start time of the interval. */
3916
- startTime?: string;
3917
- /** The end time of the interval. */
3910
+ /** Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. */
3918
3911
  endTime?: string;
3912
+ /** Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. */
3913
+ startTime?: string;
3919
3914
  }
3920
3915
 
3921
3916
  /** Job error. */
@@ -3980,7 +3975,7 @@ export declare enum JobState {
3980
3975
  JOB_STATE_PARTIALLY_SUCCEEDED = "JOB_STATE_PARTIALLY_SUCCEEDED"
3981
3976
  }
3982
3977
 
3983
- /** Required. Programming language of the `code`. */
3978
+ /** Programming language of the `code`. */
3984
3979
  export declare enum Language {
3985
3980
  /**
3986
3981
  * Unspecified language. This value should not be used.
@@ -5489,9 +5484,9 @@ export declare interface ModelSelectionConfig {
5489
5484
  featureSelectionPreference?: FeatureSelectionPreference;
5490
5485
  }
5491
5486
 
5492
- /** The configuration for the multi-speaker setup. */
5487
+ /** The configuration for the multi-speaker setup. This data type is not supported in Vertex AI. */
5493
5488
  export declare interface MultiSpeakerVoiceConfig {
5494
- /** The configuration for the speaker to use. */
5489
+ /** Required. All the enabled speaker voices. */
5495
5490
  speakerVoiceConfigs?: SpeakerVoiceConfig[];
5496
5491
  }
5497
5492
 
@@ -5574,7 +5569,7 @@ export declare class Operations extends BaseModule {
5574
5569
  private fetchPredictVideosOperationInternal;
5575
5570
  }
5576
5571
 
5577
- /** Required. Outcome of the code execution. */
5572
+ /** Outcome of the code execution. */
5578
5573
  export declare enum Outcome {
5579
5574
  /**
5580
5575
  * Unspecified status. This value should not be used.
@@ -5599,10 +5594,13 @@ export declare enum PagedItem {
5599
5594
  PAGED_ITEM_MODELS = "models",
5600
5595
  PAGED_ITEM_TUNING_JOBS = "tuningJobs",
5601
5596
  PAGED_ITEM_FILES = "files",
5602
- PAGED_ITEM_CACHED_CONTENTS = "cachedContents"
5597
+ PAGED_ITEM_CACHED_CONTENTS = "cachedContents",
5598
+ PAGED_ITEM_RAG_STORES = "ragStores",
5599
+ PAGED_ITEM_DOCUMENTS = "documents"
5603
5600
  }
5604
5601
 
5605
5602
  declare interface PagedItemConfig {
5603
+ parent?: string;
5606
5604
  config?: {
5607
5605
  pageToken?: string;
5608
5606
  pageSize?: number;
@@ -5617,6 +5615,8 @@ declare interface PagedItemResponse<T> {
5617
5615
  tuningJobs?: T[];
5618
5616
  files?: T[];
5619
5617
  cachedContents?: T[];
5618
+ ragStores?: T[];
5619
+ documents?: T[];
5620
5620
  }
5621
5621
 
5622
5622
  /**
@@ -5725,17 +5725,6 @@ export declare class Pager<T> implements AsyncIterable<T> {
5725
5725
  of content being conveyed. Using multiple fields within the same `Part`
5726
5726
  instance is considered invalid. */
5727
5727
  export declare interface Part {
5728
- /** Metadata for a given video. */
5729
- videoMetadata?: VideoMetadata;
5730
- /** Indicates if the part is thought from the model. */
5731
- thought?: boolean;
5732
- /** Optional. Inlined bytes data. */
5733
- inlineData?: Blob_2;
5734
- /** Optional. URI based data. */
5735
- fileData?: FileData;
5736
- /** An opaque signature for the thought so it can be reused in subsequent requests.
5737
- * @remarks Encoded as base64 string. */
5738
- thoughtSignature?: string;
5739
5728
  /** A predicted [FunctionCall] returned from the model that contains a string
5740
5729
  representing the [FunctionDeclaration.name] and a structured JSON object
5741
5730
  containing the parameters and their values. */
@@ -5744,10 +5733,21 @@ export declare interface Part {
5744
5733
  codeExecutionResult?: CodeExecutionResult;
5745
5734
  /** Optional. Code generated by the model that is meant to be executed. */
5746
5735
  executableCode?: ExecutableCode;
5736
+ /** Optional. URI based data. */
5737
+ fileData?: FileData;
5747
5738
  /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */
5748
5739
  functionResponse?: FunctionResponse;
5740
+ /** Optional. Inlined bytes data. */
5741
+ inlineData?: Blob_2;
5749
5742
  /** Optional. Text part (can be code). */
5750
5743
  text?: string;
5744
+ /** Optional. Indicates if the part is thought from the model. */
5745
+ thought?: boolean;
5746
+ /** Optional. An opaque signature for the thought so it can be reused in subsequent requests.
5747
+ * @remarks Encoded as base64 string. */
5748
+ thoughtSignature?: string;
5749
+ /** Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. */
5750
+ videoMetadata?: VideoMetadata;
5751
5751
  }
5752
5752
 
5753
5753
  export declare type PartListUnion = PartUnion[] | PartUnion;
@@ -5782,7 +5782,7 @@ export declare enum PersonGeneration {
5782
5782
 
5783
5783
  /** The configuration for the prebuilt speaker to use. */
5784
5784
  export declare interface PrebuiltVoiceConfig {
5785
- /** The name of the prebuilt voice to use. */
5785
+ /** The name of the preset voice to use. */
5786
5786
  voiceName?: string;
5787
5787
  }
5788
5788
 
@@ -5806,6 +5806,28 @@ export declare interface PreferenceOptimizationDataStats {
5806
5806
  userOutputTokenDistribution?: DatasetDistribution;
5807
5807
  }
5808
5808
 
5809
+ /** Hyperparameters for Preference Optimization. This data type is not supported in Gemini API. */
5810
+ export declare interface PreferenceOptimizationHyperParameters {
5811
+ /** Optional. Adapter size for preference optimization. */
5812
+ adapterSize?: AdapterSize;
5813
+ /** Optional. Weight for KL Divergence regularization. */
5814
+ beta?: number;
5815
+ /** Optional. Number of complete passes the model makes over the entire training dataset during training. */
5816
+ epochCount?: string;
5817
+ /** Optional. Multiplier for adjusting the default learning rate. */
5818
+ learningRateMultiplier?: number;
5819
+ }
5820
+
5821
+ /** Preference optimization tuning spec for tuning. */
5822
+ export declare interface PreferenceOptimizationSpec {
5823
+ /** Optional. Hyperparameters for Preference Optimization. */
5824
+ hyperParameters?: PreferenceOptimizationHyperParameters;
5825
+ /** Required. Cloud Storage path to file containing training dataset for preference optimization tuning. The dataset must be formatted as a JSONL file. */
5826
+ trainingDatasetUri?: string;
5827
+ /** Optional. Cloud Storage path to file containing validation dataset for preference optimization tuning. The dataset must be formatted as a JSONL file. */
5828
+ validationDatasetUri?: string;
5829
+ }
5830
+
5809
5831
  /** A pre-tuned model for continuous tuning. This data type is not supported in Gemini API. */
5810
5832
  export declare interface PreTunedModel {
5811
5833
  /** Output only. The name of the base model this PreTunedModel was tuned from. */
@@ -6089,13 +6111,13 @@ export declare interface SafetyRating {
6089
6111
  blocked?: boolean;
6090
6112
  /** Output only. Harm category. */
6091
6113
  category?: HarmCategory;
6092
- /** Output only. The overwritten threshold for the safety category of Gemini 2.0 image out. If minors are detected in the output image, the threshold of each safety category will be overwritten if user sets a lower threshold. */
6114
+ /** Output only. The overwritten threshold for the safety category of Gemini 2.0 image out. If minors are detected in the output image, the threshold of each safety category will be overwritten if user sets a lower threshold. This field is not supported in Gemini API. */
6093
6115
  overwrittenThreshold?: HarmBlockThreshold;
6094
6116
  /** Output only. Harm probability levels in the content. */
6095
6117
  probability?: HarmProbability;
6096
6118
  /** Output only. Harm probability score. This field is not supported in Gemini API. */
6097
6119
  probabilityScore?: number;
6098
- /** Output only. Harm severity levels in the content. */
6120
+ /** Output only. Harm severity levels in the content. This field is not supported in Gemini API. */
6099
6121
  severity?: HarmSeverity;
6100
6122
  /** Output only. Harm severity score. This field is not supported in Gemini API. */
6101
6123
  severityScore?: number;
@@ -6103,11 +6125,10 @@ export declare interface SafetyRating {
6103
6125
 
6104
6126
  /** Safety settings. */
6105
6127
  export declare interface SafetySetting {
6106
- /** Determines if the harm block method uses probability or probability
6107
- and severity scores. */
6108
- method?: HarmBlockMethod;
6109
6128
  /** Required. Harm category. */
6110
6129
  category?: HarmCategory;
6130
+ /** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. This field is not supported in Gemini API. */
6131
+ method?: HarmBlockMethod;
6111
6132
  /** Required. The harm block threshold. */
6112
6133
  threshold?: HarmBlockThreshold;
6113
6134
  }
@@ -6521,28 +6542,22 @@ export declare interface SlidingWindow {
6521
6542
  targetTokens?: string;
6522
6543
  }
6523
6544
 
6524
- /** The configuration for the speaker to use. */
6545
+ /** The configuration for a single speaker in a multi speaker setup. This data type is not supported in Vertex AI. */
6525
6546
  export declare interface SpeakerVoiceConfig {
6526
- /** The name of the speaker to use. Should be the same as in the
6527
- prompt. */
6547
+ /** Required. The name of the speaker to use. Should be the same as in the prompt. */
6528
6548
  speaker?: string;
6529
- /** The configuration for the voice to use. */
6549
+ /** Required. The configuration for the voice to use. */
6530
6550
  voiceConfig?: VoiceConfig;
6531
6551
  }
6532
6552
 
6533
- /** The speech generation configuration. */
6553
+ /** The speech generation config. */
6534
6554
  export declare interface SpeechConfig {
6535
- /** The configuration for the speaker to use.
6536
- */
6555
+ /** Optional. Language code (ISO 639. e.g. en-US) for the speech synthesization. */
6556
+ languageCode?: string;
6557
+ /** The configuration for the speaker to use. */
6537
6558
  voiceConfig?: VoiceConfig;
6538
- /** The configuration for the multi-speaker setup.
6539
- It is mutually exclusive with the voice_config field.
6540
- */
6559
+ /** Optional. The configuration for the multi-speaker setup. It is mutually exclusive with the voice_config field. This field is not supported in Vertex AI. */
6541
6560
  multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
6542
- /** Language code (ISO 639. e.g. en-US) for the speech synthesization.
6543
- Only available for Live API.
6544
- */
6545
- languageCode?: string;
6546
6561
  }
6547
6562
 
6548
6563
  export declare type SpeechConfigUnion = SpeechConfig | string;
@@ -6698,7 +6713,7 @@ export declare interface SupervisedTuningDataStats {
6698
6713
  userOutputTokenDistribution?: SupervisedTuningDatasetDistribution;
6699
6714
  }
6700
6715
 
6701
- /** Tuning Spec for Supervised Tuning for first party models. This data type is not supported in Gemini API. */
6716
+ /** Supervised tuning spec for tuning. */
6702
6717
  export declare interface SupervisedTuningSpec {
6703
6718
  /** Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false. */
6704
6719
  exportLastCheckpointOnly?: boolean;
@@ -6854,25 +6869,23 @@ export declare interface Tool {
6854
6869
  functionDeclarations?: FunctionDeclaration[];
6855
6870
  /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. This field is not supported in Gemini API. */
6856
6871
  retrieval?: Retrieval;
6857
- /** Optional. Google Search tool type. Specialized retrieval tool
6858
- that is powered by Google Search. */
6859
- googleSearch?: GoogleSearch;
6860
6872
  /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */
6861
6873
  googleSearchRetrieval?: GoogleSearchRetrieval;
6862
- /** Optional. Enterprise web search tool type. Specialized retrieval
6863
- tool that is powered by Vertex AI Search and Sec4 compliance. */
6864
- enterpriseWebSearch?: EnterpriseWebSearch;
6865
6874
  /** Optional. Google Maps tool type. Specialized retrieval tool
6866
6875
  that is powered by Google Maps. */
6867
6876
  googleMaps?: GoogleMaps;
6868
- /** Optional. Tool to support URL context retrieval. */
6869
- urlContext?: UrlContext;
6870
6877
  /** Optional. Tool to support the model interacting directly with the
6871
6878
  computer. If enabled, it automatically populates computer-use specific
6872
6879
  Function Declarations. */
6873
6880
  computerUse?: ComputerUse;
6874
6881
  /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
6875
6882
  codeExecution?: ToolCodeExecution;
6883
+ /** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
6884
+ enterpriseWebSearch?: EnterpriseWebSearch;
6885
+ /** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
6886
+ googleSearch?: GoogleSearch;
6887
+ /** Optional. Tool to support URL context retrieval. */
6888
+ urlContext?: UrlContext;
6876
6889
  }
6877
6890
 
6878
6891
  /** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. This data type is not supported in Gemini API. */
@@ -6893,7 +6906,7 @@ export declare type ToolListUnion = ToolUnion[];
6893
6906
 
6894
6907
  export declare type ToolUnion = Tool | CallableTool;
6895
6908
 
6896
- /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */
6909
+ /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. This enum is not supported in Gemini API. */
6897
6910
  export declare enum TrafficType {
6898
6911
  /**
6899
6912
  * Unspecified request traffic type.
@@ -7021,6 +7034,8 @@ export declare interface TuningJob {
7021
7034
  preTunedModel?: PreTunedModel;
7022
7035
  /** Tuning Spec for Supervised Fine Tuning. */
7023
7036
  supervisedTuningSpec?: SupervisedTuningSpec;
7037
+ /** Tuning Spec for Preference Optimization. */
7038
+ preferenceOptimizationSpec?: PreferenceOptimizationSpec;
7024
7039
  /** Output only. The tuning data statistics associated with this TuningJob. */
7025
7040
  tuningDataStats?: TuningDataStats;
7026
7041
  /** Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key. */
@@ -7045,7 +7060,19 @@ export declare interface TuningJob {
7045
7060
  veoTuningSpec?: VeoTuningSpec;
7046
7061
  }
7047
7062
 
7048
- /** Tuning mode. */
7063
+ /** Enum representing the tuning method. */
7064
+ export declare enum TuningMethod {
7065
+ /**
7066
+ * Supervised fine tuning.
7067
+ */
7068
+ SUPERVISED_FINE_TUNING = "SUPERVISED_FINE_TUNING",
7069
+ /**
7070
+ * Preference optimization tuning.
7071
+ */
7072
+ PREFERENCE_TUNING = "PREFERENCE_TUNING"
7073
+ }
7074
+
7075
+ /** Tuning mode. This enum is not supported in Gemini API. */
7049
7076
  export declare enum TuningMode {
7050
7077
  /**
7051
7078
  * Tuning mode is unspecified.
@@ -7126,7 +7153,7 @@ declare class Tunings extends BaseModule {
7126
7153
  private tuneMldevInternal;
7127
7154
  }
7128
7155
 
7129
- /** Optional. The tuning task. Either I2V or T2V. */
7156
+ /** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
7130
7157
  export declare enum TuningTask {
7131
7158
  /**
7132
7159
  * Default value. This value is unused.
@@ -7185,7 +7212,7 @@ export declare enum TurnCoverage {
7185
7212
  TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT"
7186
7213
  }
7187
7214
 
7188
- /** Optional. The type of the data. */
7215
+ /** The type of the data. */
7189
7216
  export declare enum Type {
7190
7217
  /**
7191
7218
  * Not specified, should not be used.
@@ -7238,23 +7265,23 @@ declare namespace types {
7238
7265
  Language,
7239
7266
  FunctionResponseScheduling,
7240
7267
  Type,
7241
- HarmCategory,
7242
- HarmBlockMethod,
7243
- HarmBlockThreshold,
7244
7268
  Mode,
7245
7269
  AuthType,
7246
7270
  ApiSpec,
7247
- UrlRetrievalStatus,
7271
+ HarmCategory,
7272
+ HarmBlockMethod,
7273
+ HarmBlockThreshold,
7248
7274
  FinishReason,
7249
7275
  HarmProbability,
7250
7276
  HarmSeverity,
7277
+ UrlRetrievalStatus,
7251
7278
  BlockedReason,
7252
7279
  TrafficType,
7253
7280
  Modality,
7254
7281
  MediaResolution,
7255
- JobState,
7256
7282
  TuningMode,
7257
7283
  AdapterSize,
7284
+ JobState,
7258
7285
  TuningTask,
7259
7286
  FeatureSelectionPreference,
7260
7287
  Behavior,
@@ -7272,6 +7299,7 @@ declare namespace types {
7272
7299
  VideoGenerationReferenceType,
7273
7300
  VideoGenerationMaskMode,
7274
7301
  VideoCompressionQuality,
7302
+ TuningMethod,
7275
7303
  FileState,
7276
7304
  FileSource,
7277
7305
  TurnCompleteReason,
@@ -7283,28 +7311,24 @@ declare namespace types {
7283
7311
  Scale,
7284
7312
  MusicGenerationMode,
7285
7313
  LiveMusicPlaybackControl,
7286
- VideoMetadata,
7287
- Blob_2 as Blob,
7288
- FileData,
7289
7314
  FunctionCall,
7290
7315
  CodeExecutionResult,
7291
7316
  ExecutableCode,
7317
+ FileData,
7292
7318
  FunctionResponseBlob,
7293
7319
  FunctionResponseFileData,
7294
7320
  FunctionResponsePart,
7295
7321
  FunctionResponse,
7322
+ Blob_2 as Blob,
7323
+ VideoMetadata,
7296
7324
  Part,
7297
7325
  Content,
7298
7326
  HttpOptions,
7299
7327
  Schema,
7300
7328
  ModelSelectionConfig,
7301
- SafetySetting,
7302
7329
  FunctionDeclaration,
7303
- Interval,
7304
- GoogleSearch,
7305
7330
  DynamicRetrievalConfig,
7306
7331
  GoogleSearchRetrieval,
7307
- EnterpriseWebSearch,
7308
7332
  ApiKeyConfig,
7309
7333
  AuthConfigGoogleServiceAccountConfig,
7310
7334
  AuthConfigHttpBasicAuthConfig,
@@ -7312,7 +7336,6 @@ declare namespace types {
7312
7336
  AuthConfigOidcConfig,
7313
7337
  AuthConfig,
7314
7338
  GoogleMaps,
7315
- UrlContext,
7316
7339
  ComputerUse,
7317
7340
  ApiAuthApiKeyConfig,
7318
7341
  ApiAuth,
@@ -7331,22 +7354,22 @@ declare namespace types {
7331
7354
  VertexRagStore,
7332
7355
  Retrieval,
7333
7356
  ToolCodeExecution,
7357
+ EnterpriseWebSearch,
7358
+ Interval,
7359
+ GoogleSearch,
7360
+ UrlContext,
7334
7361
  Tool,
7335
7362
  FunctionCallingConfig,
7336
7363
  LatLng,
7337
7364
  RetrievalConfig,
7338
7365
  ToolConfig,
7339
- PrebuiltVoiceConfig,
7340
- VoiceConfig,
7341
- SpeakerVoiceConfig,
7342
- MultiSpeakerVoiceConfig,
7343
- SpeechConfig,
7344
7366
  AutomaticFunctionCallingConfig,
7345
7367
  ThinkingConfig,
7346
7368
  ImageConfig,
7347
7369
  GenerationConfigRoutingConfigAutoRoutingMode,
7348
7370
  GenerationConfigRoutingConfigManualRoutingMode,
7349
7371
  GenerationConfigRoutingConfig,
7372
+ SafetySetting,
7350
7373
  GenerateContentConfig,
7351
7374
  GenerateContentParameters,
7352
7375
  HttpResponse,
@@ -7354,8 +7377,6 @@ declare namespace types {
7354
7377
  GoogleTypeDate,
7355
7378
  Citation,
7356
7379
  CitationMetadata,
7357
- UrlMetadata,
7358
- UrlContextMetadata,
7359
7380
  GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
7360
7381
  GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
7361
7382
  GroundingChunkMapsPlaceAnswerSources,
@@ -7375,6 +7396,8 @@ declare namespace types {
7375
7396
  LogprobsResultTopCandidates,
7376
7397
  LogprobsResult,
7377
7398
  SafetyRating,
7399
+ UrlMetadata,
7400
+ UrlContextMetadata,
7378
7401
  Candidate,
7379
7402
  GenerateContentResponsePromptFeedback,
7380
7403
  ModalityTokenCount,
@@ -7427,6 +7450,11 @@ declare namespace types {
7427
7450
  DeleteModelConfig,
7428
7451
  DeleteModelParameters,
7429
7452
  DeleteModelResponse,
7453
+ PrebuiltVoiceConfig,
7454
+ VoiceConfig,
7455
+ SpeakerVoiceConfig,
7456
+ MultiSpeakerVoiceConfig,
7457
+ SpeechConfig,
7430
7458
  GenerationConfig,
7431
7459
  CountTokensConfig,
7432
7460
  CountTokensParameters,
@@ -7449,10 +7477,12 @@ declare namespace types {
7449
7477
  GetTuningJobParameters,
7450
7478
  TunedModelCheckpoint,
7451
7479
  TunedModel,
7452
- GoogleRpcStatus,
7453
- PreTunedModel,
7454
7480
  SupervisedHyperParameters,
7455
7481
  SupervisedTuningSpec,
7482
+ PreferenceOptimizationHyperParameters,
7483
+ PreferenceOptimizationSpec,
7484
+ GoogleRpcStatus,
7485
+ PreTunedModel,
7456
7486
  DatasetDistributionDistributionBucket,
7457
7487
  DatasetDistribution,
7458
7488
  DatasetStats,
@@ -7738,6 +7768,10 @@ export declare interface UpscaleImageConfig {
7738
7768
  abortSignal?: AbortSignal;
7739
7769
  /** Cloud Storage URI used to store the generated images. */
7740
7770
  outputGcsUri?: string;
7771
+ /** Filter level for safety filtering. */
7772
+ safetyFilterLevel?: SafetyFilterLevel;
7773
+ /** Allows generation of people by the model. */
7774
+ personGeneration?: PersonGeneration;
7741
7775
  /** Whether to include a reason for filtered-out images in the
7742
7776
  response. */
7743
7777
  includeRaiReason?: boolean;
@@ -7778,19 +7812,19 @@ export declare class UpscaleImageResponse {
7778
7812
  generatedImages?: GeneratedImage[];
7779
7813
  }
7780
7814
 
7781
- /** Tool to support URL context retrieval. */
7815
+ /** Tool to support URL context. */
7782
7816
  export declare interface UrlContext {
7783
7817
  }
7784
7818
 
7785
7819
  /** Metadata related to url context retrieval tool. */
7786
7820
  export declare interface UrlContextMetadata {
7787
- /** List of url context. */
7821
+ /** Output only. List of url context. */
7788
7822
  urlMetadata?: UrlMetadata[];
7789
7823
  }
7790
7824
 
7791
- /** Context for a single url retrieval. */
7825
+ /** Context of the a single url retrieval. */
7792
7826
  export declare interface UrlMetadata {
7793
- /** The URL retrieved by the tool. */
7827
+ /** Retrieved url by the tool. */
7794
7828
  retrievedUrl?: string;
7795
7829
  /** Status of the url retrieval. */
7796
7830
  urlRetrievalStatus?: UrlRetrievalStatus;
@@ -7799,7 +7833,7 @@ export declare interface UrlMetadata {
7799
7833
  /** Status of the url retrieval. */
7800
7834
  export declare enum UrlRetrievalStatus {
7801
7835
  /**
7802
- * Default value. This value is unused
7836
+ * Default value. This value is unused.
7803
7837
  */
7804
7838
  URL_RETRIEVAL_STATUS_UNSPECIFIED = "URL_RETRIEVAL_STATUS_UNSPECIFIED",
7805
7839
  /**
@@ -7811,11 +7845,11 @@ export declare enum UrlRetrievalStatus {
7811
7845
  */
7812
7846
  URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR",
7813
7847
  /**
7814
- * Url retrieval is failed because the content is behind paywall.
7848
+ * Url retrieval is failed because the content is behind paywall. This enum value is not supported in Vertex AI.
7815
7849
  */
7816
7850
  URL_RETRIEVAL_STATUS_PAYWALL = "URL_RETRIEVAL_STATUS_PAYWALL",
7817
7851
  /**
7818
- * Url retrieval is failed because the content is unsafe.
7852
+ * Url retrieval is failed because the content is unsafe. This enum value is not supported in Vertex AI.
7819
7853
  */
7820
7854
  URL_RETRIEVAL_STATUS_UNSAFE = "URL_RETRIEVAL_STATUS_UNSAFE"
7821
7855
  }
@@ -7999,21 +8033,19 @@ export declare enum VideoGenerationReferenceType {
7999
8033
  STYLE = "STYLE"
8000
8034
  }
8001
8035
 
8002
- /** Describes how the video in the Part should be used by the model. */
8036
+ /** Metadata describes the input video content. */
8003
8037
  export declare interface VideoMetadata {
8004
- /** The frame rate of the video sent to the model. If not specified, the
8005
- default value will be 1.0. The fps range is (0.0, 24.0]. */
8006
- fps?: number;
8007
8038
  /** Optional. The end offset of the video. */
8008
8039
  endOffset?: string;
8040
+ /** Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]. */
8041
+ fps?: number;
8009
8042
  /** Optional. The start offset of the video. */
8010
8043
  startOffset?: string;
8011
8044
  }
8012
8045
 
8013
8046
  /** The configuration for the voice to use. */
8014
8047
  export declare interface VoiceConfig {
8015
- /** The configuration for the speaker to use.
8016
- */
8048
+ /** The configuration for the prebuilt voice to use. */
8017
8049
  prebuiltVoiceConfig?: PrebuiltVoiceConfig;
8018
8050
  }
8019
8051