@google/genai 1.33.0 → 1.34.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/README.md +233 -1
- package/dist/genai.d.ts +65 -133
- package/dist/index.cjs +53 -43
- package/dist/index.mjs +53 -43
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +53 -46
- package/dist/node/index.mjs +53 -46
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +65 -133
- package/dist/web/index.mjs +53 -46
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +65 -133
- package/package.json +1 -1
package/dist/web/web.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ export declare interface ApiAuthApiKeyConfig {
|
|
|
119
119
|
* The ApiClient class is used to send requests to the Gemini API or Vertex AI
|
|
120
120
|
* endpoints.
|
|
121
121
|
*/
|
|
122
|
-
declare class ApiClient {
|
|
122
|
+
declare class ApiClient implements GeminiNextGenAPIClientAdapter {
|
|
123
123
|
readonly clientOptions: ApiClientInitOptions;
|
|
124
124
|
constructor(opts: ApiClientInitOptions);
|
|
125
125
|
/**
|
|
@@ -140,6 +140,7 @@ declare class ApiClient {
|
|
|
140
140
|
isVertexAI(): boolean;
|
|
141
141
|
getProject(): string | undefined;
|
|
142
142
|
getLocation(): string | undefined;
|
|
143
|
+
getAuthHeaders(): Promise<Headers>;
|
|
143
144
|
getApiVersion(): string;
|
|
144
145
|
getBaseUrl(): string;
|
|
145
146
|
getRequestUrl(): string;
|
|
@@ -415,9 +416,6 @@ export declare interface AudioChunk {
|
|
|
415
416
|
* An audio content block.
|
|
416
417
|
*/
|
|
417
418
|
declare interface AudioContent {
|
|
418
|
-
/**
|
|
419
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
420
|
-
*/
|
|
421
419
|
type: 'audio';
|
|
422
420
|
data?: string;
|
|
423
421
|
/**
|
|
@@ -703,6 +701,7 @@ declare class BaseGeminiNextGenAPIClient {
|
|
|
703
701
|
private encoder;
|
|
704
702
|
protected idempotencyHeader?: string;
|
|
705
703
|
private _options;
|
|
704
|
+
private clientAdapter;
|
|
706
705
|
/**
|
|
707
706
|
* API Client for interfacing with the Gemini Next Gen API API.
|
|
708
707
|
*
|
|
@@ -716,7 +715,7 @@ declare class BaseGeminiNextGenAPIClient {
|
|
|
716
715
|
* @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
717
716
|
* @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
718
717
|
*/
|
|
719
|
-
constructor({ baseURL, apiKey, apiVersion, ...opts }
|
|
718
|
+
constructor({ baseURL, apiKey, apiVersion, ...opts }: ClientOptions);
|
|
720
719
|
/**
|
|
721
720
|
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
722
721
|
*/
|
|
@@ -738,6 +737,7 @@ declare class BaseGeminiNextGenAPIClient {
|
|
|
738
737
|
buildURL(path: string, query: Record<string, unknown> | null | undefined, defaultBaseURL?: string | undefined): string;
|
|
739
738
|
/**
|
|
740
739
|
* Used as a callback for mutating the given `FinalRequestOptions` object.
|
|
740
|
+
|
|
741
741
|
*/
|
|
742
742
|
protected prepareOptions(options: FinalRequestOptions): Promise<void>;
|
|
743
743
|
/**
|
|
@@ -1578,6 +1578,10 @@ declare interface ClientOptions {
|
|
|
1578
1578
|
* Defaults to globalThis.console.
|
|
1579
1579
|
*/
|
|
1580
1580
|
logger?: Logger | undefined;
|
|
1581
|
+
/**
|
|
1582
|
+
* The adapter to the parent API client instance (for accessing auth, project, location)
|
|
1583
|
+
*/
|
|
1584
|
+
clientAdapter: GeminiNextGenAPIClientAdapter;
|
|
1581
1585
|
}
|
|
1582
1586
|
|
|
1583
1587
|
/**
|
|
@@ -1598,9 +1602,6 @@ declare interface CodeExecutionCallArguments {
|
|
|
1598
1602
|
* Code execution content.
|
|
1599
1603
|
*/
|
|
1600
1604
|
declare interface CodeExecutionCallContent {
|
|
1601
|
-
/**
|
|
1602
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1603
|
-
*/
|
|
1604
1605
|
type: 'code_execution_call';
|
|
1605
1606
|
/**
|
|
1606
1607
|
* A unique ID for this specific tool call.
|
|
@@ -1624,9 +1625,6 @@ export declare interface CodeExecutionResult {
|
|
|
1624
1625
|
* Code execution result content.
|
|
1625
1626
|
*/
|
|
1626
1627
|
declare interface CodeExecutionResultContent {
|
|
1627
|
-
/**
|
|
1628
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1629
|
-
*/
|
|
1630
1628
|
type: 'code_execution_result';
|
|
1631
1629
|
/**
|
|
1632
1630
|
* ID to match the ID from the code execution call block.
|
|
@@ -1732,9 +1730,6 @@ declare interface ContentDelta {
|
|
|
1732
1730
|
|
|
1733
1731
|
declare namespace ContentDelta {
|
|
1734
1732
|
interface TextDelta {
|
|
1735
|
-
/**
|
|
1736
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1737
|
-
*/
|
|
1738
1733
|
type: 'text';
|
|
1739
1734
|
/**
|
|
1740
1735
|
* Citation information for model-generated content.
|
|
@@ -1743,9 +1738,6 @@ declare namespace ContentDelta {
|
|
|
1743
1738
|
text?: string;
|
|
1744
1739
|
}
|
|
1745
1740
|
interface ImageDelta {
|
|
1746
|
-
/**
|
|
1747
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1748
|
-
*/
|
|
1749
1741
|
type: 'image';
|
|
1750
1742
|
data?: string;
|
|
1751
1743
|
/**
|
|
@@ -1755,13 +1747,10 @@ declare namespace ContentDelta {
|
|
|
1755
1747
|
/**
|
|
1756
1748
|
* The resolution of the media.
|
|
1757
1749
|
*/
|
|
1758
|
-
resolution?: 'low' | 'medium' | 'high';
|
|
1750
|
+
resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
|
|
1759
1751
|
uri?: string;
|
|
1760
1752
|
}
|
|
1761
1753
|
interface AudioDelta {
|
|
1762
|
-
/**
|
|
1763
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1764
|
-
*/
|
|
1765
1754
|
type: 'audio';
|
|
1766
1755
|
data?: string;
|
|
1767
1756
|
/**
|
|
@@ -1771,18 +1760,15 @@ declare namespace ContentDelta {
|
|
|
1771
1760
|
uri?: string;
|
|
1772
1761
|
}
|
|
1773
1762
|
interface DocumentDelta {
|
|
1774
|
-
/**
|
|
1775
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1776
|
-
*/
|
|
1777
1763
|
type: 'document';
|
|
1778
1764
|
data?: string;
|
|
1779
|
-
|
|
1765
|
+
/**
|
|
1766
|
+
* The mime type of the document.
|
|
1767
|
+
*/
|
|
1768
|
+
mime_type?: InteractionsAPI.DocumentMimeType;
|
|
1780
1769
|
uri?: string;
|
|
1781
1770
|
}
|
|
1782
1771
|
interface VideoDelta {
|
|
1783
|
-
/**
|
|
1784
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1785
|
-
*/
|
|
1786
1772
|
type: 'video';
|
|
1787
1773
|
data?: string;
|
|
1788
1774
|
/**
|
|
@@ -1792,13 +1778,10 @@ declare namespace ContentDelta {
|
|
|
1792
1778
|
/**
|
|
1793
1779
|
* The resolution of the media.
|
|
1794
1780
|
*/
|
|
1795
|
-
resolution?: 'low' | 'medium' | 'high';
|
|
1781
|
+
resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
|
|
1796
1782
|
uri?: string;
|
|
1797
1783
|
}
|
|
1798
1784
|
interface ThoughtSummaryDelta {
|
|
1799
|
-
/**
|
|
1800
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1801
|
-
*/
|
|
1802
1785
|
type: 'thought_summary';
|
|
1803
1786
|
/**
|
|
1804
1787
|
* A text content block.
|
|
@@ -1806,9 +1789,6 @@ declare namespace ContentDelta {
|
|
|
1806
1789
|
content?: InteractionsAPI.TextContent | InteractionsAPI.ImageContent;
|
|
1807
1790
|
}
|
|
1808
1791
|
interface ThoughtSignatureDelta {
|
|
1809
|
-
/**
|
|
1810
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1811
|
-
*/
|
|
1812
1792
|
type: 'thought_signature';
|
|
1813
1793
|
/**
|
|
1814
1794
|
* Signature to match the backend source to be part of the generation.
|
|
@@ -1816,9 +1796,6 @@ declare namespace ContentDelta {
|
|
|
1816
1796
|
signature?: string;
|
|
1817
1797
|
}
|
|
1818
1798
|
interface FunctionCallDelta {
|
|
1819
|
-
/**
|
|
1820
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1821
|
-
*/
|
|
1822
1799
|
type: 'function_call';
|
|
1823
1800
|
/**
|
|
1824
1801
|
* A unique ID for this specific tool call.
|
|
@@ -1830,9 +1807,6 @@ declare namespace ContentDelta {
|
|
|
1830
1807
|
name?: string;
|
|
1831
1808
|
}
|
|
1832
1809
|
interface FunctionResultDelta {
|
|
1833
|
-
/**
|
|
1834
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1835
|
-
*/
|
|
1836
1810
|
type: 'function_result';
|
|
1837
1811
|
/**
|
|
1838
1812
|
* ID to match the ID from the function call block.
|
|
@@ -1847,13 +1821,10 @@ declare namespace ContentDelta {
|
|
|
1847
1821
|
}
|
|
1848
1822
|
namespace FunctionResultDelta {
|
|
1849
1823
|
interface Items {
|
|
1850
|
-
items?: Array<string | InteractionsAPI.ImageContent>;
|
|
1824
|
+
items?: Array<string | InteractionsAPI.ImageContent | unknown>;
|
|
1851
1825
|
}
|
|
1852
1826
|
}
|
|
1853
1827
|
interface CodeExecutionCallDelta {
|
|
1854
|
-
/**
|
|
1855
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1856
|
-
*/
|
|
1857
1828
|
type: 'code_execution_call';
|
|
1858
1829
|
/**
|
|
1859
1830
|
* A unique ID for this specific tool call.
|
|
@@ -1865,9 +1836,6 @@ declare namespace ContentDelta {
|
|
|
1865
1836
|
arguments?: InteractionsAPI.CodeExecutionCallArguments;
|
|
1866
1837
|
}
|
|
1867
1838
|
interface CodeExecutionResultDelta {
|
|
1868
|
-
/**
|
|
1869
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1870
|
-
*/
|
|
1871
1839
|
type: 'code_execution_result';
|
|
1872
1840
|
/**
|
|
1873
1841
|
* ID to match the ID from the function call block.
|
|
@@ -1878,9 +1846,6 @@ declare namespace ContentDelta {
|
|
|
1878
1846
|
signature?: string;
|
|
1879
1847
|
}
|
|
1880
1848
|
interface URLContextCallDelta {
|
|
1881
|
-
/**
|
|
1882
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1883
|
-
*/
|
|
1884
1849
|
type: 'url_context_call';
|
|
1885
1850
|
/**
|
|
1886
1851
|
* A unique ID for this specific tool call.
|
|
@@ -1892,9 +1857,6 @@ declare namespace ContentDelta {
|
|
|
1892
1857
|
arguments?: InteractionsAPI.URLContextCallArguments;
|
|
1893
1858
|
}
|
|
1894
1859
|
interface URLContextResultDelta {
|
|
1895
|
-
/**
|
|
1896
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1897
|
-
*/
|
|
1898
1860
|
type: 'url_context_result';
|
|
1899
1861
|
/**
|
|
1900
1862
|
* ID to match the ID from the function call block.
|
|
@@ -1905,9 +1867,6 @@ declare namespace ContentDelta {
|
|
|
1905
1867
|
signature?: string;
|
|
1906
1868
|
}
|
|
1907
1869
|
interface GoogleSearchCallDelta {
|
|
1908
|
-
/**
|
|
1909
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1910
|
-
*/
|
|
1911
1870
|
type: 'google_search_call';
|
|
1912
1871
|
/**
|
|
1913
1872
|
* A unique ID for this specific tool call.
|
|
@@ -1919,9 +1878,6 @@ declare namespace ContentDelta {
|
|
|
1919
1878
|
arguments?: InteractionsAPI.GoogleSearchCallArguments;
|
|
1920
1879
|
}
|
|
1921
1880
|
interface GoogleSearchResultDelta {
|
|
1922
|
-
/**
|
|
1923
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1924
|
-
*/
|
|
1925
1881
|
type: 'google_search_result';
|
|
1926
1882
|
/**
|
|
1927
1883
|
* ID to match the ID from the function call block.
|
|
@@ -1932,9 +1888,6 @@ declare namespace ContentDelta {
|
|
|
1932
1888
|
signature?: string;
|
|
1933
1889
|
}
|
|
1934
1890
|
interface MCPServerToolCallDelta {
|
|
1935
|
-
/**
|
|
1936
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1937
|
-
*/
|
|
1938
1891
|
type: 'mcp_server_tool_call';
|
|
1939
1892
|
/**
|
|
1940
1893
|
* A unique ID for this specific tool call.
|
|
@@ -1947,9 +1900,6 @@ declare namespace ContentDelta {
|
|
|
1947
1900
|
server_name?: string;
|
|
1948
1901
|
}
|
|
1949
1902
|
interface MCPServerToolResultDelta {
|
|
1950
|
-
/**
|
|
1951
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1952
|
-
*/
|
|
1953
1903
|
type: 'mcp_server_tool_result';
|
|
1954
1904
|
/**
|
|
1955
1905
|
* ID to match the ID from the function call block.
|
|
@@ -1964,13 +1914,10 @@ declare namespace ContentDelta {
|
|
|
1964
1914
|
}
|
|
1965
1915
|
namespace MCPServerToolResultDelta {
|
|
1966
1916
|
interface Items {
|
|
1967
|
-
items?: Array<string | InteractionsAPI.ImageContent>;
|
|
1917
|
+
items?: Array<string | InteractionsAPI.ImageContent | unknown>;
|
|
1968
1918
|
}
|
|
1969
1919
|
}
|
|
1970
1920
|
interface FileSearchResultDelta {
|
|
1971
|
-
/**
|
|
1972
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
1973
|
-
*/
|
|
1974
1921
|
type: 'file_search_result';
|
|
1975
1922
|
result?: Array<FileSearchResultDelta.Result>;
|
|
1976
1923
|
}
|
|
@@ -2603,9 +2550,6 @@ declare interface DeepResearchAgentConfig {
|
|
|
2603
2550
|
* Whether to include thought summaries in the response.
|
|
2604
2551
|
*/
|
|
2605
2552
|
thinking_summaries?: 'auto' | 'none';
|
|
2606
|
-
/**
|
|
2607
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
2608
|
-
*/
|
|
2609
2553
|
type?: 'deep-research';
|
|
2610
2554
|
}
|
|
2611
2555
|
|
|
@@ -2807,15 +2751,20 @@ export { Document_2 as Document }
|
|
|
2807
2751
|
* A document content block.
|
|
2808
2752
|
*/
|
|
2809
2753
|
declare interface DocumentContent {
|
|
2810
|
-
/**
|
|
2811
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
2812
|
-
*/
|
|
2813
2754
|
type: 'document';
|
|
2814
2755
|
data?: string;
|
|
2815
|
-
|
|
2756
|
+
/**
|
|
2757
|
+
* The mime type of the document.
|
|
2758
|
+
*/
|
|
2759
|
+
mime_type?: DocumentMimeType;
|
|
2816
2760
|
uri?: string;
|
|
2817
2761
|
}
|
|
2818
2762
|
|
|
2763
|
+
/**
|
|
2764
|
+
* The mime type of the document.
|
|
2765
|
+
*/
|
|
2766
|
+
declare type DocumentMimeType = (string & {}) | 'application/pdf';
|
|
2767
|
+
|
|
2819
2768
|
declare class Documents extends BaseModule {
|
|
2820
2769
|
private readonly apiClient;
|
|
2821
2770
|
constructor(apiClient: ApiClient);
|
|
@@ -2901,9 +2850,6 @@ export declare interface DownloadFileParameters {
|
|
|
2901
2850
|
* Configuration for dynamic agents.
|
|
2902
2851
|
*/
|
|
2903
2852
|
declare interface DynamicAgentConfig {
|
|
2904
|
-
/**
|
|
2905
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
2906
|
-
*/
|
|
2907
2853
|
type?: 'dynamic';
|
|
2908
2854
|
[k: string]: unknown;
|
|
2909
2855
|
}
|
|
@@ -3456,9 +3402,6 @@ export declare interface FileSearch {
|
|
|
3456
3402
|
* File Search result content.
|
|
3457
3403
|
*/
|
|
3458
3404
|
declare interface FileSearchResultContent {
|
|
3459
|
-
/**
|
|
3460
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
3461
|
-
*/
|
|
3462
3405
|
type: 'file_search_result';
|
|
3463
3406
|
/**
|
|
3464
3407
|
* The results of the File Search.
|
|
@@ -3773,9 +3716,6 @@ declare interface FunctionCallContent {
|
|
|
3773
3716
|
* The name of the tool to call.
|
|
3774
3717
|
*/
|
|
3775
3718
|
name: string;
|
|
3776
|
-
/**
|
|
3777
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
3778
|
-
*/
|
|
3779
3719
|
type: 'function_call';
|
|
3780
3720
|
}
|
|
3781
3721
|
|
|
@@ -3925,9 +3865,6 @@ declare interface FunctionResultContent {
|
|
|
3925
3865
|
* The result of the tool call.
|
|
3926
3866
|
*/
|
|
3927
3867
|
result: FunctionResultContent.Items | unknown | string;
|
|
3928
|
-
/**
|
|
3929
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
3930
|
-
*/
|
|
3931
3868
|
type: 'function_result';
|
|
3932
3869
|
/**
|
|
3933
3870
|
* Whether the tool call resulted in an error.
|
|
@@ -3941,10 +3878,22 @@ declare interface FunctionResultContent {
|
|
|
3941
3878
|
|
|
3942
3879
|
declare namespace FunctionResultContent {
|
|
3943
3880
|
interface Items {
|
|
3944
|
-
items?: Array<string | InteractionsAPI.ImageContent>;
|
|
3881
|
+
items?: Array<string | InteractionsAPI.ImageContent | unknown>;
|
|
3945
3882
|
}
|
|
3946
3883
|
}
|
|
3947
3884
|
|
|
3885
|
+
/**
|
|
3886
|
+
* @license
|
|
3887
|
+
* Copyright 2025 Google LLC
|
|
3888
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
3889
|
+
*/
|
|
3890
|
+
declare interface GeminiNextGenAPIClientAdapter {
|
|
3891
|
+
isVertexAI: () => boolean;
|
|
3892
|
+
getProject: () => string | undefined;
|
|
3893
|
+
getLocation: () => string | undefined;
|
|
3894
|
+
getAuthHeaders: () => Headers | Promise<Headers>;
|
|
3895
|
+
}
|
|
3896
|
+
|
|
3948
3897
|
/**
|
|
3949
3898
|
* @license
|
|
3950
3899
|
* Copyright 2025 Google LLC
|
|
@@ -5010,9 +4959,6 @@ declare interface GoogleSearchCallArguments {
|
|
|
5010
4959
|
* Google Search content.
|
|
5011
4960
|
*/
|
|
5012
4961
|
declare interface GoogleSearchCallContent {
|
|
5013
|
-
/**
|
|
5014
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
5015
|
-
*/
|
|
5016
4962
|
type: 'google_search_call';
|
|
5017
4963
|
/**
|
|
5018
4964
|
* A unique ID for this specific tool call.
|
|
@@ -5046,9 +4992,6 @@ declare interface GoogleSearchResult {
|
|
|
5046
4992
|
* Google Search result content.
|
|
5047
4993
|
*/
|
|
5048
4994
|
declare interface GoogleSearchResultContent {
|
|
5049
|
-
/**
|
|
5050
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
5051
|
-
*/
|
|
5052
4995
|
type: 'google_search_result';
|
|
5053
4996
|
/**
|
|
5054
4997
|
* ID to match the ID from the google search call block.
|
|
@@ -5495,9 +5438,6 @@ export declare interface ImageConfig {
|
|
|
5495
5438
|
* An image content block.
|
|
5496
5439
|
*/
|
|
5497
5440
|
declare interface ImageContent {
|
|
5498
|
-
/**
|
|
5499
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
5500
|
-
*/
|
|
5501
5441
|
type: 'image';
|
|
5502
5442
|
data?: string;
|
|
5503
5443
|
/**
|
|
@@ -5507,7 +5447,7 @@ declare interface ImageContent {
|
|
|
5507
5447
|
/**
|
|
5508
5448
|
* The resolution of the media.
|
|
5509
5449
|
*/
|
|
5510
|
-
resolution?: 'low' | 'medium' | 'high';
|
|
5450
|
+
resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
|
|
5511
5451
|
uri?: string;
|
|
5512
5452
|
}
|
|
5513
5453
|
|
|
@@ -5768,7 +5708,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
5768
5708
|
}
|
|
5769
5709
|
|
|
5770
5710
|
export declare namespace Interactions {
|
|
5771
|
-
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 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 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 ImageContent as ImageContent, type ImageMimeType as ImageMimeType, type Interaction as Interaction, type InteractionEvent as InteractionEvent, type InteractionSSEEvent as InteractionSSEEvent, 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, };
|
|
5711
|
+
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 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 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 ImageContent as ImageContent, type ImageMimeType as ImageMimeType, type Interaction as Interaction, type InteractionEvent as InteractionEvent, type InteractionSSEEvent as InteractionSSEEvent, 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, };
|
|
5772
5712
|
}
|
|
5773
5713
|
|
|
5774
5714
|
declare namespace InteractionsAPI {
|
|
@@ -5787,6 +5727,7 @@ declare namespace InteractionsAPI {
|
|
|
5787
5727
|
ContentStop,
|
|
5788
5728
|
DeepResearchAgentConfig,
|
|
5789
5729
|
DocumentContent,
|
|
5730
|
+
DocumentMimeType,
|
|
5790
5731
|
DynamicAgentConfig,
|
|
5791
5732
|
ErrorEvent_2 as ErrorEvent,
|
|
5792
5733
|
FileSearchResultContent,
|
|
@@ -7032,9 +6973,6 @@ declare interface MCPServerToolCallContent {
|
|
|
7032
6973
|
* The name of the used MCP server.
|
|
7033
6974
|
*/
|
|
7034
6975
|
server_name: string;
|
|
7035
|
-
/**
|
|
7036
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
7037
|
-
*/
|
|
7038
6976
|
type: 'mcp_server_tool_call';
|
|
7039
6977
|
}
|
|
7040
6978
|
|
|
@@ -7050,9 +6988,6 @@ declare interface MCPServerToolResultContent {
|
|
|
7050
6988
|
* The result of the tool call.
|
|
7051
6989
|
*/
|
|
7052
6990
|
result: MCPServerToolResultContent.Items | unknown | string;
|
|
7053
|
-
/**
|
|
7054
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
7055
|
-
*/
|
|
7056
6991
|
type: 'mcp_server_tool_result';
|
|
7057
6992
|
/**
|
|
7058
6993
|
* Name of the tool which is called for this specific tool call.
|
|
@@ -7066,7 +7001,7 @@ declare interface MCPServerToolResultContent {
|
|
|
7066
7001
|
|
|
7067
7002
|
declare namespace MCPServerToolResultContent {
|
|
7068
7003
|
interface Items {
|
|
7069
|
-
items?: Array<string | InteractionsAPI.ImageContent>;
|
|
7004
|
+
items?: Array<string | InteractionsAPI.ImageContent | unknown>;
|
|
7070
7005
|
}
|
|
7071
7006
|
}
|
|
7072
7007
|
|
|
@@ -7612,9 +7547,9 @@ export declare interface ModelSelectionConfig {
|
|
|
7612
7547
|
featureSelectionPreference?: FeatureSelectionPreference;
|
|
7613
7548
|
}
|
|
7614
7549
|
|
|
7615
|
-
/**
|
|
7550
|
+
/** Configuration for a multi-speaker text-to-speech request. */
|
|
7616
7551
|
export declare interface MultiSpeakerVoiceConfig {
|
|
7617
|
-
/** Required.
|
|
7552
|
+
/** Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided. */
|
|
7618
7553
|
speakerVoiceConfigs?: SpeakerVoiceConfig[];
|
|
7619
7554
|
}
|
|
7620
7555
|
|
|
@@ -7983,7 +7918,11 @@ export declare enum PartMediaResolutionLevel {
|
|
|
7983
7918
|
/**
|
|
7984
7919
|
* Media resolution set to high.
|
|
7985
7920
|
*/
|
|
7986
|
-
MEDIA_RESOLUTION_HIGH = "MEDIA_RESOLUTION_HIGH"
|
|
7921
|
+
MEDIA_RESOLUTION_HIGH = "MEDIA_RESOLUTION_HIGH",
|
|
7922
|
+
/**
|
|
7923
|
+
* Media resolution set to ultra high.
|
|
7924
|
+
*/
|
|
7925
|
+
MEDIA_RESOLUTION_ULTRA_HIGH = "MEDIA_RESOLUTION_ULTRA_HIGH"
|
|
7987
7926
|
}
|
|
7988
7927
|
|
|
7989
7928
|
/** Tuning spec for Partner models. This data type is not supported in Gemini API. */
|
|
@@ -8925,7 +8864,7 @@ export declare interface SpeechConfig {
|
|
|
8925
8864
|
voiceConfig?: VoiceConfig;
|
|
8926
8865
|
/** Optional. Language code (ISO 639. e.g. en-US) for the speech synthesization. */
|
|
8927
8866
|
languageCode?: string;
|
|
8928
|
-
/**
|
|
8867
|
+
/** The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`. */
|
|
8929
8868
|
multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
|
|
8930
8869
|
}
|
|
8931
8870
|
|
|
@@ -9175,9 +9114,6 @@ export declare interface TestTableItem {
|
|
|
9175
9114
|
* A text content block.
|
|
9176
9115
|
*/
|
|
9177
9116
|
declare interface TextContent {
|
|
9178
|
-
/**
|
|
9179
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
9180
|
-
*/
|
|
9181
9117
|
type: 'text';
|
|
9182
9118
|
/**
|
|
9183
9119
|
* Citation information for model-generated content.
|
|
@@ -9197,35 +9133,40 @@ export declare interface ThinkingConfig {
|
|
|
9197
9133
|
/** Indicates the thinking budget in tokens. 0 is DISABLED. -1 is AUTOMATIC. The default values and allowed ranges are model dependent.
|
|
9198
9134
|
*/
|
|
9199
9135
|
thinkingBudget?: number;
|
|
9200
|
-
/** Optional. The
|
|
9136
|
+
/** Optional. The number of thoughts tokens that the model should generate. */
|
|
9201
9137
|
thinkingLevel?: ThinkingLevel;
|
|
9202
9138
|
}
|
|
9203
9139
|
|
|
9204
|
-
/** The
|
|
9140
|
+
/** The number of thoughts tokens that the model should generate. */
|
|
9205
9141
|
export declare enum ThinkingLevel {
|
|
9206
9142
|
/**
|
|
9207
|
-
*
|
|
9143
|
+
* Unspecified thinking level.
|
|
9208
9144
|
*/
|
|
9209
9145
|
THINKING_LEVEL_UNSPECIFIED = "THINKING_LEVEL_UNSPECIFIED",
|
|
9210
9146
|
/**
|
|
9211
9147
|
* Low thinking level.
|
|
9212
9148
|
*/
|
|
9213
9149
|
LOW = "LOW",
|
|
9150
|
+
/**
|
|
9151
|
+
* Medium thinking level.
|
|
9152
|
+
*/
|
|
9153
|
+
MEDIUM = "MEDIUM",
|
|
9214
9154
|
/**
|
|
9215
9155
|
* High thinking level.
|
|
9216
9156
|
*/
|
|
9217
|
-
HIGH = "HIGH"
|
|
9157
|
+
HIGH = "HIGH",
|
|
9158
|
+
/**
|
|
9159
|
+
* MINIMAL thinking level.
|
|
9160
|
+
*/
|
|
9161
|
+
MINIMAL = "MINIMAL"
|
|
9218
9162
|
}
|
|
9219
9163
|
|
|
9220
|
-
declare type ThinkingLevel_2 = 'low' | 'high';
|
|
9164
|
+
declare type ThinkingLevel_2 = 'minimal' | 'low' | 'medium' | 'high';
|
|
9221
9165
|
|
|
9222
9166
|
/**
|
|
9223
9167
|
* A thought content block.
|
|
9224
9168
|
*/
|
|
9225
9169
|
declare interface ThoughtContent {
|
|
9226
|
-
/**
|
|
9227
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
9228
|
-
*/
|
|
9229
9170
|
type: 'thought';
|
|
9230
9171
|
/**
|
|
9231
9172
|
* Signature to match the backend source to be part of the generation.
|
|
@@ -10585,9 +10526,6 @@ declare interface URLContextCallArguments {
|
|
|
10585
10526
|
* URL context content.
|
|
10586
10527
|
*/
|
|
10587
10528
|
declare interface URLContextCallContent {
|
|
10588
|
-
/**
|
|
10589
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
10590
|
-
*/
|
|
10591
10529
|
type: 'url_context_call';
|
|
10592
10530
|
/**
|
|
10593
10531
|
* A unique ID for this specific tool call.
|
|
@@ -10623,9 +10561,6 @@ declare interface URLContextResult {
|
|
|
10623
10561
|
* URL context result content.
|
|
10624
10562
|
*/
|
|
10625
10563
|
declare interface URLContextResultContent {
|
|
10626
|
-
/**
|
|
10627
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
10628
|
-
*/
|
|
10629
10564
|
type: 'url_context_result';
|
|
10630
10565
|
/**
|
|
10631
10566
|
* ID to match the ID from the url context call block.
|
|
@@ -10917,9 +10852,6 @@ export declare enum VideoCompressionQuality {
|
|
|
10917
10852
|
* A video content block.
|
|
10918
10853
|
*/
|
|
10919
10854
|
declare interface VideoContent {
|
|
10920
|
-
/**
|
|
10921
|
-
* Used as the OpenAPI type discriminator for the content oneof.
|
|
10922
|
-
*/
|
|
10923
10855
|
type: 'video';
|
|
10924
10856
|
data?: string;
|
|
10925
10857
|
/**
|
|
@@ -10929,7 +10861,7 @@ declare interface VideoContent {
|
|
|
10929
10861
|
/**
|
|
10930
10862
|
* The resolution of the media.
|
|
10931
10863
|
*/
|
|
10932
|
-
resolution?: 'low' | 'medium' | 'high';
|
|
10864
|
+
resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
|
|
10933
10865
|
uri?: string;
|
|
10934
10866
|
}
|
|
10935
10867
|
|