@google/genai 1.45.0 → 1.47.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.
@@ -33,6 +33,18 @@ var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
33
33
  * Copyright 2025 Google LLC
34
34
  * SPDX-License-Identifier: Apache-2.0
35
35
  */
36
+ /** Programming language of the `code`. */
37
+ var Language;
38
+ (function (Language) {
39
+ /**
40
+ * Unspecified language. This value should not be used.
41
+ */
42
+ Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
43
+ /**
44
+ * Python >= 3.10, with numpy and simpy available.
45
+ */
46
+ Language["PYTHON"] = "PYTHON";
47
+ })(Language || (Language = {}));
36
48
  /** Outcome of the code execution. */
37
49
  var Outcome;
38
50
  (function (Outcome) {
@@ -53,18 +65,6 @@ var Outcome;
53
65
  */
54
66
  Outcome["OUTCOME_DEADLINE_EXCEEDED"] = "OUTCOME_DEADLINE_EXCEEDED";
55
67
  })(Outcome || (Outcome = {}));
56
- /** Programming language of the `code`. */
57
- var Language;
58
- (function (Language) {
59
- /**
60
- * Unspecified language. This value should not be used.
61
- */
62
- Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
63
- /**
64
- * Python >= 3.10, with numpy and simpy available.
65
- */
66
- Language["PYTHON"] = "PYTHON";
67
- })(Language || (Language = {}));
68
68
  /** Specifies how the response should be scheduled in the conversation. */
69
69
  var FunctionResponseScheduling;
70
70
  (function (FunctionResponseScheduling) {
@@ -121,38 +121,18 @@ var Type;
121
121
  */
122
122
  Type["NULL"] = "NULL";
123
123
  })(Type || (Type = {}));
124
- /** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
125
- var PhishBlockThreshold;
126
- (function (PhishBlockThreshold) {
127
- /**
128
- * Defaults to unspecified.
129
- */
130
- PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
131
- /**
132
- * Blocks Low and above confidence URL that is risky.
133
- */
134
- PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
135
- /**
136
- * Blocks Medium and above confidence URL that is risky.
137
- */
138
- PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
139
- /**
140
- * Blocks High and above confidence URL that is risky.
141
- */
142
- PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
143
- /**
144
- * Blocks Higher and above confidence URL that is risky.
145
- */
146
- PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
124
+ /** The environment being operated. */
125
+ var Environment;
126
+ (function (Environment) {
147
127
  /**
148
- * Blocks Very high and above confidence URL that is risky.
128
+ * Defaults to browser.
149
129
  */
150
- PhishBlockThreshold["BLOCK_VERY_HIGH_AND_ABOVE"] = "BLOCK_VERY_HIGH_AND_ABOVE";
130
+ Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
151
131
  /**
152
- * Blocks Extremely high confidence URL that is risky.
132
+ * Operates in a web browser.
153
133
  */
154
- PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
155
- })(PhishBlockThreshold || (PhishBlockThreshold = {}));
134
+ Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
135
+ })(Environment || (Environment = {}));
156
136
  /** Type of auth scheme. This enum is not supported in Gemini API. */
157
137
  var AuthType;
158
138
  (function (AuthType) {
@@ -223,6 +203,38 @@ var ApiSpec;
223
203
  */
224
204
  ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
225
205
  })(ApiSpec || (ApiSpec = {}));
206
+ /** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
207
+ var PhishBlockThreshold;
208
+ (function (PhishBlockThreshold) {
209
+ /**
210
+ * Defaults to unspecified.
211
+ */
212
+ PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
213
+ /**
214
+ * Blocks Low and above confidence URL that is risky.
215
+ */
216
+ PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
217
+ /**
218
+ * Blocks Medium and above confidence URL that is risky.
219
+ */
220
+ PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
221
+ /**
222
+ * Blocks High and above confidence URL that is risky.
223
+ */
224
+ PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
225
+ /**
226
+ * Blocks Higher and above confidence URL that is risky.
227
+ */
228
+ PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
229
+ /**
230
+ * Blocks Very high and above confidence URL that is risky.
231
+ */
232
+ PhishBlockThreshold["BLOCK_VERY_HIGH_AND_ABOVE"] = "BLOCK_VERY_HIGH_AND_ABOVE";
233
+ /**
234
+ * Blocks Extremely high confidence URL that is risky.
235
+ */
236
+ PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
237
+ })(PhishBlockThreshold || (PhishBlockThreshold = {}));
226
238
  /** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
227
239
  var Behavior;
228
240
  (function (Behavior) {
@@ -282,6 +294,10 @@ var ThinkingLevel;
282
294
  * Unspecified thinking level.
283
295
  */
284
296
  ThinkingLevel["THINKING_LEVEL_UNSPECIFIED"] = "THINKING_LEVEL_UNSPECIFIED";
297
+ /**
298
+ * MINIMAL thinking level.
299
+ */
300
+ ThinkingLevel["MINIMAL"] = "MINIMAL";
285
301
  /**
286
302
  * Low thinking level.
287
303
  */
@@ -294,10 +310,6 @@ var ThinkingLevel;
294
310
  * High thinking level.
295
311
  */
296
312
  ThinkingLevel["HIGH"] = "HIGH";
297
- /**
298
- * MINIMAL thinking level.
299
- */
300
- ThinkingLevel["MINIMAL"] = "MINIMAL";
301
313
  })(ThinkingLevel || (ThinkingLevel = {}));
302
314
  /** Enum that controls the generation of people. */
303
315
  var PersonGeneration;
@@ -315,6 +327,22 @@ var PersonGeneration;
315
327
  */
316
328
  PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
317
329
  })(PersonGeneration || (PersonGeneration = {}));
330
+ /** Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people. This enum is not supported in Gemini API. */
331
+ var ProminentPeople;
332
+ (function (ProminentPeople) {
333
+ /**
334
+ * Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
335
+ */
336
+ ProminentPeople["PROMINENT_PEOPLE_UNSPECIFIED"] = "PROMINENT_PEOPLE_UNSPECIFIED";
337
+ /**
338
+ * Allows the model to generate images of prominent people.
339
+ */
340
+ ProminentPeople["ALLOW_PROMINENT_PEOPLE"] = "ALLOW_PROMINENT_PEOPLE";
341
+ /**
342
+ * Prevents the model from generating images of prominent people.
343
+ */
344
+ ProminentPeople["BLOCK_PROMINENT_PEOPLE"] = "BLOCK_PROMINENT_PEOPLE";
345
+ })(ProminentPeople || (ProminentPeople = {}));
318
346
  /** The harm category to be blocked. */
319
347
  var HarmCategory;
320
348
  (function (HarmCategory) {
@@ -633,6 +661,42 @@ var Modality;
633
661
  */
634
662
  Modality["AUDIO"] = "AUDIO";
635
663
  })(Modality || (Modality = {}));
664
+ /** The stage of the underlying model. This enum is not supported in Vertex AI. */
665
+ var ModelStage;
666
+ (function (ModelStage) {
667
+ /**
668
+ * Unspecified model stage.
669
+ */
670
+ ModelStage["MODEL_STAGE_UNSPECIFIED"] = "MODEL_STAGE_UNSPECIFIED";
671
+ /**
672
+ * The underlying model is subject to lots of tunings.
673
+ */
674
+ ModelStage["UNSTABLE_EXPERIMENTAL"] = "UNSTABLE_EXPERIMENTAL";
675
+ /**
676
+ * Models in this stage are for experimental purposes only.
677
+ */
678
+ ModelStage["EXPERIMENTAL"] = "EXPERIMENTAL";
679
+ /**
680
+ * Models in this stage are more mature than experimental models.
681
+ */
682
+ ModelStage["PREVIEW"] = "PREVIEW";
683
+ /**
684
+ * Models in this stage are considered stable and ready for production use.
685
+ */
686
+ ModelStage["STABLE"] = "STABLE";
687
+ /**
688
+ * If the model is on this stage, it means that this model is on the path to deprecation in near future. Only existing customers can use this model.
689
+ */
690
+ ModelStage["LEGACY"] = "LEGACY";
691
+ /**
692
+ * Models in this stage are deprecated. These models cannot be used.
693
+ */
694
+ ModelStage["DEPRECATED"] = "DEPRECATED";
695
+ /**
696
+ * Models in this stage are retired. These models cannot be used.
697
+ */
698
+ ModelStage["RETIRED"] = "RETIRED";
699
+ })(ModelStage || (ModelStage = {}));
636
700
  /** The media resolution to use. */
637
701
  var MediaResolution;
638
702
  (function (MediaResolution) {
@@ -869,6 +933,26 @@ var TuningTask;
869
933
  */
870
934
  TuningTask["TUNING_TASK_R2V"] = "TUNING_TASK_R2V";
871
935
  })(TuningTask || (TuningTask = {}));
936
+ /** Output only. Current state of the `Document`. This enum is not supported in Vertex AI. */
937
+ var DocumentState;
938
+ (function (DocumentState) {
939
+ /**
940
+ * The default value. This value is used if the state is omitted.
941
+ */
942
+ DocumentState["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
943
+ /**
944
+ * Some `Chunks` of the `Document` are being processed (embedding and vector storage).
945
+ */
946
+ DocumentState["STATE_PENDING"] = "STATE_PENDING";
947
+ /**
948
+ * All `Chunks` of the `Document` is processed and available for querying.
949
+ */
950
+ DocumentState["STATE_ACTIVE"] = "STATE_ACTIVE";
951
+ /**
952
+ * Some `Chunks` of the `Document` failed processing.
953
+ */
954
+ DocumentState["STATE_FAILED"] = "STATE_FAILED";
955
+ })(DocumentState || (DocumentState = {}));
872
956
  /** The tokenization quality used for given media. */
873
957
  var PartMediaResolutionLevel;
874
958
  (function (PartMediaResolutionLevel) {
@@ -893,6 +977,34 @@ var PartMediaResolutionLevel;
893
977
  */
894
978
  PartMediaResolutionLevel["MEDIA_RESOLUTION_ULTRA_HIGH"] = "MEDIA_RESOLUTION_ULTRA_HIGH";
895
979
  })(PartMediaResolutionLevel || (PartMediaResolutionLevel = {}));
980
+ /** The type of tool in the function call. */
981
+ var ToolType;
982
+ (function (ToolType) {
983
+ /**
984
+ * Unspecified tool type.
985
+ */
986
+ ToolType["TOOL_TYPE_UNSPECIFIED"] = "TOOL_TYPE_UNSPECIFIED";
987
+ /**
988
+ * Google search tool, maps to Tool.google_search.search_types.web_search.
989
+ */
990
+ ToolType["GOOGLE_SEARCH_WEB"] = "GOOGLE_SEARCH_WEB";
991
+ /**
992
+ * Image search tool, maps to Tool.google_search.search_types.image_search.
993
+ */
994
+ ToolType["GOOGLE_SEARCH_IMAGE"] = "GOOGLE_SEARCH_IMAGE";
995
+ /**
996
+ * URL context tool, maps to Tool.url_context.
997
+ */
998
+ ToolType["URL_CONTEXT"] = "URL_CONTEXT";
999
+ /**
1000
+ * Google maps tool, maps to Tool.google_maps.
1001
+ */
1002
+ ToolType["GOOGLE_MAPS"] = "GOOGLE_MAPS";
1003
+ /**
1004
+ * File search tool, maps to Tool.file_search.
1005
+ */
1006
+ ToolType["FILE_SEARCH"] = "FILE_SEARCH";
1007
+ })(ToolType || (ToolType = {}));
896
1008
  /** Resource scope. */
897
1009
  var ResourceScope;
898
1010
  (function (ResourceScope) {
@@ -905,42 +1017,34 @@ var ResourceScope;
905
1017
  */
906
1018
  ResourceScope["COLLECTION"] = "COLLECTION";
907
1019
  })(ResourceScope || (ResourceScope = {}));
908
- /** Options for feature selection preference. */
909
- var FeatureSelectionPreference;
910
- (function (FeatureSelectionPreference) {
911
- FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED";
912
- FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY";
913
- FeatureSelectionPreference["BALANCED"] = "BALANCED";
914
- FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST";
915
- })(FeatureSelectionPreference || (FeatureSelectionPreference = {}));
916
- /** The environment being operated. */
917
- var Environment;
918
- (function (Environment) {
919
- /**
920
- * Defaults to browser.
921
- */
922
- Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
1020
+ /** Pricing and performance service tier. */
1021
+ var ServiceTier;
1022
+ (function (ServiceTier) {
923
1023
  /**
924
- * Operates in a web browser.
1024
+ * Default service tier, which is standard.
925
1025
  */
926
- Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
927
- })(Environment || (Environment = {}));
928
- /** Enum for controlling whether the model can generate images of prominent people (celebrities). */
929
- var ProminentPeople;
930
- (function (ProminentPeople) {
1026
+ ServiceTier["SERVICE_TIER_UNSPECIFIED"] = "SERVICE_TIER_UNSPECIFIED";
931
1027
  /**
932
- * Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
1028
+ * Flex service tier.
933
1029
  */
934
- ProminentPeople["PROMINENT_PEOPLE_UNSPECIFIED"] = "PROMINENT_PEOPLE_UNSPECIFIED";
1030
+ ServiceTier["SERVICE_TIER_FLEX"] = "SERVICE_TIER_FLEX";
935
1031
  /**
936
- * Allows the model to generate images of prominent people.
1032
+ * Standard service tier.
937
1033
  */
938
- ProminentPeople["ALLOW_PROMINENT_PEOPLE"] = "ALLOW_PROMINENT_PEOPLE";
1034
+ ServiceTier["SERVICE_TIER_STANDARD"] = "SERVICE_TIER_STANDARD";
939
1035
  /**
940
- * Prevents the model from generating images of prominent people.
1036
+ * Priority service tier.
941
1037
  */
942
- ProminentPeople["BLOCK_PROMINENT_PEOPLE"] = "BLOCK_PROMINENT_PEOPLE";
943
- })(ProminentPeople || (ProminentPeople = {}));
1038
+ ServiceTier["SERVICE_TIER_PRIORITY"] = "SERVICE_TIER_PRIORITY";
1039
+ })(ServiceTier || (ServiceTier = {}));
1040
+ /** Options for feature selection preference. */
1041
+ var FeatureSelectionPreference;
1042
+ (function (FeatureSelectionPreference) {
1043
+ FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED";
1044
+ FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY";
1045
+ FeatureSelectionPreference["BALANCED"] = "BALANCED";
1046
+ FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST";
1047
+ })(FeatureSelectionPreference || (FeatureSelectionPreference = {}));
944
1048
  /** Enum representing the Vertex embedding API to use. */
945
1049
  var EmbeddingApiType;
946
1050
  (function (EmbeddingApiType) {
@@ -1115,14 +1219,6 @@ var TuningMethod;
1115
1219
  */
1116
1220
  TuningMethod["DISTILLATION"] = "DISTILLATION";
1117
1221
  })(TuningMethod || (TuningMethod = {}));
1118
- /** State for the lifecycle of a Document. */
1119
- var DocumentState;
1120
- (function (DocumentState) {
1121
- DocumentState["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
1122
- DocumentState["STATE_PENDING"] = "STATE_PENDING";
1123
- DocumentState["STATE_ACTIVE"] = "STATE_ACTIVE";
1124
- DocumentState["STATE_FAILED"] = "STATE_FAILED";
1125
- })(DocumentState || (DocumentState = {}));
1126
1222
  /** State for the lifecycle of a File. */
1127
1223
  var FileState;
1128
1224
  (function (FileState) {
@@ -1282,6 +1378,10 @@ var TurnCoverage;
1282
1378
  * The users turn includes all realtime input since the last turn, including inactivity (e.g. silence on the audio stream).
1283
1379
  */
1284
1380
  TurnCoverage["TURN_INCLUDES_ALL_INPUT"] = "TURN_INCLUDES_ALL_INPUT";
1381
+ /**
1382
+ * Includes audio activity and all video since the last turn. With automatic activity detection, audio activity means speech and excludes silence.
1383
+ */
1384
+ TurnCoverage["TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO"] = "TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO";
1285
1385
  })(TurnCoverage || (TurnCoverage = {}));
1286
1386
  /** Scale of the generated music. */
1287
1387
  var Scale;
@@ -142,12 +142,16 @@ declare interface Blob_2 {
142
142
  mimeType?: string;
143
143
  }
144
144
 
145
- /** Result of executing the [ExecutableCode]. Only generated when using the [CodeExecution] tool, and always follows a `part` containing the [ExecutableCode]. */
145
+ /** Result of executing the `ExecutableCode`.
146
+
147
+ Generated only when the `CodeExecution` tool is used. */
146
148
  declare interface CodeExecutionResult {
147
149
  /** Required. Outcome of the code execution. */
148
150
  outcome?: Outcome;
149
151
  /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */
150
152
  output?: string;
153
+ /** The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. */
154
+ id?: string;
151
155
  }
152
156
 
153
157
  /** Tool to support computer use. */
@@ -251,12 +255,18 @@ declare enum Environment {
251
255
  ENVIRONMENT_BROWSER = "ENVIRONMENT_BROWSER"
252
256
  }
253
257
 
254
- /** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [CodeExecution] tool, in which the code will be automatically executed, and a corresponding [CodeExecutionResult] will also be generated. */
258
+ /** Model-generated code executed server-side, results returned to the model.
259
+
260
+ Only generated when using the `CodeExecution` tool, in which the code will
261
+ be automatically executed, and a corresponding `CodeExecutionResult` will
262
+ also be generated. */
255
263
  declare interface ExecutableCode {
256
264
  /** Required. The code to be executed. */
257
265
  code?: string;
258
266
  /** Required. Programming language of the `code`. */
259
267
  language?: Language;
268
+ /** Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. */
269
+ id?: string;
260
270
  }
261
271
 
262
272
  /** Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. This data type is not supported in Gemini API. */
@@ -307,14 +317,13 @@ declare interface FileData {
307
317
  mimeType?: string;
308
318
  }
309
319
 
310
- /** Tool to retrieve knowledge from the File Search Stores. */
320
+ /** The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API. This data type is not supported in Vertex AI. */
311
321
  declare interface FileSearch {
312
- /** The names of the file_search_stores to retrieve from.
313
- Example: `fileSearchStores/my-file-search-store-123` */
322
+ /** Required. The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123` */
314
323
  fileSearchStoreNames?: string[];
315
- /** The number of file search retrieval chunks to retrieve. */
324
+ /** Optional. The number of semantic retrieval chunks to retrieve. */
316
325
  topK?: number;
317
- /** Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression. */
326
+ /** Optional. Metadata filter to apply to the semantic retrieval documents and chunks. */
318
327
  metadataFilter?: string;
319
328
  }
320
329
 
@@ -510,9 +519,9 @@ declare interface GoogleMaps {
510
519
  enableWidget?: boolean;
511
520
  }
512
521
 
513
- /** Tool to support web search. */
522
+ /** GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
514
523
  declare interface GoogleSearch {
515
- /** Different types of search that can be enabled on the GoogleSearch tool. */
524
+ /** Optional. The set of search types to enable. If not set, web search is enabled by default. */
516
525
  searchTypes?: SearchTypes;
517
526
  /** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API. */
518
527
  blockingConfidence?: PhishBlockThreshold;
@@ -757,6 +766,12 @@ declare interface Part {
757
766
  thoughtSignature?: string;
758
767
  /** Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. */
759
768
  videoMetadata?: VideoMetadata;
769
+ /** Server-side tool call. This field is populated when the model predicts a tool invocation that should be executed on the server. The client is expected to echo this message back to the API. */
770
+ toolCall?: ToolCall;
771
+ /** The output from a server-side ToolCall execution. This field is populated by the client with the results of executing the corresponding ToolCall. */
772
+ toolResponse?: ToolResponse;
773
+ /** Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams. This field is not supported in Vertex AI. */
774
+ partMetadata?: Record<string, unknown>;
760
775
  }
761
776
 
762
777
  /** Partial argument value of the function call. This data type is not supported in Gemini API. */
@@ -897,12 +912,14 @@ declare interface RagRetrievalConfigRankingRankService {
897
912
  modelName?: string;
898
913
  }
899
914
 
900
- /** ReplicatedVoiceConfig is used to configure replicated voice. */
915
+ /** The configuration for the replicated voice to use. */
901
916
  declare interface ReplicatedVoiceConfig {
902
- /** The mime type of the replicated voice.
917
+ /** The mimetype of the voice sample. The only currently supported
918
+ value is `audio/wav`. This represents 16-bit signed little-endian wav
919
+ data, with a 24kHz sampling rate.
903
920
  */
904
921
  mimeType?: string;
905
- /** The sample audio of the replicated voice.
922
+ /** The sample of the custom voice.
906
923
 
907
924
  * @remarks Encoded as base64 string. */
908
925
  voiceSampleAudio?: string;
@@ -942,7 +959,7 @@ declare interface Schema {
942
959
  anyOf?: Schema[];
943
960
  /** Optional. Default value to use if the field is not specified. */
944
961
  default?: unknown;
945
- /** Optional. Description of the schema. */
962
+ /** Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt. */
946
963
  description?: string;
947
964
  /** 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"]}` */
948
965
  enum?: string[];
@@ -984,12 +1001,11 @@ declare interface Schema {
984
1001
  type?: Type;
985
1002
  }
986
1003
 
987
- /** Tool to support computer use. */
1004
+ /** Different types of search that can be enabled on the GoogleSearch tool. */
988
1005
  declare interface SearchTypes {
989
- /** Setting this field enables web search. Only text results are
990
- returned. */
1006
+ /** Optional. Setting this field enables web search. Only text results are returned. */
991
1007
  webSearch?: WebSearch;
992
- /** Setting this field enables image search. Image bytes are returned. */
1008
+ /** Optional. Setting this field enables image search. Image bytes are returned. */
993
1009
  imageSearch?: ImageSearch;
994
1010
  }
995
1011
 
@@ -1001,8 +1017,9 @@ declare interface SpeakerVoiceConfig {
1001
1017
  voiceConfig?: VoiceConfig;
1002
1018
  }
1003
1019
 
1020
+ /** Config for speech generation and transcription. */
1004
1021
  declare interface SpeechConfig {
1005
- /** Configuration for the voice of the response. */
1022
+ /** The configuration in case of single-voice output. */
1006
1023
  voiceConfig?: VoiceConfig;
1007
1024
  /** Optional. The language code (ISO 639-1) for the speech synthesis. */
1008
1025
  languageCode?: string;
@@ -1042,6 +1059,10 @@ declare enum ThinkingLevel {
1042
1059
  * Unspecified thinking level.
1043
1060
  */
1044
1061
  THINKING_LEVEL_UNSPECIFIED = "THINKING_LEVEL_UNSPECIFIED",
1062
+ /**
1063
+ * MINIMAL thinking level.
1064
+ */
1065
+ MINIMAL = "MINIMAL",
1045
1066
  /**
1046
1067
  * Low thinking level.
1047
1068
  */
@@ -1053,11 +1074,7 @@ declare enum ThinkingLevel {
1053
1074
  /**
1054
1075
  * High thinking level.
1055
1076
  */
1056
- HIGH = "HIGH",
1057
- /**
1058
- * MINIMAL thinking level.
1059
- */
1060
- MINIMAL = "MINIMAL"
1077
+ HIGH = "HIGH"
1061
1078
  }
1062
1079
 
1063
1080
  /** Tokens info with a list of tokens and the corresponding list of token ids. */
@@ -1079,9 +1096,9 @@ declare interface Tool {
1079
1096
  computer. If enabled, it automatically populates computer-use specific
1080
1097
  Function Declarations. */
1081
1098
  computerUse?: ComputerUse;
1082
- /** Optional. Tool to retrieve knowledge from the File Search Stores. */
1099
+ /** Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora. This field is not supported in Vertex AI. */
1083
1100
  fileSearch?: FileSearch;
1084
- /** Enables the model to execute Google Search as part of generation. */
1101
+ /** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
1085
1102
  googleSearch?: GoogleSearch;
1086
1103
  /** Optional. Tool that allows grounding the model's response with
1087
1104
  geospatial context related to the user's query. */
@@ -1102,6 +1119,21 @@ declare interface Tool {
1102
1119
  mcpServers?: McpServer[];
1103
1120
  }
1104
1121
 
1122
+ /** A predicted server-side `ToolCall` returned from the model.
1123
+
1124
+ This message contains information about a tool that the model wants to invoke.
1125
+ The client is NOT expected to execute this `ToolCall`. Instead, the
1126
+ client should pass this `ToolCall` back to the API in a subsequent turn
1127
+ within a `Content` message, along with the corresponding `ToolResponse`. */
1128
+ declare interface ToolCall {
1129
+ /** Unique identifier of the tool call. The server returns the tool response with the matching `id`. */
1130
+ id?: string;
1131
+ /** The type of tool that was called. */
1132
+ toolType?: ToolType;
1133
+ /** The tool call arguments. Example: {"arg1": "value1", "arg2": "value2"}. */
1134
+ args?: Record<string, unknown>;
1135
+ }
1136
+
1105
1137
  /** 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. */
1106
1138
  declare interface ToolCodeExecution {
1107
1139
  }
@@ -1114,6 +1146,49 @@ declare interface ToolParallelAiSearch {
1114
1146
  customConfigs?: Record<string, unknown>;
1115
1147
  }
1116
1148
 
1149
+ /** The output from a server-side `ToolCall` execution.
1150
+
1151
+ This message contains the results of a tool invocation that was initiated by a
1152
+ `ToolCall` from the model. The client should pass this `ToolResponse` back to
1153
+ the API in a subsequent turn within a `Content` message, along with the
1154
+ corresponding `ToolCall`. */
1155
+ declare class ToolResponse {
1156
+ /** The identifier of the tool call this response is for. */
1157
+ id?: string;
1158
+ /** The type of tool that was called, matching the tool_type in the corresponding ToolCall. */
1159
+ toolType?: ToolType;
1160
+ /** The tool response. */
1161
+ response?: Record<string, unknown>;
1162
+ }
1163
+
1164
+ /** The type of tool in the function call. */
1165
+ declare enum ToolType {
1166
+ /**
1167
+ * Unspecified tool type.
1168
+ */
1169
+ TOOL_TYPE_UNSPECIFIED = "TOOL_TYPE_UNSPECIFIED",
1170
+ /**
1171
+ * Google search tool, maps to Tool.google_search.search_types.web_search.
1172
+ */
1173
+ GOOGLE_SEARCH_WEB = "GOOGLE_SEARCH_WEB",
1174
+ /**
1175
+ * Image search tool, maps to Tool.google_search.search_types.image_search.
1176
+ */
1177
+ GOOGLE_SEARCH_IMAGE = "GOOGLE_SEARCH_IMAGE",
1178
+ /**
1179
+ * URL context tool, maps to Tool.url_context.
1180
+ */
1181
+ URL_CONTEXT = "URL_CONTEXT",
1182
+ /**
1183
+ * Google maps tool, maps to Tool.google_maps.
1184
+ */
1185
+ GOOGLE_MAPS = "GOOGLE_MAPS",
1186
+ /**
1187
+ * File search tool, maps to Tool.file_search.
1188
+ */
1189
+ FILE_SEARCH = "FILE_SEARCH"
1190
+ }
1191
+
1117
1192
  /** Data type of the schema field. */
1118
1193
  declare enum Type {
1119
1194
  /**
@@ -1210,16 +1285,17 @@ declare interface VideoMetadata {
1210
1285
  startOffset?: string;
1211
1286
  }
1212
1287
 
1288
+ /** The configuration for the voice to use. */
1213
1289
  declare interface VoiceConfig {
1214
- /** If true, the model will use a replicated voice for the response. */
1290
+ /** The configuration for a replicated voice, which is a clone of a
1291
+ user's voice that can be used for speech synthesis. If this is unset, a
1292
+ default voice is used. */
1215
1293
  replicatedVoiceConfig?: ReplicatedVoiceConfig;
1216
1294
  /** The configuration for a prebuilt voice. */
1217
1295
  prebuiltVoiceConfig?: PrebuiltVoiceConfig;
1218
1296
  }
1219
1297
 
1220
- /** Standard web search for grounding and related configurations.
1221
-
1222
- Only text results are returned. */
1298
+ /** Standard web search for grounding and related configurations. Only text results are returned. */
1223
1299
  declare interface WebSearch {
1224
1300
  }
1225
1301