@google/genai 2.0.1 → 2.2.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.
@@ -500,7 +500,7 @@ declare interface AudioResponseFormat {
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
  */
@@ -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
  /**
@@ -4039,7 +4039,7 @@ export declare interface FunctionDeclaration {
4039
4039
  response?: Schema;
4040
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`. */
4041
4041
  responseJsonSchema?: unknown;
4042
- /** 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. */
4043
4043
  behavior?: Behavior;
4044
4044
  }
4045
4045
 
@@ -6133,7 +6133,7 @@ declare interface ImageResponseFormat {
6133
6133
  /**
6134
6134
  * The delivery mode for the image output.
6135
6135
  */
6136
- delivery?: 'inline' | 'url';
6136
+ delivery?: 'inline' | 'uri';
6137
6137
  /**
6138
6138
  * The size of the image output.
6139
6139
  */
@@ -6259,6 +6259,10 @@ declare interface Interaction {
6259
6259
  * Required. Output only. The status of the interaction.
6260
6260
  */
6261
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>;
6262
6266
  /**
6263
6267
  * Required. Output only. The time at which the response was last updated in ISO
6264
6268
  * 8601 format (YYYY-MM-DDThh:mm:ssZ).
@@ -6305,10 +6309,6 @@ declare interface Interaction {
6305
6309
  * The service tier for the interaction.
6306
6310
  */
6307
6311
  service_tier?: 'flex' | 'standard' | 'priority';
6308
- /**
6309
- * Output only. The steps that make up the interaction.
6310
- */
6311
- steps?: Array<Step>;
6312
6312
  /**
6313
6313
  * System instruction for the interaction.
6314
6314
  */
@@ -7923,7 +7923,7 @@ export declare interface Model {
7923
7923
  * The model that will complete your prompt.\n\nSee
7924
7924
  * [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
7925
7925
  */
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-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 & {});
7927
7927
 
7928
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. */
7929
7929
  export declare interface ModelArmorConfig {
@@ -9974,7 +9974,7 @@ export declare enum StartSensitivity {
9974
9974
  declare type Step = UserInputStep | ModelOutputStep | ThoughtStep | FunctionCallStep | CodeExecutionCallStep | URLContextCallStep | MCPServerToolCallStep | GoogleSearchCallStep | FileSearchCallStep | GoogleMapsCallStep | FunctionResultStep | CodeExecutionResultStep | URLContextResultStep | GoogleSearchResultStep | MCPServerToolResultStep | FileSearchResultStep | GoogleMapsResultStep;
9975
9975
 
9976
9976
  declare interface StepDelta {
9977
- 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 | StepDelta.FunctionResult;
9978
9978
  event_type: 'step.delta';
9979
9979
  index: number;
9980
9980
  /**
@@ -10055,7 +10055,136 @@ declare namespace StepDelta {
10055
10055
  }
10056
10056
  interface ArgumentsDelta {
10057
10057
  type: 'arguments_delta';
10058
- partial_arguments?: string;
10058
+ arguments?: string;
10059
+ }
10060
+ interface CodeExecutionCall {
10061
+ /**
10062
+ * The arguments to pass to the code execution.
10063
+ */
10064
+ arguments: InteractionsAPI.CodeExecutionCallArguments;
10065
+ type: 'code_execution_call';
10066
+ /**
10067
+ * A signature hash for backend validation.
10068
+ */
10069
+ signature?: string;
10070
+ }
10071
+ interface URLContextCall {
10072
+ /**
10073
+ * The arguments to pass to the URL context.
10074
+ */
10075
+ arguments: InteractionsAPI.URLContextCallArguments;
10076
+ type: 'url_context_call';
10077
+ /**
10078
+ * A signature hash for backend validation.
10079
+ */
10080
+ signature?: string;
10081
+ }
10082
+ interface GoogleSearchCall {
10083
+ /**
10084
+ * The arguments to pass to Google Search.
10085
+ */
10086
+ arguments: InteractionsAPI.GoogleSearchCallArguments;
10087
+ type: 'google_search_call';
10088
+ /**
10089
+ * A signature hash for backend validation.
10090
+ */
10091
+ signature?: string;
10092
+ }
10093
+ interface MCPServerToolCall {
10094
+ arguments: {
10095
+ [key: string]: unknown;
10096
+ };
10097
+ name: string;
10098
+ server_name: string;
10099
+ type: 'mcp_server_tool_call';
10100
+ /**
10101
+ * A signature hash for backend validation.
10102
+ */
10103
+ signature?: string;
10104
+ }
10105
+ interface FileSearchCall {
10106
+ type: 'file_search_call';
10107
+ /**
10108
+ * A signature hash for backend validation.
10109
+ */
10110
+ signature?: string;
10111
+ }
10112
+ interface GoogleMapsCall {
10113
+ type: 'google_maps_call';
10114
+ /**
10115
+ * The arguments to pass to the Google Maps tool.
10116
+ */
10117
+ arguments?: InteractionsAPI.GoogleMapsCallArguments;
10118
+ /**
10119
+ * A signature hash for backend validation.
10120
+ */
10121
+ signature?: string;
10122
+ }
10123
+ interface CodeExecutionResult {
10124
+ result: string;
10125
+ type: 'code_execution_result';
10126
+ is_error?: boolean;
10127
+ /**
10128
+ * A signature hash for backend validation.
10129
+ */
10130
+ signature?: string;
10131
+ }
10132
+ interface URLContextResult {
10133
+ result: Array<InteractionsAPI.URLContextResult>;
10134
+ type: 'url_context_result';
10135
+ is_error?: boolean;
10136
+ /**
10137
+ * A signature hash for backend validation.
10138
+ */
10139
+ signature?: string;
10140
+ }
10141
+ interface GoogleSearchResult {
10142
+ result: Array<InteractionsAPI.GoogleSearchResult>;
10143
+ type: 'google_search_result';
10144
+ is_error?: boolean;
10145
+ /**
10146
+ * A signature hash for backend validation.
10147
+ */
10148
+ signature?: string;
10149
+ }
10150
+ interface MCPServerToolResult {
10151
+ result: unknown | Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent> | string;
10152
+ type: 'mcp_server_tool_result';
10153
+ name?: string;
10154
+ server_name?: string;
10155
+ /**
10156
+ * A signature hash for backend validation.
10157
+ */
10158
+ signature?: string;
10159
+ }
10160
+ interface FileSearchResult {
10161
+ result: Array<unknown>;
10162
+ type: 'file_search_result';
10163
+ /**
10164
+ * A signature hash for backend validation.
10165
+ */
10166
+ signature?: string;
10167
+ }
10168
+ interface GoogleMapsResult {
10169
+ type: 'google_maps_result';
10170
+ /**
10171
+ * The results of the Google Maps.
10172
+ */
10173
+ result?: Array<InteractionsAPI.GoogleMapsResult>;
10174
+ /**
10175
+ * A signature hash for backend validation.
10176
+ */
10177
+ signature?: string;
10178
+ }
10179
+ interface FunctionResult {
10180
+ /**
10181
+ * Required. ID to match the ID from the function call block.
10182
+ */
10183
+ call_id: string;
10184
+ result: unknown | Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent> | string;
10185
+ type: 'function_result';
10186
+ is_error?: boolean;
10187
+ name?: string;
10059
10188
  }
10060
10189
  }
10061
10190
 
@@ -12579,6 +12708,23 @@ export declare interface VideoMetadata {
12579
12708
  */
12580
12709
  declare interface VideoResponseFormat {
12581
12710
  type: 'video';
12711
+ /**
12712
+ * The aspect ratio for the video output.
12713
+ */
12714
+ aspectRatio?: '16:9' | '9:16';
12715
+ /**
12716
+ * The delivery mode for the video output.
12717
+ */
12718
+ delivery?: 'inline' | 'uri';
12719
+ /**
12720
+ * The duration for the video output.
12721
+ */
12722
+ duration?: string;
12723
+ /**
12724
+ * The GCS URI to store the video output. Required for Vertex if delivery mode is
12725
+ * URI.
12726
+ */
12727
+ gcsUri?: string;
12582
12728
  }
12583
12729
 
12584
12730
  /** 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
  /**