@google/genai 2.0.0 → 2.1.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.
@@ -496,19 +496,19 @@ declare interface AudioResponseFormat {
496
496
  * Bit rate in bits per second (bps). Only applicable for compressed formats (MP3,
497
497
  * Opus).
498
498
  */
499
- bitRate?: number;
499
+ bit_rate?: number;
500
500
  /**
501
501
  * The delivery mode for the audio output.
502
502
  */
503
- delivery?: 'inline' | 'url';
503
+ delivery?: 'inline' | 'uri';
504
504
  /**
505
505
  * The MIME type of the audio output.
506
506
  */
507
- mimeType?: 'audio/mp3' | 'audio/ogg_opus' | 'audio/l16' | 'audio/wav' | 'audio/alaw' | 'audio/mulaw';
507
+ mime_type?: 'audio/mp3' | 'audio/ogg_opus' | 'audio/l16' | 'audio/wav' | 'audio/alaw' | 'audio/mulaw';
508
508
  /**
509
509
  * Sample rate in Hz.
510
510
  */
511
- sampleRate?: number;
511
+ sample_rate?: number;
512
512
  }
513
513
 
514
514
  /** The audio transcription configuration in Setup. */
@@ -1226,10 +1226,10 @@ export declare interface BatchJobSource {
1226
1226
 
1227
1227
  export declare type BatchJobSourceUnion = BatchJobSource | InlinedRequest[] | string;
1228
1228
 
1229
- /** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
1229
+ /** 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. */
1230
1230
  export declare enum Behavior {
1231
1231
  /**
1232
- * This value is unused.
1232
+ * This value is unspecified.
1233
1233
  */
1234
1234
  UNSPECIFIED = "UNSPECIFIED",
1235
1235
  /**
@@ -2585,8 +2585,7 @@ declare interface DeepResearchAgentConfig {
2585
2585
  /**
2586
2586
  * Enables human-in-the-loop planning for the Deep Research agent. If set to true,
2587
2587
  * the Deep Research agent will provide a research plan in its response. The agent
2588
- * will then proceed only if the user confirms the plan in the next turn. Relevant
2589
- * issue: b/482352502.
2588
+ * will then proceed only if the user confirms the plan in the next turn.
2590
2589
  */
2591
2590
  collaborative_planning?: boolean;
2592
2591
  /**
@@ -4040,7 +4039,7 @@ export declare interface FunctionDeclaration {
4040
4039
  response?: Schema;
4041
4040
  /** 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`. */
4042
4041
  responseJsonSchema?: unknown;
4043
- /** Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This field is not supported in Vertex AI. */
4042
+ /** 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. */
4044
4043
  behavior?: Behavior;
4045
4044
  }
4046
4045
 
@@ -6130,19 +6129,19 @@ declare interface ImageResponseFormat {
6130
6129
  /**
6131
6130
  * The aspect ratio for the image output.
6132
6131
  */
6133
- aspectRatio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9' | '1:8' | '8:1' | '1:4' | '4:1';
6132
+ aspect_ratio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9' | '1:8' | '8:1' | '1:4' | '4:1';
6134
6133
  /**
6135
6134
  * The delivery mode for the image output.
6136
6135
  */
6137
- delivery?: 'inline' | 'url';
6136
+ delivery?: 'inline' | 'uri';
6138
6137
  /**
6139
6138
  * The size of the image output.
6140
6139
  */
6141
- imageSize?: '512' | '1K' | '2K' | '4K';
6140
+ image_size?: '512' | '1K' | '2K' | '4K';
6142
6141
  /**
6143
6142
  * The MIME type of the image output.
6144
6143
  */
6145
- mimeType?: 'image/jpeg';
6144
+ mime_type?: 'image/jpeg';
6146
6145
  }
6147
6146
 
6148
6147
  /** Image search for grounding and related configurations. */
@@ -6260,6 +6259,10 @@ declare interface Interaction {
6260
6259
  * Required. Output only. The status of the interaction.
6261
6260
  */
6262
6261
  status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
6262
+ /**
6263
+ * Required. Output only. The steps that make up the interaction.
6264
+ */
6265
+ steps: Array<Step>;
6263
6266
  /**
6264
6267
  * Required. Output only. The time at which the response was last updated in ISO
6265
6268
  * 8601 format (YYYY-MM-DDThh:mm:ssZ).
@@ -6306,10 +6309,6 @@ declare interface Interaction {
6306
6309
  * The service tier for the interaction.
6307
6310
  */
6308
6311
  service_tier?: 'flex' | 'standard' | 'priority';
6309
- /**
6310
- * Output only. The steps that make up the interaction.
6311
- */
6312
- steps?: Array<Step>;
6313
6312
  /**
6314
6313
  * System instruction for the interaction.
6315
6314
  */
@@ -7924,7 +7923,7 @@ export declare interface Model {
7924
7923
  * The model that will complete your prompt.\n\nSee
7925
7924
  * [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
7926
7925
  */
7927
- declare type Model_2 = 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
7926
+ declare type Model_2 = 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
7928
7927
 
7929
7928
  /** Configuration for Model Armor. Model Armor is a Google Cloud service that provides safety and security filtering for prompts and responses. It helps protect your AI applications from risks such as harmful content, sensitive data leakage, and prompt injection attacks. This data type is not supported in Gemini API. */
7930
7929
  export declare interface ModelArmorConfig {
@@ -9975,7 +9974,7 @@ export declare enum StartSensitivity {
9975
9974
  declare type Step = UserInputStep | ModelOutputStep | ThoughtStep | FunctionCallStep | CodeExecutionCallStep | URLContextCallStep | MCPServerToolCallStep | GoogleSearchCallStep | FileSearchCallStep | GoogleMapsCallStep | FunctionResultStep | CodeExecutionResultStep | URLContextResultStep | GoogleSearchResultStep | MCPServerToolResultStep | FileSearchResultStep | GoogleMapsResultStep;
9976
9975
 
9977
9976
  declare interface StepDelta {
9978
- delta: StepDelta.Text | StepDelta.Image | StepDelta.Audio | StepDelta.Document | StepDelta.Video | StepDelta.ThoughtSummary | StepDelta.ThoughtSignature | StepDelta.TextAnnotationDelta | StepDelta.ArgumentsDelta;
9977
+ delta: StepDelta.Text | StepDelta.Image | StepDelta.Audio | StepDelta.Document | StepDelta.Video | StepDelta.ThoughtSummary | StepDelta.ThoughtSignature | StepDelta.TextAnnotationDelta | StepDelta.ArgumentsDelta | StepDelta.CodeExecutionCall | StepDelta.URLContextCall | StepDelta.GoogleSearchCall | StepDelta.MCPServerToolCall | StepDelta.FileSearchCall | StepDelta.GoogleMapsCall | StepDelta.CodeExecutionResult | StepDelta.URLContextResult | StepDelta.GoogleSearchResult | StepDelta.MCPServerToolResult | StepDelta.FileSearchResult | StepDelta.GoogleMapsResult;
9979
9978
  event_type: 'step.delta';
9980
9979
  index: number;
9981
9980
  /**
@@ -10056,7 +10055,125 @@ declare namespace StepDelta {
10056
10055
  }
10057
10056
  interface ArgumentsDelta {
10058
10057
  type: 'arguments_delta';
10059
- partial_arguments?: string;
10058
+ }
10059
+ interface CodeExecutionCall {
10060
+ /**
10061
+ * The arguments to pass to the code execution.
10062
+ */
10063
+ arguments: InteractionsAPI.CodeExecutionCallArguments;
10064
+ type: 'code_execution_call';
10065
+ /**
10066
+ * A signature hash for backend validation.
10067
+ */
10068
+ signature?: string;
10069
+ }
10070
+ interface URLContextCall {
10071
+ /**
10072
+ * The arguments to pass to the URL context.
10073
+ */
10074
+ arguments: InteractionsAPI.URLContextCallArguments;
10075
+ type: 'url_context_call';
10076
+ /**
10077
+ * A signature hash for backend validation.
10078
+ */
10079
+ signature?: string;
10080
+ }
10081
+ interface GoogleSearchCall {
10082
+ /**
10083
+ * The arguments to pass to Google Search.
10084
+ */
10085
+ arguments: InteractionsAPI.GoogleSearchCallArguments;
10086
+ type: 'google_search_call';
10087
+ /**
10088
+ * A signature hash for backend validation.
10089
+ */
10090
+ signature?: string;
10091
+ }
10092
+ interface MCPServerToolCall {
10093
+ arguments: {
10094
+ [key: string]: unknown;
10095
+ };
10096
+ name: string;
10097
+ server_name: string;
10098
+ type: 'mcp_server_tool_call';
10099
+ /**
10100
+ * A signature hash for backend validation.
10101
+ */
10102
+ signature?: string;
10103
+ }
10104
+ interface FileSearchCall {
10105
+ type: 'file_search_call';
10106
+ /**
10107
+ * A signature hash for backend validation.
10108
+ */
10109
+ signature?: string;
10110
+ }
10111
+ interface GoogleMapsCall {
10112
+ type: 'google_maps_call';
10113
+ /**
10114
+ * The arguments to pass to the Google Maps tool.
10115
+ */
10116
+ arguments?: InteractionsAPI.GoogleMapsCallArguments;
10117
+ /**
10118
+ * A signature hash for backend validation.
10119
+ */
10120
+ signature?: string;
10121
+ }
10122
+ interface CodeExecutionResult {
10123
+ result: string;
10124
+ type: 'code_execution_result';
10125
+ is_error?: boolean;
10126
+ /**
10127
+ * A signature hash for backend validation.
10128
+ */
10129
+ signature?: string;
10130
+ }
10131
+ interface URLContextResult {
10132
+ result: Array<InteractionsAPI.URLContextResult>;
10133
+ type: 'url_context_result';
10134
+ is_error?: boolean;
10135
+ /**
10136
+ * A signature hash for backend validation.
10137
+ */
10138
+ signature?: string;
10139
+ }
10140
+ interface GoogleSearchResult {
10141
+ result: Array<InteractionsAPI.GoogleSearchResult>;
10142
+ type: 'google_search_result';
10143
+ is_error?: boolean;
10144
+ /**
10145
+ * A signature hash for backend validation.
10146
+ */
10147
+ signature?: string;
10148
+ }
10149
+ interface MCPServerToolResult {
10150
+ result: unknown | Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent> | string;
10151
+ type: 'mcp_server_tool_result';
10152
+ name?: string;
10153
+ server_name?: string;
10154
+ /**
10155
+ * A signature hash for backend validation.
10156
+ */
10157
+ signature?: string;
10158
+ }
10159
+ interface FileSearchResult {
10160
+ result: Array<unknown>;
10161
+ type: 'file_search_result';
10162
+ /**
10163
+ * A signature hash for backend validation.
10164
+ */
10165
+ signature?: string;
10166
+ }
10167
+ interface GoogleMapsResult {
10168
+ type: 'google_maps_result';
10169
+ /**
10170
+ * The results of the Google Maps.
10171
+ */
10172
+ result?: Array<InteractionsAPI.GoogleMapsResult>;
10173
+ /**
10174
+ * A signature hash for backend validation.
10175
+ */
10176
+ signature?: string;
10060
10177
  }
10061
10178
  }
10062
10179
 
@@ -10325,7 +10442,7 @@ declare interface TextResponseFormat {
10325
10442
  /**
10326
10443
  * The MIME type of the text output.
10327
10444
  */
10328
- mimeType?: 'application/json' | 'text/plain';
10445
+ mime_type?: 'application/json' | 'text/plain';
10329
10446
  /**
10330
10447
  * The JSON schema that the output should conform to. Only applicable when
10331
10448
  * mime_type is application/json.
@@ -10549,7 +10666,7 @@ declare namespace Tool_2 {
10549
10666
  /**
10550
10667
  * The list of predefined functions that are excluded from the model call.
10551
10668
  */
10552
- excludedPredefinedFunctions?: Array<string>;
10669
+ excluded_predefined_functions?: Array<string>;
10553
10670
  }
10554
10671
  /**
10555
10672
  * A MCPServer is a server that can be called by the model to perform actions.
@@ -12580,6 +12697,23 @@ export declare interface VideoMetadata {
12580
12697
  */
12581
12698
  declare interface VideoResponseFormat {
12582
12699
  type: 'video';
12700
+ /**
12701
+ * The aspect ratio for the video output.
12702
+ */
12703
+ aspectRatio?: '16:9' | '9:16';
12704
+ /**
12705
+ * The delivery mode for the video output.
12706
+ */
12707
+ delivery?: 'inline' | 'uri';
12708
+ /**
12709
+ * The duration for the video output.
12710
+ */
12711
+ duration?: string;
12712
+ /**
12713
+ * The GCS URI to store the video output. Required for Vertex if delivery mode is
12714
+ * URI.
12715
+ */
12716
+ gcsUri?: string;
12583
12717
  }
12584
12718
 
12585
12719
  /** Voice activity signal. */
@@ -235,11 +235,11 @@ var PhishBlockThreshold;
235
235
  */
236
236
  PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
237
237
  })(PhishBlockThreshold || (PhishBlockThreshold = {}));
238
- /** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
238
+ /** 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. */
239
239
  var Behavior;
240
240
  (function (Behavior) {
241
241
  /**
242
- * This value is unused.
242
+ * This value is unspecified.
243
243
  */
244
244
  Behavior["UNSPECIFIED"] = "UNSPECIFIED";
245
245
  /**
@@ -115,10 +115,10 @@ declare enum AuthType {
115
115
  OIDC_AUTH = "OIDC_AUTH"
116
116
  }
117
117
 
118
- /** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
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. */
119
119
  declare enum Behavior {
120
120
  /**
121
- * This value is unused.
121
+ * This value is unspecified.
122
122
  */
123
123
  UNSPECIFIED = "UNSPECIFIED",
124
124
  /**
@@ -356,7 +356,7 @@ declare interface FunctionDeclaration {
356
356
  response?: Schema;
357
357
  /** 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`. */
358
358
  responseJsonSchema?: unknown;
359
- /** Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This field is not supported in Vertex AI. */
359
+ /** 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. */
360
360
  behavior?: Behavior;
361
361
  }
362
362
 
@@ -211,11 +211,11 @@ var PhishBlockThreshold;
211
211
  */
212
212
  PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
213
213
  })(PhishBlockThreshold || (PhishBlockThreshold = {}));
214
- /** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
214
+ /** 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. */
215
215
  var Behavior;
216
216
  (function (Behavior) {
217
217
  /**
218
- * This value is unused.
218
+ * This value is unspecified.
219
219
  */
220
220
  Behavior["UNSPECIFIED"] = "UNSPECIFIED";
221
221
  /**