@google/genai 1.51.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.
package/dist/web/web.d.ts CHANGED
@@ -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. */
@@ -2595,6 +2332,10 @@ export declare interface CreateFileSearchStoreConfig {
2595
2332
  /** The human-readable display name for the file search store.
2596
2333
  */
2597
2334
  displayName?: string;
2335
+ /** The embedding model to use for the FileSearchStore.
2336
+ Format: `models/{model}`. If not specified, the default embedding model will be used.
2337
+ */
2338
+ embeddingModel?: string;
2598
2339
  }
2599
2340
 
2600
2341
  /** Config for file_search_stores.create parameters. */
@@ -3211,6 +2952,19 @@ export declare interface DownloadFileParameters {
3211
2952
  config?: DownloadFileConfig;
3212
2953
  }
3213
2954
 
2955
+ /** Used to override the default configuration. */
2956
+ export declare interface DownloadMediaConfig {
2957
+ /** Used to override HTTP request options. */
2958
+ httpOptions?: HttpOptions;
2959
+ /** Abort signal which can be used to cancel the request.
2960
+
2961
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
2962
+ operation will not cancel the request in the service. You will still
2963
+ be charged usage for any applicable operations.
2964
+ */
2965
+ abortSignal?: AbortSignal;
2966
+ }
2967
+
3214
2968
  /**
3215
2969
  * Configuration for dynamic agents.
3216
2970
  */
@@ -3893,9 +3647,9 @@ export declare interface FileSearch {
3893
3647
  }
3894
3648
 
3895
3649
  /**
3896
- * File Search content.
3650
+ * File Search call step.
3897
3651
  */
3898
- declare interface FileSearchCallContent {
3652
+ declare interface FileSearchCallStep {
3899
3653
  /**
3900
3654
  * Required. A unique ID for this specific tool call.
3901
3655
  */
@@ -3908,18 +3662,14 @@ declare interface FileSearchCallContent {
3908
3662
  }
3909
3663
 
3910
3664
  /**
3911
- * File Search result content.
3665
+ * File Search result step.
3912
3666
  */
3913
- declare interface FileSearchResultContent {
3667
+ declare interface FileSearchResultStep {
3914
3668
  /**
3915
3669
  * Required. ID to match the ID from the function call block.
3916
3670
  */
3917
3671
  call_id: string;
3918
3672
  type: 'file_search_result';
3919
- /**
3920
- * Optional. The results of the File Search.
3921
- */
3922
- result?: Array<unknown>;
3923
3673
  /**
3924
3674
  * A signature hash for backend validation.
3925
3675
  */
@@ -3945,6 +3695,8 @@ export declare interface FileSearchStore {
3945
3695
  /** The size of raw bytes ingested into the FileSearchStore. This is the
3946
3696
  total size of all the documents in the FileSearchStore. */
3947
3697
  sizeBytes?: string;
3698
+ /** The embedding model used by the FileSearchStore. */
3699
+ embeddingModel?: string;
3948
3700
  }
3949
3701
 
3950
3702
  declare class FileSearchStores extends BaseModule {
@@ -4003,6 +3755,15 @@ declare class FileSearchStores extends BaseModule {
4003
3755
  * ```
4004
3756
  */
4005
3757
  uploadToFileSearchStore(params: types.UploadToFileSearchStoreParameters): Promise<types.UploadToFileSearchStoreOperation>;
3758
+ /**
3759
+ * Downloads media using a Media ID or URI.
3760
+ * This method is only supported in the Gemini Developer client.
3761
+ *
3762
+ * @param uri - The URI or Media ID of the blob.
3763
+ * @param config - Optional configuration for the download.
3764
+ * @returns A promise that resolves to the blob data as a Uint8Array.
3765
+ */
3766
+ downloadMedia(uri: string, config?: types.DownloadMediaConfig): Promise<Uint8Array>;
4006
3767
  /**
4007
3768
  * Creates a File Search Store.
4008
3769
  *
@@ -4206,31 +3967,6 @@ export declare interface FunctionCall {
4206
3967
  willContinue?: boolean;
4207
3968
  }
4208
3969
 
4209
- /**
4210
- * A function tool call content block.
4211
- */
4212
- declare interface FunctionCallContent {
4213
- /**
4214
- * Required. A unique ID for this specific tool call.
4215
- */
4216
- id: string;
4217
- /**
4218
- * Required. The arguments to pass to the function.
4219
- */
4220
- arguments: {
4221
- [key: string]: unknown;
4222
- };
4223
- /**
4224
- * Required. The name of the tool to call.
4225
- */
4226
- name: string;
4227
- type: 'function_call';
4228
- /**
4229
- * A signature hash for backend validation.
4230
- */
4231
- signature?: string;
4232
- }
4233
-
4234
3970
  /** Function calling config. */
4235
3971
  export declare interface FunctionCallingConfig {
4236
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. */
@@ -4265,6 +4001,31 @@ export declare enum FunctionCallingConfigMode {
4265
4001
  VALIDATED = "VALIDATED"
4266
4002
  }
4267
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
+
4268
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. */
4269
4030
  export declare interface FunctionDeclaration {
4270
4031
  /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */
@@ -4363,9 +4124,9 @@ export declare enum FunctionResponseScheduling {
4363
4124
  }
4364
4125
 
4365
4126
  /**
4366
- * A function tool result content block.
4127
+ * Result of a function tool call.
4367
4128
  */
4368
- declare interface FunctionResultContent {
4129
+ declare interface FunctionResultStep {
4369
4130
  /**
4370
4131
  * Required. ID to match the ID from the function call block.
4371
4132
  */
@@ -5485,9 +5246,9 @@ declare interface GoogleMapsCallArguments {
5485
5246
  }
5486
5247
 
5487
5248
  /**
5488
- * Google Maps content.
5249
+ * Google Maps call step.
5489
5250
  */
5490
- declare interface GoogleMapsCallContent {
5251
+ declare interface GoogleMapsCallStep {
5491
5252
  /**
5492
5253
  * Required. A unique ID for this specific tool call.
5493
5254
  */
@@ -5496,13 +5257,25 @@ declare interface GoogleMapsCallContent {
5496
5257
  /**
5497
5258
  * The arguments to pass to the Google Maps tool.
5498
5259
  */
5499
- arguments?: GoogleMapsCallArguments;
5260
+ arguments?: GoogleMapsCallStep.Arguments;
5500
5261
  /**
5501
5262
  * A signature hash for backend validation.
5502
5263
  */
5503
5264
  signature?: string;
5504
5265
  }
5505
5266
 
5267
+ declare namespace GoogleMapsCallStep {
5268
+ /**
5269
+ * The arguments to pass to the Google Maps tool.
5270
+ */
5271
+ interface Arguments {
5272
+ /**
5273
+ * The queries to be executed.
5274
+ */
5275
+ queries?: Array<string>;
5276
+ }
5277
+ }
5278
+
5506
5279
  /**
5507
5280
  * The result of the Google Maps.
5508
5281
  */
@@ -5560,17 +5333,14 @@ declare namespace GoogleMapsResult {
5560
5333
  }
5561
5334
 
5562
5335
  /**
5563
- * Google Maps result content.
5336
+ * Google Maps result step.
5564
5337
  */
5565
- declare interface GoogleMapsResultContent {
5338
+ declare interface GoogleMapsResultStep {
5566
5339
  /**
5567
5340
  * Required. ID to match the ID from the function call block.
5568
5341
  */
5569
5342
  call_id: string;
5570
- /**
5571
- * Required. The results of the Google Maps.
5572
- */
5573
- result: Array<GoogleMapsResult>;
5343
+ result: Array<GoogleMapsResultStep.Result>;
5574
5344
  type: 'google_maps_result';
5575
5345
  /**
5576
5346
  * A signature hash for backend validation.
@@ -5578,6 +5348,44 @@ declare interface GoogleMapsResultContent {
5578
5348
  signature?: string;
5579
5349
  }
5580
5350
 
5351
+ declare namespace GoogleMapsResultStep {
5352
+ /**
5353
+ * The result of the Google Maps.
5354
+ */
5355
+ interface Result {
5356
+ places?: Array<Result.Place>;
5357
+ widget_context_token?: string;
5358
+ }
5359
+ namespace Result {
5360
+ interface Place {
5361
+ name?: string;
5362
+ place_id?: string;
5363
+ review_snippets?: Array<Place.ReviewSnippet>;
5364
+ url?: string;
5365
+ }
5366
+ namespace Place {
5367
+ /**
5368
+ * Encapsulates a snippet of a user review that answers a question about the
5369
+ * features of a specific place in Google Maps.
5370
+ */
5371
+ interface ReviewSnippet {
5372
+ /**
5373
+ * The ID of the review snippet.
5374
+ */
5375
+ review_id?: string;
5376
+ /**
5377
+ * Title of the review.
5378
+ */
5379
+ title?: string;
5380
+ /**
5381
+ * A link that corresponds to the user review on Google Maps.
5382
+ */
5383
+ url?: string;
5384
+ }
5385
+ }
5386
+ }
5387
+ }
5388
+
5581
5389
  /** 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. */
5582
5390
  export declare interface GoogleRpcStatus {
5583
5391
  /** The status code, which should be an enum value of google.rpc.Code. */
@@ -5611,9 +5419,9 @@ declare interface GoogleSearchCallArguments {
5611
5419
  }
5612
5420
 
5613
5421
  /**
5614
- * Google Search content.
5422
+ * Google Search call step.
5615
5423
  */
5616
- declare interface GoogleSearchCallContent {
5424
+ declare interface GoogleSearchCallStep {
5617
5425
  /**
5618
5426
  * Required. A unique ID for this specific tool call.
5619
5427
  */
@@ -5621,7 +5429,7 @@ declare interface GoogleSearchCallContent {
5621
5429
  /**
5622
5430
  * Required. The arguments to pass to Google Search.
5623
5431
  */
5624
- arguments: GoogleSearchCallArguments;
5432
+ arguments: GoogleSearchCallStep.Arguments;
5625
5433
  type: 'google_search_call';
5626
5434
  /**
5627
5435
  * The type of search grounding enabled.
@@ -5633,6 +5441,18 @@ declare interface GoogleSearchCallContent {
5633
5441
  signature?: string;
5634
5442
  }
5635
5443
 
5444
+ declare namespace GoogleSearchCallStep {
5445
+ /**
5446
+ * Required. The arguments to pass to Google Search.
5447
+ */
5448
+ interface Arguments {
5449
+ /**
5450
+ * Web search queries for the following-up web search.
5451
+ */
5452
+ queries?: Array<string>;
5453
+ }
5454
+ }
5455
+
5636
5456
  /**
5637
5457
  * The result of the Google Search.
5638
5458
  */
@@ -5644,9 +5464,9 @@ declare interface GoogleSearchResult {
5644
5464
  }
5645
5465
 
5646
5466
  /**
5647
- * Google Search result content.
5467
+ * Google Search result step.
5648
5468
  */
5649
- declare interface GoogleSearchResultContent {
5469
+ declare interface GoogleSearchResultStep {
5650
5470
  /**
5651
5471
  * Required. ID to match the ID from the function call block.
5652
5472
  */
@@ -5654,7 +5474,7 @@ declare interface GoogleSearchResultContent {
5654
5474
  /**
5655
5475
  * Required. The results of the Google Search.
5656
5476
  */
5657
- result: Array<GoogleSearchResult>;
5477
+ result: Array<GoogleSearchResultStep.Result>;
5658
5478
  type: 'google_search_result';
5659
5479
  /**
5660
5480
  * Whether the Google Search resulted in an error.
@@ -5666,6 +5486,18 @@ declare interface GoogleSearchResultContent {
5666
5486
  signature?: string;
5667
5487
  }
5668
5488
 
5489
+ declare namespace GoogleSearchResultStep {
5490
+ /**
5491
+ * The result of the Google Search.
5492
+ */
5493
+ interface Result {
5494
+ /**
5495
+ * Web content snippet that can be embedded in a web page or an app webview.
5496
+ */
5497
+ search_suggestions?: string;
5498
+ }
5499
+ }
5500
+
5669
5501
  /** Tool to retrieve public web data for grounding, powered by Google. */
5670
5502
  export declare interface GoogleSearchRetrieval {
5671
5503
  /** Specifies the dynamic retrieval configuration for the given source. */
@@ -5819,6 +5651,8 @@ export declare interface GroundingChunkRetrievedContext {
5819
5651
  fileSearchStore?: string;
5820
5652
  /** Optional. Page number of the retrieved context. This field is not supported in Vertex AI. */
5821
5653
  pageNumber?: number;
5654
+ /** Optional. Media ID. This field is not supported in Vertex AI. */
5655
+ mediaId?: string;
5822
5656
  }
5823
5657
 
5824
5658
  /** A list of string values. This data type is not supported in Vertex AI. */
@@ -6281,6 +6115,29 @@ export declare enum ImageResizeMode {
6281
6115
  PAD = "PAD"
6282
6116
  }
6283
6117
 
6118
+ /**
6119
+ * Configuration for image output format.
6120
+ */
6121
+ declare interface ImageResponseFormat {
6122
+ type: 'image';
6123
+ /**
6124
+ * The aspect ratio for the image output.
6125
+ */
6126
+ 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';
6127
+ /**
6128
+ * The delivery mode for the image output.
6129
+ */
6130
+ delivery?: 'inline' | 'url';
6131
+ /**
6132
+ * The size of the image output.
6133
+ */
6134
+ imageSize?: '512' | '1K' | '2K' | '4K';
6135
+ /**
6136
+ * The MIME type of the image output.
6137
+ */
6138
+ mimeType?: 'image/jpeg';
6139
+ }
6140
+
6284
6141
  /** Image search for grounding and related configurations. */
6285
6142
  export declare interface ImageSearch {
6286
6143
  }
@@ -6412,15 +6269,11 @@ declare interface Interaction {
6412
6269
  /**
6413
6270
  * The input for the interaction.
6414
6271
  */
6415
- 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;
6272
+ input?: string | Array<Step> | Array<Content_2> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent;
6416
6273
  /**
6417
6274
  * The name of the `Model` used for generating the interaction.
6418
6275
  */
6419
6276
  model?: Model_2;
6420
- /**
6421
- * Output only. Responses from the model.
6422
- */
6423
- outputs?: Array<Content_2>;
6424
6277
  /**
6425
6278
  * The ID of the previous interaction, if any.
6426
6279
  */
@@ -6429,7 +6282,7 @@ declare interface Interaction {
6429
6282
  * Enforces that the generated response is a JSON object that complies with the
6430
6283
  * JSON schema specified in this field.
6431
6284
  */
6432
- response_format?: unknown;
6285
+ response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
6433
6286
  /**
6434
6287
  * The mime type of the response. This is required if response_format is set.
6435
6288
  */
@@ -6439,13 +6292,17 @@ declare interface Interaction {
6439
6292
  */
6440
6293
  response_modalities?: Array<'text' | 'image' | 'audio' | 'video' | 'document'>;
6441
6294
  /**
6442
- * Output only. The role of the interaction.
6295
+ * @deprecated Output only. The role of the interaction.
6443
6296
  */
6444
6297
  role?: string;
6445
6298
  /**
6446
6299
  * The service tier for the interaction.
6447
6300
  */
6448
6301
  service_tier?: 'flex' | 'standard' | 'priority';
6302
+ /**
6303
+ * Output only. The steps that make up the interaction.
6304
+ */
6305
+ steps?: Array<Step>;
6449
6306
  /**
6450
6307
  * System instruction for the interaction.
6451
6308
  */
@@ -6472,8 +6329,8 @@ declare interface InteractionCancelParams {
6472
6329
  api_version?: string;
6473
6330
  }
6474
6331
 
6475
- declare interface InteractionCompleteEvent {
6476
- event_type: 'interaction.complete';
6332
+ declare interface InteractionCompletedEvent {
6333
+ event_type: 'interaction.completed';
6477
6334
  /**
6478
6335
  * Required. The completed interaction with empty outputs to reduce the payload
6479
6336
  * size. Use the preceding ContentDelta events for the actual output.
@@ -6485,6 +6342,18 @@ declare interface InteractionCompleteEvent {
6485
6342
  event_id?: string;
6486
6343
  }
6487
6344
 
6345
+ declare interface InteractionCreatedEvent {
6346
+ event_type: 'interaction.created';
6347
+ /**
6348
+ * The Interaction resource.
6349
+ */
6350
+ interaction: Interaction;
6351
+ /**
6352
+ * The event_id token to be used to resume the interaction stream, from this event.
6353
+ */
6354
+ event_id?: string;
6355
+ }
6356
+
6488
6357
  declare type InteractionCreateParams = CreateModelInteractionParamsNonStreaming | CreateModelInteractionParamsStreaming | CreateAgentInteractionParamsNonStreaming | CreateAgentInteractionParamsStreaming;
6489
6358
 
6490
6359
  declare interface InteractionDeleteParams {
@@ -6545,7 +6414,7 @@ export declare class Interactions extends BaseInteractions {
6545
6414
  }
6546
6415
 
6547
6416
  export declare namespace Interactions {
6548
- 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, };
6417
+ 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, };
6549
6418
  }
6550
6419
 
6551
6420
  declare namespace InteractionsAPI {
@@ -6555,58 +6424,64 @@ declare namespace InteractionsAPI {
6555
6424
  AllowedTools,
6556
6425
  Annotation,
6557
6426
  AudioContent,
6427
+ AudioResponseFormat,
6558
6428
  CodeExecutionCallArguments,
6559
- CodeExecutionCallContent,
6560
- CodeExecutionResultContent,
6429
+ CodeExecutionCallStep,
6430
+ CodeExecutionResultStep,
6561
6431
  Content_2 as Content,
6562
- ContentDelta,
6563
- ContentStart,
6564
- ContentStop,
6565
6432
  DeepResearchAgentConfig,
6566
6433
  DocumentContent,
6567
6434
  DynamicAgentConfig,
6568
6435
  ErrorEvent_2 as ErrorEvent,
6569
6436
  FileCitation,
6570
- FileSearchCallContent,
6571
- FileSearchResultContent,
6437
+ FileSearchCallStep,
6438
+ FileSearchResultStep,
6572
6439
  Function_2 as Function,
6573
- FunctionCallContent,
6574
- FunctionResultContent,
6440
+ FunctionCallStep,
6441
+ FunctionResultStep,
6575
6442
  GenerationConfig_2 as GenerationConfig,
6576
6443
  GoogleMapsCallArguments,
6577
- GoogleMapsCallContent,
6444
+ GoogleMapsCallStep,
6578
6445
  GoogleMapsResult,
6579
- GoogleMapsResultContent,
6446
+ GoogleMapsResultStep,
6580
6447
  GoogleSearchCallArguments,
6581
- GoogleSearchCallContent,
6448
+ GoogleSearchCallStep,
6582
6449
  GoogleSearchResult,
6583
- GoogleSearchResultContent,
6450
+ GoogleSearchResultStep,
6584
6451
  ImageConfig_2 as ImageConfig,
6585
6452
  ImageContent,
6453
+ ImageResponseFormat,
6586
6454
  Interaction,
6587
- InteractionCompleteEvent,
6455
+ InteractionCompletedEvent,
6456
+ InteractionCreatedEvent,
6588
6457
  InteractionSSEEvent,
6589
- InteractionStartEvent,
6590
6458
  InteractionStatusUpdate,
6591
- MCPServerToolCallContent,
6592
- MCPServerToolResultContent,
6459
+ MCPServerToolCallStep,
6460
+ MCPServerToolResultStep,
6593
6461
  Model_2 as Model,
6462
+ ModelOutputStep,
6594
6463
  PlaceCitation,
6595
6464
  SpeechConfig_2 as SpeechConfig,
6465
+ Step,
6466
+ StepDelta,
6467
+ StepStart,
6468
+ StepStop,
6596
6469
  TextContent,
6470
+ TextResponseFormat,
6597
6471
  ThinkingLevel_2 as ThinkingLevel,
6598
- ThoughtContent,
6472
+ ThoughtStep,
6599
6473
  Tool_2 as Tool,
6600
6474
  ToolChoiceConfig,
6601
6475
  ToolChoiceType,
6602
- Turn,
6603
6476
  URLCitation,
6604
6477
  URLContextCallArguments,
6605
- URLContextCallContent,
6478
+ URLContextCallStep,
6606
6479
  URLContextResult,
6607
- URLContextResultContent,
6480
+ URLContextResultStep,
6608
6481
  Usage,
6482
+ UserInputStep,
6609
6483
  VideoContent,
6484
+ VideoResponseFormat,
6610
6485
  WebhookConfig_2 as WebhookConfig,
6611
6486
  InteractionDeleteResponse,
6612
6487
  InteractionCreateParams,
@@ -6625,19 +6500,7 @@ declare namespace InteractionsAPI {
6625
6500
  }
6626
6501
  }
6627
6502
 
6628
- declare type InteractionSSEEvent = InteractionStartEvent | InteractionCompleteEvent | InteractionStatusUpdate | ContentStart | ContentDelta | ContentStop | ErrorEvent_2;
6629
-
6630
- declare interface InteractionStartEvent {
6631
- event_type: 'interaction.start';
6632
- /**
6633
- * The Interaction resource.
6634
- */
6635
- interaction: Interaction;
6636
- /**
6637
- * The event_id token to be used to resume the interaction stream, from this event.
6638
- */
6639
- event_id?: string;
6640
- }
6503
+ declare type InteractionSSEEvent = InteractionCreatedEvent | InteractionCompletedEvent | InteractionStatusUpdate | ErrorEvent_2 | StepStart | StepDelta | StepStop;
6641
6504
 
6642
6505
  declare interface InteractionStatusUpdate {
6643
6506
  event_type: 'interaction.status_update';
@@ -7840,9 +7703,9 @@ export declare interface McpServer {
7840
7703
  }
7841
7704
 
7842
7705
  /**
7843
- * MCPServer tool call content.
7706
+ * MCPServer tool call step.
7844
7707
  */
7845
- declare interface MCPServerToolCallContent {
7708
+ declare interface MCPServerToolCallStep {
7846
7709
  /**
7847
7710
  * Required. A unique ID for this specific tool call.
7848
7711
  */
@@ -7869,9 +7732,9 @@ declare interface MCPServerToolCallContent {
7869
7732
  }
7870
7733
 
7871
7734
  /**
7872
- * MCPServer tool result content.
7735
+ * MCPServer tool result step.
7873
7736
  */
7874
- declare interface MCPServerToolResultContent {
7737
+ declare interface MCPServerToolResultStep {
7875
7738
  /**
7876
7739
  * Required. ID to match the ID from the function call block.
7877
7740
  */
@@ -7879,7 +7742,7 @@ declare interface MCPServerToolResultContent {
7879
7742
  /**
7880
7743
  * The output from the MCP server call. Can be simple text or rich content.
7881
7744
  */
7882
- result: unknown | Array<TextContent | ImageContent> | string;
7745
+ result: unknown | string | Array<TextContent | ImageContent>;
7883
7746
  type: 'mcp_server_tool_result';
7884
7747
  /**
7885
7748
  * Name of the tool which is called for this specific tool call.
@@ -8064,6 +7927,14 @@ export declare interface ModelArmorConfig {
8064
7927
  responseTemplateName?: string;
8065
7928
  }
8066
7929
 
7930
+ /**
7931
+ * Output generated by the model.
7932
+ */
7933
+ declare interface ModelOutputStep {
7934
+ type: 'model_output';
7935
+ content?: Array<Content_2>;
7936
+ }
7937
+
8067
7938
  export declare class Models extends BaseModule {
8068
7939
  private readonly apiClient;
8069
7940
  constructor(apiClient: ApiClient);
@@ -10091,6 +9962,119 @@ export declare enum StartSensitivity {
10091
9962
  START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW"
10092
9963
  }
10093
9964
 
9965
+ /**
9966
+ * A step in the interaction.
9967
+ */
9968
+ declare type Step = UserInputStep | ModelOutputStep | ThoughtStep | FunctionCallStep | CodeExecutionCallStep | URLContextCallStep | MCPServerToolCallStep | GoogleSearchCallStep | FileSearchCallStep | GoogleMapsCallStep | FunctionResultStep | CodeExecutionResultStep | URLContextResultStep | GoogleSearchResultStep | MCPServerToolResultStep | FileSearchResultStep | GoogleMapsResultStep;
9969
+
9970
+ declare interface StepDelta {
9971
+ delta: StepDelta.Text | StepDelta.Image | StepDelta.Audio | StepDelta.Document | StepDelta.Video | StepDelta.ThoughtSummary | StepDelta.ThoughtSignature | StepDelta.TextAnnotationDelta | StepDelta.ArgumentsDelta;
9972
+ event_type: 'step.delta';
9973
+ index: number;
9974
+ /**
9975
+ * The event_id token to be used to resume the interaction stream, from this event.
9976
+ */
9977
+ event_id?: string;
9978
+ }
9979
+
9980
+ declare namespace StepDelta {
9981
+ interface Text {
9982
+ text: string;
9983
+ type: 'text';
9984
+ }
9985
+ interface Image {
9986
+ type: 'image';
9987
+ data?: string;
9988
+ mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif' | 'image/gif' | 'image/bmp' | 'image/tiff';
9989
+ /**
9990
+ * The resolution of the media.
9991
+ */
9992
+ resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
9993
+ uri?: string;
9994
+ }
9995
+ interface Audio {
9996
+ type: 'audio';
9997
+ /**
9998
+ * The number of audio channels.
9999
+ */
10000
+ channels?: number;
10001
+ data?: string;
10002
+ 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';
10003
+ /**
10004
+ * @deprecated Deprecated. Use sample_rate instead. The value is ignored.
10005
+ */
10006
+ rate?: number;
10007
+ /**
10008
+ * The sample rate of the audio.
10009
+ */
10010
+ sample_rate?: number;
10011
+ uri?: string;
10012
+ }
10013
+ interface Document {
10014
+ type: 'document';
10015
+ data?: string;
10016
+ mime_type?: 'application/pdf';
10017
+ uri?: string;
10018
+ }
10019
+ interface Video {
10020
+ type: 'video';
10021
+ data?: string;
10022
+ mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
10023
+ /**
10024
+ * The resolution of the media.
10025
+ */
10026
+ resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
10027
+ uri?: string;
10028
+ }
10029
+ interface ThoughtSummary {
10030
+ type: 'thought_summary';
10031
+ /**
10032
+ * A new summary item to be added to the thought.
10033
+ */
10034
+ content?: InteractionsAPI.TextContent | InteractionsAPI.ImageContent;
10035
+ }
10036
+ interface ThoughtSignature {
10037
+ type: 'thought_signature';
10038
+ /**
10039
+ * Signature to match the backend source to be part of the generation.
10040
+ */
10041
+ signature?: string;
10042
+ }
10043
+ interface TextAnnotationDelta {
10044
+ type: 'text_annotation_delta';
10045
+ /**
10046
+ * Citation information for model-generated content.
10047
+ */
10048
+ annotations?: Array<InteractionsAPI.Annotation>;
10049
+ }
10050
+ interface ArgumentsDelta {
10051
+ type: 'arguments_delta';
10052
+ partial_arguments?: string;
10053
+ }
10054
+ }
10055
+
10056
+ declare interface StepStart {
10057
+ event_type: 'step.start';
10058
+ index: number;
10059
+ /**
10060
+ * A step in the interaction.
10061
+ */
10062
+ step: Step;
10063
+ /**
10064
+ * The event_id token to be used to resume the interaction stream, from this event.
10065
+ */
10066
+ event_id?: string;
10067
+ }
10068
+
10069
+ declare interface StepStop {
10070
+ event_type: 'step.stop';
10071
+ index: number;
10072
+ /**
10073
+ * The event_id token to be used to resume the interaction stream, from this event.
10074
+ */
10075
+ event_id?: string;
10076
+ }
10077
+
10094
10078
  declare class Stream<Item> implements AsyncIterable<Item> {
10095
10079
  private iterator;
10096
10080
  controller: AbortController;
@@ -10326,6 +10310,24 @@ declare interface TextContent {
10326
10310
  annotations?: Array<Annotation>;
10327
10311
  }
10328
10312
 
10313
+ /**
10314
+ * Configuration for text output format.
10315
+ */
10316
+ declare interface TextResponseFormat {
10317
+ type: 'text';
10318
+ /**
10319
+ * The MIME type of the text output.
10320
+ */
10321
+ mimeType?: 'application/json' | 'text/plain';
10322
+ /**
10323
+ * The JSON schema that the output should conform to. Only applicable when
10324
+ * mime_type is application/json.
10325
+ */
10326
+ schema?: {
10327
+ [key: string]: unknown;
10328
+ };
10329
+ }
10330
+
10329
10331
  /** The thinking features configuration. */
10330
10332
  export declare interface ThinkingConfig {
10331
10333
  /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.
@@ -10365,12 +10367,12 @@ export declare enum ThinkingLevel {
10365
10367
  declare type ThinkingLevel_2 = 'minimal' | 'low' | 'medium' | 'high';
10366
10368
 
10367
10369
  /**
10368
- * A thought content block.
10370
+ * A thought step.
10369
10371
  */
10370
- declare interface ThoughtContent {
10372
+ declare interface ThoughtStep {
10371
10373
  type: 'thought';
10372
10374
  /**
10373
- * Signature to match the backend source to be part of the generation.
10375
+ * A signature hash for backend validation.
10374
10376
  */
10375
10377
  signature?: string;
10376
10378
  /**
@@ -11079,14 +11081,6 @@ export declare interface TuningValidationDataset {
11079
11081
  vertexDatasetResource?: string;
11080
11082
  }
11081
11083
 
11082
- declare interface Turn {
11083
- content?: Array<Content_2> | string;
11084
- /**
11085
- * The originator of this turn. Must be user for input or model for model output.
11086
- */
11087
- role?: string;
11088
- }
11089
-
11090
11084
  /** The reason why the turn is complete. */
11091
11085
  export declare enum TurnCompleteReason {
11092
11086
  /**
@@ -11753,6 +11747,7 @@ declare namespace types {
11753
11747
  EmbedContentParameters,
11754
11748
  UploadToFileSearchStoreResponse,
11755
11749
  UploadToFileSearchStoreOperation,
11750
+ DownloadMediaConfig,
11756
11751
  BlobImageUnion,
11757
11752
  PartUnion,
11758
11753
  PartListUnion,
@@ -12085,9 +12080,9 @@ declare interface URLContextCallArguments {
12085
12080
  }
12086
12081
 
12087
12082
  /**
12088
- * URL context content.
12083
+ * URL context call step.
12089
12084
  */
12090
- declare interface URLContextCallContent {
12085
+ declare interface URLContextCallStep {
12091
12086
  /**
12092
12087
  * Required. A unique ID for this specific tool call.
12093
12088
  */
@@ -12095,7 +12090,7 @@ declare interface URLContextCallContent {
12095
12090
  /**
12096
12091
  * Required. The arguments to pass to the URL context.
12097
12092
  */
12098
- arguments: URLContextCallArguments;
12093
+ arguments: URLContextCallStep.Arguments;
12099
12094
  type: 'url_context_call';
12100
12095
  /**
12101
12096
  * A signature hash for backend validation.
@@ -12103,6 +12098,18 @@ declare interface URLContextCallContent {
12103
12098
  signature?: string;
12104
12099
  }
12105
12100
 
12101
+ declare namespace URLContextCallStep {
12102
+ /**
12103
+ * Required. The arguments to pass to the URL context.
12104
+ */
12105
+ interface Arguments {
12106
+ /**
12107
+ * The URLs to fetch.
12108
+ */
12109
+ urls?: Array<string>;
12110
+ }
12111
+ }
12112
+
12106
12113
  /** Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL. */
12107
12114
  export declare interface UrlContextMetadata {
12108
12115
  /** Output only. A list of URL metadata, with one entry for each URL retrieved by the tool. */
@@ -12124,9 +12131,9 @@ declare interface URLContextResult {
12124
12131
  }
12125
12132
 
12126
12133
  /**
12127
- * URL context result content.
12134
+ * URL context result step.
12128
12135
  */
12129
- declare interface URLContextResultContent {
12136
+ declare interface URLContextResultStep {
12130
12137
  /**
12131
12138
  * Required. ID to match the ID from the function call block.
12132
12139
  */
@@ -12134,7 +12141,7 @@ declare interface URLContextResultContent {
12134
12141
  /**
12135
12142
  * Required. The results of the URL context.
12136
12143
  */
12137
- result: Array<URLContextResult>;
12144
+ result: Array<URLContextResultStep.Result>;
12138
12145
  type: 'url_context_result';
12139
12146
  /**
12140
12147
  * Whether the URL context resulted in an error.
@@ -12146,6 +12153,22 @@ declare interface URLContextResultContent {
12146
12153
  signature?: string;
12147
12154
  }
12148
12155
 
12156
+ declare namespace URLContextResultStep {
12157
+ /**
12158
+ * The result of the URL context.
12159
+ */
12160
+ interface Result {
12161
+ /**
12162
+ * The status of the URL retrieval.
12163
+ */
12164
+ status?: 'success' | 'error' | 'paywall' | 'unsafe';
12165
+ /**
12166
+ * The URL that was fetched.
12167
+ */
12168
+ url?: string;
12169
+ }
12170
+ }
12171
+
12149
12172
  /** The metadata for a single URL retrieval. */
12150
12173
  export declare interface UrlMetadata {
12151
12174
  /** The URL retrieved by the tool. */
@@ -12324,6 +12347,14 @@ export declare interface UsageMetadata {
12324
12347
  trafficType?: TrafficType;
12325
12348
  }
12326
12349
 
12350
+ /**
12351
+ * Input provided by the user.
12352
+ */
12353
+ declare interface UserInputStep {
12354
+ type: 'user_input';
12355
+ content?: Array<Content_2>;
12356
+ }
12357
+
12327
12358
  /** The type of the VAD signal. */
12328
12359
  export declare enum VadSignalType {
12329
12360
  /**
@@ -12537,6 +12568,13 @@ export declare interface VideoMetadata {
12537
12568
  startOffset?: string;
12538
12569
  }
12539
12570
 
12571
+ /**
12572
+ * Configuration for video output format.
12573
+ */
12574
+ declare interface VideoResponseFormat {
12575
+ type: 'video';
12576
+ }
12577
+
12540
12578
  /** Voice activity signal. */
12541
12579
  export declare interface VoiceActivity {
12542
12580
  /** The type of the voice activity signal. */