@google/genai 1.42.0 → 1.44.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.
@@ -40,8 +40,10 @@ declare enum ApiSpec {
40
40
  ELASTIC_SEARCH = "ELASTIC_SEARCH"
41
41
  }
42
42
 
43
- /** Auth configuration to run the extension. This data type is not supported in Gemini API. */
43
+ /** The authentication config to access the API. */
44
44
  declare interface AuthConfig {
45
+ /** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
46
+ apiKey?: string;
45
47
  /** Config for API key auth. */
46
48
  apiKeyConfig?: ApiKeyConfig;
47
49
  /** Type of auth scheme. */
@@ -129,12 +131,12 @@ declare enum Behavior {
129
131
  NON_BLOCKING = "NON_BLOCKING"
130
132
  }
131
133
 
132
- /** Content blob. */
134
+ /** A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. */
133
135
  declare interface Blob_2 {
134
- /** Required. Raw bytes.
136
+ /** Required. The raw bytes of the data.
135
137
  * @remarks Encoded as base64 string. */
136
138
  data?: string;
137
- /** 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. */
139
+ /** Optional. The 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 used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled. This field is not supported in Gemini API. */
138
140
  displayName?: string;
139
141
  /** Required. The IANA standard MIME type of the source data. */
140
142
  mimeType?: string;
@@ -171,7 +173,7 @@ declare interface Content {
171
173
  /** List of parts that constitute a single message. Each part may have
172
174
  a different IANA MIME type. */
173
175
  parts?: Part[];
174
- /** 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. */
176
+ /** Optional. The producer of the content. Must be either 'user' or 'model'. If not set, the service will default to 'user'. */
175
177
  role?: string;
176
178
  }
177
179
 
@@ -231,10 +233,10 @@ declare enum DynamicRetrievalConfigMode {
231
233
 
232
234
  /** Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. This data type is not supported in Gemini API. */
233
235
  declare interface EnterpriseWebSearch {
234
- /** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. */
235
- excludeDomains?: string[];
236
236
  /** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. */
237
237
  blockingConfidence?: PhishBlockThreshold;
238
+ /** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. */
239
+ excludeDomains?: string[];
238
240
  }
239
241
 
240
242
  /** The environment being operated. */
@@ -295,11 +297,11 @@ declare enum FeatureSelectionPreference {
295
297
  PRIORITIZE_COST = "PRIORITIZE_COST"
296
298
  }
297
299
 
298
- /** URI based data. */
300
+ /** URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. */
299
301
  declare interface FileData {
300
- /** 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. */
302
+ /** Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled. This field is not supported in Gemini API. */
301
303
  displayName?: string;
302
- /** Required. URI. */
304
+ /** Required. The URI of the file in Google Cloud Storage. */
303
305
  fileUri?: string;
304
306
  /** Required. The IANA standard MIME type of the source data. */
305
307
  mimeType?: string;
@@ -335,7 +337,7 @@ declare interface FunctionCall {
335
337
  declare interface FunctionDeclaration {
336
338
  /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */
337
339
  description?: string;
338
- /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */
340
+ /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 64. */
339
341
  name?: string;
340
342
  /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */
341
343
  parameters?: Schema;
@@ -436,84 +438,86 @@ declare interface GenerationConfig {
436
438
  `response_schema` that accepts [JSON Schema](https://json-schema.org/).
437
439
  */
438
440
  responseJsonSchema?: unknown;
439
- /** Optional. If enabled, audio timestamp will be included in the request to the model. This field is not supported in Gemini API. */
441
+ /** Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response. This field is not supported in Gemini API. */
440
442
  audioTimestamp?: boolean;
441
- /** Optional. Number of candidates to generate. */
443
+ /** Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one. */
442
444
  candidateCount?: number;
443
- /** Optional. If enabled, the model will detect emotions and adapt its responses accordingly. This field is not supported in Gemini API. */
445
+ /** Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response. This field is not supported in Gemini API. */
444
446
  enableAffectiveDialog?: boolean;
445
- /** Optional. Frequency penalties. */
447
+ /** Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0]. */
446
448
  frequencyPenalty?: number;
447
- /** Optional. Logit probabilities. */
449
+ /** Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response. */
448
450
  logprobs?: number;
449
- /** Optional. The maximum number of output tokens to generate per message. */
451
+ /** Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses. */
450
452
  maxOutputTokens?: number;
451
- /** Optional. If specified, the media resolution specified will be used. */
453
+ /** Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model. */
452
454
  mediaResolution?: MediaResolution;
453
- /** Optional. Positive penalties. */
455
+ /** Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0]. */
454
456
  presencePenalty?: number;
455
- /** Optional. If true, export the logprobs results in response. */
457
+ /** Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model's confidence in its own output and for debugging. */
456
458
  responseLogprobs?: boolean;
457
- /** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */
459
+ /** Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include 'text/plain' (default) and 'application/json'. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */
458
460
  responseMimeType?: string;
459
- /** Optional. The modalities of the response. */
461
+ /** Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image. */
460
462
  responseModalities?: Modality[];
461
- /** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */
463
+ /** Optional. Lets you to specify a schema for the model's response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. */
462
464
  responseSchema?: Schema;
463
465
  /** Optional. Routing configuration. This field is not supported in Gemini API. */
464
466
  routingConfig?: GenerationConfigRoutingConfig;
465
- /** Optional. Seed. */
467
+ /** Optional. A seed for the random number generator. By setting a seed, you can make the model's output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it's not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the "random" choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results. */
466
468
  seed?: number;
467
469
  /** Optional. The speech generation config. */
468
470
  speechConfig?: SpeechConfig;
469
- /** Optional. Stop sequences. */
471
+ /** Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use ["\n", "###"] to stop generation at a new line or a specific marker. */
470
472
  stopSequences?: string[];
471
- /** Optional. Controls the randomness of predictions. */
473
+ /** Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0]. */
472
474
  temperature?: number;
473
- /** Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking. */
475
+ /** Optional. Configuration for thinking features. An error will be returned if this field is set for models that don't support thinking. */
474
476
  thinkingConfig?: ThinkingConfig;
475
- /** Optional. If specified, top-k sampling will be used. */
477
+ /** Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words. */
476
478
  topK?: number;
477
- /** Optional. If specified, nucleus sampling will be used. */
479
+ /** Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It's recommended to adjust either temperature or `top_p`, but not both. */
478
480
  topP?: number;
479
481
  /** Optional. Enables enhanced civic answers. It may not be available for all models. This field is not supported in Vertex AI. */
480
482
  enableEnhancedCivicAnswers?: boolean;
481
483
  }
482
484
 
483
- /** The configuration for routing the request to a specific model. This data type is not supported in Gemini API. */
485
+ /** The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. This data type is not supported in Gemini API. */
484
486
  declare interface GenerationConfigRoutingConfig {
485
- /** Automated routing. */
487
+ /** In this mode, the model is selected automatically based on the content of the request. */
486
488
  autoMode?: GenerationConfigRoutingConfigAutoRoutingMode;
487
- /** Manual routing. */
489
+ /** In this mode, the model is specified manually. */
488
490
  manualMode?: GenerationConfigRoutingConfigManualRoutingMode;
489
491
  }
490
492
 
491
- /** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. This data type is not supported in Gemini API. */
493
+ /** The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. This data type is not supported in Gemini API. */
492
494
  declare interface GenerationConfigRoutingConfigAutoRoutingMode {
493
495
  /** The model routing preference. */
494
496
  modelRoutingPreference?: 'UNKNOWN' | 'PRIORITIZE_QUALITY' | 'BALANCED' | 'PRIORITIZE_COST';
495
497
  }
496
498
 
497
- /** When manual routing is set, the specified model will be used directly. This data type is not supported in Gemini API. */
499
+ /** The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. This data type is not supported in Gemini API. */
498
500
  declare interface GenerationConfigRoutingConfigManualRoutingMode {
499
- /** The model name to use. Only the public LLM models are accepted. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models). */
501
+ /** The name of the model to use. Only public LLM models are accepted. */
500
502
  modelName?: string;
501
503
  }
502
504
 
503
- /** Tool to retrieve public maps data for grounding, powered by Google. */
505
+ /** Tool to retrieve knowledge from Google Maps. */
504
506
  declare interface GoogleMaps {
505
507
  /** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
506
508
  authConfig?: AuthConfig;
507
- /** Optional. If true, include the widget context token in the response. */
509
+ /** Optional. Whether to return a widget context token in the GroundingMetadata of the response. Developers can use the widget context token to render a Google Maps widget with geospatial context related to the places that the model references in the response. */
508
510
  enableWidget?: boolean;
509
511
  }
510
512
 
511
- /** GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
513
+ /** Tool to support web search. */
512
514
  declare interface GoogleSearch {
513
- /** 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. */
514
- excludeDomains?: string[];
515
+ /** Different types of search that can be enabled on the GoogleSearch tool. */
516
+ searchTypes?: SearchTypes;
515
517
  /** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API. */
516
518
  blockingConfidence?: PhishBlockThreshold;
519
+ /** 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. */
520
+ excludeDomains?: string[];
517
521
  /** 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. */
518
522
  timeRangeFilter?: Interval;
519
523
  }
@@ -577,6 +581,10 @@ declare interface HttpRetryOptions {
577
581
  attempts?: number;
578
582
  }
579
583
 
584
+ /** Image search for grounding and related configurations. */
585
+ declare interface ImageSearch {
586
+ }
587
+
580
588
  /** 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. */
581
589
  declare interface Interval {
582
590
  /** Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. */
@@ -639,6 +647,14 @@ export declare class LocalTokenizer {
639
647
  computeTokens(contents: ContentListUnion): Promise<ComputeTokensResult>;
640
648
  }
641
649
 
650
+ /** A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 5. This data type is not supported in Vertex AI. */
651
+ declare interface McpServer {
652
+ /** The name of the MCPServer. */
653
+ name?: string;
654
+ /** A transport that can stream HTTP requests and responses. */
655
+ streamableHttpTransport?: StreamableHttpTransport;
656
+ }
657
+
642
658
  /** The media resolution to use. */
643
659
  declare enum MediaResolution {
644
660
  /**
@@ -720,21 +736,21 @@ declare interface Part {
720
736
  /** Media resolution for the input media.
721
737
  */
722
738
  mediaResolution?: PartMediaResolution;
723
- /** Optional. Result of executing the [ExecutableCode]. */
739
+ /** Optional. The result of executing the ExecutableCode. */
724
740
  codeExecutionResult?: CodeExecutionResult;
725
- /** Optional. Code generated by the model that is meant to be executed. */
741
+ /** Optional. Code generated by the model that is intended to be executed. */
726
742
  executableCode?: ExecutableCode;
727
- /** Optional. URI based data. */
743
+ /** Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage. */
728
744
  fileData?: FileData;
729
- /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */
745
+ /** Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function. */
730
746
  functionCall?: FunctionCall;
731
- /** 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. */
747
+ /** Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted. */
732
748
  functionResponse?: FunctionResponse;
733
- /** Optional. Inlined bytes data. */
749
+ /** Optional. The inline data content of the part. This can be used to include images, audio, or video in a request. */
734
750
  inlineData?: Blob_2;
735
- /** Optional. Text part (can be code). */
751
+ /** Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent. */
736
752
  text?: string;
737
- /** Optional. Indicates if the part is thought from the model. */
753
+ /** Optional. Indicates whether the `part` represents the model's thought process or reasoning. */
738
754
  thought?: boolean;
739
755
  /** Optional. An opaque signature for the thought so it can be reused in subsequent requests.
740
756
  * @remarks Encoded as base64 string. */
@@ -745,16 +761,16 @@ declare interface Part {
745
761
 
746
762
  /** Partial argument value of the function call. This data type is not supported in Gemini API. */
747
763
  declare interface PartialArg {
764
+ /** Optional. Represents a boolean value. */
765
+ boolValue?: boolean;
766
+ /** Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". */
767
+ jsonPath?: string;
748
768
  /** Optional. Represents a null value. */
749
769
  nullValue?: 'NULL_VALUE';
750
770
  /** Optional. Represents a double value. */
751
771
  numberValue?: number;
752
772
  /** Optional. Represents a string value. */
753
773
  stringValue?: string;
754
- /** Optional. Represents a boolean value. */
755
- boolValue?: boolean;
756
- /** Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". */
757
- jsonPath?: string;
758
774
  /** Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow. */
759
775
  willContinue?: boolean;
760
776
  }
@@ -827,9 +843,9 @@ declare enum PhishBlockThreshold {
827
843
  BLOCK_ONLY_EXTREMELY_HIGH = "BLOCK_ONLY_EXTREMELY_HIGH"
828
844
  }
829
845
 
830
- /** The configuration for the prebuilt speaker to use. */
846
+ /** Configuration for a prebuilt voice. */
831
847
  declare interface PrebuiltVoiceConfig {
832
- /** The name of the preset voice to use. */
848
+ /** The name of the prebuilt voice to use. */
833
849
  voiceName?: string;
834
850
  }
835
851
 
@@ -922,53 +938,62 @@ declare interface Retrieval {
922
938
  object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
923
939
  be added in the future as needed. */
924
940
  declare interface Schema {
925
- /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */
941
+ /** Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`. */
926
942
  anyOf?: Schema[];
927
- /** Optional. Default value of the data. */
943
+ /** Optional. Default value to use if the field is not specified. */
928
944
  default?: unknown;
929
- /** Optional. The description of the data. */
945
+ /** Optional. Description of the schema. */
930
946
  description?: string;
931
- /** Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} */
947
+ /** Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:["EAST", "NORTH", "SOUTH", "WEST"]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:["101", "201", "301"]}` */
932
948
  enum?: string[];
933
- /** Optional. Example of the object. Will only populated when the object is the root. */
949
+ /** Optional. Example of an instance of this schema. */
934
950
  example?: unknown;
935
- /** Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc */
951
+ /** Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type. */
936
952
  format?: string;
937
- /** Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. */
953
+ /** Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array. */
938
954
  items?: Schema;
939
- /** Optional. Maximum number of the elements for Type.ARRAY. */
955
+ /** Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array. */
940
956
  maxItems?: string;
941
- /** Optional. Maximum length of the Type.STRING */
957
+ /** Optional. If type is `STRING`, `max_length` specifies the maximum length of the string. */
942
958
  maxLength?: string;
943
- /** Optional. Maximum number of the properties for Type.OBJECT. */
959
+ /** Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided. */
944
960
  maxProperties?: string;
945
- /** Optional. Maximum value of the Type.INTEGER and Type.NUMBER */
961
+ /** Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value. */
946
962
  maximum?: number;
947
- /** Optional. Minimum number of the elements for Type.ARRAY. */
963
+ /** Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array. */
948
964
  minItems?: string;
949
- /** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */
965
+ /** Optional. If type is `STRING`, `min_length` specifies the minimum length of the string. */
950
966
  minLength?: string;
951
- /** Optional. Minimum number of the properties for Type.OBJECT. */
967
+ /** Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided. */
952
968
  minProperties?: string;
953
- /** Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER */
969
+ /** Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value. */
954
970
  minimum?: number;
955
- /** Optional. Indicates if the value may be null. */
971
+ /** Optional. Indicates if the value of this field can be null. */
956
972
  nullable?: boolean;
957
- /** Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */
973
+ /** Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match. */
958
974
  pattern?: string;
959
- /** Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. */
975
+ /** Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object. */
960
976
  properties?: Record<string, Schema>;
961
- /** Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. */
977
+ /** Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties. */
962
978
  propertyOrdering?: string[];
963
- /** Optional. Required properties of Type.OBJECT. */
979
+ /** Optional. If type is `OBJECT`, `required` lists the names of properties that must be present. */
964
980
  required?: string[];
965
- /** Optional. The title of the Schema. */
981
+ /** Optional. Title for the schema. */
966
982
  title?: string;
967
- /** Optional. The type of the data. */
983
+ /** Optional. Data type of the schema field. */
968
984
  type?: Type;
969
985
  }
970
986
 
971
- /** Configuration for a single speaker in a multi speaker setup. */
987
+ /** Tool to support computer use. */
988
+ declare interface SearchTypes {
989
+ /** Setting this field enables web search. Only text results are
990
+ returned. */
991
+ webSearch?: WebSearch;
992
+ /** Setting this field enables image search. Image bytes are returned. */
993
+ imageSearch?: ImageSearch;
994
+ }
995
+
996
+ /** Configuration for a single speaker in a multi-speaker setup. */
972
997
  declare interface SpeakerVoiceConfig {
973
998
  /** Required. The name of the speaker. This should be the same as the speaker name used in the prompt. */
974
999
  speaker?: string;
@@ -979,12 +1004,26 @@ declare interface SpeakerVoiceConfig {
979
1004
  declare interface SpeechConfig {
980
1005
  /** Configuration for the voice of the response. */
981
1006
  voiceConfig?: VoiceConfig;
982
- /** Optional. Language code (ISO 639. e.g. en-US) for the speech synthesization. */
1007
+ /** Optional. The language code (ISO 639-1) for the speech synthesis. */
983
1008
  languageCode?: string;
984
1009
  /** The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`. */
985
1010
  multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
986
1011
  }
987
1012
 
1013
+ /** A transport that can stream HTTP requests and responses. Next ID: 6. This data type is not supported in Vertex AI. */
1014
+ declare interface StreamableHttpTransport {
1015
+ /** Optional: Fields for authentication headers, timeouts, etc., if needed. */
1016
+ headers?: Record<string, string>;
1017
+ /** Timeout for SSE read operations. */
1018
+ sseReadTimeout?: string;
1019
+ /** Whether to close the client session when the transport closes. */
1020
+ terminateOnClose?: boolean;
1021
+ /** HTTP timeout for regular operations. */
1022
+ timeout?: string;
1023
+ /** The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp". */
1024
+ url?: string;
1025
+ }
1026
+
988
1027
  /** The thinking features configuration. */
989
1028
  declare interface ThinkingConfig {
990
1029
  /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.
@@ -1042,27 +1081,40 @@ declare interface Tool {
1042
1081
  computerUse?: ComputerUse;
1043
1082
  /** Optional. Tool to retrieve knowledge from the File Search Stores. */
1044
1083
  fileSearch?: FileSearch;
1084
+ /** Enables the model to execute Google Search as part of generation. */
1085
+ googleSearch?: GoogleSearch;
1086
+ /** Optional. Tool that allows grounding the model's response with
1087
+ geospatial context related to the user's query. */
1088
+ googleMaps?: GoogleMaps;
1045
1089
  /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
1046
1090
  codeExecution?: ToolCodeExecution;
1047
1091
  /** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
1048
1092
  enterpriseWebSearch?: EnterpriseWebSearch;
1049
1093
  /** Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided. */
1050
1094
  functionDeclarations?: FunctionDeclaration[];
1051
- /** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
1052
- googleMaps?: GoogleMaps;
1053
- /** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
1054
- googleSearch?: GoogleSearch;
1055
1095
  /** Optional. Specialized retrieval tool that is powered by Google Search. */
1056
1096
  googleSearchRetrieval?: GoogleSearchRetrieval;
1097
+ /** Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation. This field is not supported in Gemini API. */
1098
+ parallelAiSearch?: ToolParallelAiSearch;
1057
1099
  /** Optional. Tool to support URL context retrieval. */
1058
1100
  urlContext?: UrlContext;
1101
+ /** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
1102
+ mcpServers?: McpServer[];
1059
1103
  }
1060
1104
 
1061
1105
  /** 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. */
1062
1106
  declare interface ToolCodeExecution {
1063
1107
  }
1064
1108
 
1065
- /** The type of the data. */
1109
+ /** ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. This data type is not supported in Gemini API. */
1110
+ declare interface ToolParallelAiSearch {
1111
+ /** Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details. */
1112
+ apiKey?: string;
1113
+ /** Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { "source_policy": { "include_domains": ["google.com", "wikipedia.org"], "exclude_domains": ["example.com"] }, "fetch_policy": { "max_age_seconds": 3600 } } */
1114
+ customConfigs?: Record<string, unknown>;
1115
+ }
1116
+
1117
+ /** Data type of the schema field. */
1066
1118
  declare enum Type {
1067
1119
  /**
1068
1120
  * Not specified, should not be used.
@@ -1148,11 +1200,11 @@ declare interface VertexRagStoreRagResource {
1148
1200
  ragFileIds?: string[];
1149
1201
  }
1150
1202
 
1151
- /** Metadata describes the input video content. */
1203
+ /** Provides metadata for a video, including the start and end offsets for clipping and the frame rate. */
1152
1204
  declare interface VideoMetadata {
1153
1205
  /** Optional. The end offset of the video. */
1154
1206
  endOffset?: string;
1155
- /** 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]. */
1207
+ /** Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0]. */
1156
1208
  fps?: number;
1157
1209
  /** Optional. The start offset of the video. */
1158
1210
  startOffset?: string;
@@ -1161,8 +1213,14 @@ declare interface VideoMetadata {
1161
1213
  declare interface VoiceConfig {
1162
1214
  /** If true, the model will use a replicated voice for the response. */
1163
1215
  replicatedVoiceConfig?: ReplicatedVoiceConfig;
1164
- /** The configuration for the prebuilt voice to use. */
1216
+ /** The configuration for a prebuilt voice. */
1165
1217
  prebuiltVoiceConfig?: PrebuiltVoiceConfig;
1166
1218
  }
1167
1219
 
1220
+ /** Standard web search for grounding and related configurations.
1221
+
1222
+ Only text results are returned. */
1223
+ declare interface WebSearch {
1224
+ }
1225
+
1168
1226
  export { }