Skip to content

Commit 9fd0b33

Browse files
committed
chore: update docs/samples to use the GA model for gemini-2.5-image
1 parent c662f62 commit 9fd0b33

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

genkit-tools/cli/context/GENKIT.go.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Here are suggested models to use for various task types. This is NOT an exhausti
230230
```
231231
| Plugin | Recommended Model | Input Modalities |
232232
|------------------------------------------------------------|------------------------------------|-------------------|
233-
| github.com/firebase/genkit/go/plugins/googlegenai | gemini-2.5-flash-image-preview | Text, Image |
233+
| github.com/firebase/genkit/go/plugins/googlegenai | gemini-2.5-flash-image | Text, Image |
234234
| github.com/firebase/genkit/go/plugins/googlegenai | imagen-4.0-generate-preview-06-06 | Text |
235235
| github.com/firebase/genkit/go/plugins/compat_oai/openai | gpt-image-1 | Text |
236236
```

genkit-tools/cli/context/GENKIT.js.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ exhaustive list.
313313
```
314314
| Plugin | Recommended Model | Input Modalities |
315315
|------------------------------------|------------------------------------|-------------------|
316-
| @genkit-ai/google-genai | gemini-2.5-flash-image-preview | Text, Image |
316+
| @genkit-ai/google-genai | gemini-2.5-flash-image | Text, Image |
317317
| @genkit-ai/google-genai | imagen-4.0-generate-preview-06-06 | Text |
318318
| @genkit-ai/compat-oai/openai | gpt-image-1 | Text |
319319
```

js/plugins/google-genai/.guides/docs/editing-images.prompt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: Edit images with `gemini-2.5-flash-image-preview` (aka "Nano Banana")
2+
title: Edit images with `gemini-2.5-flash-image` (aka "Nano Banana")
33
description: read this if you need to perform sophisticated image edits such as background removal, post matching, character replacement, relighting, on an existing image
44
---
55

6-
The `gemini-2.5-flash-image-preview` model (also known as "Nano Banana") can perform sophisticated image edits.
6+
The `gemini-2.5-flash-image` model (also known as "Nano Banana") can perform sophisticated image edits.
77

88
- You must ALWAYS add `{config: {responseModalities: ['TEXT', 'IMAGE']}}` to your `ai.generate` calls when using this model.
99

@@ -15,7 +15,7 @@ import { ai } from "@/ai/genkit"; // or wherever genkit is initialized
1515
import { googleAI } from "@genkit-ai/google-genai";
1616

1717
const {media} = await ai.generate({
18-
model: googleAI.model('gemini-2.5-flash-image-preview'),
18+
model: googleAI.model('gemini-2.5-flash-image'),
1919
config: {responseModalities: ['TEXT', 'IMAGE']}},
2020
prompt: "generate a picture of a unicorn wearing a space suit on the moon",
2121
});
@@ -32,7 +32,7 @@ import { ai } from "@/ai/genkit"; // or wherever genkit is initialized
3232
import { googleAI } from "@genkit-ai/google-genai";
3333

3434
const {media} = await ai.generate({
35-
model: googleAI.model('gemini-2.5-flash-image-preview'),
35+
model: googleAI.model('gemini-2.5-flash-image'),
3636
config: {responseModalities: ['TEXT', 'IMAGE']}},
3737
prompt: [
3838
{text: "change the person's outfit to a banana costume"},
@@ -54,7 +54,7 @@ import { googleAI } from "@genkit-ai/google-genai";
5454
const {personImageUri, animalImageUri, sceneryImageUri} = await loadImages(...);
5555

5656
const {media} = await ai.generate({
57-
model: googleAI.model('gemini-2.5-flash-image-preview'),
57+
model: googleAI.model('gemini-2.5-flash-image'),
5858
config: {responseModalities: ['TEXT', 'IMAGE']}},
5959
prompt: [
6060
// the model tends to match aspect ratio of the *last* image provided
@@ -84,7 +84,7 @@ const originalImageUri = "data:..."; // the original image
8484
const annotatedImageUri = "data:..."; // the image with annotations on top of it
8585

8686
const {media} = await ai.generate({
87-
model: googleAI.model('gemini-2.5-flash-image-preview'),
87+
model: googleAI.model('gemini-2.5-flash-image'),
8888
config: {responseModalities: ['TEXT', 'IMAGE']}},
8989
prompt: [
9090

js/testapps/basic-gemini/src/index-vertexai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ ai.defineFlow('gemini-image-editing', async (_) => {
406406
const room = fs.readFileSync('my_room.png', { encoding: 'base64' });
407407

408408
const { media } = await ai.generate({
409-
model: vertexAI.model('gemini-2.5-flash-image-preview'),
409+
model: vertexAI.model('gemini-2.5-flash-image'),
410410
prompt: [
411411
{ text: 'add the plant to my room' },
412412
{ media: { url: `data:image/png;base64,${plant}` } },

js/testapps/basic-gemini/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ ai.defineFlow('gemini-image-editing', async (_) => {
438438
const room = fs.readFileSync('my_room.png', { encoding: 'base64' });
439439

440440
const { media } = await ai.generate({
441-
model: googleAI.model('gemini-2.5-flash-image-preview'),
441+
model: googleAI.model('gemini-2.5-flash-image'),
442442
prompt: [
443443
{ text: 'add the plant to my room' },
444444
{ media: { url: `data:image/png;base64,${plant}` } },

samples/js-gemini/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ ai.defineFlow('gemini-image-editing', async (_) => {
238238
const room = fs.readFileSync('my_room.png', { encoding: 'base64' });
239239

240240
const { media } = await ai.generate({
241-
model: googleAI.model('gemini-2.5-flash-image-preview'),
241+
model: googleAI.model('gemini-2.5-flash-image'),
242242
prompt: [
243243
{ text: 'add the plant to my room' },
244244
{ media: { url: `data:image/png;base64,${plant}` } },

0 commit comments

Comments
 (0)