@google/genai 2.5.0 → 2.7.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.
@@ -328,18 +328,6 @@ function uploadToFileSearchStoreResponseFromMldev(fromObject) {
328
328
  * Copyright 2025 Google LLC
329
329
  * SPDX-License-Identifier: Apache-2.0
330
330
  */
331
- /** Programming language of the `code`. */
332
- var Language;
333
- (function (Language) {
334
- /**
335
- * Unspecified language. This value should not be used.
336
- */
337
- Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
338
- /**
339
- * Python >= 3.10, with numpy and simpy available.
340
- */
341
- Language["PYTHON"] = "PYTHON";
342
- })(Language || (Language = {}));
343
331
  /** Outcome of the code execution. */
344
332
  var Outcome;
345
333
  (function (Outcome) {
@@ -348,18 +336,30 @@ var Outcome;
348
336
  */
349
337
  Outcome["OUTCOME_UNSPECIFIED"] = "OUTCOME_UNSPECIFIED";
350
338
  /**
351
- * Code execution completed successfully.
339
+ * Code execution completed successfully. `output` contains the stdout, if any.
352
340
  */
353
341
  Outcome["OUTCOME_OK"] = "OUTCOME_OK";
354
342
  /**
355
- * Code execution finished but with a failure. `stderr` should contain the reason.
343
+ * Code execution failed. `output` contains the stderr and stdout, if any.
356
344
  */
357
345
  Outcome["OUTCOME_FAILED"] = "OUTCOME_FAILED";
358
346
  /**
359
- * Code execution ran for too long, and was cancelled. There may or may not be a partial output present.
347
+ * Code execution ran for too long, and was cancelled. There may or may not be a partial `output` present.
360
348
  */
361
349
  Outcome["OUTCOME_DEADLINE_EXCEEDED"] = "OUTCOME_DEADLINE_EXCEEDED";
362
350
  })(Outcome || (Outcome = {}));
351
+ /** Programming language of the `code`. */
352
+ var Language;
353
+ (function (Language) {
354
+ /**
355
+ * Unspecified language. This value should not be used.
356
+ */
357
+ Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
358
+ /**
359
+ * Python >= 3.10, with numpy and simpy available.
360
+ */
361
+ Language["PYTHON"] = "PYTHON";
362
+ })(Language || (Language = {}));
363
363
  /** Specifies how the response should be scheduled in the conversation. */
364
364
  var FunctionResponseScheduling;
365
365
  (function (FunctionResponseScheduling) {
@@ -427,6 +427,14 @@ var Environment;
427
427
  * Operates in a web browser.
428
428
  */
429
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";
430
438
  })(Environment || (Environment = {}));
431
439
  /** Type of auth scheme. This enum is not supported in Gemini API. */
432
440
  var AuthType;
@@ -558,30 +566,6 @@ var DynamicRetrievalConfigMode;
558
566
  */
559
567
  DynamicRetrievalConfigMode["MODE_DYNAMIC"] = "MODE_DYNAMIC";
560
568
  })(DynamicRetrievalConfigMode || (DynamicRetrievalConfigMode = {}));
561
- /** Function calling mode. */
562
- var FunctionCallingConfigMode;
563
- (function (FunctionCallingConfigMode) {
564
- /**
565
- * Unspecified function calling mode. This value should not be used.
566
- */
567
- FunctionCallingConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
568
- /**
569
- * Default model behavior, model decides to predict either function calls or natural language response.
570
- */
571
- FunctionCallingConfigMode["AUTO"] = "AUTO";
572
- /**
573
- * Model is constrained to always predicting function calls only. 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".
574
- */
575
- FunctionCallingConfigMode["ANY"] = "ANY";
576
- /**
577
- * Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
578
- */
579
- FunctionCallingConfigMode["NONE"] = "NONE";
580
- /**
581
- * 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".
582
- */
583
- FunctionCallingConfigMode["VALIDATED"] = "VALIDATED";
584
- })(FunctionCallingConfigMode || (FunctionCallingConfigMode = {}));
585
569
  /** The number of thoughts tokens that the model should generate. */
586
570
  var ThinkingLevel;
587
571
  (function (ThinkingLevel) {
@@ -730,6 +714,30 @@ var HarmBlockThreshold;
730
714
  */
731
715
  HarmBlockThreshold["OFF"] = "OFF";
732
716
  })(HarmBlockThreshold || (HarmBlockThreshold = {}));
717
+ /** Function calling mode. */
718
+ var FunctionCallingConfigMode;
719
+ (function (FunctionCallingConfigMode) {
720
+ /**
721
+ * Unspecified function calling mode. This value should not be used.
722
+ */
723
+ FunctionCallingConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
724
+ /**
725
+ * Default model behavior, model decides to predict either function calls or natural language response.
726
+ */
727
+ FunctionCallingConfigMode["AUTO"] = "AUTO";
728
+ /**
729
+ * Model is constrained to always predicting function calls only. 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".
730
+ */
731
+ FunctionCallingConfigMode["ANY"] = "ANY";
732
+ /**
733
+ * Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
734
+ */
735
+ FunctionCallingConfigMode["NONE"] = "NONE";
736
+ /**
737
+ * 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".
738
+ */
739
+ FunctionCallingConfigMode["VALIDATED"] = "VALIDATED";
740
+ })(FunctionCallingConfigMode || (FunctionCallingConfigMode = {}));
733
741
  /** Output only. The reason why the model stopped generating tokens.
734
742
 
735
743
  If empty, the model has not stopped generating the tokens. */
@@ -1212,7 +1220,23 @@ var PairwiseChoice;
1212
1220
  */
1213
1221
  PairwiseChoice["TIE"] = "TIE";
1214
1222
  })(PairwiseChoice || (PairwiseChoice = {}));
1215
- /** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
1223
+ /** The speed of the tuning job. Only supported for Veo 3.0 models. This enum is not supported in Gemini API. */
1224
+ var TuningSpeed;
1225
+ (function (TuningSpeed) {
1226
+ /**
1227
+ * The default / unset value. For Veo 3.0 models, this defaults to FAST.
1228
+ */
1229
+ TuningSpeed["TUNING_SPEED_UNSPECIFIED"] = "TUNING_SPEED_UNSPECIFIED";
1230
+ /**
1231
+ * Regular tuning speed.
1232
+ */
1233
+ TuningSpeed["REGULAR"] = "REGULAR";
1234
+ /**
1235
+ * Fast tuning speed.
1236
+ */
1237
+ TuningSpeed["FAST"] = "FAST";
1238
+ })(TuningSpeed || (TuningSpeed = {}));
1239
+ /** The tuning task for Veo. This enum is not supported in Gemini API. */
1216
1240
  var TuningTask;
1217
1241
  (function (TuningTask) {
1218
1242
  /**
@@ -1232,6 +1256,22 @@ var TuningTask;
1232
1256
  */
1233
1257
  TuningTask["TUNING_TASK_R2V"] = "TUNING_TASK_R2V";
1234
1258
  })(TuningTask || (TuningTask = {}));
1259
+ /** The orientation of the video. Defaults to LANDSCAPE. This enum is not supported in Gemini API. */
1260
+ var VideoOrientation;
1261
+ (function (VideoOrientation) {
1262
+ /**
1263
+ * Unspecified video orientation. Defaults to landscape.
1264
+ */
1265
+ VideoOrientation["VIDEO_ORIENTATION_UNSPECIFIED"] = "VIDEO_ORIENTATION_UNSPECIFIED";
1266
+ /**
1267
+ * Landscape orientation (e.g. 16:9, 1280x720).
1268
+ */
1269
+ VideoOrientation["LANDSCAPE"] = "LANDSCAPE";
1270
+ /**
1271
+ * Portrait orientation (e.g. 9:16, 720x1280).
1272
+ */
1273
+ VideoOrientation["PORTRAIT"] = "PORTRAIT";
1274
+ })(VideoOrientation || (VideoOrientation = {}));
1235
1275
  /** Output only. Current state of the `Document`. This enum is not supported in Vertex AI. */
1236
1276
  var DocumentState;
1237
1277
  (function (DocumentState) {
@@ -1531,6 +1571,10 @@ var TuningMethod;
1531
1571
  * Distillation tuning.
1532
1572
  */
1533
1573
  TuningMethod["DISTILLATION"] = "DISTILLATION";
1574
+ /**
1575
+ * Reinforcement tuning.
1576
+ */
1577
+ TuningMethod["REINFORCEMENT_TUNING"] = "REINFORCEMENT_TUNING";
1534
1578
  })(TuningMethod || (TuningMethod = {}));
1535
1579
  /** State for the lifecycle of a File. */
1536
1580
  var FileState;
@@ -2050,7 +2094,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
2050
2094
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
2051
2095
  const USER_AGENT_HEADER = 'User-Agent';
2052
2096
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
2053
- const SDK_VERSION = '2.5.0'; // x-release-please-version
2097
+ const SDK_VERSION = '2.7.0'; // x-release-please-version
2054
2098
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
2055
2099
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
2056
2100
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';