Skip to content

feat(js/plugins/google-genai): Add *-latest versions for googleAI#4876

Merged
ifielker merged 2 commits intomainfrom
if-addAliases
Mar 2, 2026
Merged

feat(js/plugins/google-genai): Add *-latest versions for googleAI#4876
ifielker merged 2 commits intomainfrom
if-addAliases

Conversation

@ifielker
Copy link
Collaborator

@ifielker ifielker commented Mar 2, 2026

Also:

  • deprecate Claude 3 Haiku model
  • extra sample for Gemini 3.0 thinking
  • testapp thinkingConfig addition for nanoBanana 2.

Checklist (if applicable):

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on updating the GoogleAI model references within the codebase to leverage the new *-latest model versions. This ensures that all examples, tests, and documentation snippets are aligned with the most current and recommended model identifiers. Additionally, it includes the deprecation of an older Claude model and introduces new configuration options for advanced Gemini model reasoning, enhancing the overall flexibility and currency of the AI integrations.

Highlights

  • GoogleAI Model Updates: Introduced and adopted *-latest versions for GoogleAI models (e.g., gemini-pro-latest, gemini-flash-latest, gemini-flash-lite-latest) across various examples, documentation snippets, and test applications. This change ensures that applications automatically use the most up-to-date stable versions of these models.
  • Model Deprecation: Deprecated and removed the claude-3-haiku@20240307 model from the VertexAI plugin's known Anthropic models, streamlining the available model list.
  • Enhanced Thinking Configuration: Added an example demonstrating the use of thinkingConfig for Gemini 3.0 models, allowing for more granular control over the model's reasoning process, including thinkingLevel and includeThoughts.
  • Dependency Updates: Updated @genkit-ai/google-genai and genkit package dependencies to version ^1.28.0 in relevant sample applications.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • js/ai/src/model/middleware.ts
    • Updated example model names from specific versions to *-latest versions for Gemini Pro and Flash models.
  • js/doc-snippets/src/dotprompt/index.ts
    • Updated the model name in the definePrompt example to gemini-flash-latest.
  • js/doc-snippets/src/flows/index.ts
    • Updated model names in various flow definitions to gemini-flash-latest.
  • js/doc-snippets/src/index.ts
    • Updated the default model name in genkit initialization to gemini-flash-latest.
  • js/doc-snippets/src/models/index.ts
    • Updated the default model name in genkit initialization and a generate example to gemini-flash-latest.
  • js/doc-snippets/src/models/minimal.ts
    • Updated the default model name in genkit initialization to gemini-flash-latest.
  • js/doc-snippets/src/multi-agent/simple.ts
    • Updated the model name in the chat definition to gemini-pro-latest.
  • js/genkit/src/genkit.ts
    • Updated example model names in JSDoc comments to gemini-flash-latest.
  • js/plugins/google-genai/src/googleai/gemini.ts
    • Added gemini-pro-latest, gemini-flash-latest, and gemini-flash-lite-latest to the list of known Gemini models.
  • js/plugins/vertexai/src/modelgarden/v2/anthropic.ts
    • Removed the claude-3-haiku@20240307 model from the known Anthropic models list.
  • js/plugins/vertexai/tests/modelgarden/v2/index_test.ts
    • Updated test cases to use newer model names for Anthropic, Mistral, and Llama models.
  • js/testapps/basic-gemini/src/index.ts
    • Updated model names in various flow definitions to *-latest versions.
    • Renamed the 'reasoning' flow to 'reasoning - thinkingBudget' to clarify its legacy status.
    • Added a thinkingConfig property to the nano-banana-2 flow's configuration.
  • js/testapps/dev-ui-gallery/src/genkit.ts
    • Updated default model names for ai and ai2 instances to gemini-flash-latest.
  • js/testapps/dev-ui-gallery/src/main/prompts.ts
    • Updated model names in prompt definitions to gemini-flash-latest.
  • js/testapps/dev-ui-gallery/src/main/tools.ts
    • Updated the model name in the weatherPrompt definition to gemini-flash-latest.
  • js/testapps/docs-menu-basic/src/index.ts
    • Updated the model name in the menuSuggestionFlow to gemini-flash-latest.
  • js/testapps/evals/src/pdf-rag.ts
    • Updated model names in pdfQA, simpleStructured, and simpleEcho flows to gemini-flash-latest.
  • js/testapps/express/src/index.ts
    • Updated model names in jokeFlow and jokeStream to gemini-flash-latest.
  • js/testapps/flow-simple-ai/src/index.ts
    • Updated the default model name in genkit initialization to gemini-flash-latest.
    • Updated model names in various flows (streamJsonFlow, vertexStreamer, searchDestinations, toolCaller, dynamicToolCaller, invalidOutput, fileApi, toolTester, arrayStreamTester, blockingMiddleware, formatJson, formatJsonManualSchema, extractData, geminiEnum, reasoning, googleSearch, meme-of-the-day, resource, abort-signal) to gemini-flash-latest.
  • js/testapps/format-tester/src/tools.ts
    • Updated the default model name in genkit initialization to gemini-flash-latest.
  • js/testapps/mcp/src/index.ts
    • Updated the default model name in genkit initialization to gemini-flash-latest.
  • js/testapps/menu/src/01/prompts.ts
    • Updated prompt text formatting.
    • Updated the model name in s01_staticMenuDotPrompt to gemini-flash-latest.
  • js/testapps/menu/src/02/prompts.ts
    • Updated prompt text formatting.
    • Updated the model name in s02_dataMenuPrompt to gemini-flash-latest.
  • js/testapps/menu/src/04/prompts.ts
    • Updated prompt text formatting.
    • Updated the model name in s04_ragDataMenuPrompt to gemini-flash-latest.
  • js/testapps/menu/src/05/prompts.ts
    • Updated prompt text formatting.
    • Updated model names in s05_readMenuPrompt and s05_textMenuPrompt to gemini-flash-latest.
  • js/testapps/model-armor/src/index.ts
    • Updated the model name in the modelArmor flow to gemini-flash-latest.
  • js/testapps/next/src/genkit/index.ts
    • Updated the default model name in genkit initialization to gemini-flash-latest.
  • js/testapps/rag/src/genkit.ts
    • Updated the default model name in genkit initialization to gemini-flash-latest.
  • js/testapps/rag/src/pdf-rag-firebase.ts
    • Updated the model name in pdfQAFirebase to gemini-flash-latest.
  • js/testapps/rag/src/pdf-rag.ts
    • Updated the model name in synthesizeQuestions to gemini-flash-latest.
  • js/testapps/rag/src/prompt.ts
    • Updated the model name in augmentedPrompt to gemini-flash-latest.
  • samples/js-angular/server/src/chatbot.ts
    • Updated the model name in chatbotFlow to gemini-flash-latest.
  • samples/js-angular/server/src/jsonStreaming.ts
    • Updated the model name in streamCharacters to gemini-flash-latest.
  • samples/js-character-generator/index.ts
    • Updated the model name in the prompt definition to gemini-flash-latest.
  • samples/js-coffee-shop/src/index.ts
    • Updated model names in simpleGreetingPrompt and greetingWithHistoryPrompt to gemini-flash-latest.
  • samples/js-gemini/package.json
    • Updated @genkit-ai/google-genai and genkit dependencies to ^1.28.0.
    • Updated genkit-cli dev dependency to ^1.28.0.
  • samples/js-gemini/src/index.ts
    • Renamed the 'reasoning' flow to 'gemini 2.5 reasoning' and added a comment indicating it's a legacy example.
    • Added a new flow named 'thinkingConfig' demonstrating current Gemini reasoning with thinkingConfig for gemini-3-pro-preview.
  • samples/js-menu/src/01/prompts.ts
    • Updated prompt text formatting.
    • Updated the model name in s01_staticMenuDotPrompt to gemini-flash-latest.
  • samples/js-menu/src/02/prompts.ts
    • Updated prompt text formatting.
    • Updated the model name in s02_dataMenuPrompt to gemini-flash-latest.
  • samples/js-menu/src/03/flows.ts
    • Updated the model name in s03_multiTurnChatFlow to gemini-flash-latest.
  • samples/js-menu/src/03/prompts.ts
    • Updated prompt text formatting.
    • Updated the model name in s03_chatPreamblePrompt to gemini-flash-latest.
  • samples/js-menu/src/04/prompts.ts
    • Updated prompt text formatting.
    • Updated the model name in s04_ragDataMenuPrompt to gemini-flash-latest.
  • samples/js-menu/src/05/prompts.ts
    • Updated prompt text formatting.
    • Updated model names in s05_readMenuPrompt and s05_textMenuPrompt to gemini-flash-latest.
  • samples/js-schoolAgent/src/genkit.ts
    • Updated the default model name in genkit initialization to gemini-pro-latest.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces *-latest versions for Google AI models and updates numerous examples and test applications to use these new aliases. It also deprecates the Claude 3 Haiku model and adds new samples for Gemini's reasoning capabilities. The changes are well-aligned with improving maintainability by using version-agnostic model names. I've found one minor issue in a new sample file that I've commented on.

@ifielker ifielker merged commit 9ea0e46 into main Mar 2, 2026
7 checks passed
@ifielker ifielker deleted the if-addAliases branch March 2, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants