@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/web/web.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. */
@@ -5426,6 +5425,9 @@ export declare interface ImageConfig {
5426
5425
  values are `1K`, `2K`, `4K`. If not specified, the model will use default
5427
5426
  value `1K`. */
5428
5427
  imageSize?: string;
5428
+ /** Controls the generation of people. Supported values are:
5429
+ ALLOW_ALL, ALLOW_ADULT, ALLOW_NONE. */
5430
+ personGeneration?: string;
5429
5431
  /** MIME type of the generated image. This field is not
5430
5432
  supported in Gemini API. */
5431
5433
  outputMimeType?: string;
@@ -5610,14 +5612,10 @@ declare interface Interaction {
5610
5612
  * The name of the `Model` used for generating the interaction.
5611
5613
  */
5612
5614
  model?: Model_2;
5613
- /**
5614
- * Output only. The object type of the interaction. Always set to `interaction`.
5615
- */
5616
- object?: 'interaction';
5617
5615
  /**
5618
5616
  * Output only. Responses from the model.
5619
5617
  */
5620
- outputs?: Array<TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent>;
5618
+ outputs?: Array<Content_2>;
5621
5619
  /**
5622
5620
  * The ID of the previous interaction, if any.
5623
5621
  */
@@ -5657,8 +5655,7 @@ declare type InteractionDeleteResponse = unknown;
5657
5655
 
5658
5656
  declare interface InteractionEvent {
5659
5657
  /**
5660
- * The event_id token to be used to resume the interaction stream, from
5661
- * this event.
5658
+ * The event_id token to be used to resume the interaction stream, from this event.
5662
5659
  */
5663
5660
  event_id?: string;
5664
5661
  event_type?: 'interaction.start' | 'interaction.complete';
@@ -5708,7 +5705,7 @@ export declare class Interactions extends BaseInteractions {
5708
5705
  }
5709
5706
 
5710
5707
  export declare namespace Interactions {
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, };
5708
+ 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, };
5712
5709
  }
5713
5710
 
5714
5711
  declare namespace InteractionsAPI {
@@ -5722,6 +5719,7 @@ declare namespace InteractionsAPI {
5722
5719
  CodeExecutionCallArguments,
5723
5720
  CodeExecutionCallContent,
5724
5721
  CodeExecutionResultContent,
5722
+ Content_2 as Content,
5725
5723
  ContentDelta,
5726
5724
  ContentStart,
5727
5725
  ContentStop,
@@ -5785,8 +5783,7 @@ declare type InteractionSSEEvent = InteractionEvent | InteractionStatusUpdate |
5785
5783
 
5786
5784
  declare interface InteractionStatusUpdate {
5787
5785
  /**
5788
- * The event_id token to be used to resume the interaction stream, from
5789
- * this event.
5786
+ * The event_id token to be used to resume the interaction stream, from this event.
5790
5787
  */
5791
5788
  event_id?: string;
5792
5789
  event_type?: 'interaction.status_update';
@@ -7101,18 +7098,6 @@ export declare interface ModalityTokenCount {
7101
7098
  tokenCount?: number;
7102
7099
  }
7103
7100
 
7104
- /** The mode of the predictor to be used in dynamic retrieval. */
7105
- export declare enum Mode {
7106
- /**
7107
- * Always trigger retrieval.
7108
- */
7109
- MODE_UNSPECIFIED = "MODE_UNSPECIFIED",
7110
- /**
7111
- * Run retrieval only when system decides it is necessary.
7112
- */
7113
- MODE_DYNAMIC = "MODE_DYNAMIC"
7114
- }
7115
-
7116
7101
  /** A trained machine learning model. */
7117
7102
  export declare interface Model {
7118
7103
  /** Resource name of the model. */
@@ -7171,7 +7156,7 @@ export declare interface Model {
7171
7156
  /**
7172
7157
  * The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
7173
7158
  */
7174
- 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 & {});
7159
+ 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 & {});
7175
7160
 
7176
7161
  export declare class Models extends BaseModule {
7177
7162
  private readonly apiClient;
@@ -7283,7 +7268,7 @@ export declare class Models extends BaseModule {
7283
7268
  * @example
7284
7269
  * ```ts
7285
7270
  * const response = await client.models.generateImages({
7286
- * model: 'imagen-3.0-generate-002',
7271
+ * model: 'imagen-4.0-generate-001',
7287
7272
  * prompt: 'Robot holding a red skateboard',
7288
7273
  * config: {
7289
7274
  * numberOfImages: 1,
@@ -7326,7 +7311,7 @@ export declare class Models extends BaseModule {
7326
7311
  * @example
7327
7312
  * ```ts
7328
7313
  * const response = await client.models.upscaleImage({
7329
- * model: 'imagen-3.0-generate-002',
7314
+ * model: 'imagen-4.0-upscale-preview',
7330
7315
  * image: image,
7331
7316
  * upscaleFactor: 'x2',
7332
7317
  * config: {
@@ -7425,7 +7410,7 @@ export declare class Models extends BaseModule {
7425
7410
  * console.log(response1?.generatedImages?.[0]?.image?.imageBytes);
7426
7411
  *
7427
7412
  * const response2 = await ai.models.recontextImage({
7428
- * model: 'virtual-try-on-preview-08-04',
7413
+ * model: 'virtual-try-on-001',
7429
7414
  * source: {
7430
7415
  * personImage: personImage,
7431
7416
  * productImages: [productImage],
@@ -9280,12 +9265,8 @@ export declare interface TokensInfo {
9280
9265
 
9281
9266
  /** Tool details of a tool that the model may use to generate a response. */
9282
9267
  export declare interface Tool {
9283
- /** List of function declarations that the tool supports. */
9284
- functionDeclarations?: FunctionDeclaration[];
9285
9268
  /** 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. */
9286
9269
  retrieval?: Retrieval;
9287
- /** Optional. Specialized retrieval tool that is powered by Google Search. */
9288
- googleSearchRetrieval?: GoogleSearchRetrieval;
9289
9270
  /** Optional. Tool to support the model interacting directly with the
9290
9271
  computer. If enabled, it automatically populates computer-use specific
9291
9272
  Function Declarations. */
@@ -9296,10 +9277,14 @@ export declare interface Tool {
9296
9277
  codeExecution?: ToolCodeExecution;
9297
9278
  /** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
9298
9279
  enterpriseWebSearch?: EnterpriseWebSearch;
9280
+ /** 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. */
9281
+ functionDeclarations?: FunctionDeclaration[];
9299
9282
  /** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
9300
9283
  googleMaps?: GoogleMaps;
9301
9284
  /** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
9302
9285
  googleSearch?: GoogleSearch;
9286
+ /** Optional. Specialized retrieval tool that is powered by Google Search. */
9287
+ googleSearchRetrieval?: GoogleSearchRetrieval;
9303
9288
  /** Optional. Tool to support URL context retrieval. */
9304
9289
  urlContext?: UrlContext;
9305
9290
  }
@@ -9409,10 +9394,10 @@ export declare interface ToolCodeExecution {
9409
9394
 
9410
9395
  This config is shared for all tools provided in the request. */
9411
9396
  export declare interface ToolConfig {
9412
- /** Optional. Function calling config. */
9413
- functionCallingConfig?: FunctionCallingConfig;
9414
9397
  /** Optional. Retrieval config. */
9415
9398
  retrievalConfig?: RetrievalConfig;
9399
+ /** Optional. Function calling config. */
9400
+ functionCallingConfig?: FunctionCallingConfig;
9416
9401
  }
9417
9402
 
9418
9403
  export declare type ToolListUnion = ToolUnion[];
@@ -9702,7 +9687,7 @@ declare interface Turn {
9702
9687
  /**
9703
9688
  * The content of the turn.
9704
9689
  */
9705
- content?: string | Array<TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent>;
9690
+ content?: string | Array<Content_2>;
9706
9691
  /**
9707
9692
  * The originator of this turn. Must be user for input or model for
9708
9693
  * model output.
@@ -9799,11 +9784,13 @@ declare namespace types {
9799
9784
  Language,
9800
9785
  FunctionResponseScheduling,
9801
9786
  Type,
9802
- Mode,
9803
9787
  ApiSpec,
9804
9788
  AuthType,
9805
9789
  HttpElementLocation,
9806
9790
  PhishBlockThreshold,
9791
+ Behavior,
9792
+ DynamicRetrievalConfigMode,
9793
+ FunctionCallingConfigMode,
9807
9794
  ThinkingLevel,
9808
9795
  HarmCategory,
9809
9796
  HarmBlockMethod,
@@ -9822,10 +9809,7 @@ declare namespace types {
9822
9809
  TuningTask,
9823
9810
  PartMediaResolutionLevel,
9824
9811
  FeatureSelectionPreference,
9825
- Behavior,
9826
- DynamicRetrievalConfigMode,
9827
9812
  Environment,
9828
- FunctionCallingConfigMode,
9829
9813
  SafetyFilterLevel,
9830
9814
  PersonGeneration,
9831
9815
  ImagePromptLanguage,
@@ -9868,9 +9852,6 @@ declare namespace types {
9868
9852
  HttpOptions,
9869
9853
  Schema,
9870
9854
  ModelSelectionConfig,
9871
- FunctionDeclaration,
9872
- DynamicRetrievalConfig,
9873
- GoogleSearchRetrieval,
9874
9855
  ComputerUse,
9875
9856
  FileSearch,
9876
9857
  ApiAuthApiKeyConfig,
@@ -9897,14 +9878,17 @@ declare namespace types {
9897
9878
  Retrieval,
9898
9879
  ToolCodeExecution,
9899
9880
  EnterpriseWebSearch,
9881
+ FunctionDeclaration,
9900
9882
  GoogleMaps,
9901
9883
  Interval,
9902
9884
  GoogleSearch,
9885
+ DynamicRetrievalConfig,
9886
+ GoogleSearchRetrieval,
9903
9887
  UrlContext,
9904
9888
  Tool,
9905
- FunctionCallingConfig,
9906
9889
  LatLng,
9907
9890
  RetrievalConfig,
9891
+ FunctionCallingConfig,
9908
9892
  ToolConfig,
9909
9893
  ReplicatedVoiceConfig,
9910
9894
  PrebuiltVoiceConfig,
@@ -10647,7 +10631,7 @@ declare interface Usage {
10647
10631
  /**
10648
10632
  * Number of tokens of thoughts for thinking models.
10649
10633
  */
10650
- total_reasoning_tokens?: number;
10634
+ total_thought_tokens?: number;
10651
10635
  /**
10652
10636
  * Total token count for the interaction request (prompt + responses + other
10653
10637
  * internal tokens).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/genai",
3
- "version": "1.34.0",
3
+ "version": "1.35.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/node/index.mjs",