Skip to content

Revise Genkit installation instructions for Next.js#195

Open
LukeSchlangen wants to merge 1 commit intomainfrom
update-vertex-ai-import-1
Open

Revise Genkit installation instructions for Next.js#195
LukeSchlangen wants to merge 1 commit intomainfrom
update-vertex-ai-import-1

Conversation

@LukeSchlangen
Copy link
Collaborator

@LukeSchlangen LukeSchlangen commented Dec 23, 2025

I think the previous import is now deprecated?

Updated installation instructions for Genkit dependencies in Next.js documentation, including the addition of a model plugin and clarification on optional dependencies.

Updated installation instructions for Genkit dependencies in Next.js documentation, including the addition of a model plugin and clarification on optional dependencies.
@gemini-code-assist
Copy link

Summary of Changes

Hello @LukeSchlangen, 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 refines the Genkit installation guide for Next.js applications. It simplifies the initial dependency installation by bundling a common model plugin directly into the first npm install command and removes redundant instructions. Additionally, it corrects an import path in a code example to ensure accuracy and consistency within the documentation.

Highlights

  • Installation Simplification: The initial npm install command for Genkit in Next.js now includes @genkit-ai/google-genai, streamlining the setup process by bundling a common model plugin directly into the first step.
  • Documentation Clarity: The separate, tabbed section for installing model plugins has been removed, making the installation instructions more concise and easier to follow.
  • Code Example Correction: An import statement within the Gemini (Vertex AI) example was updated to correctly reference @genkit-ai/google-genai, ensuring accuracy and consistency in the provided code snippets.
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

@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 simplifies the Genkit installation instructions for Next.js by consolidating dependency installation into a single command and updating an import statement to reflect the new unified @genkit-ai/google-genai plugin. The changes make the setup process more straightforward for new users. My review includes a couple of suggestions to further improve the clarity of the documentation, ensuring users understand that the single google-genai package now supports both Google AI and Vertex AI, which will help them navigate the rest of the guide.

Install the Genkit dependencies into your Next.js app:

1. Install the core Genkit library and the Next.js plugin:
1. Install the core Genkit library, the Next.js plugin, and at least one model plugin:

Choose a reason for hiding this comment

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

medium

The phrase 'and at least one model plugin' could be confusing since the command that follows installs a specific one. To improve clarity, I suggest rephrasing to explicitly mention that @genkit-ai/google-genai is a unified plugin for both Google AI and Vertex AI. This will help users understand why they see tabs for both later in the document.

1.  Install the core Genkit library, the Next.js plugin, and the unified Google GenAI plugin (which supports both the Gemini API and Vertex AI):

<TabItem label="Gemini (Vertex AI)">
```ts
import { vertexAI } from '@genkit-ai/vertexai';
import { vertexAI } from '@genkit-ai/google-genai';

Choose a reason for hiding this comment

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

medium

To avoid confusion for users who might wonder why vertexAI is being imported from @genkit-ai/google-genai under a 'Gemini (Vertex AI)' tab, it would be helpful to add a comment explaining that the @genkit-ai/google-genai package is a unified plugin that provides access to both Google AI and Vertex AI models.

    // The unified @genkit-ai/google-genai plugin provides access to both Google AI and Vertex AI.
    import { vertexAI } from '@genkit-ai/google-genai';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant