@google/genai 1.41.0 → 1.43.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
@@ -411,18 +411,13 @@ declare interface AudioContent {
411
411
  /**
412
412
  * The mime type of the audio.
413
413
  */
414
- mime_type?: AudioMimeType;
414
+ mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac';
415
415
  /**
416
416
  * The URI of the audio.
417
417
  */
418
418
  uri?: string;
419
419
  }
420
420
 
421
- /**
422
- * The mime type of the audio.
423
- */
424
- declare type AudioMimeType = 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | (string & {});
425
-
426
421
  /** The audio transcription configuration in Setup. */
427
422
  export declare interface AudioTranscriptionConfig {
428
423
  }
@@ -1336,10 +1331,12 @@ export declare interface Candidate {
1336
1331
  If empty, the model has not stopped generating the tokens.
1337
1332
  */
1338
1333
  finishReason?: FinishReason;
1334
+ /** Output only. Metadata returned when grounding is enabled. It
1335
+ contains the sources used to ground the generated content.
1336
+ */
1337
+ groundingMetadata?: GroundingMetadata;
1339
1338
  /** Output only. Average log probability score of the candidate. */
1340
1339
  avgLogprobs?: number;
1341
- /** Output only. Metadata specifies sources used to ground generated content. */
1342
- groundingMetadata?: GroundingMetadata;
1343
1340
  /** Output only. Index of the candidate. */
1344
1341
  index?: number;
1345
1342
  /** Output only. Log-likelihood scores for the response tokens and top tokens */
@@ -1603,15 +1600,15 @@ declare interface CodeExecutionCallArguments {
1603
1600
  * Code execution content.
1604
1601
  */
1605
1602
  declare interface CodeExecutionCallContent {
1606
- type: 'code_execution_call';
1607
1603
  /**
1608
1604
  * A unique ID for this specific tool call.
1609
1605
  */
1610
- id?: string;
1606
+ id: string;
1611
1607
  /**
1612
1608
  * The arguments to pass to the code execution.
1613
1609
  */
1614
- arguments?: CodeExecutionCallArguments;
1610
+ arguments: CodeExecutionCallArguments;
1611
+ type: 'code_execution_call';
1615
1612
  }
1616
1613
 
1617
1614
  /** Result of executing the [ExecutableCode]. Only generated when using the [CodeExecution] tool, and always follows a `part` containing the [ExecutableCode]. */
@@ -1626,19 +1623,19 @@ export declare interface CodeExecutionResult {
1626
1623
  * Code execution result content.
1627
1624
  */
1628
1625
  declare interface CodeExecutionResultContent {
1629
- type: 'code_execution_result';
1630
1626
  /**
1631
1627
  * ID to match the ID from the code execution call block.
1632
1628
  */
1633
- call_id?: string;
1629
+ call_id: string;
1634
1630
  /**
1635
- * Whether the code execution resulted in an error.
1631
+ * The output of the code execution.
1636
1632
  */
1637
- is_error?: boolean;
1633
+ result: string;
1634
+ type: 'code_execution_result';
1638
1635
  /**
1639
- * The output of the code execution.
1636
+ * Whether the code execution resulted in an error.
1640
1637
  */
1641
- result?: string;
1638
+ is_error?: boolean;
1642
1639
  /**
1643
1640
  * A signature hash for backend validation.
1644
1641
  */
@@ -1730,31 +1727,28 @@ export declare interface Content {
1730
1727
  declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
1731
1728
 
1732
1729
  declare interface ContentDelta {
1733
- delta?: ContentDelta.TextDelta | ContentDelta.ImageDelta | ContentDelta.AudioDelta | ContentDelta.DocumentDelta | ContentDelta.VideoDelta | ContentDelta.ThoughtSummaryDelta | ContentDelta.ThoughtSignatureDelta | ContentDelta.FunctionCallDelta | ContentDelta.FunctionResultDelta | ContentDelta.CodeExecutionCallDelta | ContentDelta.CodeExecutionResultDelta | ContentDelta.URLContextCallDelta | ContentDelta.URLContextResultDelta | ContentDelta.GoogleSearchCallDelta | ContentDelta.GoogleSearchResultDelta | ContentDelta.MCPServerToolCallDelta | ContentDelta.MCPServerToolResultDelta | ContentDelta.FileSearchCallDelta | ContentDelta.FileSearchResultDelta;
1730
+ delta: ContentDelta.TextDelta | ContentDelta.ImageDelta | ContentDelta.AudioDelta | ContentDelta.DocumentDelta | ContentDelta.VideoDelta | ContentDelta.ThoughtSummaryDelta | ContentDelta.ThoughtSignatureDelta | ContentDelta.FunctionCallDelta | ContentDelta.FunctionResultDelta | ContentDelta.CodeExecutionCallDelta | ContentDelta.CodeExecutionResultDelta | ContentDelta.URLContextCallDelta | ContentDelta.URLContextResultDelta | ContentDelta.GoogleSearchCallDelta | ContentDelta.GoogleSearchResultDelta | ContentDelta.MCPServerToolCallDelta | ContentDelta.MCPServerToolResultDelta | ContentDelta.FileSearchCallDelta | ContentDelta.FileSearchResultDelta;
1731
+ event_type: 'content.delta';
1732
+ index: number;
1734
1733
  /**
1735
1734
  * The event_id token to be used to resume the interaction stream, from this event.
1736
1735
  */
1737
1736
  event_id?: string;
1738
- event_type?: 'content.delta';
1739
- index?: number;
1740
1737
  }
1741
1738
 
1742
1739
  declare namespace ContentDelta {
1743
1740
  interface TextDelta {
1741
+ text: string;
1744
1742
  type: 'text';
1745
1743
  /**
1746
1744
  * Citation information for model-generated content.
1747
1745
  */
1748
1746
  annotations?: Array<InteractionsAPI.Annotation>;
1749
- text?: string;
1750
1747
  }
1751
1748
  interface ImageDelta {
1752
1749
  type: 'image';
1753
1750
  data?: string;
1754
- /**
1755
- * The mime type of the image.
1756
- */
1757
- mime_type?: InteractionsAPI.ImageMimeType;
1751
+ mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif';
1758
1752
  /**
1759
1753
  * The resolution of the media.
1760
1754
  */
@@ -1764,28 +1758,19 @@ declare namespace ContentDelta {
1764
1758
  interface AudioDelta {
1765
1759
  type: 'audio';
1766
1760
  data?: string;
1767
- /**
1768
- * The mime type of the audio.
1769
- */
1770
- mime_type?: InteractionsAPI.AudioMimeType;
1761
+ mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac';
1771
1762
  uri?: string;
1772
1763
  }
1773
1764
  interface DocumentDelta {
1774
1765
  type: 'document';
1775
1766
  data?: string;
1776
- /**
1777
- * The mime type of the document.
1778
- */
1779
- mime_type?: InteractionsAPI.DocumentMimeType;
1767
+ mime_type?: 'application/pdf';
1780
1768
  uri?: string;
1781
1769
  }
1782
1770
  interface VideoDelta {
1783
1771
  type: 'video';
1784
1772
  data?: string;
1785
- /**
1786
- * The mime type of the video.
1787
- */
1788
- mime_type?: InteractionsAPI.VideoMimeType;
1773
+ mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
1789
1774
  /**
1790
1775
  * The resolution of the media.
1791
1776
  */
@@ -1807,28 +1792,28 @@ declare namespace ContentDelta {
1807
1792
  signature?: string;
1808
1793
  }
1809
1794
  interface FunctionCallDelta {
1810
- type: 'function_call';
1811
1795
  /**
1812
1796
  * A unique ID for this specific tool call.
1813
1797
  */
1814
- id?: string;
1815
- arguments?: {
1798
+ id: string;
1799
+ arguments: {
1816
1800
  [key: string]: unknown;
1817
1801
  };
1818
- name?: string;
1802
+ name: string;
1803
+ type: 'function_call';
1819
1804
  }
1820
1805
  interface FunctionResultDelta {
1821
- type: 'function_result';
1822
1806
  /**
1823
1807
  * ID to match the ID from the function call block.
1824
1808
  */
1825
- call_id?: string;
1826
- is_error?: boolean;
1827
- name?: string;
1809
+ call_id: string;
1828
1810
  /**
1829
1811
  * Tool call result delta.
1830
1812
  */
1831
- result?: FunctionResultDelta.Items | unknown | string;
1813
+ result: FunctionResultDelta.Items | unknown | string;
1814
+ type: 'function_result';
1815
+ is_error?: boolean;
1816
+ name?: string;
1832
1817
  }
1833
1818
  namespace FunctionResultDelta {
1834
1819
  interface Items {
@@ -1836,91 +1821,91 @@ declare namespace ContentDelta {
1836
1821
  }
1837
1822
  }
1838
1823
  interface CodeExecutionCallDelta {
1839
- type: 'code_execution_call';
1840
1824
  /**
1841
1825
  * A unique ID for this specific tool call.
1842
1826
  */
1843
- id?: string;
1827
+ id: string;
1844
1828
  /**
1845
1829
  * The arguments to pass to the code execution.
1846
1830
  */
1847
- arguments?: InteractionsAPI.CodeExecutionCallArguments;
1831
+ arguments: InteractionsAPI.CodeExecutionCallArguments;
1832
+ type: 'code_execution_call';
1848
1833
  }
1849
1834
  interface CodeExecutionResultDelta {
1850
- type: 'code_execution_result';
1851
1835
  /**
1852
1836
  * ID to match the ID from the function call block.
1853
1837
  */
1854
- call_id?: string;
1838
+ call_id: string;
1839
+ result: string;
1840
+ type: 'code_execution_result';
1855
1841
  is_error?: boolean;
1856
- result?: string;
1857
1842
  signature?: string;
1858
1843
  }
1859
1844
  interface URLContextCallDelta {
1860
- type: 'url_context_call';
1861
1845
  /**
1862
1846
  * A unique ID for this specific tool call.
1863
1847
  */
1864
- id?: string;
1848
+ id: string;
1865
1849
  /**
1866
1850
  * The arguments to pass to the URL context.
1867
1851
  */
1868
- arguments?: InteractionsAPI.URLContextCallArguments;
1852
+ arguments: InteractionsAPI.URLContextCallArguments;
1853
+ type: 'url_context_call';
1869
1854
  }
1870
1855
  interface URLContextResultDelta {
1871
- type: 'url_context_result';
1872
1856
  /**
1873
1857
  * ID to match the ID from the function call block.
1874
1858
  */
1875
- call_id?: string;
1859
+ call_id: string;
1860
+ result: Array<InteractionsAPI.URLContextResult>;
1861
+ type: 'url_context_result';
1876
1862
  is_error?: boolean;
1877
- result?: Array<InteractionsAPI.URLContextResult>;
1878
1863
  signature?: string;
1879
1864
  }
1880
1865
  interface GoogleSearchCallDelta {
1881
- type: 'google_search_call';
1882
1866
  /**
1883
1867
  * A unique ID for this specific tool call.
1884
1868
  */
1885
- id?: string;
1869
+ id: string;
1886
1870
  /**
1887
1871
  * The arguments to pass to Google Search.
1888
1872
  */
1889
- arguments?: InteractionsAPI.GoogleSearchCallArguments;
1873
+ arguments: InteractionsAPI.GoogleSearchCallArguments;
1874
+ type: 'google_search_call';
1890
1875
  }
1891
1876
  interface GoogleSearchResultDelta {
1892
- type: 'google_search_result';
1893
1877
  /**
1894
1878
  * ID to match the ID from the function call block.
1895
1879
  */
1896
- call_id?: string;
1880
+ call_id: string;
1881
+ result: Array<InteractionsAPI.GoogleSearchResult>;
1882
+ type: 'google_search_result';
1897
1883
  is_error?: boolean;
1898
- result?: Array<InteractionsAPI.GoogleSearchResult>;
1899
1884
  signature?: string;
1900
1885
  }
1901
1886
  interface MCPServerToolCallDelta {
1902
- type: 'mcp_server_tool_call';
1903
1887
  /**
1904
1888
  * A unique ID for this specific tool call.
1905
1889
  */
1906
- id?: string;
1907
- arguments?: {
1890
+ id: string;
1891
+ arguments: {
1908
1892
  [key: string]: unknown;
1909
1893
  };
1910
- name?: string;
1911
- server_name?: string;
1894
+ name: string;
1895
+ server_name: string;
1896
+ type: 'mcp_server_tool_call';
1912
1897
  }
1913
1898
  interface MCPServerToolResultDelta {
1914
- type: 'mcp_server_tool_result';
1915
1899
  /**
1916
1900
  * ID to match the ID from the function call block.
1917
1901
  */
1918
- call_id?: string;
1919
- name?: string;
1902
+ call_id: string;
1920
1903
  /**
1921
1904
  * Tool call result delta.
1922
1905
  */
1923
- result?: MCPServerToolResultDelta.Items | unknown | string;
1906
+ result: MCPServerToolResultDelta.Items | unknown | string;
1907
+ type: 'mcp_server_tool_result';
1908
+ name?: string;
1924
1909
  server_name?: string;
1925
1910
  }
1926
1911
  namespace MCPServerToolResultDelta {
@@ -1929,11 +1914,11 @@ declare namespace ContentDelta {
1929
1914
  }
1930
1915
  }
1931
1916
  interface FileSearchCallDelta {
1932
- type: 'file_search_call';
1933
1917
  /**
1934
1918
  * A unique ID for this specific tool call.
1935
1919
  */
1936
- id?: string;
1920
+ id: string;
1921
+ type: 'file_search_call';
1937
1922
  }
1938
1923
  interface FileSearchResultDelta {
1939
1924
  type: 'file_search_result';
@@ -2004,22 +1989,22 @@ declare interface ContentStart {
2004
1989
  /**
2005
1990
  * The content of the response.
2006
1991
  */
2007
- content?: Content_2;
1992
+ content: Content_2;
1993
+ event_type: 'content.start';
1994
+ index: number;
2008
1995
  /**
2009
1996
  * The event_id token to be used to resume the interaction stream, from this event.
2010
1997
  */
2011
1998
  event_id?: string;
2012
- event_type?: 'content.start';
2013
- index?: number;
2014
1999
  }
2015
2000
 
2016
2001
  declare interface ContentStop {
2002
+ event_type: 'content.stop';
2003
+ index: number;
2017
2004
  /**
2018
2005
  * The event_id token to be used to resume the interaction stream, from this event.
2019
2006
  */
2020
2007
  event_id?: string;
2021
- event_type?: 'content.stop';
2022
- index?: number;
2023
2008
  }
2024
2009
 
2025
2010
  export declare type ContentUnion = Content | PartUnion[] | PartUnion;
@@ -2582,11 +2567,11 @@ export declare interface DatasetStats {
2582
2567
  * Configuration for the Deep Research agent.
2583
2568
  */
2584
2569
  declare interface DeepResearchAgentConfig {
2570
+ type: 'deep-research';
2585
2571
  /**
2586
2572
  * Whether to include thought summaries in the response.
2587
2573
  */
2588
2574
  thinking_summaries?: 'auto' | 'none';
2589
- type?: 'deep-research';
2590
2575
  }
2591
2576
 
2592
2577
  /** Optional parameters for models.get method. */
@@ -2825,18 +2810,13 @@ declare interface DocumentContent {
2825
2810
  /**
2826
2811
  * The mime type of the document.
2827
2812
  */
2828
- mime_type?: DocumentMimeType;
2813
+ mime_type?: 'application/pdf';
2829
2814
  /**
2830
2815
  * The URI of the document.
2831
2816
  */
2832
2817
  uri?: string;
2833
2818
  }
2834
2819
 
2835
- /**
2836
- * The mime type of the document.
2837
- */
2838
- declare type DocumentMimeType = (string & {}) | 'application/pdf';
2839
-
2840
2820
  declare class Documents extends BaseModule {
2841
2821
  private readonly apiClient;
2842
2822
  constructor(apiClient: ApiClient);
@@ -2922,7 +2902,7 @@ export declare interface DownloadFileParameters {
2922
2902
  * Configuration for dynamic agents.
2923
2903
  */
2924
2904
  declare interface DynamicAgentConfig {
2925
- type?: 'dynamic';
2905
+ type: 'dynamic';
2926
2906
  [k: string]: unknown;
2927
2907
  }
2928
2908
 
@@ -3098,6 +3078,25 @@ export declare interface EmbedContentParameters {
3098
3078
  config?: EmbedContentConfig;
3099
3079
  }
3100
3080
 
3081
+ /** Parameters for the _embed_content method. */
3082
+ export declare interface EmbedContentParametersPrivate {
3083
+ /** ID of the model to use. For a list of models, see `Google models
3084
+ <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_. */
3085
+ model: string;
3086
+ /** The content to embed. Only the `parts.text` fields will be counted.
3087
+ */
3088
+ contents?: ContentListUnion;
3089
+ /** The single content to embed. Only the `parts.text` fields will be counted.
3090
+ */
3091
+ content?: ContentUnion;
3092
+ /** The Vertex embedding API to use.
3093
+ */
3094
+ embeddingApiType?: EmbeddingApiType;
3095
+ /** Configuration that contains optional parameters.
3096
+ */
3097
+ config?: EmbedContentConfig;
3098
+ }
3099
+
3101
3100
  /** Response for the embed_content method. */
3102
3101
  export declare class EmbedContentResponse {
3103
3102
  /** Used to retain the full HTTP response. */
@@ -3111,6 +3110,18 @@ export declare class EmbedContentResponse {
3111
3110
  metadata?: EmbedContentMetadata;
3112
3111
  }
3113
3112
 
3113
+ /** Enum representing the Vertex embedding API to use. */
3114
+ export declare enum EmbeddingApiType {
3115
+ /**
3116
+ * predict API endpoint (default)
3117
+ */
3118
+ PREDICT = "PREDICT",
3119
+ /**
3120
+ * embedContent API Endpoint
3121
+ */
3122
+ EMBED_CONTENT = "EMBED_CONTENT"
3123
+ }
3124
+
3114
3125
  export declare interface EmbeddingsBatchJobSource {
3115
3126
  /** The Gemini Developer API's file resource name of the input data
3116
3127
  (e.g. "files/12345").
@@ -3180,6 +3191,7 @@ export declare enum Environment {
3180
3191
  }
3181
3192
 
3182
3193
  declare interface ErrorEvent_2 {
3194
+ event_type: 'error';
3183
3195
  /**
3184
3196
  * Error message from an interaction.
3185
3197
  */
@@ -3188,7 +3200,6 @@ declare interface ErrorEvent_2 {
3188
3200
  * The event_id token to be used to resume the interaction stream, from this event.
3189
3201
  */
3190
3202
  event_id?: string;
3191
- event_type?: 'error';
3192
3203
  }
3193
3204
 
3194
3205
  declare namespace ErrorEvent_2 {
@@ -3480,17 +3491,21 @@ export declare interface FileSearch {
3480
3491
  * File Search content.
3481
3492
  */
3482
3493
  declare interface FileSearchCallContent {
3483
- type: 'file_search_call';
3484
3494
  /**
3485
3495
  * A unique ID for this specific tool call.
3486
3496
  */
3487
- id?: string;
3497
+ id: string;
3498
+ type: 'file_search_call';
3488
3499
  }
3489
3500
 
3490
3501
  /**
3491
3502
  * File Search result content.
3492
3503
  */
3493
3504
  declare interface FileSearchResultContent {
3505
+ /**
3506
+ * ID to match the ID from the file search call block.
3507
+ */
3508
+ call_id: string;
3494
3509
  type: 'file_search_result';
3495
3510
  /**
3496
3511
  * The results of the File Search.
@@ -4687,7 +4702,7 @@ declare interface GenerationConfig_2 {
4687
4702
  /**
4688
4703
  * The tool choice for the interaction.
4689
4704
  */
4690
- tool_choice?: ToolChoice;
4705
+ tool_choice?: ToolChoiceType | ToolChoiceConfig;
4691
4706
  /**
4692
4707
  * The maximum cumulative probability of tokens to consider when sampling.
4693
4708
  */
@@ -5030,8 +5045,10 @@ export declare interface GoogleRpcStatus {
5030
5045
  message?: string;
5031
5046
  }
5032
5047
 
5033
- /** GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
5048
+ /** Tool to support web search. */
5034
5049
  export declare interface GoogleSearch {
5050
+ /** Different types of search that can be enabled on the GoogleSearch tool. */
5051
+ searchTypes?: SearchTypes;
5035
5052
  /** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: ["amazon.com", "facebook.com"]. This field is not supported in Gemini API. */
5036
5053
  excludeDomains?: string[];
5037
5054
  /** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API. */
@@ -5054,15 +5071,19 @@ declare interface GoogleSearchCallArguments {
5054
5071
  * Google Search content.
5055
5072
  */
5056
5073
  declare interface GoogleSearchCallContent {
5057
- type: 'google_search_call';
5058
5074
  /**
5059
5075
  * A unique ID for this specific tool call.
5060
5076
  */
5061
- id?: string;
5077
+ id: string;
5062
5078
  /**
5063
5079
  * The arguments to pass to Google Search.
5064
5080
  */
5065
- arguments?: GoogleSearchCallArguments;
5081
+ arguments: GoogleSearchCallArguments;
5082
+ type: 'google_search_call';
5083
+ /**
5084
+ * The type of search grounding enabled.
5085
+ */
5086
+ search_type?: 'web_search' | 'image_search';
5066
5087
  }
5067
5088
 
5068
5089
  /**
@@ -5087,19 +5108,19 @@ declare interface GoogleSearchResult {
5087
5108
  * Google Search result content.
5088
5109
  */
5089
5110
  declare interface GoogleSearchResultContent {
5090
- type: 'google_search_result';
5091
5111
  /**
5092
5112
  * ID to match the ID from the google search call block.
5093
5113
  */
5094
- call_id?: string;
5114
+ call_id: string;
5095
5115
  /**
5096
- * Whether the Google Search resulted in an error.
5116
+ * The results of the Google Search.
5097
5117
  */
5098
- is_error?: boolean;
5118
+ result: Array<GoogleSearchResult>;
5119
+ type: 'google_search_result';
5099
5120
  /**
5100
- * The results of the Google Search.
5121
+ * Whether the Google Search resulted in an error.
5101
5122
  */
5102
- result?: Array<GoogleSearchResult>;
5123
+ is_error?: boolean;
5103
5124
  /**
5104
5125
  * The signature of the Google Search result.
5105
5126
  */
@@ -5122,8 +5143,16 @@ export declare interface GoogleTypeDate {
5122
5143
  year?: number;
5123
5144
  }
5124
5145
 
5125
- /** Grounding chunk. */
5146
+ /** A piece of evidence that supports a claim made by the model.
5147
+
5148
+ This is used to show a citation for a claim made by the model. When grounding
5149
+ is enabled, the model returns a `GroundingChunk` that contains a reference to
5150
+ the source of the information. */
5126
5151
  export declare interface GroundingChunk {
5152
+ /** A grounding chunk from an image search result. See the `Image`
5153
+ message for details.
5154
+ */
5155
+ image?: GroundingChunkImage;
5127
5156
  /** Grounding chunk from Google Maps. This field is not supported in Gemini API. */
5128
5157
  maps?: GroundingChunkMaps;
5129
5158
  /** Grounding chunk from context retrieved by the retrieval tools. This field is not supported in Gemini API. */
@@ -5132,6 +5161,22 @@ export declare interface GroundingChunk {
5132
5161
  web?: GroundingChunkWeb;
5133
5162
  }
5134
5163
 
5164
+ /** A piece of evidence that comes from an image search result.
5165
+
5166
+ It contains the URI of the image search result and the URI of the image.
5167
+ This is used to provide the user with a link to the source of the
5168
+ information. */
5169
+ export declare interface GroundingChunkImage {
5170
+ /** The URI of the image search result page. */
5171
+ sourceUri?: string;
5172
+ /** The URI of the image. */
5173
+ imageUri?: string;
5174
+ /** The title of the image search result page. */
5175
+ title?: string;
5176
+ /** The domain of the image search result page. */
5177
+ domain?: string;
5178
+ }
5179
+
5135
5180
  /** Chunk from Google Maps. This data type is not supported in Gemini API. */
5136
5181
  export declare interface GroundingChunkMaps {
5137
5182
  /** Sources used to generate the place answer. This includes review snippets and photos that were used to generate the answer, as well as uris to flag content. */
@@ -5206,12 +5251,19 @@ export declare interface GroundingChunkWeb {
5206
5251
  uri?: string;
5207
5252
  }
5208
5253
 
5209
- /** Metadata returned to client when grounding is enabled. */
5210
5254
  export declare interface GroundingMetadata {
5255
+ /** Optional. The image search queries that were used to generate the
5256
+ content. This field is populated only when the grounding source is Google
5257
+ Search with the Image Search search_type enabled.
5258
+ */
5259
+ imageSearchQueries?: string[];
5260
+ /** A list of supporting references retrieved from the grounding
5261
+ source. This field is populated when the grounding source is Google
5262
+ Search, Vertex AI Search, or Google Maps.
5263
+ */
5264
+ groundingChunks?: GroundingChunk[];
5211
5265
  /** Optional. Output only. Resource name of the Google Maps widget context token to be used with the PlacesContextElement widget to render contextual data. This is populated only for Google Maps grounding. This field is not supported in Gemini API. */
5212
5266
  googleMapsWidgetContextToken?: string;
5213
- /** List of supporting references retrieved from specified grounding source. */
5214
- groundingChunks?: GroundingChunk[];
5215
5267
  /** Optional. List of grounding support. */
5216
5268
  groundingSupports?: GroundingSupport[];
5217
5269
  /** Optional. Output only. Retrieval metadata. */
@@ -5535,6 +5587,12 @@ export declare interface ImageConfig {
5535
5587
  /** Controls the generation of people. Supported values are:
5536
5588
  ALLOW_ALL, ALLOW_ADULT, ALLOW_NONE. */
5537
5589
  personGeneration?: string;
5590
+ /** Controls whether prominent people (celebrities)
5591
+ generation is allowed. If used with personGeneration, personGeneration
5592
+ enum would take precedence. For instance, if ALLOW_NONE is set, all person
5593
+ generation would be blocked. If this field is unspecified, the default
5594
+ behavior is to allow prominent people. */
5595
+ prominentPeople?: ProminentPeople;
5538
5596
  /** MIME type of the generated image. This field is not
5539
5597
  supported in Gemini API. */
5540
5598
  outputMimeType?: string;
@@ -5547,8 +5605,8 @@ export declare interface ImageConfig {
5547
5605
  * The configuration for image interaction.
5548
5606
  */
5549
5607
  declare interface ImageConfig_2 {
5550
- aspect_ratio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9';
5551
- image_size?: '1K' | '2K' | '4K';
5608
+ aspect_ratio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9' | '1:8' | '8:1' | '1:4' | '4:1';
5609
+ image_size?: '1K' | '2K' | '4K' | '512';
5552
5610
  }
5553
5611
 
5554
5612
  /**
@@ -5563,7 +5621,7 @@ declare interface ImageContent {
5563
5621
  /**
5564
5622
  * The mime type of the image.
5565
5623
  */
5566
- mime_type?: ImageMimeType;
5624
+ mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif';
5567
5625
  /**
5568
5626
  * The resolution of the media.
5569
5627
  */
@@ -5574,11 +5632,6 @@ declare interface ImageContent {
5574
5632
  uri?: string;
5575
5633
  }
5576
5634
 
5577
- /**
5578
- * The mime type of the image.
5579
- */
5580
- declare type ImageMimeType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif' | (string & {});
5581
-
5582
5635
  /** Enum that specifies the language of the text in the prompt. */
5583
5636
  export declare enum ImagePromptLanguage {
5584
5637
  /**
@@ -5615,6 +5668,10 @@ export declare enum ImagePromptLanguage {
5615
5668
  es = "es"
5616
5669
  }
5617
5670
 
5671
+ /** Image search for grounding and related configurations. */
5672
+ export declare interface ImageSearch {
5673
+ }
5674
+
5618
5675
  /** Optional parameters for importing a file. */
5619
5676
  export declare interface ImportFileConfig {
5620
5677
  /** Used to override HTTP request options. */
@@ -5718,19 +5775,32 @@ declare interface Interaction {
5718
5775
  * Output only. A unique identifier for the interaction completion.
5719
5776
  */
5720
5777
  id: string;
5778
+ /**
5779
+ * Output only. The time at which the response was created in ISO 8601 format
5780
+ * (YYYY-MM-DDThh:mm:ssZ).
5781
+ */
5782
+ created: string;
5721
5783
  /**
5722
5784
  * Output only. The status of the interaction.
5723
5785
  */
5724
5786
  status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
5787
+ /**
5788
+ * Output only. The time at which the response was last updated in ISO 8601 format
5789
+ * (YYYY-MM-DDThh:mm:ssZ).
5790
+ */
5791
+ updated: string;
5725
5792
  /**
5726
5793
  * The name of the `Agent` used for generating the interaction.
5727
5794
  */
5728
5795
  agent?: (string & {}) | 'deep-research-pro-preview-12-2025';
5729
5796
  /**
5730
- * Output only. The time at which the response was created in ISO 8601 format
5731
- * (YYYY-MM-DDThh:mm:ssZ).
5797
+ * Configuration for the agent.
5798
+ */
5799
+ agent_config?: DynamicAgentConfig | DeepResearchAgentConfig;
5800
+ /**
5801
+ * The inputs for the interaction.
5732
5802
  */
5733
- created?: string;
5803
+ input?: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
5734
5804
  /**
5735
5805
  * The name of the `Model` used for generating the interaction.
5736
5806
  */
@@ -5743,15 +5813,31 @@ declare interface Interaction {
5743
5813
  * The ID of the previous interaction, if any.
5744
5814
  */
5745
5815
  previous_interaction_id?: string;
5816
+ /**
5817
+ * Enforces that the generated response is a JSON object that complies with
5818
+ * the JSON schema specified in this field.
5819
+ */
5820
+ response_format?: unknown;
5821
+ /**
5822
+ * The mime type of the response. This is required if response_format is set.
5823
+ */
5824
+ response_mime_type?: string;
5825
+ /**
5826
+ * The requested modalities of the response (TEXT, IMAGE, AUDIO).
5827
+ */
5828
+ response_modalities?: Array<'text' | 'image' | 'audio'>;
5746
5829
  /**
5747
5830
  * Output only. The role of the interaction.
5748
5831
  */
5749
5832
  role?: string;
5750
5833
  /**
5751
- * Output only. The time at which the response was last updated in ISO 8601 format
5752
- * (YYYY-MM-DDThh:mm:ssZ).
5834
+ * System instruction for the interaction.
5835
+ */
5836
+ system_instruction?: string;
5837
+ /**
5838
+ * A list of tool declarations the model may call during interaction.
5753
5839
  */
5754
- updated?: string;
5840
+ tools?: Array<Tool_2>;
5755
5841
  /**
5756
5842
  * Output only. Statistics on the interaction request's token usage.
5757
5843
  */
@@ -5766,15 +5852,16 @@ declare interface InteractionCancelParams {
5766
5852
  }
5767
5853
 
5768
5854
  declare interface InteractionCompleteEvent {
5855
+ event_type: 'interaction.complete';
5769
5856
  /**
5770
- * The event_id token to be used to resume the interaction stream, from this event.
5857
+ * The completed interaction with empty outputs to reduce the payload size.
5858
+ * Use the preceding ContentDelta events for the actual output.
5771
5859
  */
5772
- event_id?: string;
5773
- event_type?: 'interaction.complete';
5860
+ interaction: Interaction;
5774
5861
  /**
5775
- * The Interaction resource.
5862
+ * The event_id token to be used to resume the interaction stream, from this event.
5776
5863
  */
5777
- interaction?: Interaction;
5864
+ event_id?: string;
5778
5865
  }
5779
5866
 
5780
5867
  declare type InteractionCreateParams = CreateModelInteractionParamsNonStreaming | CreateModelInteractionParamsStreaming | CreateAgentInteractionParamsNonStreaming | CreateAgentInteractionParamsStreaming;
@@ -5832,7 +5919,7 @@ export declare class Interactions extends BaseInteractions {
5832
5919
  }
5833
5920
 
5834
5921
  export declare namespace Interactions {
5835
- export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type AudioMimeType as AudioMimeType, 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 DocumentMimeType as DocumentMimeType, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, 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 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 ImageMimeType as ImageMimeType, 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 SpeechConfig_2 as SpeechConfig, type TextContent as TextContent, type ThinkingLevel_2 as ThinkingLevel, type ThoughtContent as ThoughtContent, type Tool_2 as Tool, type ToolChoice as ToolChoice, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type Turn as Turn, 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 VideoMimeType as VideoMimeType, 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, };
5922
+ 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 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 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 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 URLContextCallArguments as URLContextCallArguments, type URLContextCallContent as URLContextCallContent, type URLContextResult as URLContextResult, type URLContextResultContent as URLContextResultContent, type Usage as Usage, type VideoContent as VideoContent, 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, };
5836
5923
  }
5837
5924
 
5838
5925
  declare namespace InteractionsAPI {
@@ -5842,7 +5929,6 @@ declare namespace InteractionsAPI {
5842
5929
  AllowedTools,
5843
5930
  Annotation,
5844
5931
  AudioContent,
5845
- AudioMimeType,
5846
5932
  CodeExecutionCallArguments,
5847
5933
  CodeExecutionCallContent,
5848
5934
  CodeExecutionResultContent,
@@ -5852,7 +5938,6 @@ declare namespace InteractionsAPI {
5852
5938
  ContentStop,
5853
5939
  DeepResearchAgentConfig,
5854
5940
  DocumentContent,
5855
- DocumentMimeType,
5856
5941
  DynamicAgentConfig,
5857
5942
  ErrorEvent_2 as ErrorEvent,
5858
5943
  FileSearchCallContent,
@@ -5867,7 +5952,6 @@ declare namespace InteractionsAPI {
5867
5952
  GoogleSearchResultContent,
5868
5953
  ImageConfig_2 as ImageConfig,
5869
5954
  ImageContent,
5870
- ImageMimeType,
5871
5955
  Interaction,
5872
5956
  InteractionCompleteEvent,
5873
5957
  InteractionSSEEvent,
@@ -5881,7 +5965,6 @@ declare namespace InteractionsAPI {
5881
5965
  ThinkingLevel_2 as ThinkingLevel,
5882
5966
  ThoughtContent,
5883
5967
  Tool_2 as Tool,
5884
- ToolChoice,
5885
5968
  ToolChoiceConfig,
5886
5969
  ToolChoiceType,
5887
5970
  Turn,
@@ -5891,7 +5974,6 @@ declare namespace InteractionsAPI {
5891
5974
  URLContextResultContent,
5892
5975
  Usage,
5893
5976
  VideoContent,
5894
- VideoMimeType,
5895
5977
  InteractionDeleteResponse,
5896
5978
  InteractionCreateParams,
5897
5979
  BaseCreateModelInteractionParams,
@@ -5912,25 +5994,25 @@ declare namespace InteractionsAPI {
5912
5994
  declare type InteractionSSEEvent = InteractionStartEvent | InteractionCompleteEvent | InteractionStatusUpdate | ContentStart | ContentDelta | ContentStop | ErrorEvent_2;
5913
5995
 
5914
5996
  declare interface InteractionStartEvent {
5997
+ event_type: 'interaction.start';
5915
5998
  /**
5916
- * The event_id token to be used to resume the interaction stream, from this event.
5999
+ * The Interaction resource.
5917
6000
  */
5918
- event_id?: string;
5919
- event_type?: 'interaction.start';
6001
+ interaction: Interaction;
5920
6002
  /**
5921
- * The Interaction resource.
6003
+ * The event_id token to be used to resume the interaction stream, from this event.
5922
6004
  */
5923
- interaction?: Interaction;
6005
+ event_id?: string;
5924
6006
  }
5925
6007
 
5926
6008
  declare interface InteractionStatusUpdate {
6009
+ event_type: 'interaction.status_update';
6010
+ interaction_id: string;
6011
+ status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
5927
6012
  /**
5928
6013
  * The event_id token to be used to resume the interaction stream, from this event.
5929
6014
  */
5930
6015
  event_id?: string;
5931
- event_type?: 'interaction.status_update';
5932
- interaction_id?: string;
5933
- status?: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
5934
6016
  }
5935
6017
 
5936
6018
  /** Parameters for the private _Register method. */
@@ -7100,6 +7182,14 @@ export declare enum MaskReferenceMode {
7100
7182
  MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
7101
7183
  }
7102
7184
 
7185
+ /** A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 5. This data type is not supported in Vertex AI. */
7186
+ export declare interface McpServer {
7187
+ /** The name of the MCPServer. */
7188
+ name?: string;
7189
+ /** A transport that can stream HTTP requests and responses. */
7190
+ streamableHttpTransport?: StreamableHttpTransport;
7191
+ }
7192
+
7103
7193
  /**
7104
7194
  * MCPServer tool call content.
7105
7195
  */
@@ -7308,7 +7398,7 @@ export declare interface Model {
7308
7398
  /**
7309
7399
  * The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
7310
7400
  */
7311
- declare type Model_2 = 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | (string & {});
7401
+ declare type Model_2 = 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | (string & {});
7312
7402
 
7313
7403
  /** Configuration for Model Armor integrations of prompt and responses. This data type is not supported in Gemini API. */
7314
7404
  export declare interface ModelArmorConfig {
@@ -7321,6 +7411,28 @@ export declare interface ModelArmorConfig {
7321
7411
  export declare class Models extends BaseModule {
7322
7412
  private readonly apiClient;
7323
7413
  constructor(apiClient: ApiClient);
7414
+ /**
7415
+ * Calculates embeddings for the given contents.
7416
+ *
7417
+ * @param params - The parameters for embedding contents.
7418
+ * @return The response from the API.
7419
+ *
7420
+ * @example
7421
+ * ```ts
7422
+ * const response = await ai.models.embedContent({
7423
+ * model: 'text-embedding-004',
7424
+ * contents: [
7425
+ * 'What is your name?',
7426
+ * 'What is your favorite color?',
7427
+ * ],
7428
+ * config: {
7429
+ * outputDimensionality: 64,
7430
+ * },
7431
+ * });
7432
+ * console.log(response);
7433
+ * ```
7434
+ */
7435
+ embedContent: (params: types.EmbedContentParameters) => Promise<types.EmbedContentResponse>;
7324
7436
  /**
7325
7437
  * Makes an API request to generate content with a given model.
7326
7438
  *
@@ -7531,7 +7643,7 @@ export declare class Models extends BaseModule {
7531
7643
  * console.log(response);
7532
7644
  * ```
7533
7645
  */
7534
- embedContent(params: types.EmbedContentParameters): Promise<types.EmbedContentResponse>;
7646
+ private embedContentInternal;
7535
7647
  /**
7536
7648
  * Private method for generating images.
7537
7649
  */
@@ -8207,6 +8319,22 @@ export declare interface ProductImage {
8207
8319
  productImage?: Image_2;
8208
8320
  }
8209
8321
 
8322
+ /** Enum for controlling whether the model can generate images of prominent people (celebrities). */
8323
+ export declare enum ProminentPeople {
8324
+ /**
8325
+ * Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
8326
+ */
8327
+ PROMINENT_PEOPLE_UNSPECIFIED = "PROMINENT_PEOPLE_UNSPECIFIED",
8328
+ /**
8329
+ * Allows the model to generate images of prominent people.
8330
+ */
8331
+ ALLOW_PROMINENT_PEOPLE = "ALLOW_PROMINENT_PEOPLE",
8332
+ /**
8333
+ * Prevents the model from generating images of prominent people.
8334
+ */
8335
+ BLOCK_PROMINENT_PEOPLE = "BLOCK_PROMINENT_PEOPLE"
8336
+ }
8337
+
8210
8338
  /**
8211
8339
  * @license
8212
8340
  * Copyright 2025 Google LLC
@@ -8759,6 +8887,15 @@ export declare interface SearchEntryPoint {
8759
8887
  sdkBlob?: string;
8760
8888
  }
8761
8889
 
8890
+ /** Tool to support computer use. */
8891
+ export declare interface SearchTypes {
8892
+ /** Setting this field enables web search. Only text results are
8893
+ returned. */
8894
+ webSearch?: WebSearch;
8895
+ /** Setting this field enables image search. Image bytes are returned. */
8896
+ imageSearch?: ImageSearch;
8897
+ }
8898
+
8762
8899
  /** Segment of the content. */
8763
8900
  export declare interface Segment {
8764
8901
  /** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */
@@ -9121,6 +9258,20 @@ declare class Stream<Item> implements AsyncIterable<Item> {
9121
9258
  toReadableStream(): _ReadableStream_2;
9122
9259
  }
9123
9260
 
9261
+ /** A transport that can stream HTTP requests and responses. Next ID: 6. This data type is not supported in Vertex AI. */
9262
+ export declare interface StreamableHttpTransport {
9263
+ /** Optional: Fields for authentication headers, timeouts, etc., if needed. */
9264
+ headers?: Record<string, string>;
9265
+ /** Timeout for SSE read operations. */
9266
+ sseReadTimeout?: string;
9267
+ /** Whether to close the client session when the transport closes. */
9268
+ terminateOnClose?: boolean;
9269
+ /** HTTP timeout for regular operations. */
9270
+ timeout?: string;
9271
+ /** The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp". */
9272
+ url?: string;
9273
+ }
9274
+
9124
9275
  /** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
9125
9276
  export declare interface StringList {
9126
9277
  /** The string values of the metadata to store. */
@@ -9306,15 +9457,15 @@ export declare interface TestTableItem {
9306
9457
  * A text content block.
9307
9458
  */
9308
9459
  declare interface TextContent {
9460
+ /**
9461
+ * The text content.
9462
+ */
9463
+ text: string;
9309
9464
  type: 'text';
9310
9465
  /**
9311
9466
  * Citation information for model-generated content.
9312
9467
  */
9313
9468
  annotations?: Array<Annotation>;
9314
- /**
9315
- * The text content.
9316
- */
9317
- text?: string;
9318
9469
  }
9319
9470
 
9320
9471
  /** The thinking features configuration. */
@@ -9480,6 +9631,8 @@ export declare interface Tool {
9480
9631
  computerUse?: ComputerUse;
9481
9632
  /** Optional. Tool to retrieve knowledge from the File Search Stores. */
9482
9633
  fileSearch?: FileSearch;
9634
+ /** Enables the model to execute Google Search as part of generation. */
9635
+ googleSearch?: GoogleSearch;
9483
9636
  /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
9484
9637
  codeExecution?: ToolCodeExecution;
9485
9638
  /** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
@@ -9488,12 +9641,12 @@ export declare interface Tool {
9488
9641
  functionDeclarations?: FunctionDeclaration[];
9489
9642
  /** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
9490
9643
  googleMaps?: GoogleMaps;
9491
- /** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
9492
- googleSearch?: GoogleSearch;
9493
9644
  /** Optional. Specialized retrieval tool that is powered by Google Search. */
9494
9645
  googleSearchRetrieval?: GoogleSearchRetrieval;
9495
9646
  /** Optional. Tool to support URL context retrieval. */
9496
9647
  urlContext?: UrlContext;
9648
+ /** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
9649
+ mcpServers?: McpServer[];
9497
9650
  }
9498
9651
 
9499
9652
  /**
@@ -9507,6 +9660,10 @@ declare namespace Tool_2 {
9507
9660
  */
9508
9661
  interface GoogleSearch {
9509
9662
  type: 'google_search';
9663
+ /**
9664
+ * The types of search grounding to enable.
9665
+ */
9666
+ search_types?: Array<'web_search' | 'image_search'>;
9510
9667
  }
9511
9668
  /**
9512
9669
  * A tool that can be used by the model to execute code.
@@ -9580,13 +9737,11 @@ declare namespace Tool_2 {
9580
9737
  }
9581
9738
 
9582
9739
  /**
9583
- * The configuration for tool choice.
9740
+ * The tool choice configuration containing allowed tools.
9584
9741
  */
9585
- declare type ToolChoice = ToolChoiceType | ToolChoiceConfig;
9586
-
9587
9742
  declare interface ToolChoiceConfig {
9588
9743
  /**
9589
- * The configuration for allowed tools.
9744
+ * The allowed tools.
9590
9745
  */
9591
9746
  allowed_tools?: AllowedTools;
9592
9747
  }
@@ -9997,10 +10152,10 @@ declare namespace types {
9997
10152
  Language,
9998
10153
  FunctionResponseScheduling,
9999
10154
  Type,
10155
+ PhishBlockThreshold,
10000
10156
  ApiSpec,
10001
10157
  AuthType,
10002
10158
  HttpElementLocation,
10003
- PhishBlockThreshold,
10004
10159
  Behavior,
10005
10160
  DynamicRetrievalConfigMode,
10006
10161
  FunctionCallingConfigMode,
@@ -10024,6 +10179,8 @@ declare namespace types {
10024
10179
  ResourceScope,
10025
10180
  FeatureSelectionPreference,
10026
10181
  Environment,
10182
+ ProminentPeople,
10183
+ EmbeddingApiType,
10027
10184
  SafetyFilterLevel,
10028
10185
  PersonGeneration,
10029
10186
  ImagePromptLanguage,
@@ -10070,6 +10227,11 @@ declare namespace types {
10070
10227
  ModelSelectionConfig,
10071
10228
  ComputerUse,
10072
10229
  FileSearch,
10230
+ WebSearch,
10231
+ ImageSearch,
10232
+ SearchTypes,
10233
+ Interval,
10234
+ GoogleSearch,
10073
10235
  ApiAuthApiKeyConfig,
10074
10236
  ApiAuth,
10075
10237
  ApiKeyConfig,
@@ -10096,11 +10258,11 @@ declare namespace types {
10096
10258
  EnterpriseWebSearch,
10097
10259
  FunctionDeclaration,
10098
10260
  GoogleMaps,
10099
- Interval,
10100
- GoogleSearch,
10101
10261
  DynamicRetrievalConfig,
10102
10262
  GoogleSearchRetrieval,
10103
10263
  UrlContext,
10264
+ StreamableHttpTransport,
10265
+ McpServer,
10104
10266
  Tool,
10105
10267
  LatLng,
10106
10268
  RetrievalConfig,
@@ -10127,6 +10289,7 @@ declare namespace types {
10127
10289
  GoogleTypeDate,
10128
10290
  Citation,
10129
10291
  CitationMetadata,
10292
+ GroundingChunkImage,
10130
10293
  GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
10131
10294
  GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
10132
10295
  GroundingChunkMapsPlaceAnswerSources,
@@ -10156,7 +10319,7 @@ declare namespace types {
10156
10319
  ReferenceImage,
10157
10320
  EditImageParameters,
10158
10321
  EmbedContentConfig,
10159
- EmbedContentParameters,
10322
+ EmbedContentParametersPrivate,
10160
10323
  ContentEmbeddingStatistics,
10161
10324
  ContentEmbedding,
10162
10325
  EmbedContentMetadata,
@@ -10424,6 +10587,7 @@ declare namespace types {
10424
10587
  CountTokensResult,
10425
10588
  ComputeTokensResult,
10426
10589
  CreateTuningJobParameters,
10590
+ EmbedContentParameters,
10427
10591
  UploadToFileSearchStoreResponse,
10428
10592
  UploadToFileSearchStoreOperation,
10429
10593
  BlobImageUnion,
@@ -10736,15 +10900,15 @@ declare interface URLContextCallArguments {
10736
10900
  * URL context content.
10737
10901
  */
10738
10902
  declare interface URLContextCallContent {
10739
- type: 'url_context_call';
10740
10903
  /**
10741
10904
  * A unique ID for this specific tool call.
10742
10905
  */
10743
- id?: string;
10906
+ id: string;
10744
10907
  /**
10745
10908
  * The arguments to pass to the URL context.
10746
10909
  */
10747
- arguments?: URLContextCallArguments;
10910
+ arguments: URLContextCallArguments;
10911
+ type: 'url_context_call';
10748
10912
  }
10749
10913
 
10750
10914
  /** Metadata related to url context retrieval tool. */
@@ -10771,19 +10935,19 @@ declare interface URLContextResult {
10771
10935
  * URL context result content.
10772
10936
  */
10773
10937
  declare interface URLContextResultContent {
10774
- type: 'url_context_result';
10775
10938
  /**
10776
10939
  * ID to match the ID from the url context call block.
10777
10940
  */
10778
- call_id?: string;
10941
+ call_id: string;
10779
10942
  /**
10780
- * Whether the URL context resulted in an error.
10943
+ * The results of the URL context.
10781
10944
  */
10782
- is_error?: boolean;
10945
+ result: Array<URLContextResult>;
10946
+ type: 'url_context_result';
10783
10947
  /**
10784
- * The results of the URL context.
10948
+ * Whether the URL context resulted in an error.
10785
10949
  */
10786
- result?: Array<URLContextResult>;
10950
+ is_error?: boolean;
10787
10951
  /**
10788
10952
  * The signature of the URL context result.
10789
10953
  */
@@ -11070,7 +11234,7 @@ declare interface VideoContent {
11070
11234
  /**
11071
11235
  * The mime type of the video.
11072
11236
  */
11073
- mime_type?: VideoMimeType;
11237
+ mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
11074
11238
  /**
11075
11239
  * The resolution of the media.
11076
11240
  */
@@ -11152,11 +11316,6 @@ export declare interface VideoMetadata {
11152
11316
  startOffset?: string;
11153
11317
  }
11154
11318
 
11155
- /**
11156
- * The mime type of the video.
11157
- */
11158
- declare type VideoMimeType = 'video/mp4' | 'video/mpeg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/mpg' | 'video/webm' | 'video/wmv' | 'video/3gpp' | (string & {});
11159
-
11160
11319
  /** Voice activity signal. */
11161
11320
  export declare interface VoiceActivity {
11162
11321
  /** The type of the voice activity signal. */
@@ -11191,6 +11350,12 @@ export declare interface VoiceConfig {
11191
11350
  prebuiltVoiceConfig?: PrebuiltVoiceConfig;
11192
11351
  }
11193
11352
 
11353
+ /** Standard web search for grounding and related configurations.
11354
+
11355
+ Only text results are returned. */
11356
+ export declare interface WebSearch {
11357
+ }
11358
+
11194
11359
  declare interface WebSocket_2 {
11195
11360
  /**
11196
11361
  * Connects the socket to the server.