Skip to content

docs(ai): Remove references to specific model versions #9203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs-devsite/ai.aimodel.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export declare abstract class AIModel

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [model](./ai.aimodel.md#aimodelmodel) | | string | The fully qualified model resource name to use for generating images (for example, <code>publishers/google/models/imagen-3.0-generate-002</code>). |
| [model](./ai.aimodel.md#aimodelmodel) | | string | The fully qualified model resource name to use for generating images (for example, <code>publishers/google/models/model-name</code>). |

## AIModel.model

The fully qualified model resource name to use for generating images (for example, `publishers/google/models/imagen-3.0-generate-002`<!-- -->).
The fully qualified model resource name to use for generating images (for example, `publishers/google/models/model-name`<!-- -->).

<b>Signature:</b>

Expand Down
4 changes: 2 additions & 2 deletions docs-devsite/ai.imagenmodel.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ https://github.com/firebase/firebase-js-sdk

Class for Imagen model APIs.

This class provides methods for generating images using the Imagen model.
This class provides methods for generating images using the Imagen model. See the documentation for a list of [supported models](https://firebase.google.com/docs/ai-logic/models)<!-- -->.

<b>Signature:</b>

Expand Down Expand Up @@ -144,7 +144,7 @@ If the request to generate images fails. This happens if the prompt is blocked.
const imagen = new ImagenModel(
ai,
{
model: 'imagen-3.0-generate-002'
model: 'imagen-model-name'
}
);

Expand Down
6 changes: 3 additions & 3 deletions docs-devsite/ai.imagenmodelparams.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface ImagenModelParams
| Property | Type | Description |
| --- | --- | --- |
| [generationConfig](./ai.imagenmodelparams.md#imagenmodelparamsgenerationconfig) | [ImagenGenerationConfig](./ai.imagengenerationconfig.md#imagengenerationconfig_interface) | <b><i>(Public Preview)</i></b> Configuration options for generating images with Imagen. |
| [model](./ai.imagenmodelparams.md#imagenmodelparamsmodel) | string | <b><i>(Public Preview)</i></b> The Imagen model to use for generating images. For example: <code>imagen-3.0-generate-002</code>.<!-- -->Only Imagen 3 models (named <code>imagen-3.0-*</code>) are supported.<!-- -->See [model versions](https://firebase.google.com/docs/vertex-ai/models) for a full list of supported Imagen 3 models. |
| [model](./ai.imagenmodelparams.md#imagenmodelparamsmodel) | string | <b><i>(Public Preview)</i></b> The Imagen model to use for generating images.<!-- -->See the documentation for a list of [supported models](https://firebase.google.com/docs/ai-logic/models)<!-- -->.<!-- -->See [model versions](https://firebase.google.com/docs/vertex-ai/models) for a full list of supported Imagen 3 models. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to update the commented out statement, as well?

| [safetySettings](./ai.imagenmodelparams.md#imagenmodelparamssafetysettings) | [ImagenSafetySettings](./ai.imagensafetysettings.md#imagensafetysettings_interface) | <b><i>(Public Preview)</i></b> Safety settings for filtering potentially inappropriate content. |

## ImagenModelParams.generationConfig
Expand All @@ -47,9 +47,9 @@ generationConfig?: ImagenGenerationConfig;
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

The Imagen model to use for generating images. For example: `imagen-3.0-generate-002`<!-- -->.
The Imagen model to use for generating images.

Only Imagen 3 models (named `imagen-3.0-*`<!-- -->) are supported.
See the documentation for a list of [supported models](https://firebase.google.com/docs/ai-logic/models)<!-- -->.

See [model versions](https://firebase.google.com/docs/vertex-ai/models) for a full list of supported Imagen 3 models.

Expand Down
6 changes: 3 additions & 3 deletions docs-devsite/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The Firebase AI Web SDK.
| [getAI(app, options)](./ai.md#getai_a94a413) | Returns the default [AI](./ai.ai.md#ai_interface) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with the default settings. |
| <b>function(ai, ...)</b> |
| [getGenerativeModel(ai, modelParams, requestOptions)](./ai.md#getgenerativemodel_c63f46a) | Returns a [GenerativeModel](./ai.generativemodel.md#generativemodel_class) class with methods for inference and other functionality. |
| [getImagenModel(ai, modelParams, requestOptions)](./ai.md#getimagenmodel_e1f6645) | <b><i>(Public Preview)</i></b> Returns an [ImagenModel](./ai.imagenmodel.md#imagenmodel_class) class with methods for using Imagen.<!-- -->Only Imagen 3 models (named <code>imagen-3.0-*</code>) are supported. |
| [getImagenModel(ai, modelParams, requestOptions)](./ai.md#getimagenmodel_e1f6645) | <b><i>(Public Preview)</i></b> Returns an [ImagenModel](./ai.imagenmodel.md#imagenmodel_class) class with methods for using Imagen.<!-- -->See the documentation for a list of [supported models](https://firebase.google.com/docs/ai-logic/models)<!-- -->. |

## Classes

Expand All @@ -36,7 +36,7 @@ The Firebase AI Web SDK.
| [GenerativeModel](./ai.generativemodel.md#generativemodel_class) | Class for generative model APIs. |
| [GoogleAIBackend](./ai.googleaibackend.md#googleaibackend_class) | Configuration class for the Gemini Developer API.<!-- -->Use this with [AIOptions](./ai.aioptions.md#aioptions_interface) when initializing the AI service via [getAI()](./ai.md#getai_a94a413) to specify the Gemini Developer API as the backend. |
| [ImagenImageFormat](./ai.imagenimageformat.md#imagenimageformat_class) | <b><i>(Public Preview)</i></b> Defines the image format for images generated by Imagen.<!-- -->Use this class to specify the desired format (JPEG or PNG) and compression quality for images generated by Imagen. This is typically included as part of [ImagenModelParams](./ai.imagenmodelparams.md#imagenmodelparams_interface)<!-- -->. |
| [ImagenModel](./ai.imagenmodel.md#imagenmodel_class) | <b><i>(Public Preview)</i></b> Class for Imagen model APIs.<!-- -->This class provides methods for generating images using the Imagen model. |
| [ImagenModel](./ai.imagenmodel.md#imagenmodel_class) | <b><i>(Public Preview)</i></b> Class for Imagen model APIs.<!-- -->This class provides methods for generating images using the Imagen model. See the documentation for a list of [supported models](https://firebase.google.com/docs/ai-logic/models)<!-- -->. |
| [IntegerSchema](./ai.integerschema.md#integerschema_class) | Schema class for "integer" types. |
| [NumberSchema](./ai.numberschema.md#numberschema_class) | Schema class for "number" types. |
| [ObjectSchema](./ai.objectschema.md#objectschema_class) | Schema class for "object" types. The <code>properties</code> param must be a map of <code>Schema</code> objects. |
Expand Down Expand Up @@ -254,7 +254,7 @@ export declare function getGenerativeModel(ai: AI, modelParams: ModelParams | Hy

Returns an [ImagenModel](./ai.imagenmodel.md#imagenmodel_class) class with methods for using Imagen.

Only Imagen 3 models (named `imagen-3.0-*`<!-- -->) are supported.
See the documentation for a list of [supported models](https://firebase.google.com/docs/ai-logic/models)<!-- -->.

<b>Signature:</b>

Expand Down
2 changes: 1 addition & 1 deletion packages/ai/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export function getGenerativeModel(
/**
* Returns an {@link ImagenModel} class with methods for using Imagen.
*
* Only Imagen 3 models (named `imagen-3.0-*`) are supported.
* See the documentation for a list of {@link https://firebase.google.com/docs/ai-logic/models | supported models}.
*
* @param ai - An {@link AI} instance.
* @param modelParams - Parameters to use when making Imagen requests.
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/src/models/ai-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { _isFirebaseServerApp } from '@firebase/app';
export abstract class AIModel {
/**
* The fully qualified model resource name to use for generating images
* (for example, `publishers/google/models/imagen-3.0-generate-002`).
* (for example, `publishers/google/models/model-name`).
Copy link
Contributor

@DellaBitta DellaBitta Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be something like <model-name>?

*/
readonly model: string;

Expand Down
3 changes: 2 additions & 1 deletion packages/ai/src/models/imagen-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ import { AIModel } from './ai-model';
* Class for Imagen model APIs.
*
* This class provides methods for generating images using the Imagen model.
* See the documentation for a list of {@link https://firebase.google.com/docs/ai-logic/models | supported models}.
*
* @example
* ```javascript
* const imagen = new ImagenModel(
* ai,
* {
* model: 'imagen-3.0-generate-002'
* model: 'imagen-model-name'
* }
* );
*
Expand Down
3 changes: 1 addition & 2 deletions packages/ai/src/types/imagen/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ import { ImagenImageFormat } from '../../requests/imagen-image-format';
export interface ImagenModelParams {
/**
* The Imagen model to use for generating images.
* For example: `imagen-3.0-generate-002`.
*
* Only Imagen 3 models (named `imagen-3.0-*`) are supported.
* See the documentation for a list of {@link https://firebase.google.com/docs/ai-logic/models | supported models}.
*
* See {@link https://firebase.google.com/docs/vertex-ai/models | model versions}
* for a full list of supported Imagen 3 models.
Expand Down
Loading