@google/genai 2.9.0 → 2.10.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.
@@ -554,7 +554,7 @@ declare interface BatchJob {
554
554
  outputInfo?: BatchJobOutputInfo;
555
555
  }
556
556
 
557
- /** Config for `des` parameter. */
557
+ /** Config for `dest` parameter. */
558
558
  declare interface BatchJobDestination {
559
559
  /** Storage format of the output files. Must be one of:
560
560
  'jsonl', 'bigquery', 'vertex-dataset'.
@@ -933,15 +933,12 @@ declare interface CompositeReinforcementTuningRewardConfigWeightedRewardConfig {
933
933
  declare interface ComputerUse {
934
934
  /** Required. The environment being operated. */
935
935
  environment?: Environment;
936
- /** By default, predefined functions are included in the final model call.
937
- Some of them can be explicitly excluded from being automatically included.
938
- This can serve two purposes:
939
- 1. Using a more restricted / different action space.
940
- 2. Improving the definitions / instructions of predefined functions. */
936
+ /** Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions. */
941
937
  excludedPredefinedFunctions?: string[];
942
- /** Optional. Whether enable the prompt injection detection check on computer-use request.
943
- */
938
+ /** Optional. Enables the prompt injection detection check on computer-use request. */
944
939
  enablePromptInjectionDetection?: boolean;
940
+ /** Optional. Disabled safety policies for computer use. This field is not supported in Vertex AI. */
941
+ disabledSafetyPolicies?: SafetyPolicy[];
945
942
  }
946
943
 
947
944
  /** Optional parameters for computing tokens. */
@@ -5158,9 +5155,9 @@ declare interface LiveServerSessionResumptionUpdate {
5158
5155
  resumable?: boolean;
5159
5156
  /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.
5160
5157
 
5161
- Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).
5158
+ Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).
5162
5159
 
5163
- Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */
5160
+ Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames are likely not needed. */
5164
5161
  lastConsumedClientMessageIndex?: string;
5165
5162
  }
5166
5163
 
@@ -6401,6 +6398,42 @@ declare enum SafetyFilterLevel {
6401
6398
  BLOCK_NONE = "BLOCK_NONE"
6402
6399
  }
6403
6400
 
6401
+ /** SafetyPolicy */
6402
+ declare enum SafetyPolicy {
6403
+ /**
6404
+ * Unspecified safety policy.
6405
+ */
6406
+ SAFETY_POLICY_UNSPECIFIED = "SAFETY_POLICY_UNSPECIFIED",
6407
+ /**
6408
+ * Safety policy for financial transactions.
6409
+ */
6410
+ FINANCIAL_TRANSACTIONS = "FINANCIAL_TRANSACTIONS",
6411
+ /**
6412
+ * Safety policy for sensitive data modification.
6413
+ */
6414
+ SENSITIVE_DATA_MODIFICATION = "SENSITIVE_DATA_MODIFICATION",
6415
+ /**
6416
+ * Safety policy for communication tools (e.g. Gmail, Chat, Meet).
6417
+ */
6418
+ COMMUNICATION_TOOL = "COMMUNICATION_TOOL",
6419
+ /**
6420
+ * Safety policy for account creation.
6421
+ */
6422
+ ACCOUNT_CREATION = "ACCOUNT_CREATION",
6423
+ /**
6424
+ * Safety policy for data modification.
6425
+ */
6426
+ DATA_MODIFICATION = "DATA_MODIFICATION",
6427
+ /**
6428
+ * Safety policy for user consent management.
6429
+ */
6430
+ USER_CONSENT_MANAGEMENT = "USER_CONSENT_MANAGEMENT",
6431
+ /**
6432
+ * Safety policy for legal terms and agreements.
6433
+ */
6434
+ LEGAL_TERMS_AND_AGREEMENTS = "LEGAL_TERMS_AND_AGREEMENTS"
6435
+ }
6436
+
6404
6437
  /** A safety rating for a piece of content. The safety rating contains the harm category and the harm probability level. */
6405
6438
  declare interface SafetyRating {
6406
6439
  /** Output only. Indicates whether the content was blocked because of this rating. */
@@ -7026,9 +7059,7 @@ declare interface TokensInfo {
7026
7059
  declare interface Tool {
7027
7060
  /** 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. */
7028
7061
  retrieval?: Retrieval;
7029
- /** Optional. Tool to support the model interacting directly with the
7030
- computer. If enabled, it automatically populates computer-use specific
7031
- Function Declarations. */
7062
+ /** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
7032
7063
  computerUse?: ComputerUse;
7033
7064
  /** Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora. This field is not supported in Vertex AI. */
7034
7065
  fileSearch?: FileSearch;
@@ -7642,10 +7673,11 @@ declare namespace types {
7642
7673
  Language,
7643
7674
  FunctionResponseScheduling,
7644
7675
  Type,
7645
- Environment,
7646
7676
  AuthType,
7647
7677
  HttpElementLocation,
7648
7678
  ApiSpec,
7679
+ Environment,
7680
+ SafetyPolicy,
7649
7681
  PhishBlockThreshold,
7650
7682
  Behavior,
7651
7683
  DynamicRetrievalConfigMode,
@@ -7729,7 +7761,6 @@ declare namespace types {
7729
7761
  HttpOptions,
7730
7762
  Schema,
7731
7763
  ModelSelectionConfig,
7732
- ComputerUse,
7733
7764
  ApiKeyConfig,
7734
7765
  AuthConfigGoogleServiceAccountConfig,
7735
7766
  AuthConfigHttpBasicAuthConfig,
@@ -7753,6 +7784,7 @@ declare namespace types {
7753
7784
  RagRetrievalConfig,
7754
7785
  VertexRagStore,
7755
7786
  Retrieval,
7787
+ ComputerUse,
7756
7788
  FileSearch,
7757
7789
  WebSearch,
7758
7790
  ImageSearch,
@@ -416,26 +416,6 @@ var Type;
416
416
  */
417
417
  Type["NULL"] = "NULL";
418
418
  })(Type || (Type = {}));
419
- /** The environment being operated. */
420
- var Environment;
421
- (function (Environment) {
422
- /**
423
- * Defaults to browser.
424
- */
425
- Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
426
- /**
427
- * Operates in a web browser.
428
- */
429
- Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
430
- /**
431
- * Operates in a mobile environment.
432
- */
433
- Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
434
- /**
435
- * Operates in a desktop environment.
436
- */
437
- Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
438
- })(Environment || (Environment = {}));
439
419
  /** Type of auth scheme. This enum is not supported in Gemini API. */
440
420
  var AuthType;
441
421
  (function (AuthType) {
@@ -506,6 +486,62 @@ var ApiSpec;
506
486
  */
507
487
  ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
508
488
  })(ApiSpec || (ApiSpec = {}));
489
+ /** The environment being operated. */
490
+ var Environment;
491
+ (function (Environment) {
492
+ /**
493
+ * Defaults to browser.
494
+ */
495
+ Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
496
+ /**
497
+ * Operates in a web browser.
498
+ */
499
+ Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
500
+ /**
501
+ * Operates in a mobile environment.
502
+ */
503
+ Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
504
+ /**
505
+ * Operates in a desktop environment.
506
+ */
507
+ Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
508
+ })(Environment || (Environment = {}));
509
+ /** SafetyPolicy */
510
+ var SafetyPolicy;
511
+ (function (SafetyPolicy) {
512
+ /**
513
+ * Unspecified safety policy.
514
+ */
515
+ SafetyPolicy["SAFETY_POLICY_UNSPECIFIED"] = "SAFETY_POLICY_UNSPECIFIED";
516
+ /**
517
+ * Safety policy for financial transactions.
518
+ */
519
+ SafetyPolicy["FINANCIAL_TRANSACTIONS"] = "FINANCIAL_TRANSACTIONS";
520
+ /**
521
+ * Safety policy for sensitive data modification.
522
+ */
523
+ SafetyPolicy["SENSITIVE_DATA_MODIFICATION"] = "SENSITIVE_DATA_MODIFICATION";
524
+ /**
525
+ * Safety policy for communication tools (e.g. Gmail, Chat, Meet).
526
+ */
527
+ SafetyPolicy["COMMUNICATION_TOOL"] = "COMMUNICATION_TOOL";
528
+ /**
529
+ * Safety policy for account creation.
530
+ */
531
+ SafetyPolicy["ACCOUNT_CREATION"] = "ACCOUNT_CREATION";
532
+ /**
533
+ * Safety policy for data modification.
534
+ */
535
+ SafetyPolicy["DATA_MODIFICATION"] = "DATA_MODIFICATION";
536
+ /**
537
+ * Safety policy for user consent management.
538
+ */
539
+ SafetyPolicy["USER_CONSENT_MANAGEMENT"] = "USER_CONSENT_MANAGEMENT";
540
+ /**
541
+ * Safety policy for legal terms and agreements.
542
+ */
543
+ SafetyPolicy["LEGAL_TERMS_AND_AGREEMENTS"] = "LEGAL_TERMS_AND_AGREEMENTS";
544
+ })(SafetyPolicy || (SafetyPolicy = {}));
509
545
  /** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
510
546
  var PhishBlockThreshold;
511
547
  (function (PhishBlockThreshold) {
@@ -2146,7 +2182,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
2146
2182
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
2147
2183
  const USER_AGENT_HEADER = 'User-Agent';
2148
2184
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
2149
- const SDK_VERSION = '2.9.0'; // x-release-please-version
2185
+ const SDK_VERSION = '2.10.0'; // x-release-please-version
2150
2186
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
2151
2187
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
2152
2188
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';