@google/genai 2.1.0 → 2.3.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.
@@ -700,7 +700,7 @@ declare interface BaseCreateAgentInteractionParams {
700
700
  * Body param: Enforces that the generated response is a JSON object that complies
701
701
  * with the JSON schema specified in this field.
702
702
  */
703
- response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
703
+ response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown;
704
704
  /**
705
705
  * Body param: The mime type of the response. This is required if response_format
706
706
  * is set.
@@ -767,7 +767,7 @@ declare interface BaseCreateModelInteractionParams {
767
767
  * Body param: Enforces that the generated response is a JSON object that complies
768
768
  * with the JSON schema specified in this field.
769
769
  */
770
- response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
770
+ response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown;
771
771
  /**
772
772
  * Body param: The mime type of the response. This is required if response_format
773
773
  * is set.
@@ -6292,7 +6292,7 @@ declare interface Interaction {
6292
6292
  * Enforces that the generated response is a JSON object that complies with the
6293
6293
  * JSON schema specified in this field.
6294
6294
  */
6295
- response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
6295
+ response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown;
6296
6296
  /**
6297
6297
  * The mime type of the response. This is required if response_format is set.
6298
6298
  */
@@ -6326,6 +6326,30 @@ declare interface Interaction {
6326
6326
  * completes.
6327
6327
  */
6328
6328
  webhook_config?: WebhookConfig_2;
6329
+ /**
6330
+ * Concatenated text from the last model output in response to the current request.
6331
+ *
6332
+ * Note: this is added by the SDK.
6333
+ */
6334
+ output_text?: string;
6335
+ /**
6336
+ * The last image generated by the model in response to the current request.
6337
+ *
6338
+ * Note: this is added by the SDK.
6339
+ */
6340
+ output_image?: ImageContent;
6341
+ /**
6342
+ * The last audio generated by the model in response to the current request.
6343
+ *
6344
+ * Note: this is added by the SDK.
6345
+ */
6346
+ output_audio?: AudioContent;
6347
+ /**
6348
+ * The last video generated by the model in response to the current request.
6349
+ *
6350
+ * Note: this is added by the SDK.
6351
+ */
6352
+ output_video?: VideoContent;
6329
6353
  }
6330
6354
 
6331
6355
  declare interface InteractionCancelParams {
@@ -6420,7 +6444,7 @@ export declare class Interactions extends BaseInteractions {
6420
6444
  }
6421
6445
 
6422
6446
  export declare namespace Interactions {
6423
- export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type AudioResponseFormat as AudioResponseFormat, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallStep as CodeExecutionCallStep, type CodeExecutionResultStep as CodeExecutionResultStep, type Content_2 as Content, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileCitation as FileCitation, type FileSearchCallStep as FileSearchCallStep, type FileSearchResultStep as FileSearchResultStep, type Function_2 as Function, type FunctionCallStep as FunctionCallStep, type FunctionResultStep as FunctionResultStep, type GenerationConfig_2 as GenerationConfig, type GoogleMapsCallArguments as GoogleMapsCallArguments, type GoogleMapsCallStep as GoogleMapsCallStep, type GoogleMapsResult as GoogleMapsResult, type GoogleMapsResultStep as GoogleMapsResultStep, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallStep as GoogleSearchCallStep, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultStep as GoogleSearchResultStep, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type ImageResponseFormat as ImageResponseFormat, type Interaction as Interaction, type InteractionCompletedEvent as InteractionCompletedEvent, type InteractionCreatedEvent as InteractionCreatedEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallStep as MCPServerToolCallStep, type MCPServerToolResultStep as MCPServerToolResultStep, type Model_2 as Model, type ModelOutputStep as ModelOutputStep, type PlaceCitation as PlaceCitation, type SpeechConfig_2 as SpeechConfig, type Step as Step, type StepDelta as StepDelta, type StepStart as StepStart, type StepStop as StepStop, type TextContent as TextContent, type TextResponseFormat as TextResponseFormat, type ThinkingLevel_2 as ThinkingLevel, type ThoughtStep as ThoughtStep, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type URLCitation as URLCitation, type URLContextCallArguments as URLContextCallArguments, type URLContextCallStep as URLContextCallStep, type URLContextResult as URLContextResult, type URLContextResultStep as URLContextResultStep, type Usage as Usage, type UserInputStep as UserInputStep, type VideoContent as VideoContent, type VideoResponseFormat as VideoResponseFormat, type WebhookConfig_2 as WebhookConfig, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
6447
+ export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type AudioResponseFormat as AudioResponseFormat, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallStep as CodeExecutionCallStep, type CodeExecutionResultStep as CodeExecutionResultStep, type Content_2 as Content, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileCitation as FileCitation, type FileSearchCallStep as FileSearchCallStep, type FileSearchResultStep as FileSearchResultStep, type Function_2 as Function, type FunctionCallStep as FunctionCallStep, type FunctionResultStep as FunctionResultStep, type GenerationConfig_2 as GenerationConfig, type GoogleMapsCallArguments as GoogleMapsCallArguments, type GoogleMapsCallStep as GoogleMapsCallStep, type GoogleMapsResult as GoogleMapsResult, type GoogleMapsResultStep as GoogleMapsResultStep, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallStep as GoogleSearchCallStep, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultStep as GoogleSearchResultStep, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type ImageResponseFormat as ImageResponseFormat, type Interaction as Interaction, type InteractionCompletedEvent as InteractionCompletedEvent, type InteractionCreatedEvent as InteractionCreatedEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallStep as MCPServerToolCallStep, type MCPServerToolResultStep as MCPServerToolResultStep, type Model_2 as Model, type ModelOutputStep as ModelOutputStep, type PlaceCitation as PlaceCitation, type SpeechConfig_2 as SpeechConfig, type Step as Step, type StepDelta as StepDelta, type StepStart as StepStart, type StepStop as StepStop, type TextContent as TextContent, type TextResponseFormat as TextResponseFormat, type ThinkingLevel_2 as ThinkingLevel, type ThoughtStep as ThoughtStep, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type URLCitation as URLCitation, type URLContextCallArguments as URLContextCallArguments, type URLContextCallStep as URLContextCallStep, type URLContextResult as URLContextResult, type URLContextResultStep as URLContextResultStep, type Usage as Usage, type UserInputStep as UserInputStep, type VideoContent as VideoContent, type WebhookConfig_2 as WebhookConfig, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
6424
6448
  }
6425
6449
 
6426
6450
  declare namespace InteractionsAPI {
@@ -6487,7 +6511,6 @@ declare namespace InteractionsAPI {
6487
6511
  Usage,
6488
6512
  UserInputStep,
6489
6513
  VideoContent,
6490
- VideoResponseFormat,
6491
6514
  WebhookConfig_2 as WebhookConfig,
6492
6515
  InteractionDeleteResponse,
6493
6516
  InteractionCreateParams,
@@ -7148,6 +7171,8 @@ export declare interface LiveConnectConfig {
7148
7171
  response.
7149
7172
  */
7150
7173
  safetySettings?: SafetySetting[];
7174
+ /** Config for stream translation. */
7175
+ streamTranslationConfig?: StreamTranslationConfig;
7151
7176
  }
7152
7177
 
7153
7178
  /** Config for LiveConnectConstraints for Auth Token creation. */
@@ -9974,7 +9999,7 @@ export declare enum StartSensitivity {
9974
9999
  declare type Step = UserInputStep | ModelOutputStep | ThoughtStep | FunctionCallStep | CodeExecutionCallStep | URLContextCallStep | MCPServerToolCallStep | GoogleSearchCallStep | FileSearchCallStep | GoogleMapsCallStep | FunctionResultStep | CodeExecutionResultStep | URLContextResultStep | GoogleSearchResultStep | MCPServerToolResultStep | FileSearchResultStep | GoogleMapsResultStep;
9975
10000
 
9976
10001
  declare interface StepDelta {
9977
- delta: StepDelta.Text | StepDelta.Image | StepDelta.Audio | StepDelta.Document | StepDelta.Video | StepDelta.ThoughtSummary | StepDelta.ThoughtSignature | StepDelta.TextAnnotationDelta | StepDelta.ArgumentsDelta | StepDelta.CodeExecutionCall | StepDelta.URLContextCall | StepDelta.GoogleSearchCall | StepDelta.MCPServerToolCall | StepDelta.FileSearchCall | StepDelta.GoogleMapsCall | StepDelta.CodeExecutionResult | StepDelta.URLContextResult | StepDelta.GoogleSearchResult | StepDelta.MCPServerToolResult | StepDelta.FileSearchResult | StepDelta.GoogleMapsResult;
10002
+ delta: StepDelta.Text | StepDelta.Image | StepDelta.Audio | StepDelta.Document | StepDelta.Video | StepDelta.ThoughtSummary | StepDelta.ThoughtSignature | StepDelta.TextAnnotationDelta | StepDelta.ArgumentsDelta | StepDelta.CodeExecutionCall | StepDelta.URLContextCall | StepDelta.GoogleSearchCall | StepDelta.MCPServerToolCall | StepDelta.FileSearchCall | StepDelta.GoogleMapsCall | StepDelta.CodeExecutionResult | StepDelta.URLContextResult | StepDelta.GoogleSearchResult | StepDelta.MCPServerToolResult | StepDelta.FileSearchResult | StepDelta.GoogleMapsResult | StepDelta.FunctionResult;
9978
10003
  event_type: 'step.delta';
9979
10004
  index: number;
9980
10005
  /**
@@ -10055,6 +10080,7 @@ declare namespace StepDelta {
10055
10080
  }
10056
10081
  interface ArgumentsDelta {
10057
10082
  type: 'arguments_delta';
10083
+ arguments?: string;
10058
10084
  }
10059
10085
  interface CodeExecutionCall {
10060
10086
  /**
@@ -10175,6 +10201,16 @@ declare namespace StepDelta {
10175
10201
  */
10176
10202
  signature?: string;
10177
10203
  }
10204
+ interface FunctionResult {
10205
+ /**
10206
+ * Required. ID to match the ID from the function call block.
10207
+ */
10208
+ call_id: string;
10209
+ result: unknown | Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent> | string;
10210
+ type: 'function_result';
10211
+ is_error?: boolean;
10212
+ name?: string;
10213
+ }
10178
10214
  }
10179
10215
 
10180
10216
  declare interface StepStart {
@@ -10238,6 +10274,17 @@ export declare interface StreamableHttpTransport {
10238
10274
  url?: string;
10239
10275
  }
10240
10276
 
10277
+ /** Config for stream translation. */
10278
+ export declare interface StreamTranslationConfig {
10279
+ /** If true, the model will generate audio when the target language is
10280
+ spoken, essentially it will parrot the input. If false, we will not produce
10281
+ audio for the target language. */
10282
+ echoTargetLanguage?: boolean;
10283
+ /** The target language for translation. Supported values are BCP-47
10284
+ language codes (e.g. "en", "es", "fr"). */
10285
+ targetLanguageCode?: string;
10286
+ }
10287
+
10241
10288
  /** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
10242
10289
  export declare interface StringList {
10243
10290
  /** The string values of the metadata to store. */
@@ -11835,6 +11882,7 @@ declare namespace types {
11835
11882
  LiveClientRealtimeInput,
11836
11883
  LiveClientToolResponse,
11837
11884
  LiveClientMessage,
11885
+ StreamTranslationConfig,
11838
11886
  LiveConnectConfig,
11839
11887
  LiveConnectParameters,
11840
11888
  CreateChatParameters,
@@ -12692,30 +12740,6 @@ export declare interface VideoMetadata {
12692
12740
  startOffset?: string;
12693
12741
  }
12694
12742
 
12695
- /**
12696
- * Configuration for video output format.
12697
- */
12698
- declare interface VideoResponseFormat {
12699
- type: 'video';
12700
- /**
12701
- * The aspect ratio for the video output.
12702
- */
12703
- aspectRatio?: '16:9' | '9:16';
12704
- /**
12705
- * The delivery mode for the video output.
12706
- */
12707
- delivery?: 'inline' | 'uri';
12708
- /**
12709
- * The duration for the video output.
12710
- */
12711
- duration?: string;
12712
- /**
12713
- * The GCS URI to store the video output. Required for Vertex if delivery mode is
12714
- * URI.
12715
- */
12716
- gcsUri?: string;
12717
- }
12718
-
12719
12743
  /** Voice activity signal. */
12720
12744
  export declare interface VoiceActivity {
12721
12745
  /** The type of the voice activity signal. */