@google/genai 1.52.0 → 2.0.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.
@@ -487,6 +487,30 @@ declare interface AudioContent {
487
487
  uri?: string;
488
488
  }
489
489
 
490
+ /**
491
+ * Configuration for audio output format.
492
+ */
493
+ declare interface AudioResponseFormat {
494
+ type: 'audio';
495
+ /**
496
+ * Bit rate in bits per second (bps). Only applicable for compressed formats (MP3,
497
+ * Opus).
498
+ */
499
+ bitRate?: number;
500
+ /**
501
+ * The delivery mode for the audio output.
502
+ */
503
+ delivery?: 'inline' | 'url';
504
+ /**
505
+ * The MIME type of the audio output.
506
+ */
507
+ mimeType?: 'audio/mp3' | 'audio/ogg_opus' | 'audio/l16' | 'audio/wav' | 'audio/alaw' | 'audio/mulaw';
508
+ /**
509
+ * Sample rate in Hz.
510
+ */
511
+ sampleRate?: number;
512
+ }
513
+
490
514
  /** The audio transcription configuration in Setup. */
491
515
  export declare interface AudioTranscriptionConfig {
492
516
  /** The language codes of the audio. BCP-47 language code. If not set, the transcription will be in the language detected by the model. If set, the server will use the language code specified in the model config as a hint for the language of the audio
@@ -659,7 +683,7 @@ declare interface BaseCreateAgentInteractionParams {
659
683
  /**
660
684
  * Body param: The input for the interaction.
661
685
  */
662
- input: Array<Content_2> | string | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | CodeExecutionCallContent | URLContextCallContent | MCPServerToolCallContent | GoogleSearchCallContent | FileSearchCallContent | GoogleMapsCallContent | FunctionResultContent | CodeExecutionResultContent | URLContextResultContent | GoogleSearchResultContent | MCPServerToolResultContent | FileSearchResultContent | GoogleMapsResultContent;
686
+ input: string | Array<Step> | Array<Content_2> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent;
663
687
  /**
664
688
  * Body param: Configuration parameters for the agent interaction.
665
689
  */
@@ -676,7 +700,7 @@ declare interface BaseCreateAgentInteractionParams {
676
700
  * Body param: Enforces that the generated response is a JSON object that complies
677
701
  * with the JSON schema specified in this field.
678
702
  */
679
- response_format?: unknown;
703
+ response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
680
704
  /**
681
705
  * Body param: The mime type of the response. This is required if response_format
682
706
  * is set.
@@ -722,7 +746,7 @@ declare interface BaseCreateModelInteractionParams {
722
746
  /**
723
747
  * Body param: The input for the interaction.
724
748
  */
725
- input: Array<Content_2> | string | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | CodeExecutionCallContent | URLContextCallContent | MCPServerToolCallContent | GoogleSearchCallContent | FileSearchCallContent | GoogleMapsCallContent | FunctionResultContent | CodeExecutionResultContent | URLContextResultContent | GoogleSearchResultContent | MCPServerToolResultContent | FileSearchResultContent | GoogleMapsResultContent;
749
+ input: string | Array<Step> | Array<Content_2> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent;
726
750
  /**
727
751
  * Body param: The name of the `Model` used for generating the interaction.
728
752
  */
@@ -743,7 +767,7 @@ declare interface BaseCreateModelInteractionParams {
743
767
  * Body param: Enforces that the generated response is a JSON object that complies
744
768
  * with the JSON schema specified in this field.
745
769
  */
746
- response_format?: unknown;
770
+ response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
747
771
  /**
748
772
  * Body param: The mime type of the response. This is required if response_format
749
773
  * is set.
@@ -1770,9 +1794,9 @@ declare interface CodeExecutionCallArguments {
1770
1794
  }
1771
1795
 
1772
1796
  /**
1773
- * Code execution content.
1797
+ * Code execution call step.
1774
1798
  */
1775
- declare interface CodeExecutionCallContent {
1799
+ declare interface CodeExecutionCallStep {
1776
1800
  /**
1777
1801
  * Required. A unique ID for this specific tool call.
1778
1802
  */
@@ -1780,7 +1804,7 @@ declare interface CodeExecutionCallContent {
1780
1804
  /**
1781
1805
  * Required. The arguments to pass to the code execution.
1782
1806
  */
1783
- arguments: CodeExecutionCallArguments;
1807
+ arguments: CodeExecutionCallStep.Arguments;
1784
1808
  type: 'code_execution_call';
1785
1809
  /**
1786
1810
  * A signature hash for backend validation.
@@ -1788,6 +1812,22 @@ declare interface CodeExecutionCallContent {
1788
1812
  signature?: string;
1789
1813
  }
1790
1814
 
1815
+ declare namespace CodeExecutionCallStep {
1816
+ /**
1817
+ * Required. The arguments to pass to the code execution.
1818
+ */
1819
+ interface Arguments {
1820
+ /**
1821
+ * The code to be executed.
1822
+ */
1823
+ code?: string;
1824
+ /**
1825
+ * Programming language of the `code`.
1826
+ */
1827
+ language?: 'python';
1828
+ }
1829
+ }
1830
+
1791
1831
  /** Result of executing the `ExecutableCode`.
1792
1832
 
1793
1833
  Generated only when the `CodeExecution` tool is used. */
@@ -1801,9 +1841,9 @@ export declare interface CodeExecutionResult {
1801
1841
  }
1802
1842
 
1803
1843
  /**
1804
- * Code execution result content.
1844
+ * Code execution result step.
1805
1845
  */
1806
- declare interface CodeExecutionResultContent {
1846
+ declare interface CodeExecutionResultStep {
1807
1847
  /**
1808
1848
  * Required. ID to match the ID from the function call block.
1809
1849
  */
@@ -1905,288 +1945,7 @@ export declare interface Content {
1905
1945
  /**
1906
1946
  * The content of the response.
1907
1947
  */
1908
- declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | CodeExecutionCallContent | URLContextCallContent | MCPServerToolCallContent | GoogleSearchCallContent | FileSearchCallContent | GoogleMapsCallContent | FunctionResultContent | CodeExecutionResultContent | URLContextResultContent | GoogleSearchResultContent | MCPServerToolResultContent | FileSearchResultContent | GoogleMapsResultContent;
1909
-
1910
- declare interface ContentDelta {
1911
- /**
1912
- * The delta content data for a content block.
1913
- */
1914
- delta: ContentDelta.Text | ContentDelta.Image | ContentDelta.Audio | ContentDelta.Document | ContentDelta.Video | ContentDelta.ThoughtSummary | ContentDelta.ThoughtSignature | ContentDelta.FunctionCall | ContentDelta.CodeExecutionCall | ContentDelta.URLContextCall | ContentDelta.GoogleSearchCall | ContentDelta.MCPServerToolCall | ContentDelta.FileSearchCall | ContentDelta.GoogleMapsCall | ContentDelta.FunctionResult | ContentDelta.CodeExecutionResult | ContentDelta.URLContextResult | ContentDelta.GoogleSearchResult | ContentDelta.MCPServerToolResult | ContentDelta.FileSearchResult | ContentDelta.GoogleMapsResult | ContentDelta.TextAnnotation;
1915
- event_type: 'content.delta';
1916
- index: number;
1917
- /**
1918
- * The event_id token to be used to resume the interaction stream, from this event.
1919
- */
1920
- event_id?: string;
1921
- }
1922
-
1923
- declare namespace ContentDelta {
1924
- interface Text {
1925
- text: string;
1926
- type: 'text';
1927
- }
1928
- interface Image {
1929
- type: 'image';
1930
- data?: string;
1931
- mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif' | 'image/gif' | 'image/bmp' | 'image/tiff';
1932
- /**
1933
- * The resolution of the media.
1934
- */
1935
- resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
1936
- uri?: string;
1937
- }
1938
- interface Audio {
1939
- type: 'audio';
1940
- /**
1941
- * The number of audio channels.
1942
- */
1943
- channels?: number;
1944
- data?: string;
1945
- mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/mpeg' | 'audio/m4a' | 'audio/l16' | 'audio/opus' | 'audio/alaw' | 'audio/mulaw';
1946
- /**
1947
- * @deprecated Deprecated. Use sample_rate instead. The value is ignored.
1948
- */
1949
- rate?: number;
1950
- /**
1951
- * The sample rate of the audio.
1952
- */
1953
- sample_rate?: number;
1954
- uri?: string;
1955
- }
1956
- interface Document {
1957
- type: 'document';
1958
- data?: string;
1959
- mime_type?: 'application/pdf';
1960
- uri?: string;
1961
- }
1962
- interface Video {
1963
- type: 'video';
1964
- data?: string;
1965
- mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
1966
- /**
1967
- * The resolution of the media.
1968
- */
1969
- resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
1970
- uri?: string;
1971
- }
1972
- interface ThoughtSummary {
1973
- type: 'thought_summary';
1974
- /**
1975
- * A new summary item to be added to the thought.
1976
- */
1977
- content?: InteractionsAPI.TextContent | InteractionsAPI.ImageContent;
1978
- }
1979
- interface ThoughtSignature {
1980
- type: 'thought_signature';
1981
- /**
1982
- * Signature to match the backend source to be part of the generation.
1983
- */
1984
- signature?: string;
1985
- }
1986
- interface FunctionCall {
1987
- /**
1988
- * Required. A unique ID for this specific tool call.
1989
- */
1990
- id: string;
1991
- arguments: {
1992
- [key: string]: unknown;
1993
- };
1994
- name: string;
1995
- type: 'function_call';
1996
- /**
1997
- * A signature hash for backend validation.
1998
- */
1999
- signature?: string;
2000
- }
2001
- interface CodeExecutionCall {
2002
- /**
2003
- * Required. A unique ID for this specific tool call.
2004
- */
2005
- id: string;
2006
- /**
2007
- * The arguments to pass to the code execution.
2008
- */
2009
- arguments: InteractionsAPI.CodeExecutionCallArguments;
2010
- type: 'code_execution_call';
2011
- /**
2012
- * A signature hash for backend validation.
2013
- */
2014
- signature?: string;
2015
- }
2016
- interface URLContextCall {
2017
- /**
2018
- * Required. A unique ID for this specific tool call.
2019
- */
2020
- id: string;
2021
- /**
2022
- * The arguments to pass to the URL context.
2023
- */
2024
- arguments: InteractionsAPI.URLContextCallArguments;
2025
- type: 'url_context_call';
2026
- /**
2027
- * A signature hash for backend validation.
2028
- */
2029
- signature?: string;
2030
- }
2031
- interface GoogleSearchCall {
2032
- /**
2033
- * Required. A unique ID for this specific tool call.
2034
- */
2035
- id: string;
2036
- /**
2037
- * The arguments to pass to Google Search.
2038
- */
2039
- arguments: InteractionsAPI.GoogleSearchCallArguments;
2040
- type: 'google_search_call';
2041
- /**
2042
- * A signature hash for backend validation.
2043
- */
2044
- signature?: string;
2045
- }
2046
- interface MCPServerToolCall {
2047
- /**
2048
- * Required. A unique ID for this specific tool call.
2049
- */
2050
- id: string;
2051
- arguments: {
2052
- [key: string]: unknown;
2053
- };
2054
- name: string;
2055
- server_name: string;
2056
- type: 'mcp_server_tool_call';
2057
- /**
2058
- * A signature hash for backend validation.
2059
- */
2060
- signature?: string;
2061
- }
2062
- interface FileSearchCall {
2063
- /**
2064
- * Required. A unique ID for this specific tool call.
2065
- */
2066
- id: string;
2067
- type: 'file_search_call';
2068
- /**
2069
- * A signature hash for backend validation.
2070
- */
2071
- signature?: string;
2072
- }
2073
- interface GoogleMapsCall {
2074
- /**
2075
- * Required. A unique ID for this specific tool call.
2076
- */
2077
- id: string;
2078
- type: 'google_maps_call';
2079
- /**
2080
- * The arguments to pass to the Google Maps tool.
2081
- */
2082
- arguments?: InteractionsAPI.GoogleMapsCallArguments;
2083
- /**
2084
- * A signature hash for backend validation.
2085
- */
2086
- signature?: string;
2087
- }
2088
- interface FunctionResult {
2089
- /**
2090
- * Required. ID to match the ID from the function call block.
2091
- */
2092
- call_id: string;
2093
- result: unknown | Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent> | string;
2094
- type: 'function_result';
2095
- is_error?: boolean;
2096
- name?: string;
2097
- /**
2098
- * A signature hash for backend validation.
2099
- */
2100
- signature?: string;
2101
- }
2102
- interface CodeExecutionResult {
2103
- /**
2104
- * Required. ID to match the ID from the function call block.
2105
- */
2106
- call_id: string;
2107
- result: string;
2108
- type: 'code_execution_result';
2109
- is_error?: boolean;
2110
- /**
2111
- * A signature hash for backend validation.
2112
- */
2113
- signature?: string;
2114
- }
2115
- interface URLContextResult {
2116
- /**
2117
- * Required. ID to match the ID from the function call block.
2118
- */
2119
- call_id: string;
2120
- result: Array<InteractionsAPI.URLContextResult>;
2121
- type: 'url_context_result';
2122
- is_error?: boolean;
2123
- /**
2124
- * A signature hash for backend validation.
2125
- */
2126
- signature?: string;
2127
- }
2128
- interface GoogleSearchResult {
2129
- /**
2130
- * Required. ID to match the ID from the function call block.
2131
- */
2132
- call_id: string;
2133
- result: Array<InteractionsAPI.GoogleSearchResult>;
2134
- type: 'google_search_result';
2135
- is_error?: boolean;
2136
- /**
2137
- * A signature hash for backend validation.
2138
- */
2139
- signature?: string;
2140
- }
2141
- interface MCPServerToolResult {
2142
- /**
2143
- * Required. ID to match the ID from the function call block.
2144
- */
2145
- call_id: string;
2146
- result: unknown | Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent> | string;
2147
- type: 'mcp_server_tool_result';
2148
- name?: string;
2149
- server_name?: string;
2150
- /**
2151
- * A signature hash for backend validation.
2152
- */
2153
- signature?: string;
2154
- }
2155
- interface FileSearchResult {
2156
- /**
2157
- * Required. ID to match the ID from the function call block.
2158
- */
2159
- call_id: string;
2160
- result: Array<unknown>;
2161
- type: 'file_search_result';
2162
- /**
2163
- * A signature hash for backend validation.
2164
- */
2165
- signature?: string;
2166
- }
2167
- interface GoogleMapsResult {
2168
- /**
2169
- * Required. ID to match the ID from the function call block.
2170
- */
2171
- call_id: string;
2172
- type: 'google_maps_result';
2173
- /**
2174
- * The results of the Google Maps.
2175
- */
2176
- result?: Array<InteractionsAPI.GoogleMapsResult>;
2177
- /**
2178
- * A signature hash for backend validation.
2179
- */
2180
- signature?: string;
2181
- }
2182
- interface TextAnnotation {
2183
- type: 'text_annotation';
2184
- /**
2185
- * Citation information for model-generated content.
2186
- */
2187
- annotations?: Array<InteractionsAPI.Annotation>;
2188
- }
2189
- }
1948
+ declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent;
2190
1949
 
2191
1950
  /** The embedding generated from an input content. */
2192
1951
  export declare interface ContentEmbedding {
@@ -2228,28 +1987,6 @@ export declare class ContentReferenceImage {
2228
1987
  toReferenceImageAPI(): ReferenceImageAPIInternal;
2229
1988
  }
2230
1989
 
2231
- declare interface ContentStart {
2232
- /**
2233
- * The content of the response.
2234
- */
2235
- content: Content_2;
2236
- event_type: 'content.start';
2237
- index: number;
2238
- /**
2239
- * The event_id token to be used to resume the interaction stream, from this event.
2240
- */
2241
- event_id?: string;
2242
- }
2243
-
2244
- declare interface ContentStop {
2245
- event_type: 'content.stop';
2246
- index: number;
2247
- /**
2248
- * The event_id token to be used to resume the interaction stream, from this event.
2249
- */
2250
- event_id?: string;
2251
- }
2252
-
2253
1990
  export declare type ContentUnion = Content | PartUnion[] | PartUnion;
2254
1991
 
2255
1992
  /** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */
@@ -3910,9 +3647,9 @@ export declare interface FileSearch {
3910
3647
  }
3911
3648
 
3912
3649
  /**
3913
- * File Search content.
3650
+ * File Search call step.
3914
3651
  */
3915
- declare interface FileSearchCallContent {
3652
+ declare interface FileSearchCallStep {
3916
3653
  /**
3917
3654
  * Required. A unique ID for this specific tool call.
3918
3655
  */
@@ -3925,18 +3662,14 @@ declare interface FileSearchCallContent {
3925
3662
  }
3926
3663
 
3927
3664
  /**
3928
- * File Search result content.
3665
+ * File Search result step.
3929
3666
  */
3930
- declare interface FileSearchResultContent {
3667
+ declare interface FileSearchResultStep {
3931
3668
  /**
3932
3669
  * Required. ID to match the ID from the function call block.
3933
3670
  */
3934
3671
  call_id: string;
3935
3672
  type: 'file_search_result';
3936
- /**
3937
- * Optional. The results of the File Search.
3938
- */
3939
- result?: Array<unknown>;
3940
3673
  /**
3941
3674
  * A signature hash for backend validation.
3942
3675
  */
@@ -4234,31 +3967,6 @@ export declare interface FunctionCall {
4234
3967
  willContinue?: boolean;
4235
3968
  }
4236
3969
 
4237
- /**
4238
- * A function tool call content block.
4239
- */
4240
- declare interface FunctionCallContent {
4241
- /**
4242
- * Required. A unique ID for this specific tool call.
4243
- */
4244
- id: string;
4245
- /**
4246
- * Required. The arguments to pass to the function.
4247
- */
4248
- arguments: {
4249
- [key: string]: unknown;
4250
- };
4251
- /**
4252
- * Required. The name of the tool to call.
4253
- */
4254
- name: string;
4255
- type: 'function_call';
4256
- /**
4257
- * A signature hash for backend validation.
4258
- */
4259
- signature?: string;
4260
- }
4261
-
4262
3970
  /** Function calling config. */
4263
3971
  export declare interface FunctionCallingConfig {
4264
3972
  /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */
@@ -4293,6 +4001,31 @@ export declare enum FunctionCallingConfigMode {
4293
4001
  VALIDATED = "VALIDATED"
4294
4002
  }
4295
4003
 
4004
+ /**
4005
+ * A function tool call step.
4006
+ */
4007
+ declare interface FunctionCallStep {
4008
+ /**
4009
+ * Required. A unique ID for this specific tool call.
4010
+ */
4011
+ id: string;
4012
+ /**
4013
+ * Required. The arguments to pass to the function.
4014
+ */
4015
+ arguments: {
4016
+ [key: string]: unknown;
4017
+ };
4018
+ /**
4019
+ * Required. The name of the tool to call.
4020
+ */
4021
+ name: string;
4022
+ type: 'function_call';
4023
+ /**
4024
+ * A signature hash for backend validation.
4025
+ */
4026
+ signature?: string;
4027
+ }
4028
+
4296
4029
  /** Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. */
4297
4030
  export declare interface FunctionDeclaration {
4298
4031
  /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */
@@ -4391,9 +4124,9 @@ export declare enum FunctionResponseScheduling {
4391
4124
  }
4392
4125
 
4393
4126
  /**
4394
- * A function tool result content block.
4127
+ * Result of a function tool call.
4395
4128
  */
4396
- declare interface FunctionResultContent {
4129
+ declare interface FunctionResultStep {
4397
4130
  /**
4398
4131
  * Required. ID to match the ID from the function call block.
4399
4132
  */
@@ -5520,9 +5253,9 @@ declare interface GoogleMapsCallArguments {
5520
5253
  }
5521
5254
 
5522
5255
  /**
5523
- * Google Maps content.
5256
+ * Google Maps call step.
5524
5257
  */
5525
- declare interface GoogleMapsCallContent {
5258
+ declare interface GoogleMapsCallStep {
5526
5259
  /**
5527
5260
  * Required. A unique ID for this specific tool call.
5528
5261
  */
@@ -5531,13 +5264,25 @@ declare interface GoogleMapsCallContent {
5531
5264
  /**
5532
5265
  * The arguments to pass to the Google Maps tool.
5533
5266
  */
5534
- arguments?: GoogleMapsCallArguments;
5267
+ arguments?: GoogleMapsCallStep.Arguments;
5535
5268
  /**
5536
5269
  * A signature hash for backend validation.
5537
5270
  */
5538
5271
  signature?: string;
5539
5272
  }
5540
5273
 
5274
+ declare namespace GoogleMapsCallStep {
5275
+ /**
5276
+ * The arguments to pass to the Google Maps tool.
5277
+ */
5278
+ interface Arguments {
5279
+ /**
5280
+ * The queries to be executed.
5281
+ */
5282
+ queries?: Array<string>;
5283
+ }
5284
+ }
5285
+
5541
5286
  /**
5542
5287
  * The result of the Google Maps.
5543
5288
  */
@@ -5595,17 +5340,14 @@ declare namespace GoogleMapsResult {
5595
5340
  }
5596
5341
 
5597
5342
  /**
5598
- * Google Maps result content.
5343
+ * Google Maps result step.
5599
5344
  */
5600
- declare interface GoogleMapsResultContent {
5345
+ declare interface GoogleMapsResultStep {
5601
5346
  /**
5602
5347
  * Required. ID to match the ID from the function call block.
5603
5348
  */
5604
5349
  call_id: string;
5605
- /**
5606
- * Required. The results of the Google Maps.
5607
- */
5608
- result: Array<GoogleMapsResult>;
5350
+ result: Array<GoogleMapsResultStep.Result>;
5609
5351
  type: 'google_maps_result';
5610
5352
  /**
5611
5353
  * A signature hash for backend validation.
@@ -5613,6 +5355,44 @@ declare interface GoogleMapsResultContent {
5613
5355
  signature?: string;
5614
5356
  }
5615
5357
 
5358
+ declare namespace GoogleMapsResultStep {
5359
+ /**
5360
+ * The result of the Google Maps.
5361
+ */
5362
+ interface Result {
5363
+ places?: Array<Result.Place>;
5364
+ widget_context_token?: string;
5365
+ }
5366
+ namespace Result {
5367
+ interface Place {
5368
+ name?: string;
5369
+ place_id?: string;
5370
+ review_snippets?: Array<Place.ReviewSnippet>;
5371
+ url?: string;
5372
+ }
5373
+ namespace Place {
5374
+ /**
5375
+ * Encapsulates a snippet of a user review that answers a question about the
5376
+ * features of a specific place in Google Maps.
5377
+ */
5378
+ interface ReviewSnippet {
5379
+ /**
5380
+ * The ID of the review snippet.
5381
+ */
5382
+ review_id?: string;
5383
+ /**
5384
+ * Title of the review.
5385
+ */
5386
+ title?: string;
5387
+ /**
5388
+ * A link that corresponds to the user review on Google Maps.
5389
+ */
5390
+ url?: string;
5391
+ }
5392
+ }
5393
+ }
5394
+ }
5395
+
5616
5396
  /** The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). This data type is not supported in Gemini API. */
5617
5397
  export declare interface GoogleRpcStatus {
5618
5398
  /** The status code, which should be an enum value of google.rpc.Code. */
@@ -5646,9 +5426,9 @@ declare interface GoogleSearchCallArguments {
5646
5426
  }
5647
5427
 
5648
5428
  /**
5649
- * Google Search content.
5429
+ * Google Search call step.
5650
5430
  */
5651
- declare interface GoogleSearchCallContent {
5431
+ declare interface GoogleSearchCallStep {
5652
5432
  /**
5653
5433
  * Required. A unique ID for this specific tool call.
5654
5434
  */
@@ -5656,7 +5436,7 @@ declare interface GoogleSearchCallContent {
5656
5436
  /**
5657
5437
  * Required. The arguments to pass to Google Search.
5658
5438
  */
5659
- arguments: GoogleSearchCallArguments;
5439
+ arguments: GoogleSearchCallStep.Arguments;
5660
5440
  type: 'google_search_call';
5661
5441
  /**
5662
5442
  * The type of search grounding enabled.
@@ -5668,6 +5448,18 @@ declare interface GoogleSearchCallContent {
5668
5448
  signature?: string;
5669
5449
  }
5670
5450
 
5451
+ declare namespace GoogleSearchCallStep {
5452
+ /**
5453
+ * Required. The arguments to pass to Google Search.
5454
+ */
5455
+ interface Arguments {
5456
+ /**
5457
+ * Web search queries for the following-up web search.
5458
+ */
5459
+ queries?: Array<string>;
5460
+ }
5461
+ }
5462
+
5671
5463
  /**
5672
5464
  * The result of the Google Search.
5673
5465
  */
@@ -5679,9 +5471,9 @@ declare interface GoogleSearchResult {
5679
5471
  }
5680
5472
 
5681
5473
  /**
5682
- * Google Search result content.
5474
+ * Google Search result step.
5683
5475
  */
5684
- declare interface GoogleSearchResultContent {
5476
+ declare interface GoogleSearchResultStep {
5685
5477
  /**
5686
5478
  * Required. ID to match the ID from the function call block.
5687
5479
  */
@@ -5689,7 +5481,7 @@ declare interface GoogleSearchResultContent {
5689
5481
  /**
5690
5482
  * Required. The results of the Google Search.
5691
5483
  */
5692
- result: Array<GoogleSearchResult>;
5484
+ result: Array<GoogleSearchResultStep.Result>;
5693
5485
  type: 'google_search_result';
5694
5486
  /**
5695
5487
  * Whether the Google Search resulted in an error.
@@ -5701,6 +5493,18 @@ declare interface GoogleSearchResultContent {
5701
5493
  signature?: string;
5702
5494
  }
5703
5495
 
5496
+ declare namespace GoogleSearchResultStep {
5497
+ /**
5498
+ * The result of the Google Search.
5499
+ */
5500
+ interface Result {
5501
+ /**
5502
+ * Web content snippet that can be embedded in a web page or an app webview.
5503
+ */
5504
+ search_suggestions?: string;
5505
+ }
5506
+ }
5507
+
5704
5508
  /** Tool to retrieve public web data for grounding, powered by Google. */
5705
5509
  export declare interface GoogleSearchRetrieval {
5706
5510
  /** Specifies the dynamic retrieval configuration for the given source. */
@@ -6318,6 +6122,29 @@ export declare enum ImageResizeMode {
6318
6122
  PAD = "PAD"
6319
6123
  }
6320
6124
 
6125
+ /**
6126
+ * Configuration for image output format.
6127
+ */
6128
+ declare interface ImageResponseFormat {
6129
+ type: 'image';
6130
+ /**
6131
+ * The aspect ratio for the image output.
6132
+ */
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';
6134
+ /**
6135
+ * The delivery mode for the image output.
6136
+ */
6137
+ delivery?: 'inline' | 'url';
6138
+ /**
6139
+ * The size of the image output.
6140
+ */
6141
+ imageSize?: '512' | '1K' | '2K' | '4K';
6142
+ /**
6143
+ * The MIME type of the image output.
6144
+ */
6145
+ mimeType?: 'image/jpeg';
6146
+ }
6147
+
6321
6148
  /** Image search for grounding and related configurations. */
6322
6149
  export declare interface ImageSearch {
6323
6150
  }
@@ -6449,15 +6276,11 @@ declare interface Interaction {
6449
6276
  /**
6450
6277
  * The input for the interaction.
6451
6278
  */
6452
- input?: Array<Content_2> | string | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | CodeExecutionCallContent | URLContextCallContent | MCPServerToolCallContent | GoogleSearchCallContent | FileSearchCallContent | GoogleMapsCallContent | FunctionResultContent | CodeExecutionResultContent | URLContextResultContent | GoogleSearchResultContent | MCPServerToolResultContent | FileSearchResultContent | GoogleMapsResultContent;
6279
+ input?: string | Array<Step> | Array<Content_2> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent;
6453
6280
  /**
6454
6281
  * The name of the `Model` used for generating the interaction.
6455
6282
  */
6456
6283
  model?: Model_2;
6457
- /**
6458
- * Output only. Responses from the model.
6459
- */
6460
- outputs?: Array<Content_2>;
6461
6284
  /**
6462
6285
  * The ID of the previous interaction, if any.
6463
6286
  */
@@ -6466,7 +6289,7 @@ declare interface Interaction {
6466
6289
  * Enforces that the generated response is a JSON object that complies with the
6467
6290
  * JSON schema specified in this field.
6468
6291
  */
6469
- response_format?: unknown;
6292
+ response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
6470
6293
  /**
6471
6294
  * The mime type of the response. This is required if response_format is set.
6472
6295
  */
@@ -6476,13 +6299,17 @@ declare interface Interaction {
6476
6299
  */
6477
6300
  response_modalities?: Array<'text' | 'image' | 'audio' | 'video' | 'document'>;
6478
6301
  /**
6479
- * Output only. The role of the interaction.
6302
+ * @deprecated Output only. The role of the interaction.
6480
6303
  */
6481
6304
  role?: string;
6482
6305
  /**
6483
6306
  * The service tier for the interaction.
6484
6307
  */
6485
6308
  service_tier?: 'flex' | 'standard' | 'priority';
6309
+ /**
6310
+ * Output only. The steps that make up the interaction.
6311
+ */
6312
+ steps?: Array<Step>;
6486
6313
  /**
6487
6314
  * System instruction for the interaction.
6488
6315
  */
@@ -6509,8 +6336,8 @@ declare interface InteractionCancelParams {
6509
6336
  api_version?: string;
6510
6337
  }
6511
6338
 
6512
- declare interface InteractionCompleteEvent {
6513
- event_type: 'interaction.complete';
6339
+ declare interface InteractionCompletedEvent {
6340
+ event_type: 'interaction.completed';
6514
6341
  /**
6515
6342
  * Required. The completed interaction with empty outputs to reduce the payload
6516
6343
  * size. Use the preceding ContentDelta events for the actual output.
@@ -6522,6 +6349,18 @@ declare interface InteractionCompleteEvent {
6522
6349
  event_id?: string;
6523
6350
  }
6524
6351
 
6352
+ declare interface InteractionCreatedEvent {
6353
+ event_type: 'interaction.created';
6354
+ /**
6355
+ * The Interaction resource.
6356
+ */
6357
+ interaction: Interaction;
6358
+ /**
6359
+ * The event_id token to be used to resume the interaction stream, from this event.
6360
+ */
6361
+ event_id?: string;
6362
+ }
6363
+
6525
6364
  declare type InteractionCreateParams = CreateModelInteractionParamsNonStreaming | CreateModelInteractionParamsStreaming | CreateAgentInteractionParamsNonStreaming | CreateAgentInteractionParamsStreaming;
6526
6365
 
6527
6366
  declare interface InteractionDeleteParams {
@@ -6582,7 +6421,7 @@ export declare class Interactions extends BaseInteractions {
6582
6421
  }
6583
6422
 
6584
6423
  export declare namespace Interactions {
6585
- export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallContent as CodeExecutionCallContent, type CodeExecutionResultContent as CodeExecutionResultContent, type Content_2 as Content, type ContentDelta as ContentDelta, type ContentStart as ContentStart, type ContentStop as ContentStop, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileCitation as FileCitation, type FileSearchCallContent as FileSearchCallContent, type FileSearchResultContent as FileSearchResultContent, type Function_2 as Function, type FunctionCallContent as FunctionCallContent, type FunctionResultContent as FunctionResultContent, type GenerationConfig_2 as GenerationConfig, type GoogleMapsCallArguments as GoogleMapsCallArguments, type GoogleMapsCallContent as GoogleMapsCallContent, type GoogleMapsResult as GoogleMapsResult, type GoogleMapsResultContent as GoogleMapsResultContent, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallContent as GoogleSearchCallContent, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultContent as GoogleSearchResultContent, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type Interaction as Interaction, type InteractionCompleteEvent as InteractionCompleteEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStartEvent as InteractionStartEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallContent as MCPServerToolCallContent, type MCPServerToolResultContent as MCPServerToolResultContent, type Model_2 as Model, type PlaceCitation as PlaceCitation, type SpeechConfig_2 as SpeechConfig, type TextContent as TextContent, type ThinkingLevel_2 as ThinkingLevel, type ThoughtContent as ThoughtContent, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type Turn as Turn, type URLCitation as URLCitation, type URLContextCallArguments as URLContextCallArguments, type URLContextCallContent as URLContextCallContent, type URLContextResult as URLContextResult, type URLContextResultContent as URLContextResultContent, type Usage as Usage, type VideoContent as VideoContent, type WebhookConfig_2 as WebhookConfig, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
6424
+ export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type AudioResponseFormat as AudioResponseFormat, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallStep as CodeExecutionCallStep, type CodeExecutionResultStep as CodeExecutionResultStep, type Content_2 as Content, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileCitation as FileCitation, type FileSearchCallStep as FileSearchCallStep, type FileSearchResultStep as FileSearchResultStep, type Function_2 as Function, type FunctionCallStep as FunctionCallStep, type FunctionResultStep as FunctionResultStep, type GenerationConfig_2 as GenerationConfig, type GoogleMapsCallArguments as GoogleMapsCallArguments, type GoogleMapsCallStep as GoogleMapsCallStep, type GoogleMapsResult as GoogleMapsResult, type GoogleMapsResultStep as GoogleMapsResultStep, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallStep as GoogleSearchCallStep, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultStep as GoogleSearchResultStep, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type ImageResponseFormat as ImageResponseFormat, type Interaction as Interaction, type InteractionCompletedEvent as InteractionCompletedEvent, type InteractionCreatedEvent as InteractionCreatedEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallStep as MCPServerToolCallStep, type MCPServerToolResultStep as MCPServerToolResultStep, type Model_2 as Model, type ModelOutputStep as ModelOutputStep, type PlaceCitation as PlaceCitation, type SpeechConfig_2 as SpeechConfig, type Step as Step, type StepDelta as StepDelta, type StepStart as StepStart, type StepStop as StepStop, type TextContent as TextContent, type TextResponseFormat as TextResponseFormat, type ThinkingLevel_2 as ThinkingLevel, type ThoughtStep as ThoughtStep, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type URLCitation as URLCitation, type URLContextCallArguments as URLContextCallArguments, type URLContextCallStep as URLContextCallStep, type URLContextResult as URLContextResult, type URLContextResultStep as URLContextResultStep, type Usage as Usage, type UserInputStep as UserInputStep, type VideoContent as VideoContent, type VideoResponseFormat as VideoResponseFormat, type WebhookConfig_2 as WebhookConfig, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
6586
6425
  }
6587
6426
 
6588
6427
  declare namespace InteractionsAPI {
@@ -6592,58 +6431,64 @@ declare namespace InteractionsAPI {
6592
6431
  AllowedTools,
6593
6432
  Annotation,
6594
6433
  AudioContent,
6434
+ AudioResponseFormat,
6595
6435
  CodeExecutionCallArguments,
6596
- CodeExecutionCallContent,
6597
- CodeExecutionResultContent,
6436
+ CodeExecutionCallStep,
6437
+ CodeExecutionResultStep,
6598
6438
  Content_2 as Content,
6599
- ContentDelta,
6600
- ContentStart,
6601
- ContentStop,
6602
6439
  DeepResearchAgentConfig,
6603
6440
  DocumentContent,
6604
6441
  DynamicAgentConfig,
6605
6442
  ErrorEvent_2 as ErrorEvent,
6606
6443
  FileCitation,
6607
- FileSearchCallContent,
6608
- FileSearchResultContent,
6444
+ FileSearchCallStep,
6445
+ FileSearchResultStep,
6609
6446
  Function_2 as Function,
6610
- FunctionCallContent,
6611
- FunctionResultContent,
6447
+ FunctionCallStep,
6448
+ FunctionResultStep,
6612
6449
  GenerationConfig_2 as GenerationConfig,
6613
6450
  GoogleMapsCallArguments,
6614
- GoogleMapsCallContent,
6451
+ GoogleMapsCallStep,
6615
6452
  GoogleMapsResult,
6616
- GoogleMapsResultContent,
6453
+ GoogleMapsResultStep,
6617
6454
  GoogleSearchCallArguments,
6618
- GoogleSearchCallContent,
6455
+ GoogleSearchCallStep,
6619
6456
  GoogleSearchResult,
6620
- GoogleSearchResultContent,
6457
+ GoogleSearchResultStep,
6621
6458
  ImageConfig_2 as ImageConfig,
6622
6459
  ImageContent,
6460
+ ImageResponseFormat,
6623
6461
  Interaction,
6624
- InteractionCompleteEvent,
6462
+ InteractionCompletedEvent,
6463
+ InteractionCreatedEvent,
6625
6464
  InteractionSSEEvent,
6626
- InteractionStartEvent,
6627
6465
  InteractionStatusUpdate,
6628
- MCPServerToolCallContent,
6629
- MCPServerToolResultContent,
6466
+ MCPServerToolCallStep,
6467
+ MCPServerToolResultStep,
6630
6468
  Model_2 as Model,
6469
+ ModelOutputStep,
6631
6470
  PlaceCitation,
6632
6471
  SpeechConfig_2 as SpeechConfig,
6472
+ Step,
6473
+ StepDelta,
6474
+ StepStart,
6475
+ StepStop,
6633
6476
  TextContent,
6477
+ TextResponseFormat,
6634
6478
  ThinkingLevel_2 as ThinkingLevel,
6635
- ThoughtContent,
6479
+ ThoughtStep,
6636
6480
  Tool_2 as Tool,
6637
6481
  ToolChoiceConfig,
6638
6482
  ToolChoiceType,
6639
- Turn,
6640
6483
  URLCitation,
6641
6484
  URLContextCallArguments,
6642
- URLContextCallContent,
6485
+ URLContextCallStep,
6643
6486
  URLContextResult,
6644
- URLContextResultContent,
6487
+ URLContextResultStep,
6645
6488
  Usage,
6489
+ UserInputStep,
6646
6490
  VideoContent,
6491
+ VideoResponseFormat,
6647
6492
  WebhookConfig_2 as WebhookConfig,
6648
6493
  InteractionDeleteResponse,
6649
6494
  InteractionCreateParams,
@@ -6662,19 +6507,7 @@ declare namespace InteractionsAPI {
6662
6507
  }
6663
6508
  }
6664
6509
 
6665
- declare type InteractionSSEEvent = InteractionStartEvent | InteractionCompleteEvent | InteractionStatusUpdate | ContentStart | ContentDelta | ContentStop | ErrorEvent_2;
6666
-
6667
- declare interface InteractionStartEvent {
6668
- event_type: 'interaction.start';
6669
- /**
6670
- * The Interaction resource.
6671
- */
6672
- interaction: Interaction;
6673
- /**
6674
- * The event_id token to be used to resume the interaction stream, from this event.
6675
- */
6676
- event_id?: string;
6677
- }
6510
+ declare type InteractionSSEEvent = InteractionCreatedEvent | InteractionCompletedEvent | InteractionStatusUpdate | ErrorEvent_2 | StepStart | StepDelta | StepStop;
6678
6511
 
6679
6512
  declare interface InteractionStatusUpdate {
6680
6513
  event_type: 'interaction.status_update';
@@ -7877,9 +7710,9 @@ export declare interface McpServer {
7877
7710
  }
7878
7711
 
7879
7712
  /**
7880
- * MCPServer tool call content.
7713
+ * MCPServer tool call step.
7881
7714
  */
7882
- declare interface MCPServerToolCallContent {
7715
+ declare interface MCPServerToolCallStep {
7883
7716
  /**
7884
7717
  * Required. A unique ID for this specific tool call.
7885
7718
  */
@@ -7906,9 +7739,9 @@ declare interface MCPServerToolCallContent {
7906
7739
  }
7907
7740
 
7908
7741
  /**
7909
- * MCPServer tool result content.
7742
+ * MCPServer tool result step.
7910
7743
  */
7911
- declare interface MCPServerToolResultContent {
7744
+ declare interface MCPServerToolResultStep {
7912
7745
  /**
7913
7746
  * Required. ID to match the ID from the function call block.
7914
7747
  */
@@ -7916,7 +7749,7 @@ declare interface MCPServerToolResultContent {
7916
7749
  /**
7917
7750
  * The output from the MCP server call. Can be simple text or rich content.
7918
7751
  */
7919
- result: unknown | Array<TextContent | ImageContent> | string;
7752
+ result: unknown | string | Array<TextContent | ImageContent>;
7920
7753
  type: 'mcp_server_tool_result';
7921
7754
  /**
7922
7755
  * Name of the tool which is called for this specific tool call.
@@ -8101,6 +7934,14 @@ export declare interface ModelArmorConfig {
8101
7934
  responseTemplateName?: string;
8102
7935
  }
8103
7936
 
7937
+ /**
7938
+ * Output generated by the model.
7939
+ */
7940
+ declare interface ModelOutputStep {
7941
+ type: 'model_output';
7942
+ content?: Array<Content_2>;
7943
+ }
7944
+
8104
7945
  export declare class Models extends BaseModule {
8105
7946
  private readonly apiClient;
8106
7947
  constructor(apiClient: ApiClient);
@@ -10128,6 +9969,119 @@ export declare enum StartSensitivity {
10128
9969
  START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW"
10129
9970
  }
10130
9971
 
9972
+ /**
9973
+ * A step in the interaction.
9974
+ */
9975
+ declare type Step = UserInputStep | ModelOutputStep | ThoughtStep | FunctionCallStep | CodeExecutionCallStep | URLContextCallStep | MCPServerToolCallStep | GoogleSearchCallStep | FileSearchCallStep | GoogleMapsCallStep | FunctionResultStep | CodeExecutionResultStep | URLContextResultStep | GoogleSearchResultStep | MCPServerToolResultStep | FileSearchResultStep | GoogleMapsResultStep;
9976
+
9977
+ declare interface StepDelta {
9978
+ delta: StepDelta.Text | StepDelta.Image | StepDelta.Audio | StepDelta.Document | StepDelta.Video | StepDelta.ThoughtSummary | StepDelta.ThoughtSignature | StepDelta.TextAnnotationDelta | StepDelta.ArgumentsDelta;
9979
+ event_type: 'step.delta';
9980
+ index: number;
9981
+ /**
9982
+ * The event_id token to be used to resume the interaction stream, from this event.
9983
+ */
9984
+ event_id?: string;
9985
+ }
9986
+
9987
+ declare namespace StepDelta {
9988
+ interface Text {
9989
+ text: string;
9990
+ type: 'text';
9991
+ }
9992
+ interface Image {
9993
+ type: 'image';
9994
+ data?: string;
9995
+ mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif' | 'image/gif' | 'image/bmp' | 'image/tiff';
9996
+ /**
9997
+ * The resolution of the media.
9998
+ */
9999
+ resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
10000
+ uri?: string;
10001
+ }
10002
+ interface Audio {
10003
+ type: 'audio';
10004
+ /**
10005
+ * The number of audio channels.
10006
+ */
10007
+ channels?: number;
10008
+ data?: string;
10009
+ mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/mpeg' | 'audio/m4a' | 'audio/l16' | 'audio/opus' | 'audio/alaw' | 'audio/mulaw';
10010
+ /**
10011
+ * @deprecated Deprecated. Use sample_rate instead. The value is ignored.
10012
+ */
10013
+ rate?: number;
10014
+ /**
10015
+ * The sample rate of the audio.
10016
+ */
10017
+ sample_rate?: number;
10018
+ uri?: string;
10019
+ }
10020
+ interface Document {
10021
+ type: 'document';
10022
+ data?: string;
10023
+ mime_type?: 'application/pdf';
10024
+ uri?: string;
10025
+ }
10026
+ interface Video {
10027
+ type: 'video';
10028
+ data?: string;
10029
+ mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
10030
+ /**
10031
+ * The resolution of the media.
10032
+ */
10033
+ resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
10034
+ uri?: string;
10035
+ }
10036
+ interface ThoughtSummary {
10037
+ type: 'thought_summary';
10038
+ /**
10039
+ * A new summary item to be added to the thought.
10040
+ */
10041
+ content?: InteractionsAPI.TextContent | InteractionsAPI.ImageContent;
10042
+ }
10043
+ interface ThoughtSignature {
10044
+ type: 'thought_signature';
10045
+ /**
10046
+ * Signature to match the backend source to be part of the generation.
10047
+ */
10048
+ signature?: string;
10049
+ }
10050
+ interface TextAnnotationDelta {
10051
+ type: 'text_annotation_delta';
10052
+ /**
10053
+ * Citation information for model-generated content.
10054
+ */
10055
+ annotations?: Array<InteractionsAPI.Annotation>;
10056
+ }
10057
+ interface ArgumentsDelta {
10058
+ type: 'arguments_delta';
10059
+ partial_arguments?: string;
10060
+ }
10061
+ }
10062
+
10063
+ declare interface StepStart {
10064
+ event_type: 'step.start';
10065
+ index: number;
10066
+ /**
10067
+ * A step in the interaction.
10068
+ */
10069
+ step: Step;
10070
+ /**
10071
+ * The event_id token to be used to resume the interaction stream, from this event.
10072
+ */
10073
+ event_id?: string;
10074
+ }
10075
+
10076
+ declare interface StepStop {
10077
+ event_type: 'step.stop';
10078
+ index: number;
10079
+ /**
10080
+ * The event_id token to be used to resume the interaction stream, from this event.
10081
+ */
10082
+ event_id?: string;
10083
+ }
10084
+
10131
10085
  declare class Stream<Item> implements AsyncIterable<Item> {
10132
10086
  private iterator;
10133
10087
  controller: AbortController;
@@ -10363,6 +10317,24 @@ declare interface TextContent {
10363
10317
  annotations?: Array<Annotation>;
10364
10318
  }
10365
10319
 
10320
+ /**
10321
+ * Configuration for text output format.
10322
+ */
10323
+ declare interface TextResponseFormat {
10324
+ type: 'text';
10325
+ /**
10326
+ * The MIME type of the text output.
10327
+ */
10328
+ mimeType?: 'application/json' | 'text/plain';
10329
+ /**
10330
+ * The JSON schema that the output should conform to. Only applicable when
10331
+ * mime_type is application/json.
10332
+ */
10333
+ schema?: {
10334
+ [key: string]: unknown;
10335
+ };
10336
+ }
10337
+
10366
10338
  /** The thinking features configuration. */
10367
10339
  export declare interface ThinkingConfig {
10368
10340
  /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.
@@ -10402,12 +10374,12 @@ export declare enum ThinkingLevel {
10402
10374
  declare type ThinkingLevel_2 = 'minimal' | 'low' | 'medium' | 'high';
10403
10375
 
10404
10376
  /**
10405
- * A thought content block.
10377
+ * A thought step.
10406
10378
  */
10407
- declare interface ThoughtContent {
10379
+ declare interface ThoughtStep {
10408
10380
  type: 'thought';
10409
10381
  /**
10410
- * Signature to match the backend source to be part of the generation.
10382
+ * A signature hash for backend validation.
10411
10383
  */
10412
10384
  signature?: string;
10413
10385
  /**
@@ -11116,14 +11088,6 @@ export declare interface TuningValidationDataset {
11116
11088
  vertexDatasetResource?: string;
11117
11089
  }
11118
11090
 
11119
- declare interface Turn {
11120
- content?: Array<Content_2> | string;
11121
- /**
11122
- * The originator of this turn. Must be user for input or model for model output.
11123
- */
11124
- role?: string;
11125
- }
11126
-
11127
11091
  /** The reason why the turn is complete. */
11128
11092
  export declare enum TurnCompleteReason {
11129
11093
  /**
@@ -12123,9 +12087,9 @@ declare interface URLContextCallArguments {
12123
12087
  }
12124
12088
 
12125
12089
  /**
12126
- * URL context content.
12090
+ * URL context call step.
12127
12091
  */
12128
- declare interface URLContextCallContent {
12092
+ declare interface URLContextCallStep {
12129
12093
  /**
12130
12094
  * Required. A unique ID for this specific tool call.
12131
12095
  */
@@ -12133,7 +12097,7 @@ declare interface URLContextCallContent {
12133
12097
  /**
12134
12098
  * Required. The arguments to pass to the URL context.
12135
12099
  */
12136
- arguments: URLContextCallArguments;
12100
+ arguments: URLContextCallStep.Arguments;
12137
12101
  type: 'url_context_call';
12138
12102
  /**
12139
12103
  * A signature hash for backend validation.
@@ -12141,6 +12105,18 @@ declare interface URLContextCallContent {
12141
12105
  signature?: string;
12142
12106
  }
12143
12107
 
12108
+ declare namespace URLContextCallStep {
12109
+ /**
12110
+ * Required. The arguments to pass to the URL context.
12111
+ */
12112
+ interface Arguments {
12113
+ /**
12114
+ * The URLs to fetch.
12115
+ */
12116
+ urls?: Array<string>;
12117
+ }
12118
+ }
12119
+
12144
12120
  /** Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL. */
12145
12121
  export declare interface UrlContextMetadata {
12146
12122
  /** Output only. A list of URL metadata, with one entry for each URL retrieved by the tool. */
@@ -12162,9 +12138,9 @@ declare interface URLContextResult {
12162
12138
  }
12163
12139
 
12164
12140
  /**
12165
- * URL context result content.
12141
+ * URL context result step.
12166
12142
  */
12167
- declare interface URLContextResultContent {
12143
+ declare interface URLContextResultStep {
12168
12144
  /**
12169
12145
  * Required. ID to match the ID from the function call block.
12170
12146
  */
@@ -12172,7 +12148,7 @@ declare interface URLContextResultContent {
12172
12148
  /**
12173
12149
  * Required. The results of the URL context.
12174
12150
  */
12175
- result: Array<URLContextResult>;
12151
+ result: Array<URLContextResultStep.Result>;
12176
12152
  type: 'url_context_result';
12177
12153
  /**
12178
12154
  * Whether the URL context resulted in an error.
@@ -12184,6 +12160,22 @@ declare interface URLContextResultContent {
12184
12160
  signature?: string;
12185
12161
  }
12186
12162
 
12163
+ declare namespace URLContextResultStep {
12164
+ /**
12165
+ * The result of the URL context.
12166
+ */
12167
+ interface Result {
12168
+ /**
12169
+ * The status of the URL retrieval.
12170
+ */
12171
+ status?: 'success' | 'error' | 'paywall' | 'unsafe';
12172
+ /**
12173
+ * The URL that was fetched.
12174
+ */
12175
+ url?: string;
12176
+ }
12177
+ }
12178
+
12187
12179
  /** The metadata for a single URL retrieval. */
12188
12180
  export declare interface UrlMetadata {
12189
12181
  /** The URL retrieved by the tool. */
@@ -12362,6 +12354,14 @@ export declare interface UsageMetadata {
12362
12354
  trafficType?: TrafficType;
12363
12355
  }
12364
12356
 
12357
+ /**
12358
+ * Input provided by the user.
12359
+ */
12360
+ declare interface UserInputStep {
12361
+ type: 'user_input';
12362
+ content?: Array<Content_2>;
12363
+ }
12364
+
12365
12365
  /** The type of the VAD signal. */
12366
12366
  export declare enum VadSignalType {
12367
12367
  /**
@@ -12575,6 +12575,13 @@ export declare interface VideoMetadata {
12575
12575
  startOffset?: string;
12576
12576
  }
12577
12577
 
12578
+ /**
12579
+ * Configuration for video output format.
12580
+ */
12581
+ declare interface VideoResponseFormat {
12582
+ type: 'video';
12583
+ }
12584
+
12578
12585
  /** Voice activity signal. */
12579
12586
  export declare interface VoiceActivity {
12580
12587
  /** The type of the voice activity signal. */