@google/genai 1.34.0 → 1.35.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/genai.d.ts CHANGED
@@ -581,7 +581,7 @@ declare interface BaseCreateAgentInteractionParams {
581
581
  /**
582
582
  * Body param: The inputs for the interaction.
583
583
  */
584
- input: string | Array<TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent;
584
+ input: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent;
585
585
  /**
586
586
  * Path param: Which version of the API to use.
587
587
  */
@@ -633,7 +633,7 @@ declare interface BaseCreateModelInteractionParams {
633
633
  /**
634
634
  * Body param: The inputs for the interaction.
635
635
  */
636
- input: string | Array<TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent;
636
+ input: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent;
637
637
  /**
638
638
  * Body param: The name of the `Model` used for generating the interaction.
639
639
  */
@@ -1045,7 +1045,7 @@ export declare interface BatchJobSource {
1045
1045
 
1046
1046
  export declare type BatchJobSourceUnion = BatchJobSource | InlinedRequest[] | string;
1047
1047
 
1048
- /** Defines the function behavior. Defaults to `BLOCKING`. */
1048
+ /** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
1049
1049
  export declare enum Behavior {
1050
1050
  /**
1051
1051
  * This value is unused.
@@ -1717,11 +1717,15 @@ export declare interface Content {
1717
1717
  role?: string;
1718
1718
  }
1719
1719
 
1720
+ /**
1721
+ * The content of the response.
1722
+ */
1723
+ declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent;
1724
+
1720
1725
  declare interface ContentDelta {
1721
1726
  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.FileSearchResultDelta;
1722
1727
  /**
1723
- * The event_id token to be used to resume the interaction stream, from
1724
- * this event.
1728
+ * The event_id token to be used to resume the interaction stream, from this event.
1725
1729
  */
1726
1730
  event_id?: string;
1727
1731
  event_type?: 'content.delta';
@@ -1986,10 +1990,9 @@ declare interface ContentStart {
1986
1990
  /**
1987
1991
  * The content of the response.
1988
1992
  */
1989
- content?: TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent;
1993
+ content?: Content_2;
1990
1994
  /**
1991
- * The event_id token to be used to resume the interaction stream, from
1992
- * this event.
1995
+ * The event_id token to be used to resume the interaction stream, from this event.
1993
1996
  */
1994
1997
  event_id?: string;
1995
1998
  event_type?: 'content.start';
@@ -1998,8 +2001,7 @@ declare interface ContentStart {
1998
2001
 
1999
2002
  declare interface ContentStop {
2000
2003
  /**
2001
- * The event_id token to be used to resume the interaction stream, from
2002
- * this event.
2004
+ * The event_id token to be used to resume the interaction stream, from this event.
2003
2005
  */
2004
2006
  event_id?: string;
2005
2007
  event_type?: 'content.stop';
@@ -2856,13 +2858,13 @@ declare interface DynamicAgentConfig {
2856
2858
 
2857
2859
  /** Describes the options to customize dynamic retrieval. */
2858
2860
  export declare interface DynamicRetrievalConfig {
2859
- /** The mode of the predictor to be used in dynamic retrieval. */
2860
- mode?: DynamicRetrievalConfigMode;
2861
2861
  /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */
2862
2862
  dynamicThreshold?: number;
2863
+ /** The mode of the predictor to be used in dynamic retrieval. */
2864
+ mode?: DynamicRetrievalConfigMode;
2863
2865
  }
2864
2866
 
2865
- /** Config for the dynamic retrieval config mode. */
2867
+ /** The mode of the predictor to be used in dynamic retrieval. */
2866
2868
  export declare enum DynamicRetrievalConfigMode {
2867
2869
  /**
2868
2870
  * Always trigger retrieval.
@@ -3113,8 +3115,7 @@ declare interface ErrorEvent_2 {
3113
3115
  */
3114
3116
  error?: ErrorEvent_2.Error;
3115
3117
  /**
3116
- * The event_id token to be used to resume the interaction stream, from
3117
- * this event.
3118
+ * The event_id token to be used to resume the interaction stream, from this event.
3118
3119
  */
3119
3120
  event_id?: string;
3120
3121
  event_type?: 'error';
@@ -3543,7 +3544,8 @@ declare class FileSearchStores extends BaseModule {
3543
3544
  export declare enum FileSource {
3544
3545
  SOURCE_UNSPECIFIED = "SOURCE_UNSPECIFIED",
3545
3546
  UPLOADED = "UPLOADED",
3546
- GENERATED = "GENERATED"
3547
+ GENERATED = "GENERATED",
3548
+ REGISTERED = "REGISTERED"
3547
3549
  }
3548
3550
 
3549
3551
  /**
@@ -3721,18 +3723,18 @@ declare interface FunctionCallContent {
3721
3723
 
3722
3724
  /** Function calling config. */
3723
3725
  export declare interface FunctionCallingConfig {
3724
- /** Optional. Function calling mode. */
3725
- mode?: FunctionCallingConfigMode;
3726
3726
  /** 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. */
3727
3727
  allowedFunctionNames?: string[];
3728
+ /** Optional. Function calling mode. */
3729
+ mode?: FunctionCallingConfigMode;
3728
3730
  /** Optional. When set to true, arguments of a single function call will be streamed out in multiple parts/contents/responses. Partial parameter results will be returned in the [FunctionCall.partial_args] field. This field is not supported in Gemini API. */
3729
3731
  streamFunctionCallArguments?: boolean;
3730
3732
  }
3731
3733
 
3732
- /** Config for the function calling config mode. */
3734
+ /** Function calling mode. */
3733
3735
  export declare enum FunctionCallingConfigMode {
3734
3736
  /**
3735
- * The function calling config mode is unspecified. Should not be used.
3737
+ * Unspecified function calling mode. This value should not be used.
3736
3738
  */
3737
3739
  MODE_UNSPECIFIED = "MODE_UNSPECIFIED",
3738
3740
  /**
@@ -3748,18 +3750,13 @@ export declare enum FunctionCallingConfigMode {
3748
3750
  */
3749
3751
  NONE = "NONE",
3750
3752
  /**
3751
- * Model decides to predict either a function call or a natural language response, but will validate function calls with constrained decoding. If "allowed_function_names" are set, the predicted function call will be limited to any one of "allowed_function_names", else the predicted function call will be any one of the provided "function_declarations".
3753
+ * Model is constrained to predict either function calls or natural language response. If "allowed_function_names" are set, the predicted function calls will be limited to any one of "allowed_function_names", else the predicted function calls will be any one of the provided "function_declarations".
3752
3754
  */
3753
3755
  VALIDATED = "VALIDATED"
3754
3756
  }
3755
3757
 
3756
- /** Defines a function that the model can generate JSON inputs for.
3757
-
3758
- The inputs are based on `OpenAPI 3.0 specifications
3759
- <https://spec.openapis.org/oas/v3.0.3>`_. */
3758
+ /** 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. */
3760
3759
  export declare interface FunctionDeclaration {
3761
- /** Defines the function behavior. */
3762
- behavior?: Behavior;
3763
3760
  /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */
3764
3761
  description?: string;
3765
3762
  /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */
@@ -3772,6 +3769,8 @@ export declare interface FunctionDeclaration {
3772
3769
  response?: Schema;
3773
3770
  /** Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`. */
3774
3771
  responseJsonSchema?: unknown;
3772
+ /** Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This field is not supported in Vertex AI. */
3773
+ behavior?: Behavior;
3775
3774
  }
3776
3775
 
3777
3776
  /** A function response. */
@@ -5421,6 +5420,9 @@ export declare interface ImageConfig {
5421
5420
  values are `1K`, `2K`, `4K`. If not specified, the model will use default
5422
5421
  value `1K`. */
5423
5422
  imageSize?: string;
5423
+ /** Controls the generation of people. Supported values are:
5424
+ ALLOW_ALL, ALLOW_ADULT, ALLOW_NONE. */
5425
+ personGeneration?: string;
5424
5426
  /** MIME type of the generated image. This field is not
5425
5427
  supported in Gemini API. */
5426
5428
  outputMimeType?: string;
@@ -5605,14 +5607,10 @@ declare interface Interaction {
5605
5607
  * The name of the `Model` used for generating the interaction.
5606
5608
  */
5607
5609
  model?: Model_2;
5608
- /**
5609
- * Output only. The object type of the interaction. Always set to `interaction`.
5610
- */
5611
- object?: 'interaction';
5612
5610
  /**
5613
5611
  * Output only. Responses from the model.
5614
5612
  */
5615
- outputs?: Array<TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent>;
5613
+ outputs?: Array<Content_2>;
5616
5614
  /**
5617
5615
  * The ID of the previous interaction, if any.
5618
5616
  */
@@ -5652,8 +5650,7 @@ declare type InteractionDeleteResponse = unknown;
5652
5650
 
5653
5651
  declare interface InteractionEvent {
5654
5652
  /**
5655
- * The event_id token to be used to resume the interaction stream, from
5656
- * this event.
5653
+ * The event_id token to be used to resume the interaction stream, from this event.
5657
5654
  */
5658
5655
  event_id?: string;
5659
5656
  event_type?: 'interaction.start' | 'interaction.complete';
@@ -5703,7 +5700,7 @@ export declare class Interactions extends BaseInteractions {
5703
5700
  }
5704
5701
 
5705
5702
  export declare namespace Interactions {
5706
- 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, };
5703
+ 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 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, };
5707
5704
  }
5708
5705
 
5709
5706
  declare namespace InteractionsAPI {
@@ -5717,6 +5714,7 @@ declare namespace InteractionsAPI {
5717
5714
  CodeExecutionCallArguments,
5718
5715
  CodeExecutionCallContent,
5719
5716
  CodeExecutionResultContent,
5717
+ Content_2 as Content,
5720
5718
  ContentDelta,
5721
5719
  ContentStart,
5722
5720
  ContentStop,
@@ -5780,8 +5778,7 @@ declare type InteractionSSEEvent = InteractionEvent | InteractionStatusUpdate |
5780
5778
 
5781
5779
  declare interface InteractionStatusUpdate {
5782
5780
  /**
5783
- * The event_id token to be used to resume the interaction stream, from
5784
- * this event.
5781
+ * The event_id token to be used to resume the interaction stream, from this event.
5785
5782
  */
5786
5783
  event_id?: string;
5787
5784
  event_type?: 'interaction.status_update';
@@ -7096,18 +7093,6 @@ export declare interface ModalityTokenCount {
7096
7093
  tokenCount?: number;
7097
7094
  }
7098
7095
 
7099
- /** The mode of the predictor to be used in dynamic retrieval. */
7100
- export declare enum Mode {
7101
- /**
7102
- * Always trigger retrieval.
7103
- */
7104
- MODE_UNSPECIFIED = "MODE_UNSPECIFIED",
7105
- /**
7106
- * Run retrieval only when system decides it is necessary.
7107
- */
7108
- MODE_DYNAMIC = "MODE_DYNAMIC"
7109
- }
7110
-
7111
7096
  /** A trained machine learning model. */
7112
7097
  export declare interface Model {
7113
7098
  /** Resource name of the model. */
@@ -7166,7 +7151,7 @@ export declare interface Model {
7166
7151
  /**
7167
7152
  * The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
7168
7153
  */
7169
- declare type Model_2 = 'gemini-2.5-pro' | 'gemini-2.5-flash' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-preview-native-audio-dialog' | 'gemini-2.5-flash-image-preview' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-pro-preview' | (string & {});
7154
+ declare type Model_2 = 'gemini-2.5-pro' | 'gemini-2.5-flash' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-preview-native-audio-dialog' | 'gemini-2.5-flash-image-preview' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-pro-preview' | 'gemini-3-flash-preview' | (string & {});
7170
7155
 
7171
7156
  export declare class Models extends BaseModule {
7172
7157
  private readonly apiClient;
@@ -7278,7 +7263,7 @@ export declare class Models extends BaseModule {
7278
7263
  * @example
7279
7264
  * ```ts
7280
7265
  * const response = await client.models.generateImages({
7281
- * model: 'imagen-3.0-generate-002',
7266
+ * model: 'imagen-4.0-generate-001',
7282
7267
  * prompt: 'Robot holding a red skateboard',
7283
7268
  * config: {
7284
7269
  * numberOfImages: 1,
@@ -7321,7 +7306,7 @@ export declare class Models extends BaseModule {
7321
7306
  * @example
7322
7307
  * ```ts
7323
7308
  * const response = await client.models.upscaleImage({
7324
- * model: 'imagen-3.0-generate-002',
7309
+ * model: 'imagen-4.0-upscale-preview',
7325
7310
  * image: image,
7326
7311
  * upscaleFactor: 'x2',
7327
7312
  * config: {
@@ -7420,7 +7405,7 @@ export declare class Models extends BaseModule {
7420
7405
  * console.log(response1?.generatedImages?.[0]?.image?.imageBytes);
7421
7406
  *
7422
7407
  * const response2 = await ai.models.recontextImage({
7423
- * model: 'virtual-try-on-preview-08-04',
7408
+ * model: 'virtual-try-on-001',
7424
7409
  * source: {
7425
7410
  * personImage: personImage,
7426
7411
  * productImages: [productImage],
@@ -9275,12 +9260,8 @@ export declare interface TokensInfo {
9275
9260
 
9276
9261
  /** Tool details of a tool that the model may use to generate a response. */
9277
9262
  export declare interface Tool {
9278
- /** List of function declarations that the tool supports. */
9279
- functionDeclarations?: FunctionDeclaration[];
9280
9263
  /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. This field is not supported in Gemini API. */
9281
9264
  retrieval?: Retrieval;
9282
- /** Optional. Specialized retrieval tool that is powered by Google Search. */
9283
- googleSearchRetrieval?: GoogleSearchRetrieval;
9284
9265
  /** Optional. Tool to support the model interacting directly with the
9285
9266
  computer. If enabled, it automatically populates computer-use specific
9286
9267
  Function Declarations. */
@@ -9291,10 +9272,14 @@ export declare interface Tool {
9291
9272
  codeExecution?: ToolCodeExecution;
9292
9273
  /** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
9293
9274
  enterpriseWebSearch?: EnterpriseWebSearch;
9275
+ /** Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided. */
9276
+ functionDeclarations?: FunctionDeclaration[];
9294
9277
  /** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
9295
9278
  googleMaps?: GoogleMaps;
9296
9279
  /** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
9297
9280
  googleSearch?: GoogleSearch;
9281
+ /** Optional. Specialized retrieval tool that is powered by Google Search. */
9282
+ googleSearchRetrieval?: GoogleSearchRetrieval;
9298
9283
  /** Optional. Tool to support URL context retrieval. */
9299
9284
  urlContext?: UrlContext;
9300
9285
  }
@@ -9404,10 +9389,10 @@ export declare interface ToolCodeExecution {
9404
9389
 
9405
9390
  This config is shared for all tools provided in the request. */
9406
9391
  export declare interface ToolConfig {
9407
- /** Optional. Function calling config. */
9408
- functionCallingConfig?: FunctionCallingConfig;
9409
9392
  /** Optional. Retrieval config. */
9410
9393
  retrievalConfig?: RetrievalConfig;
9394
+ /** Optional. Function calling config. */
9395
+ functionCallingConfig?: FunctionCallingConfig;
9411
9396
  }
9412
9397
 
9413
9398
  export declare type ToolListUnion = ToolUnion[];
@@ -9697,7 +9682,7 @@ declare interface Turn {
9697
9682
  /**
9698
9683
  * The content of the turn.
9699
9684
  */
9700
- content?: string | Array<TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent>;
9685
+ content?: string | Array<Content_2>;
9701
9686
  /**
9702
9687
  * The originator of this turn. Must be user for input or model for
9703
9688
  * model output.
@@ -9794,11 +9779,13 @@ declare namespace types {
9794
9779
  Language,
9795
9780
  FunctionResponseScheduling,
9796
9781
  Type,
9797
- Mode,
9798
9782
  ApiSpec,
9799
9783
  AuthType,
9800
9784
  HttpElementLocation,
9801
9785
  PhishBlockThreshold,
9786
+ Behavior,
9787
+ DynamicRetrievalConfigMode,
9788
+ FunctionCallingConfigMode,
9802
9789
  ThinkingLevel,
9803
9790
  HarmCategory,
9804
9791
  HarmBlockMethod,
@@ -9817,10 +9804,7 @@ declare namespace types {
9817
9804
  TuningTask,
9818
9805
  PartMediaResolutionLevel,
9819
9806
  FeatureSelectionPreference,
9820
- Behavior,
9821
- DynamicRetrievalConfigMode,
9822
9807
  Environment,
9823
- FunctionCallingConfigMode,
9824
9808
  SafetyFilterLevel,
9825
9809
  PersonGeneration,
9826
9810
  ImagePromptLanguage,
@@ -9863,9 +9847,6 @@ declare namespace types {
9863
9847
  HttpOptions,
9864
9848
  Schema,
9865
9849
  ModelSelectionConfig,
9866
- FunctionDeclaration,
9867
- DynamicRetrievalConfig,
9868
- GoogleSearchRetrieval,
9869
9850
  ComputerUse,
9870
9851
  FileSearch,
9871
9852
  ApiAuthApiKeyConfig,
@@ -9892,14 +9873,17 @@ declare namespace types {
9892
9873
  Retrieval,
9893
9874
  ToolCodeExecution,
9894
9875
  EnterpriseWebSearch,
9876
+ FunctionDeclaration,
9895
9877
  GoogleMaps,
9896
9878
  Interval,
9897
9879
  GoogleSearch,
9880
+ DynamicRetrievalConfig,
9881
+ GoogleSearchRetrieval,
9898
9882
  UrlContext,
9899
9883
  Tool,
9900
- FunctionCallingConfig,
9901
9884
  LatLng,
9902
9885
  RetrievalConfig,
9886
+ FunctionCallingConfig,
9903
9887
  ToolConfig,
9904
9888
  ReplicatedVoiceConfig,
9905
9889
  PrebuiltVoiceConfig,
@@ -10642,7 +10626,7 @@ declare interface Usage {
10642
10626
  /**
10643
10627
  * Number of tokens of thoughts for thinking models.
10644
10628
  */
10645
- total_reasoning_tokens?: number;
10629
+ total_thought_tokens?: number;
10646
10630
  /**
10647
10631
  * Total token count for the interaction request (prompt + responses + other
10648
10632
  * internal tokens).