@firebase/ai 2.10.0-canary.ba0bc39bb → 2.10.0-canary.bfb9accdc

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.
@@ -8,7 +8,7 @@ var util = require('@firebase/util');
8
8
  var logger$1 = require('@firebase/logger');
9
9
 
10
10
  var name = "@firebase/ai";
11
- var version = "2.10.0-canary.ba0bc39bb";
11
+ var version = "2.10.0-canary.bfb9accdc";
12
12
 
13
13
  /**
14
14
  * @license
@@ -609,6 +609,11 @@ const SchemaType = {
609
609
  * and the {@link https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#safety-filters | Responsible AI and usage guidelines}
610
610
  * for more details.
611
611
  *
612
+ * @deprecated All Imagen models are deprecated and will shut down as
613
+ * early as June 2026. As a replacement, you can
614
+ * {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
615
+ * migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
616
+ *
612
617
  * @public
613
618
  */
614
619
  const ImagenSafetyFilterLevel = {
@@ -638,6 +643,11 @@ const ImagenSafetyFilterLevel = {
638
643
  * See the <a href="http://firebase.google.com/docs/vertex-ai/generate-images">personGeneration</a>
639
644
  * documentation for more details.
640
645
  *
646
+ * @deprecated All Imagen models are deprecated and will shut down as
647
+ * early as June 2026. As a replacement, you can
648
+ * {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
649
+ * migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
650
+ *
641
651
  * @public
642
652
  */
643
653
  const ImagenPersonFilterLevel = {
@@ -671,6 +681,11 @@ const ImagenPersonFilterLevel = {
671
681
  * See the {@link http://firebase.google.com/docs/vertex-ai/generate-images | documentation }
672
682
  * for more details and examples of the supported aspect ratios.
673
683
  *
684
+ * @deprecated All Imagen models are deprecated and will shut down as
685
+ * early as June 2026. As a replacement, you can
686
+ * {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
687
+ * migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
688
+ *
674
689
  * @public
675
690
  */
676
691
  const ImagenAspectRatio = {
@@ -2838,8 +2853,9 @@ function validateGenerationConfig(generationConfig) {
2838
2853
  }
2839
2854
  if ((generationConfig.responseSchema != null ||
2840
2855
  generationConfig.responseJsonSchema != null) &&
2841
- generationConfig.responseMimeType) {
2842
- throw new AIError(AIErrorCode.UNSUPPORTED, `responseMimeType must be set if responseSchema or responseJsonSchema are set.`);
2856
+ generationConfig.responseMimeType !== 'application/json') {
2857
+ throw new AIError(AIErrorCode.UNSUPPORTED, `responseMimeType must be set to "application/json" if` +
2858
+ ` responseSchema or responseJsonSchema are set.`);
2843
2859
  }
2844
2860
  }
2845
2861
 
@@ -3271,6 +3287,11 @@ class LiveGenerativeModel extends AIModel {
3271
3287
  * }
3272
3288
  * ```
3273
3289
  *
3290
+ * @deprecated All Imagen models are deprecated and will shut down as
3291
+ * early as June 2026. As a replacement, you can
3292
+ * {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
3293
+ * migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
3294
+ *
3274
3295
  * @public
3275
3296
  */
3276
3297
  class ImagenModel extends AIModel {
@@ -3602,7 +3623,10 @@ class TemplateGenerativeModel {
3602
3623
  *
3603
3624
  * This class should only be instantiated with {@link getTemplateImagenModel}.
3604
3625
  *
3605
- * @beta
3626
+ * @deprecated All Imagen models are deprecated and will shut down as
3627
+ * early as June 2026. As a replacement, you can
3628
+ * {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
3629
+ * migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
3606
3630
  */
3607
3631
  class TemplateImagenModel {
3608
3632
  /**
@@ -3911,6 +3935,11 @@ class AnyOfSchema extends Schema {
3911
3935
  * }
3912
3936
  * ```
3913
3937
  *
3938
+ * @deprecated All Imagen models are deprecated and will shut down as
3939
+ * early as June 2026. As a replacement, you can
3940
+ * {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
3941
+ * migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
3942
+ *
3914
3943
  * @public
3915
3944
  */
3916
3945
  class ImagenImageFormat {
@@ -4411,6 +4440,11 @@ function getGenerativeModel(ai, modelParams, requestOptions) {
4411
4440
  *
4412
4441
  * Only Imagen 3 models (named `imagen-3.0-*`) are supported.
4413
4442
  *
4443
+ * @deprecated All Imagen models are deprecated and will shut down as
4444
+ * early as June 2026. As a replacement, you can
4445
+ * {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
4446
+ * migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
4447
+ *
4414
4448
  * @param ai - An {@link AI} instance.
4415
4449
  * @param modelParams - Parameters to use when making Imagen requests.
4416
4450
  * @param requestOptions - Additional options to use when making requests.
@@ -4461,10 +4495,13 @@ function getTemplateGenerativeModel(ai, requestOptions) {
4461
4495
  * Returns a {@link TemplateImagenModel} class for executing server-side
4462
4496
  * Imagen templates.
4463
4497
  *
4498
+ * @deprecated All Imagen models are deprecated and will shut down as
4499
+ * early as June 2026. As a replacement, you can
4500
+ * {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
4501
+ * migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
4502
+ *
4464
4503
  * @param ai - An {@link AI} instance.
4465
4504
  * @param requestOptions - Additional options to use when making requests.
4466
- *
4467
- * @beta
4468
4505
  */
4469
4506
  function getTemplateImagenModel(ai, requestOptions) {
4470
4507
  return new TemplateImagenModel(ai, requestOptions);