@google/genai 2.4.0 → 2.6.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
@@ -84,7 +84,7 @@ declare interface Agent {
84
84
  /**
85
85
  * The environment configuration for the agent.
86
86
  */
87
- base_environment?: string | InteractionsAPI.Environment;
87
+ base_environment?: InteractionsAPI.Environment | string;
88
88
  /**
89
89
  * Agent description for developers to quickly read and understand.
90
90
  */
@@ -164,7 +164,7 @@ declare interface AgentCreateParams {
164
164
  /**
165
165
  * Body param: The environment configuration for the agent.
166
166
  */
167
- base_environment?: string | InteractionsAPI.Environment;
167
+ base_environment?: InteractionsAPI.Environment | string;
168
168
  /**
169
169
  * Body param: Agent description for developers to quickly read and understand.
170
170
  */
@@ -1447,7 +1447,7 @@ export declare interface BatchJobOutputInfo {
1447
1447
  vertexMultimodalDatasetName?: string;
1448
1448
  /** The full path of the Cloud Storage directory created, into which the prediction output is written. */
1449
1449
  gcsOutputDirectory?: string;
1450
- /** The name of the BigQuery table created, in `predictions_<timestamp>` format, into which the prediction output is written. */
1450
+ /** The name of the BigQuery table created, in `predictions_TIMESTAMP` format, into which the prediction output is written. */
1451
1451
  bigqueryOutputTable?: string;
1452
1452
  }
1453
1453
 
@@ -2079,15 +2079,13 @@ declare namespace CodeExecutionCallStep {
2079
2079
  }
2080
2080
  }
2081
2081
 
2082
- /** Result of executing the `ExecutableCode`.
2083
-
2084
- Generated only when the `CodeExecution` tool is used. */
2082
+ /** Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. */
2085
2083
  export declare interface CodeExecutionResult {
2086
2084
  /** Required. Outcome of the code execution. */
2087
2085
  outcome?: Outcome;
2088
2086
  /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */
2089
2087
  output?: string;
2090
- /** The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. */
2088
+ /** Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. This field is not supported in Vertex AI. */
2091
2089
  id?: string;
2092
2090
  }
2093
2091
 
@@ -2136,6 +2134,9 @@ export declare interface ComputerUse {
2136
2134
  1. Using a more restricted / different action space.
2137
2135
  2. Improving the definitions / instructions of predefined functions. */
2138
2136
  excludedPredefinedFunctions?: string[];
2137
+ /** Optional. Whether enable the prompt injection detection check on computer-use request.
2138
+ */
2139
+ enablePromptInjectionDetection?: boolean;
2139
2140
  }
2140
2141
 
2141
2142
  /** Optional parameters for computing tokens. */
@@ -3021,35 +3022,51 @@ export declare interface DistillationDataStats {
3021
3022
  trainingDatasetStats?: DatasetStats;
3022
3023
  }
3023
3024
 
3024
- /** Hyperparameters for distillation. */
3025
+ /** Distillation hyperparameters for tuning. */
3025
3026
  export declare interface DistillationHyperParameters {
3026
- /** Optional. Adapter size for distillation. */
3027
+ /** The size of the adapter. Can be 'small', 'medium', or 'large'. */
3027
3028
  adapterSize?: AdapterSize;
3028
- /** Optional. Number of complete passes the model makes over the entire training dataset during training. */
3029
+ /** Number of complete passes the model makes over the entire training dataset
3030
+ during training. */
3029
3031
  epochCount?: string;
3030
- /** Optional. Multiplier for adjusting the default learning rate. */
3032
+ /** Multiplier for adjusting the default learning rate. */
3031
3033
  learningRateMultiplier?: number;
3032
- /** The batch size hyperparameter for tuning.
3033
- This is only supported for OSS models in Gemini Enterprise Agent Platform.
3034
- */
3035
- batchSize?: number;
3036
- /** The learning rate for tuning. OSS models only. */
3034
+ /** Generation config for Distillation teacher model sampling. Only the
3035
+ following fields are supported for distillation teacher samplings:
3036
+ - temperature
3037
+ - top_p
3038
+ - top_k
3039
+ - candidate_count
3040
+ - thinking_config */
3041
+ generationConfig?: GenerationConfig;
3042
+ /** The learning rate for distillation tuning. */
3037
3043
  learningRate?: number;
3044
+ /** Batch size for tuning. This feature is only available for open
3045
+ source models. */
3046
+ batchSize?: number;
3038
3047
  }
3039
3048
 
3040
- /** Spec for creating a distilled dataset in Vertex Dataset. This data type is not supported in Gemini API. */
3049
+ /** Distillation sampling spec for tuning. */
3041
3050
  export declare interface DistillationSamplingSpec {
3042
- /** Optional. The base teacher model that is being distilled. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models). */
3051
+ /** The base teacher model that is being distilled. See [Supported
3052
+ models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models). */
3043
3053
  baseTeacherModel?: string;
3044
- /** Optional. The resource name of the Tuned teacher model. Format: `projects/{project}/locations/{location}/models/{model}`. */
3054
+ /** The resource name of the Tuned teacher model. Format:
3055
+ `projects/{project}/locations/{location}/models/{model}`. */
3045
3056
  tunedTeacherModelSource?: string;
3046
- /** Optional. Cloud Storage path to file containing validation dataset for distillation. The dataset must be formatted as a JSONL file. */
3057
+ /** Cloud Storage path to file containing validation dataset for distillation.
3058
+ The dataset must be formatted as a JSONL file. */
3047
3059
  validationDatasetUri?: string;
3060
+ /** Cloud Storage path to file containing prompt dataset for distillation.
3061
+ The dataset must be formatted as a JSONL file. */
3062
+ promptDatasetUri?: string;
3063
+ /** Hyperparameters for distillation tuning. */
3064
+ hyperparameters?: DistillationHyperParameters;
3048
3065
  }
3049
3066
 
3050
3067
  /** Distillation tuning spec for tuning. */
3051
3068
  export declare interface DistillationSpec {
3052
- /** The GCS URI of the prompt dataset to use during distillation. */
3069
+ /** Optional. Cloud Storage path to file containing prompt dataset for distillation. The dataset must be formatted as a JSONL file. */
3053
3070
  promptDatasetUri?: string;
3054
3071
  /** The base teacher model that is being distilled. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models). */
3055
3072
  baseTeacherModel?: string;
@@ -3065,7 +3082,7 @@ export declare interface DistillationSpec {
3065
3082
  tunedTeacherModelSource?: string;
3066
3083
  /** Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. */
3067
3084
  validationDatasetUri?: string;
3068
- /** Tuning mode for tuning. */
3085
+ /** Optional. Specifies the tuning mode for distillation (sft part). This feature is only available for open source models. */
3069
3086
  tuningMode?: TuningMode;
3070
3087
  }
3071
3088
 
@@ -3342,15 +3359,6 @@ export declare interface EmbedContentBatch {
3342
3359
 
3343
3360
  /** Optional parameters for the embed_content method. */
3344
3361
  export declare interface EmbedContentConfig {
3345
- /** Used to override HTTP request options. */
3346
- httpOptions?: HttpOptions;
3347
- /** Abort signal which can be used to cancel the request.
3348
-
3349
- NOTE: AbortSignal is a client-only operation. Using it to cancel an
3350
- operation will not cancel the request in the service. You will still
3351
- be charged usage for any applicable operations.
3352
- */
3353
- abortSignal?: AbortSignal;
3354
3362
  /** Type of task for which the embedding will be used.
3355
3363
  */
3356
3364
  taskType?: string;
@@ -3380,6 +3388,15 @@ export declare interface EmbedContentConfig {
3380
3388
  Only applicable to Gemini Embedding 2 models.
3381
3389
  */
3382
3390
  audioTrackExtraction?: boolean;
3391
+ /** Used to override HTTP request options. */
3392
+ httpOptions?: HttpOptions;
3393
+ /** Abort signal which can be used to cancel the request.
3394
+
3395
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
3396
+ operation will not cancel the request in the service. You will still
3397
+ be charged usage for any applicable operations.
3398
+ */
3399
+ abortSignal?: AbortSignal;
3383
3400
  }
3384
3401
 
3385
3402
  /** Request-level metadata for the Gemini Enterprise Agent Platform Embed Content API. */
@@ -3512,7 +3529,15 @@ export declare enum Environment {
3512
3529
  /**
3513
3530
  * Operates in a web browser.
3514
3531
  */
3515
- ENVIRONMENT_BROWSER = "ENVIRONMENT_BROWSER"
3532
+ ENVIRONMENT_BROWSER = "ENVIRONMENT_BROWSER",
3533
+ /**
3534
+ * Operates in a mobile environment.
3535
+ */
3536
+ ENVIRONMENT_MOBILE = "ENVIRONMENT_MOBILE",
3537
+ /**
3538
+ * Operates in a desktop environment.
3539
+ */
3540
+ ENVIRONMENT_DESKTOP = "ENVIRONMENT_DESKTOP"
3516
3541
  }
3517
3542
 
3518
3543
  /**
@@ -3668,17 +3693,13 @@ export declare interface ExactMatchMetricValue {
3668
3693
  score?: number;
3669
3694
  }
3670
3695
 
3671
- /** Model-generated code executed server-side, results returned to the model.
3672
-
3673
- Only generated when using the `CodeExecution` tool, in which the code will
3674
- be automatically executed, and a corresponding `CodeExecutionResult` will
3675
- also be generated. */
3696
+ /** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. */
3676
3697
  export declare interface ExecutableCode {
3677
3698
  /** Required. The code to be executed. */
3678
3699
  code?: string;
3679
3700
  /** Required. Programming language of the `code`. */
3680
3701
  language?: Language;
3681
- /** Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. */
3702
+ /** Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. This field is not supported in Vertex AI. */
3682
3703
  id?: string;
3683
3704
  }
3684
3705
 
@@ -3999,22 +4020,21 @@ declare interface FileSearchResultStep {
3999
4020
 
4000
4021
  /** A collection of Documents. */
4001
4022
  export declare interface FileSearchStore {
4002
- /** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
4023
+ /** Output only. Immutable. Identifier. The `FileSearchStore` resource name. It is an ID (name excluding the "fileSearchStores/" prefix) that can contain up to 40 characters that are lowercase alphanumeric or dashes (-). It is output only. The unique name will be derived from `display_name` along with a 12 character random suffix. Example: `fileSearchStores/my-awesome-file-search-store-123a456b789c` If `display_name` is not provided, the name will be randomly generated. */
4003
4024
  name?: string;
4004
- /** The human-readable display name for the FileSearchStore. */
4025
+ /** Optional. The human-readable display name for the `FileSearchStore`. The display name must be no more than 512 characters in length, including spaces. Example: "Docs on Semantic Retriever". */
4005
4026
  displayName?: string;
4006
- /** The Timestamp of when the FileSearchStore was created. */
4027
+ /** Output only. The Timestamp of when the `FileSearchStore` was created. */
4007
4028
  createTime?: string;
4008
- /** The Timestamp of when the FileSearchStore was last updated. */
4029
+ /** Output only. The Timestamp of when the `FileSearchStore` was last updated. */
4009
4030
  updateTime?: string;
4010
- /** The number of documents in the FileSearchStore that are active and ready for retrieval. */
4031
+ /** Output only. The number of documents in the `FileSearchStore` that are active and ready for retrieval. */
4011
4032
  activeDocumentsCount?: string;
4012
- /** The number of documents in the FileSearchStore that are being processed. */
4033
+ /** Output only. The number of documents in the `FileSearchStore` that are being processed. */
4013
4034
  pendingDocumentsCount?: string;
4014
- /** The number of documents in the FileSearchStore that have failed processing. */
4035
+ /** Output only. The number of documents in the `FileSearchStore` that have failed processing. */
4015
4036
  failedDocumentsCount?: string;
4016
- /** The size of raw bytes ingested into the FileSearchStore. This is the
4017
- total size of all the documents in the FileSearchStore. */
4037
+ /** Output only. The size of raw bytes ingested into the `FileSearchStore`. This is the total size of all the documents in the `FileSearchStore`. */
4018
4038
  sizeBytes?: string;
4019
4039
  /** The embedding model used by the FileSearchStore. */
4020
4040
  embeddingModel?: string;
@@ -4278,9 +4298,9 @@ export declare interface FunctionCall {
4278
4298
  /** The unique id of the function call. If populated, the client to execute the
4279
4299
  `function_call` and return the response with the matching `id`. */
4280
4300
  id?: string;
4281
- /** Optional. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */
4301
+ /** Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details. */
4282
4302
  args?: Record<string, unknown>;
4283
- /** Optional. The name of the function to call. Matches [FunctionDeclaration.name]. */
4303
+ /** Optional. The name of the function to call. Matches FunctionDeclaration.name. */
4284
4304
  name?: string;
4285
4305
  /** Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally. This field is not supported in Gemini API. */
4286
4306
  partialArgs?: PartialArg[];
@@ -4290,11 +4310,11 @@ export declare interface FunctionCall {
4290
4310
 
4291
4311
  /** Function calling config. */
4292
4312
  export declare interface FunctionCallingConfig {
4293
- /** 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. */
4313
+ /** 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. */
4294
4314
  allowedFunctionNames?: string[];
4295
4315
  /** Optional. Function calling mode. */
4296
4316
  mode?: FunctionCallingConfigMode;
4297
- /** 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. */
4317
+ /** 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. */
4298
4318
  streamFunctionCallArguments?: boolean;
4299
4319
  }
4300
4320
 
@@ -4351,7 +4371,7 @@ declare interface FunctionCallStep {
4351
4371
  export declare interface FunctionDeclaration {
4352
4372
  /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */
4353
4373
  description?: string;
4354
- /** 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, colons and dashes, with a maximum length of 64. */
4374
+ /** 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, colons and dashes, with a maximum length of 128. */
4355
4375
  name?: string;
4356
4376
  /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */
4357
4377
  parameters?: Schema;
@@ -4376,7 +4396,7 @@ export declare class FunctionResponse {
4376
4396
  parts?: FunctionResponsePart[];
4377
4397
  /** Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`. */
4378
4398
  id?: string;
4379
- /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */
4399
+ /** Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name. */
4380
4400
  name?: string;
4381
4401
  /** Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. */
4382
4402
  response?: Record<string, unknown>;
@@ -5139,7 +5159,7 @@ export declare interface GenerationConfig {
5139
5159
  presencePenalty?: number;
5140
5160
  /** Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model's confidence in its own output and for debugging. */
5141
5161
  responseLogprobs?: boolean;
5142
- /** Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include 'text/plain' (default) and 'application/json'. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */
5162
+ /** Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include 'text/plain' (default) and 'application/json'. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. */
5143
5163
  responseMimeType?: string;
5144
5164
  /** Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image. */
5145
5165
  responseModalities?: Modality[];
@@ -5972,9 +5992,9 @@ export declare interface GroundingChunkRetrievedContext {
5972
5992
  customMetadata?: GroundingChunkCustomMetadata[];
5973
5993
  /** Optional. Name of the `FileSearchStore` containing the document. Example: `fileSearchStores/123`. This field is not supported in Vertex AI. */
5974
5994
  fileSearchStore?: string;
5975
- /** Optional. Page number of the retrieved context. This field is not supported in Vertex AI. */
5995
+ /** Optional. Page number of the retrieved context, if applicable. This field is not supported in Vertex AI. */
5976
5996
  pageNumber?: number;
5977
- /** Optional. Media ID. This field is not supported in Vertex AI. */
5997
+ /** Optional. The media blob resource name for multimodal file search results. Format: fileSearchStores/{file_search_store_id}/media/{blob_id}. This field is not supported in Vertex AI. */
5978
5998
  mediaId?: string;
5979
5999
  }
5980
6000
 
@@ -6575,7 +6595,7 @@ declare interface Interaction {
6575
6595
  /**
6576
6596
  * Required. Output only. The status of the interaction.
6577
6597
  */
6578
- status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
6598
+ status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete' | 'budget_exceeded';
6579
6599
  /**
6580
6600
  * Required. Output only. The steps that make up the interaction.
6581
6601
  */
@@ -6863,7 +6883,7 @@ declare type InteractionSSEEvent = InteractionCreatedEvent | InteractionComplete
6863
6883
  declare interface InteractionStatusUpdate {
6864
6884
  event_type: 'interaction.status_update';
6865
6885
  interaction_id: string;
6866
- status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
6886
+ status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete' | 'budget_exceeded';
6867
6887
  /**
6868
6888
  * The event_id token to be used to resume the interaction stream, from this event.
6869
6889
  */
@@ -8054,7 +8074,7 @@ export declare enum MaskReferenceMode {
8054
8074
  MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
8055
8075
  }
8056
8076
 
8057
- /** A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 5. This data type is not supported in Vertex AI. */
8077
+ /** A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 6. This data type is not supported in Vertex AI. */
8058
8078
  export declare interface McpServer {
8059
8079
  /** The name of the MCPServer. */
8060
8080
  name?: string;
@@ -8277,7 +8297,7 @@ export declare interface Model {
8277
8297
  * The model that will complete your prompt.\n\nSee
8278
8298
  * [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
8279
8299
  */
8280
- declare type Model_2 = 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
8300
+ declare type Model_2 = 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | 'gemini-3.5-flash' | (string & {});
8281
8301
 
8282
8302
  /** Configuration for Model Armor. Model Armor is a Google Cloud service that provides safety and security filtering for prompts and responses. It helps protect your AI applications from risks such as harmful content, sensitive data leakage, and prompt injection attacks. This data type is not supported in Gemini API. */
8283
8303
  export declare interface ModelArmorConfig {
@@ -8856,15 +8876,15 @@ export declare enum Outcome {
8856
8876
  */
8857
8877
  OUTCOME_UNSPECIFIED = "OUTCOME_UNSPECIFIED",
8858
8878
  /**
8859
- * Code execution completed successfully.
8879
+ * Code execution completed successfully. `output` contains the stdout, if any.
8860
8880
  */
8861
8881
  OUTCOME_OK = "OUTCOME_OK",
8862
8882
  /**
8863
- * Code execution finished but with a failure. `stderr` should contain the reason.
8883
+ * Code execution failed. `output` contains the stderr and stdout, if any.
8864
8884
  */
8865
8885
  OUTCOME_FAILED = "OUTCOME_FAILED",
8866
8886
  /**
8867
- * Code execution ran for too long, and was cancelled. There may or may not be a partial output present.
8887
+ * Code execution ran for too long, and was cancelled. There may or may not be a partial `output` present.
8868
8888
  */
8869
8889
  OUTCOME_DEADLINE_EXCEEDED = "OUTCOME_DEADLINE_EXCEEDED"
8870
8890
  }
@@ -9377,6 +9397,10 @@ export declare interface RagChunk {
9377
9397
  pageSpan?: RagChunkPageSpan;
9378
9398
  /** The content of the chunk. */
9379
9399
  text?: string;
9400
+ /** The ID of the chunk. */
9401
+ chunkId?: string;
9402
+ /** The ID of the file that the chunk belongs to. */
9403
+ fileId?: string;
9380
9404
  }
9381
9405
 
9382
9406
  /** Represents where the chunk starts and ends in the document. This data type is not supported in Gemini API. */
@@ -11173,7 +11197,7 @@ declare interface ToolChoiceConfig {
11173
11197
 
11174
11198
  declare type ToolChoiceType = 'auto' | 'any' | 'none' | 'validated';
11175
11199
 
11176
- /** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. This data type is not supported in Gemini API. */
11200
+ /** Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. This data type is not supported in Gemini API. */
11177
11201
  export declare interface ToolCodeExecution {
11178
11202
  }
11179
11203
 
@@ -11410,10 +11434,11 @@ export declare interface TuningJob {
11410
11434
  tuningJobState?: TuningJobState;
11411
11435
  /** Tuning Spec for Veo Tuning. */
11412
11436
  veoTuningSpec?: VeoTuningSpec;
11413
- /** Optional. Spec for creating a distillation dataset. */
11414
- distillationSamplingSpec?: DistillationSamplingSpec;
11415
11437
  /** Output only. Tuning Job metadata. */
11416
11438
  tuningJobMetadata?: TuningJobMetadata;
11439
+ /** Tuning Spec for Veo LoRA Tuning. */
11440
+ veoLoraTuningSpec?: VeoLoraTuningSpec;
11441
+ distillationSamplingSpec?: DistillationSamplingSpec;
11417
11442
  }
11418
11443
 
11419
11444
  /** Tuning job metadata. This data type is not supported in Gemini API. */
@@ -11554,7 +11579,23 @@ declare class Tunings extends BaseModule {
11554
11579
  private tuneMldevInternal;
11555
11580
  }
11556
11581
 
11557
- /** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
11582
+ /** The speed of the tuning job. Only supported for Veo 3.0 models. This enum is not supported in Gemini API. */
11583
+ export declare enum TuningSpeed {
11584
+ /**
11585
+ * The default / unset value. For Veo 3.0 models, this defaults to FAST.
11586
+ */
11587
+ TUNING_SPEED_UNSPECIFIED = "TUNING_SPEED_UNSPECIFIED",
11588
+ /**
11589
+ * Regular tuning speed.
11590
+ */
11591
+ REGULAR = "REGULAR",
11592
+ /**
11593
+ * Fast tuning speed.
11594
+ */
11595
+ FAST = "FAST"
11596
+ }
11597
+
11598
+ /** The tuning task for Veo. This enum is not supported in Gemini API. */
11558
11599
  export declare enum TuningTask {
11559
11600
  /**
11560
11601
  * Default value. This value is unused.
@@ -11766,8 +11807,8 @@ declare namespace types {
11766
11807
  createPartFromExecutableCode,
11767
11808
  createUserContent,
11768
11809
  createModelContent,
11769
- Language,
11770
11810
  Outcome,
11811
+ Language,
11771
11812
  FunctionResponseScheduling,
11772
11813
  Type,
11773
11814
  Environment,
@@ -11799,7 +11840,9 @@ declare namespace types {
11799
11840
  TuningJobState,
11800
11841
  AggregationMetric,
11801
11842
  PairwiseChoice,
11843
+ TuningSpeed,
11802
11844
  TuningTask,
11845
+ VideoOrientation,
11803
11846
  DocumentState,
11804
11847
  PartMediaResolutionLevel,
11805
11848
  ToolType,
@@ -11832,11 +11875,11 @@ declare namespace types {
11832
11875
  Scale,
11833
11876
  MusicGenerationMode,
11834
11877
  LiveMusicPlaybackControl,
11835
- ExecutableCode,
11836
- CodeExecutionResult,
11837
11878
  PartMediaResolution,
11838
11879
  ToolCall,
11839
11880
  ToolResponse,
11881
+ CodeExecutionResult,
11882
+ ExecutableCode,
11840
11883
  FileData,
11841
11884
  PartialArg,
11842
11885
  FunctionCall,
@@ -12024,6 +12067,7 @@ declare namespace types {
12024
12067
  PreferenceOptimizationHyperParameters,
12025
12068
  PreferenceOptimizationSpec,
12026
12069
  DistillationHyperParameters,
12070
+ DistillationSamplingSpec,
12027
12071
  DistillationSpec,
12028
12072
  GoogleRpcStatus,
12029
12073
  PreTunedModel,
@@ -12059,8 +12103,8 @@ declare namespace types {
12059
12103
  FullFineTuningSpec,
12060
12104
  VeoHyperParameters,
12061
12105
  VeoTuningSpec,
12062
- DistillationSamplingSpec,
12063
12106
  TuningJobMetadata,
12107
+ VeoLoraTuningSpec,
12064
12108
  TuningJob,
12065
12109
  ListTuningJobsConfig,
12066
12110
  ListTuningJobsParameters,
@@ -12878,10 +12922,26 @@ export declare interface VeoHyperParameters {
12878
12922
  epochCount?: string;
12879
12923
  /** Optional. Multiplier for adjusting the default learning rate. */
12880
12924
  learningRateMultiplier?: number;
12881
- /** Optional. The tuning task. Either I2V or T2V. */
12925
+ /** The tuning task for Veo. */
12882
12926
  tuningTask?: TuningTask;
12883
12927
  /** Optional. The ratio of Google internal dataset to use in the training mixture, in range of `[0, 1)`. If `0.2`, it means 20% of Google internal dataset and 80% of user dataset will be used for training. If not set, the default value is 0.1. */
12884
12928
  veoDataMixtureRatio?: number;
12929
+ /** Optional. The adapter size for LoRA tuning. */
12930
+ adapterSize?: AdapterSize;
12931
+ /** The speed of the tuning job. Only supported for Veo 3.0 models. */
12932
+ tuningSpeed?: TuningSpeed;
12933
+ }
12934
+
12935
+ /** Tuning Spec for Veo LoRA Model Tuning. This data type is not supported in Gemini API. */
12936
+ export declare interface VeoLoraTuningSpec {
12937
+ /** Optional. Hyperparameters for Veo LoRA. */
12938
+ hyperParameters?: VeoHyperParameters;
12939
+ /** Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset. */
12940
+ trainingDatasetUri?: string;
12941
+ /** Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset. */
12942
+ validationDatasetUri?: string;
12943
+ /** Optional. The orientation of the video. Defaults to LANDSCAPE. */
12944
+ videoOrientation?: VideoOrientation;
12885
12945
  }
12886
12946
 
12887
12947
  /** Tuning Spec for Veo Model Tuning. This data type is not supported in Gemini API. */
@@ -13069,6 +13129,22 @@ export declare interface VideoMetadata {
13069
13129
  startOffset?: string;
13070
13130
  }
13071
13131
 
13132
+ /** The orientation of the video. Defaults to LANDSCAPE. This enum is not supported in Gemini API. */
13133
+ export declare enum VideoOrientation {
13134
+ /**
13135
+ * Unspecified video orientation. Defaults to landscape.
13136
+ */
13137
+ VIDEO_ORIENTATION_UNSPECIFIED = "VIDEO_ORIENTATION_UNSPECIFIED",
13138
+ /**
13139
+ * Landscape orientation (e.g. 16:9, 1280x720).
13140
+ */
13141
+ LANDSCAPE = "LANDSCAPE",
13142
+ /**
13143
+ * Portrait orientation (e.g. 9:16, 720x1280).
13144
+ */
13145
+ PORTRAIT = "PORTRAIT"
13146
+ }
13147
+
13072
13148
  /** Voice activity signal. */
13073
13149
  export declare interface VoiceActivity {
13074
13150
  /** The type of the voice activity signal. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/genai",
3
- "version": "2.4.0",
3
+ "version": "2.6.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/node/index.mjs",