diff --git a/js/doc-snippets/src/flows/index.ts b/js/doc-snippets/src/flows/index.ts index 05271e8dce..0f9a476fa2 100644 --- a/js/doc-snippets/src/flows/index.ts +++ b/js/doc-snippets/src/flows/index.ts @@ -29,7 +29,7 @@ export const menuSuggestionFlow = ai.defineFlow( }, async (restaurantTheme) => { const { text } = await ai.generate({ - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), prompt: `Invent a menu item for a ${restaurantTheme} themed restaurant.`, }); return text; @@ -51,7 +51,7 @@ export const menuSuggestionFlowWithSchema = ai.defineFlow( }, async (restaurantTheme) => { const { output } = await ai.generate({ - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), prompt: `Invent a menu item for a ${restaurantTheme} themed restaurant.`, output: { schema: MenuItemSchema }, }); @@ -72,7 +72,7 @@ export const menuSuggestionFlowMarkdown = ai.defineFlow( }, async (restaurantTheme) => { const { output } = await ai.generate({ - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), prompt: `Invent a menu item for a ${restaurantTheme} themed restaurant.`, output: { schema: MenuItemSchema }, }); @@ -94,7 +94,7 @@ export const menuSuggestionStreamingFlow = ai.defineFlow( }, async (restaurantTheme, { sendChunk }) => { const response = await ai.generateStream({ - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), prompt: `Invent a menu item for a ${restaurantTheme} themed restaurant.`, }); @@ -128,7 +128,7 @@ export const complexMenuSuggestionFlow = ai.defineFlow( outputSchema: PrixFixeMenuSchema, }, async (theme: string): Promise> => { - const chat = ai.chat({ model: googleAI.model('gemini-2.0-flash') }); + const chat = ai.chat({ model: googleAI.model('gemini-2.5-flash') }); await chat.send('What makes a good prix fixe menu?'); await chat.send( 'What are some ingredients, seasonings, and cooking techniques that ' + @@ -178,7 +178,7 @@ Today's menu } ); const { text } = await ai.generate({ - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), system: "Help the user answer questions about today's menu.", prompt: input, docs: [{ content: [{ text: menu }] }], diff --git a/js/doc-snippets/src/index.ts b/js/doc-snippets/src/index.ts index 853a968558..a24913d9c0 100644 --- a/js/doc-snippets/src/index.ts +++ b/js/doc-snippets/src/index.ts @@ -19,7 +19,7 @@ import { genkit } from 'genkit'; const ai = genkit({ plugins: [googleAI()], - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), }); async function main() { diff --git a/js/doc-snippets/src/models/index.ts b/js/doc-snippets/src/models/index.ts index e3db35c5cd..c812614a87 100644 --- a/js/doc-snippets/src/models/index.ts +++ b/js/doc-snippets/src/models/index.ts @@ -19,13 +19,13 @@ import { genkit } from 'genkit'; const ai = genkit({ plugins: [googleAI()], - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), }); async function fn01() { // [START ex01] const { text } = await ai.generate({ - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), prompt: 'Invent a menu item for a pirate themed restaurant.', }); // [END ex01] @@ -34,7 +34,7 @@ async function fn01() { async function fn02() { // [START ex02] const { text } = await ai.generate({ - model: 'googleai/gemini-2.0-flash-001', + model: 'googleai/gemini-2.5-flash', prompt: 'Invent a menu item for a pirate themed restaurant.', }); // [END ex02] diff --git a/js/doc-snippets/src/models/minimal.ts b/js/doc-snippets/src/models/minimal.ts index 49834cd1f6..20984739e8 100644 --- a/js/doc-snippets/src/models/minimal.ts +++ b/js/doc-snippets/src/models/minimal.ts @@ -20,7 +20,7 @@ import { genkit } from 'genkit'; const ai = genkit({ plugins: [googleAI()], - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), }); async function main() { diff --git a/js/testapps/dev-ui-gallery/prompts/code.prompt b/js/testapps/dev-ui-gallery/prompts/code.prompt index 231bfcf249..5de2f2b927 100644 --- a/js/testapps/dev-ui-gallery/prompts/code.prompt +++ b/js/testapps/dev-ui-gallery/prompts/code.prompt @@ -1,5 +1,5 @@ --- -model: googleai/gemini-2.0-flash +model: googleai/gemini-2.5-flash config: temperature: 0.4 safetySettings: diff --git a/js/testapps/dev-ui-gallery/prompts/markdown.prompt b/js/testapps/dev-ui-gallery/prompts/markdown.prompt index 492bb26a92..d7c713d49e 100644 --- a/js/testapps/dev-ui-gallery/prompts/markdown.prompt +++ b/js/testapps/dev-ui-gallery/prompts/markdown.prompt @@ -1,5 +1,5 @@ --- -model: googleai/gemini-2.0-flash +model: googleai/gemini-2.5-flash config: temperature: 0.4 safetySettings: diff --git a/js/testapps/flow-simple-ai/prompts/dotpromptContext.prompt b/js/testapps/flow-simple-ai/prompts/dotpromptContext.prompt index f3ead5bb32..6de5bc1c94 100644 --- a/js/testapps/flow-simple-ai/prompts/dotpromptContext.prompt +++ b/js/testapps/flow-simple-ai/prompts/dotpromptContext.prompt @@ -1,5 +1,5 @@ --- -model: vertexai/gemini-2.0-flash +model: vertexai/gemini-2.5-flash input: schema: question: string diff --git a/js/testapps/flow-simple-ai/src/index.ts b/js/testapps/flow-simple-ai/src/index.ts index bf09bfa073..acab09f8a3 100644 --- a/js/testapps/flow-simple-ai/src/index.ts +++ b/js/testapps/flow-simple-ai/src/index.ts @@ -151,7 +151,7 @@ export const streamFlowVertex = ai.defineFlow( }, async (prompt, { sendChunk }) => { const { response, stream } = ai.generateStream({ - model: vertexAI.model('gemini-2.0-flash-001', { temperature: 0.77 }), + model: vertexAI.model('gemini-2.5-flash', { temperature: 0.77 }), prompt, }); @@ -171,7 +171,7 @@ export const streamFlowGemini = ai.defineFlow( }, async (prompt, { sendChunk }) => { const { response, stream } = ai.generateStream({ - model: googleAI.model('gemini-2.0-flash-001', { temperature: 0.77 }), + model: googleAI.model('gemini-2.5-flash', { temperature: 0.77 }), prompt, }); @@ -207,7 +207,7 @@ export const streamJsonFlow = ai.defineFlow( }, async (count, { sendChunk }) => { const { response, stream } = ai.generateStream({ - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), output: { schema: GameCharactersSchema, }, @@ -506,7 +506,7 @@ export const dynamicToolCaller = ai.defineFlow( ); const { response, stream } = ai.generateStream({ - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), config: { temperature: 1, }, @@ -901,7 +901,7 @@ ai.defineFlow( }, async ({ url, prompt, model }) => { const { text } = await ai.generate({ - model: model || 'googleai/gemini-2.0-flash', + model: model || 'googleai/gemini-2.5-flash', prompt: [{ text: prompt }, { media: { url, contentType: 'video/mp4' } }], }); return text; @@ -1112,7 +1112,7 @@ async function saveWaveFile( ai.defineFlow('googleSearch', async (thing) => { const { text } = await ai.generate({ - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), prompt: `What is a banana?`, config: { tools: [{ googleSearch: {} }] }, }); @@ -1122,7 +1122,7 @@ ai.defineFlow('googleSearch', async (thing) => { ai.defineFlow('googleSearchRetrieval', async (thing) => { const { text } = await ai.generate({ - model: vertexAI.model('gemini-2.0-flash'), + model: vertexAI.model('gemini-2.5-flash'), prompt: `What is a banana?`, config: { googleSearchRetrieval: {} }, }); @@ -1144,7 +1144,7 @@ ai.defineFlow('googleai-imagen', async (thing) => { ai.defineFlow('meme-of-the-day', async () => { const { text: script } = await ai.generate({ - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), prompt: 'Write a detailed script for a 8 second video. The video should be a meme of the day. ' + 'A Silly DIY FAIL situation like a: broken tools, or bad weather or crooked assembly, etc. Be creative. The FAIL should be very obvious. ' + @@ -1266,7 +1266,7 @@ ai.defineResource( ai.defineFlow('resource', async () => { return await ai.generate({ - model: googleAI.model('gemini-2.0-flash'), + model: googleAI.model('gemini-2.5-flash'), prompt: [ { text: 'analyze this: ' }, { resource: { uri: 'my://resource/value' } }, diff --git a/js/testapps/format-tester/src/index.ts b/js/testapps/format-tester/src/index.ts index 1178cf4d38..ec2d16a325 100644 --- a/js/testapps/format-tester/src/index.ts +++ b/js/testapps/format-tester/src/index.ts @@ -153,7 +153,6 @@ if (!models.length) { 'vertexai/gemini-2.5-flash', 'googleai/gemini-2.5-pro', 'googleai/gemini-2.5-flash', - 'googleai/gemini-2.0-flash', ]; } diff --git a/js/testapps/multiagents-demo/src/agents/representativeAgent.ts b/js/testapps/multiagents-demo/src/agents/representativeAgent.ts index bb097b788e..5cdb5f5827 100644 --- a/js/testapps/multiagents-demo/src/agents/representativeAgent.ts +++ b/js/testapps/multiagents-demo/src/agents/representativeAgent.ts @@ -20,7 +20,7 @@ import { getStoreInfoTool } from '../tools'; // Simple agent for providing store information export const agent = ai.definePrompt({ name: 'representativeAgent', - model: 'googleai/gemini-2.0-flash', + model: 'googleai/gemini-2.5-flash', description: 'Representative Agent can provide store info', tools: [getStoreInfoTool], system: `You are a customer service representative for TechStore Computer Shop. diff --git a/py/samples/dev-local-vectorstore-hello/src/hello.py b/py/samples/dev-local-vectorstore-hello/src/hello.py index f79066aee1..9cbb91670f 100644 --- a/py/samples/dev-local-vectorstore-hello/src/hello.py +++ b/py/samples/dev-local-vectorstore-hello/src/hello.py @@ -27,7 +27,7 @@ embedder='vertexai/text-embedding-004', ), ], - model='vertexai/gemini-2.0.', + model='vertexai/gemini-2.5-flash', ) films = [ diff --git a/py/samples/google-genai-code-execution/src/google-genai-code-execution.py b/py/samples/google-genai-code-execution/src/google-genai-code-execution.py index 7dd6461c34..4b554a703d 100644 --- a/py/samples/google-genai-code-execution/src/google-genai-code-execution.py +++ b/py/samples/google-genai-code-execution/src/google-genai-code-execution.py @@ -27,7 +27,7 @@ ai = Genkit( plugins=[GoogleAI()], - model=googleai_name('gemini-2.0-flash-exp'), + model=googleai_name('gemini-2.5-flash'), ) diff --git a/py/samples/google-genai-hello/src/google_genai_hello.py b/py/samples/google-genai-hello/src/google_genai_hello.py index 89cd25bdb4..5a56a82967 100644 --- a/py/samples/google-genai-hello/src/google_genai_hello.py +++ b/py/samples/google-genai-hello/src/google_genai_hello.py @@ -82,7 +82,7 @@ ]) ), ], - model='googleai/gemini-2.5-flash-preview-04-17', + model='googleai/gemini-2.5-flash', ) @@ -116,7 +116,7 @@ async def simple_generate_with_tools_flow(value: int, ctx: ActionRunContext) -> The generated response with a function. """ response = await ai.generate( - model='googleai/gemini-2.0-flash', + model='googleai/gemini-2.5-flash', prompt=f'what is a gablorken of {value}', tools=['gablorkenTool'], on_chunk=ctx.send_chunk, @@ -149,7 +149,7 @@ async def simple_generate_with_interrupts(value: int) -> str: The generated response with a function. """ response1 = await ai.generate( - model='googleai/gemini-2.0-flash', + model='googleai/gemini-2.5-flash', messages=[ Message( role=Role.USER, @@ -164,7 +164,7 @@ async def simple_generate_with_interrupts(value: int) -> str: tr = tool_response(response1.interrupts[0], 178) response = await ai.generate( - model='googleai/gemini-2.0-flash', + model='googleai/gemini-2.5-flash', messages=response1.messages, tool_responses=[tr], tools=['gablorkenTool'], diff --git a/py/samples/google-genai-image/src/google_genai_image.py b/py/samples/google-genai-image/src/google_genai_image.py index 1463c8fa40..05f6dbbb08 100644 --- a/py/samples/google-genai-image/src/google_genai_image.py +++ b/py/samples/google-genai-image/src/google_genai_image.py @@ -40,7 +40,7 @@ async def draw_image_with_gemini() -> str: return await ai.generate( prompt='Draw a cat in a hat.', config={'response_modalities': ['Text', 'Image']}, - model=googleai_name('gemini-2.0-flash-exp'), + model=googleai_name('gemini-2.5-flash'), ) @@ -64,7 +64,7 @@ async def describe_image_with_gemini(data: str) -> str: ], ), ], - model=googleai_name('gemini-2.5-pro-preview-03-25'), + model=googleai_name('gemini-2.5-flash'), ) return result.text diff --git a/py/samples/google-genai-vertexai-hello/src/google_genai_vertexai_hello.py b/py/samples/google-genai-vertexai-hello/src/google_genai_vertexai_hello.py index 69056a69d7..f73041ee76 100644 --- a/py/samples/google-genai-vertexai-hello/src/google_genai_vertexai_hello.py +++ b/py/samples/google-genai-vertexai-hello/src/google_genai_vertexai_hello.py @@ -61,7 +61,7 @@ ai = Genkit( plugins=[VertexAI()], - model='vertexai/gemini-2.0-flash', + model='vertexai/gemini-2.5-flash', ) diff --git a/py/samples/short-n-long/src/short_n_long/main.py b/py/samples/short-n-long/src/short_n_long/main.py index ffff843c1b..9179d0bed2 100644 --- a/py/samples/short-n-long/src/short_n_long/main.py +++ b/py/samples/short-n-long/src/short_n_long/main.py @@ -69,7 +69,7 @@ ai = Genkit( plugins=[GoogleAI()], - model=googleai_name('gemini-2.0-flash-exp'), + model=googleai_name('gemini-2.5-flash'), )