@google/genai 2.10.0 → 2.11.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.
@@ -279,7 +279,7 @@ var PhishBlockThreshold;
279
279
  */
280
280
  PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
281
281
  })(PhishBlockThreshold || (PhishBlockThreshold = {}));
282
- /** Specifies the function Behavior. Currently only non-blocking functions are supported. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
282
+ /** Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
283
283
  var Behavior;
284
284
  (function (Behavior) {
285
285
  /**
@@ -793,6 +793,110 @@ var Modality;
793
793
  */
794
794
  Modality["VIDEO"] = "VIDEO";
795
795
  })(Modality || (Modality = {}));
796
+ /** Delivery mode for the generated content. */
797
+ var Delivery;
798
+ (function (Delivery) {
799
+ /**
800
+ * Default value. This value is unused.
801
+ */
802
+ Delivery["DELIVERY_UNSPECIFIED"] = "DELIVERY_UNSPECIFIED";
803
+ /**
804
+ * Generated bytes are returned inline in the response.
805
+ */
806
+ Delivery["INLINE"] = "INLINE";
807
+ /**
808
+ * Generated content is stored and a URI is returned.
809
+ */
810
+ Delivery["URI"] = "URI";
811
+ })(Delivery || (Delivery = {}));
812
+ /** The aspect ratio for the image output. */
813
+ var AspectRatio;
814
+ (function (AspectRatio) {
815
+ /**
816
+ * Default value. This value is unused.
817
+ */
818
+ AspectRatio["ASPECT_RATIO_UNSPECIFIED"] = "ASPECT_RATIO_UNSPECIFIED";
819
+ /**
820
+ * 1:1 aspect ratio.
821
+ */
822
+ AspectRatio["ASPECT_RATIO_ONE_BY_ONE"] = "ASPECT_RATIO_ONE_BY_ONE";
823
+ /**
824
+ * 2:3 aspect ratio.
825
+ */
826
+ AspectRatio["ASPECT_RATIO_TWO_BY_THREE"] = "ASPECT_RATIO_TWO_BY_THREE";
827
+ /**
828
+ * 3:2 aspect ratio.
829
+ */
830
+ AspectRatio["ASPECT_RATIO_THREE_BY_TWO"] = "ASPECT_RATIO_THREE_BY_TWO";
831
+ /**
832
+ * 3:4 aspect ratio.
833
+ */
834
+ AspectRatio["ASPECT_RATIO_THREE_BY_FOUR"] = "ASPECT_RATIO_THREE_BY_FOUR";
835
+ /**
836
+ * 4:3 aspect ratio.
837
+ */
838
+ AspectRatio["ASPECT_RATIO_FOUR_BY_THREE"] = "ASPECT_RATIO_FOUR_BY_THREE";
839
+ /**
840
+ * 4:5 aspect ratio.
841
+ */
842
+ AspectRatio["ASPECT_RATIO_FOUR_BY_FIVE"] = "ASPECT_RATIO_FOUR_BY_FIVE";
843
+ /**
844
+ * 5:4 aspect ratio.
845
+ */
846
+ AspectRatio["ASPECT_RATIO_FIVE_BY_FOUR"] = "ASPECT_RATIO_FIVE_BY_FOUR";
847
+ /**
848
+ * 9:16 aspect ratio.
849
+ */
850
+ AspectRatio["ASPECT_RATIO_NINE_BY_SIXTEEN"] = "ASPECT_RATIO_NINE_BY_SIXTEEN";
851
+ /**
852
+ * 16:9 aspect ratio.
853
+ */
854
+ AspectRatio["ASPECT_RATIO_SIXTEEN_BY_NINE"] = "ASPECT_RATIO_SIXTEEN_BY_NINE";
855
+ /**
856
+ * 21:9 aspect ratio.
857
+ */
858
+ AspectRatio["ASPECT_RATIO_TWENTY_ONE_BY_NINE"] = "ASPECT_RATIO_TWENTY_ONE_BY_NINE";
859
+ /**
860
+ * 1:8 aspect ratio.
861
+ */
862
+ AspectRatio["ASPECT_RATIO_ONE_BY_EIGHT"] = "ASPECT_RATIO_ONE_BY_EIGHT";
863
+ /**
864
+ * 8:1 aspect ratio.
865
+ */
866
+ AspectRatio["ASPECT_RATIO_EIGHT_BY_ONE"] = "ASPECT_RATIO_EIGHT_BY_ONE";
867
+ /**
868
+ * 1:4 aspect ratio.
869
+ */
870
+ AspectRatio["ASPECT_RATIO_ONE_BY_FOUR"] = "ASPECT_RATIO_ONE_BY_FOUR";
871
+ /**
872
+ * 4:1 aspect ratio.
873
+ */
874
+ AspectRatio["ASPECT_RATIO_FOUR_BY_ONE"] = "ASPECT_RATIO_FOUR_BY_ONE";
875
+ })(AspectRatio || (AspectRatio = {}));
876
+ /** The size of the image output. */
877
+ var ImageSize;
878
+ (function (ImageSize) {
879
+ /**
880
+ * Default value. This value is unused.
881
+ */
882
+ ImageSize["IMAGE_SIZE_UNSPECIFIED"] = "IMAGE_SIZE_UNSPECIFIED";
883
+ /**
884
+ * 512px image size.
885
+ */
886
+ ImageSize["IMAGE_SIZE_FIVE_TWELVE"] = "IMAGE_SIZE_FIVE_TWELVE";
887
+ /**
888
+ * 1K image size.
889
+ */
890
+ ImageSize["IMAGE_SIZE_ONE_K"] = "IMAGE_SIZE_ONE_K";
891
+ /**
892
+ * 2K image size.
893
+ */
894
+ ImageSize["IMAGE_SIZE_TWO_K"] = "IMAGE_SIZE_TWO_K";
895
+ /**
896
+ * 4K image size.
897
+ */
898
+ ImageSize["IMAGE_SIZE_FOUR_K"] = "IMAGE_SIZE_FOUR_K";
899
+ })(ImageSize || (ImageSize = {}));
796
900
  /** Tuning mode. This enum is not supported in Gemini API. */
797
901
  var TuningMode;
798
902
  (function (TuningMode) {
@@ -841,6 +945,58 @@ var AdapterSize;
841
945
  */
842
946
  AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
843
947
  })(AdapterSize || (AdapterSize = {}));
948
+ /** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
949
+ var ResponseParseType;
950
+ (function (ResponseParseType) {
951
+ /**
952
+ * Default value. Fallback to IDENTITY
953
+ */
954
+ ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
955
+ /**
956
+ * Returns the sample response as is.
957
+ */
958
+ ResponseParseType["IDENTITY"] = "IDENTITY";
959
+ /**
960
+ * Uses regex to extract the important part of sample response. Similar to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_extract) `REGEX_EXTRACT(response, regex_extract_expression)`, but different in that if there are multiple matches, the last match will be returned.
961
+ */
962
+ ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
963
+ })(ResponseParseType || (ResponseParseType = {}));
964
+ /** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
965
+ var MatchOperation;
966
+ (function (MatchOperation) {
967
+ /**
968
+ * Default value. A user error will be returned if not set.
969
+ */
970
+ MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
971
+ /**
972
+ * Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
973
+ */
974
+ MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
975
+ /**
976
+ * The match operation returns `true` if expression is a substring of the target.
977
+ */
978
+ MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
979
+ /**
980
+ * The match operation returns `true` expression is an exact match of the target.
981
+ */
982
+ MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
983
+ })(MatchOperation || (MatchOperation = {}));
984
+ /** Represents how much to think for the tuning job. */
985
+ var ReinforcementTuningThinkingLevel;
986
+ (function (ReinforcementTuningThinkingLevel) {
987
+ /**
988
+ * Unspecified thinking level.
989
+ */
990
+ ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
991
+ /**
992
+ * Little to no thinking.
993
+ */
994
+ ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
995
+ /**
996
+ * High thinking level.
997
+ */
998
+ ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
999
+ })(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
844
1000
  /** Job state. */
845
1001
  var JobState;
846
1002
  (function (JobState) {
@@ -1325,58 +1481,6 @@ var ImageResizeMode;
1325
1481
  */
1326
1482
  ImageResizeMode["PAD"] = "PAD";
1327
1483
  })(ImageResizeMode || (ImageResizeMode = {}));
1328
- /** Defines how to parse sample response. */
1329
- var ResponseParseType;
1330
- (function (ResponseParseType) {
1331
- /**
1332
- * Default value. This value is unused.
1333
- */
1334
- ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
1335
- /**
1336
- * Use the sample response as is.
1337
- */
1338
- ResponseParseType["IDENTITY"] = "IDENTITY";
1339
- /**
1340
- * Use regex to extract the important part of sample response.
1341
- */
1342
- ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
1343
- })(ResponseParseType || (ResponseParseType = {}));
1344
- /** Match operation to use for evaluation. */
1345
- var MatchOperation;
1346
- (function (MatchOperation) {
1347
- /**
1348
- * Default value. This value is unused.
1349
- */
1350
- MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
1351
- /**
1352
- * Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
1353
- */
1354
- MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
1355
- /**
1356
- * `expression` is a substring of target.
1357
- */
1358
- MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
1359
- /**
1360
- * `expression` is an exact match of target.
1361
- */
1362
- MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
1363
- })(MatchOperation || (MatchOperation = {}));
1364
- /** Represents how much to think for the tuning job. */
1365
- var ReinforcementTuningThinkingLevel;
1366
- (function (ReinforcementTuningThinkingLevel) {
1367
- /**
1368
- * Unspecified thinking level.
1369
- */
1370
- ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
1371
- /**
1372
- * Little to no thinking.
1373
- */
1374
- ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
1375
- /**
1376
- * High thinking level.
1377
- */
1378
- ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
1379
- })(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
1380
1484
  /** Enum representing the tuning method. */
1381
1485
  var TuningMethod;
1382
1486
  (function (TuningMethod) {
@@ -40,6 +40,82 @@ declare enum ApiSpec {
40
40
  ELASTIC_SEARCH = "ELASTIC_SEARCH"
41
41
  }
42
42
 
43
+ /** The aspect ratio for the image output. */
44
+ declare enum AspectRatio {
45
+ /**
46
+ * Default value. This value is unused.
47
+ */
48
+ ASPECT_RATIO_UNSPECIFIED = "ASPECT_RATIO_UNSPECIFIED",
49
+ /**
50
+ * 1:1 aspect ratio.
51
+ */
52
+ ASPECT_RATIO_ONE_BY_ONE = "ASPECT_RATIO_ONE_BY_ONE",
53
+ /**
54
+ * 2:3 aspect ratio.
55
+ */
56
+ ASPECT_RATIO_TWO_BY_THREE = "ASPECT_RATIO_TWO_BY_THREE",
57
+ /**
58
+ * 3:2 aspect ratio.
59
+ */
60
+ ASPECT_RATIO_THREE_BY_TWO = "ASPECT_RATIO_THREE_BY_TWO",
61
+ /**
62
+ * 3:4 aspect ratio.
63
+ */
64
+ ASPECT_RATIO_THREE_BY_FOUR = "ASPECT_RATIO_THREE_BY_FOUR",
65
+ /**
66
+ * 4:3 aspect ratio.
67
+ */
68
+ ASPECT_RATIO_FOUR_BY_THREE = "ASPECT_RATIO_FOUR_BY_THREE",
69
+ /**
70
+ * 4:5 aspect ratio.
71
+ */
72
+ ASPECT_RATIO_FOUR_BY_FIVE = "ASPECT_RATIO_FOUR_BY_FIVE",
73
+ /**
74
+ * 5:4 aspect ratio.
75
+ */
76
+ ASPECT_RATIO_FIVE_BY_FOUR = "ASPECT_RATIO_FIVE_BY_FOUR",
77
+ /**
78
+ * 9:16 aspect ratio.
79
+ */
80
+ ASPECT_RATIO_NINE_BY_SIXTEEN = "ASPECT_RATIO_NINE_BY_SIXTEEN",
81
+ /**
82
+ * 16:9 aspect ratio.
83
+ */
84
+ ASPECT_RATIO_SIXTEEN_BY_NINE = "ASPECT_RATIO_SIXTEEN_BY_NINE",
85
+ /**
86
+ * 21:9 aspect ratio.
87
+ */
88
+ ASPECT_RATIO_TWENTY_ONE_BY_NINE = "ASPECT_RATIO_TWENTY_ONE_BY_NINE",
89
+ /**
90
+ * 1:8 aspect ratio.
91
+ */
92
+ ASPECT_RATIO_ONE_BY_EIGHT = "ASPECT_RATIO_ONE_BY_EIGHT",
93
+ /**
94
+ * 8:1 aspect ratio.
95
+ */
96
+ ASPECT_RATIO_EIGHT_BY_ONE = "ASPECT_RATIO_EIGHT_BY_ONE",
97
+ /**
98
+ * 1:4 aspect ratio.
99
+ */
100
+ ASPECT_RATIO_ONE_BY_FOUR = "ASPECT_RATIO_ONE_BY_FOUR",
101
+ /**
102
+ * 4:1 aspect ratio.
103
+ */
104
+ ASPECT_RATIO_FOUR_BY_ONE = "ASPECT_RATIO_FOUR_BY_ONE"
105
+ }
106
+
107
+ /** Configuration for audio-specific output formatting. */
108
+ declare class AudioResponseFormat {
109
+ /** Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus). */
110
+ bitRate?: number;
111
+ /** Optional. Delivery mode for the generated content. */
112
+ delivery?: Delivery;
113
+ /** Optional. The MIME type of the audio output. */
114
+ mimeType?: string;
115
+ /** Optional. Sample rate for the generated audio in Hertz. */
116
+ sampleRate?: number;
117
+ }
118
+
43
119
  /** The authentication config to access the API. */
44
120
  declare interface AuthConfig {
45
121
  /** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
@@ -115,7 +191,7 @@ declare enum AuthType {
115
191
  OIDC_AUTH = "OIDC_AUTH"
116
192
  }
117
193
 
118
- /** Specifies the function Behavior. Currently only non-blocking functions are supported. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
194
+ /** Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
119
195
  declare enum Behavior {
120
196
  /**
121
197
  * This value is unspecified.
@@ -213,6 +289,22 @@ export declare interface CountTokensResult {
213
289
  totalTokens?: number;
214
290
  }
215
291
 
292
+ /** Delivery mode for the generated content. */
293
+ declare enum Delivery {
294
+ /**
295
+ * Default value. This value is unused.
296
+ */
297
+ DELIVERY_UNSPECIFIED = "DELIVERY_UNSPECIFIED",
298
+ /**
299
+ * Generated bytes are returned inline in the response.
300
+ */
301
+ INLINE = "INLINE",
302
+ /**
303
+ * Generated content is stored and a URI is returned.
304
+ */
305
+ URI = "URI"
306
+ }
307
+
216
308
  /** Describes the options to customize dynamic retrieval. */
217
309
  declare interface DynamicRetrievalConfig {
218
310
  /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */
@@ -357,7 +449,7 @@ declare interface FunctionDeclaration {
357
449
  response?: Schema;
358
450
  /** Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`. */
359
451
  responseJsonSchema?: unknown;
360
- /** Optional. Specifies the function Behavior. Currently only non-blocking functions are supported. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
452
+ /** Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
361
453
  behavior?: Behavior;
362
454
  }
363
455
 
@@ -452,11 +544,11 @@ declare interface GenerationConfig {
452
544
  presencePenalty?: number;
453
545
  /** 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. */
454
546
  responseLogprobs?: boolean;
455
- /** 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. */
547
+ /** 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. Deprecated: Use `response_format` instead. */
456
548
  responseMimeType?: string;
457
549
  /** 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. */
458
550
  responseModalities?: Modality[];
459
- /** 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`. */
551
+ /** 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`. Deprecated: Use `response_format` instead. */
460
552
  responseSchema?: Schema;
461
553
  /** Optional. Routing configuration. This field is not supported in Gemini API. */
462
554
  routingConfig?: GenerationConfigRoutingConfig;
@@ -476,6 +568,10 @@ declare interface GenerationConfig {
476
568
  topP?: number;
477
569
  /** Optional. Enables enhanced civic answers. It may not be available for all models. This field is not supported in Vertex AI. */
478
570
  enableEnhancedCivicAnswers?: boolean;
571
+ /** Optional. New response format field for the model to configure output formatting and delivery. */
572
+ responseFormat?: ResponseFormat[];
573
+ /** Optional. Config for translation. This field is not supported in Vertex AI. */
574
+ translationConfig?: TranslationConfig;
479
575
  }
480
576
 
481
577
  /** 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. */
@@ -577,10 +673,46 @@ declare interface HttpRetryOptions {
577
673
  attempts?: number;
578
674
  }
579
675
 
676
+ /** Configuration for image-specific output formatting. */
677
+ declare class ImageResponseFormat {
678
+ /** Optional. The aspect ratio for the image output. */
679
+ aspectRatio?: AspectRatio;
680
+ /** Optional. Delivery mode for the generated content. */
681
+ delivery?: Delivery;
682
+ /** Optional. The size of the image output. */
683
+ imageSize?: ImageSize;
684
+ /** Optional. The MIME type of the image output. */
685
+ mimeType?: string;
686
+ }
687
+
580
688
  /** Image search for grounding and related configurations. */
581
689
  declare interface ImageSearch {
582
690
  }
583
691
 
692
+ /** The size of the image output. */
693
+ declare enum ImageSize {
694
+ /**
695
+ * Default value. This value is unused.
696
+ */
697
+ IMAGE_SIZE_UNSPECIFIED = "IMAGE_SIZE_UNSPECIFIED",
698
+ /**
699
+ * 512px image size.
700
+ */
701
+ IMAGE_SIZE_FIVE_TWELVE = "IMAGE_SIZE_FIVE_TWELVE",
702
+ /**
703
+ * 1K image size.
704
+ */
705
+ IMAGE_SIZE_ONE_K = "IMAGE_SIZE_ONE_K",
706
+ /**
707
+ * 2K image size.
708
+ */
709
+ IMAGE_SIZE_TWO_K = "IMAGE_SIZE_TWO_K",
710
+ /**
711
+ * 4K image size.
712
+ */
713
+ IMAGE_SIZE_FOUR_K = "IMAGE_SIZE_FOUR_K"
714
+ }
715
+
584
716
  /** 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. */
585
717
  declare interface Interval {
586
718
  /** Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. */
@@ -914,6 +1046,17 @@ declare interface ReplicatedVoiceConfig {
914
1046
 
915
1047
  * @remarks Encoded as base64 string. */
916
1048
  voiceSampleAudio?: string;
1049
+ /** Recorded consent verifying ownership of the voice. This
1050
+ represents 16-bit signed little-endian wav data, with a 24kHz sampling
1051
+ rate.
1052
+ * @remarks Encoded as base64 string. */
1053
+ consentAudio?: string;
1054
+ /** Signature of a previously verified consent audio. This should be
1055
+ populated with a signature generated by the server for a previous
1056
+ request containing the consent_audio field. When provided, the
1057
+ signature is verified instead of the consent_audio field to reduce
1058
+ latency. Requests will fail if the signature is invalid or expired. */
1059
+ voiceConsentSignature?: VoiceConsentSignature;
917
1060
  }
918
1061
 
919
1062
  /** Resource scope. */
@@ -928,6 +1071,18 @@ declare enum ResourceScope {
928
1071
  COLLECTION = "COLLECTION"
929
1072
  }
930
1073
 
1074
+ /** Configuration for the model to configure output formatting and delivery. This data type is not supported in Gemini API. */
1075
+ declare class ResponseFormat {
1076
+ /** Audio output format. */
1077
+ audio?: AudioResponseFormat;
1078
+ /** Image output format. */
1079
+ image?: ImageResponseFormat;
1080
+ /** Text output format. */
1081
+ text?: TextResponseFormat;
1082
+ /** Video output format. */
1083
+ video?: VideoResponseFormat;
1084
+ }
1085
+
931
1086
  /** Defines a retrieval tool that model can call to access external knowledge. This data type is not supported in Gemini API. */
932
1087
  declare interface Retrieval {
933
1088
  /** Optional. Deprecated. This option is no longer supported. */
@@ -1068,6 +1223,14 @@ declare interface StreamableHttpTransport {
1068
1223
  url?: string;
1069
1224
  }
1070
1225
 
1226
+ /** Configuration for text-specific output formatting. */
1227
+ declare class TextResponseFormat {
1228
+ /** Optional. The IANA standard MIME type of the response. */
1229
+ mimeType?: string;
1230
+ /** Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON. */
1231
+ schema?: unknown;
1232
+ }
1233
+
1071
1234
  /** The thinking features configuration. */
1072
1235
  declare interface ThinkingConfig {
1073
1236
  /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.
@@ -1142,6 +1305,8 @@ declare interface Tool {
1142
1305
  urlContext?: UrlContext;
1143
1306
  /** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
1144
1307
  mcpServers?: McpServer[];
1308
+ /** Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation. This field is not supported in Gemini API. */
1309
+ exaAiSearch?: ToolExaAiSearch;
1145
1310
  }
1146
1311
 
1147
1312
  /** A predicted server-side `ToolCall` returned from the model.
@@ -1163,6 +1328,14 @@ declare interface ToolCall {
1163
1328
  declare interface ToolCodeExecution {
1164
1329
  }
1165
1330
 
1331
+ /** ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. This data type is not supported in Gemini API. */
1332
+ declare interface ToolExaAiSearch {
1333
+ /** Required. The API key for ExaAiSearch. */
1334
+ apiKey?: string;
1335
+ /** Optional. This field can be used to pass any parameter from the Exa.ai Search API. */
1336
+ customConfigs?: Record<string, unknown>;
1337
+ }
1338
+
1166
1339
  /** ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. This data type is not supported in Gemini API. */
1167
1340
  declare interface ToolParallelAiSearch {
1168
1341
  /** 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. */
@@ -1214,6 +1387,14 @@ declare enum ToolType {
1214
1387
  FILE_SEARCH = "FILE_SEARCH"
1215
1388
  }
1216
1389
 
1390
+ /** Config for stream translation. */
1391
+ declare interface TranslationConfig {
1392
+ /** Optional. If true, the model will generate audio when the target language is spoken, essentially it will parrot the input. If false, we will not produce audio for the target language. */
1393
+ echoTargetLanguage?: boolean;
1394
+ /** Required. The target language for translation. Supported values are BCP-47 language codes (e.g. "en", "es", "fr"). */
1395
+ targetLanguageCode?: string;
1396
+ }
1397
+
1217
1398
  /** Data type of the schema field. */
1218
1399
  declare enum Type {
1219
1400
  /**
@@ -1310,6 +1491,18 @@ declare interface VideoMetadata {
1310
1491
  startOffset?: string;
1311
1492
  }
1312
1493
 
1494
+ /** Configuration for video-specific output formatting. This data type is not supported in Gemini API. */
1495
+ declare class VideoResponseFormat {
1496
+ /** The aspect ratio for the video output. */
1497
+ aspectRatio?: AspectRatio;
1498
+ /** Optional. Delivery mode for the generated content. */
1499
+ delivery?: Delivery;
1500
+ /** Optional. The duration for the video output. */
1501
+ duration?: string;
1502
+ /** Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI. */
1503
+ gcsUri?: string;
1504
+ }
1505
+
1313
1506
  /** The configuration for the voice to use. */
1314
1507
  declare interface VoiceConfig {
1315
1508
  /** The configuration for a replicated voice, which is a clone of a
@@ -1320,6 +1513,13 @@ declare interface VoiceConfig {
1320
1513
  prebuiltVoiceConfig?: PrebuiltVoiceConfig;
1321
1514
  }
1322
1515
 
1516
+ /** The signature of the voice consent check. */
1517
+ declare interface VoiceConsentSignature {
1518
+ /** The signature string.
1519
+ */
1520
+ signature?: string;
1521
+ }
1522
+
1323
1523
  /** Standard web search for grounding and related configurations. Only text results are returned. */
1324
1524
  declare interface WebSearch {
1325
1525
  }