Skip to content

Conversation

WafaeBakkali
Copy link
Member

@WafaeBakkali WafaeBakkali commented Aug 25, 2025

Description

Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Follow the CONTRIBUTING Guide.
  • You are listed as the author in your notebook or README file.
  • Your account is listed in CODEOWNERS for the file(s).
  • Ensure the tests and linter pass (Run nox -s format from the repository root to format).

Fixes #<issue_number_goes_here> 🦕

@WafaeBakkali WafaeBakkali requested a review from a team as a code owner August 25, 2025 20:28
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.

Summary of Changes

Hello @WafaeBakkali, 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 integrates a new application, V-Start, into the repository. The application is added as a Git submodule, which means its source code is maintained in a separate repository and referenced here. This approach facilitates modularity and independent management of the V-Start application's development lifecycle.

Highlights

  • New Application Integration: Introduces the V-Start application by adding it as a Git submodule under vision/sample-apps/.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 the V-Start sample application as a git submodule. While using submodules can be a valid approach for managing dependencies, adding it this way circumvents the code review process for the code contained within the submodule. The code at commit badea0b2ee79ff2a4164248c326c0463fe815317 has not been reviewed as part of this change, which poses a risk to the repository's quality and security. I've added a comment with suggestions on how to address this.


1. **Clone the repository:**
```bash
git clone https://github.com/WafaeBakkali/V-Start.git
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update this to the new repo link

Copy link
Member Author

Choose a reason for hiding this comment

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

Done


* [Node.js](https://nodejs.org/) (v18 or later recommended)
* npm (usually comes with Node.js)
* A Google Gemini API Key. You can get one from [Google AI Studio](https://aistudio.google.com/app/apikey).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason you're using the Gemini Developer API instead of Vertex AI, since you're already using other Google Cloud Services?

Copy link
Member Author

Choose a reason for hiding this comment

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

Having two options is meant for flexibility. Many creative agencies that use Veo prefer a quick and simple setup for initial testing with an API Key, while other customers prefer the Vertex AI API

Copy link
Collaborator

Choose a reason for hiding this comment

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

Right, I would agree that the API key is easier for setup, however you end up using Google Cloud Secret Manager and Cloud Run later, which ends up using Google Cloud anyway and requires the same IAM/gcloud auth setup. This could probably be simpler to use Vertex AI for Gemini as well and not need to store the API Key in secret manager.

@WafaeBakkali
Copy link
Member Author

@holtskinner Thanks for all the feedback. I've addressed all the requested changes


* [Node.js](https://nodejs.org/) (v18 or later recommended)
* npm (usually comes with Node.js)
* A Google Gemini API Key. You can get one from [Google AI Studio](https://aistudio.google.com/app/apikey).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Right, I would agree that the API key is easier for setup, however you end up using Google Cloud Secret Manager and Cloud Run later, which ends up using Google Cloud anyway and requires the same IAM/gcloud auth setup. This could probably be simpler to use Vertex AI for Gemini as well and not need to store the API Key in secret manager.


// Use a simple endpoint to validate the token
// We'll try to list models which is a read-only operation
const validationUrl = `https://us-central1-aiplatform.googleapis.com/v1/projects/${projectId}/locations/us-central1/models`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's recommended to use the JS Gen AI SDK rather than doing manual HTTP/REST Calls.

https://github.com/googleapis/js-genai

https://cloud.google.com/vertex-ai/generative-ai/docs/sdks/overview#googlegenaisdk_quickstart-nodejs_genai_sdk

Can you please convert this over to use the Gen AI SDK?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, and also updated GCloud Auth to be the default.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@WafaeBakkali Not sure this change went through. Looks like you're still using the raw REST calls here

const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));

// Import Google AI SDK (only for API key auth)
const { GoogleGenerativeAI } = require('@google/generative-ai');
Copy link
Collaborator

Choose a reason for hiding this comment

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

@WafaeBakkali This is the deprecated SDK, you should be using the new Gen AI SDK for all requests for the Gemini Developer API and Vertex AI

https://github.com/googleapis/js-genai

Be sure to change this throughout

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for flagging this! I accidentally didn’t push the correct file, but that’s been fixed now. The project is fully using the new Gen AI SDK.


// Use a simple endpoint to validate the token
// We'll try to list models which is a read-only operation
const validationUrl = `https://us-central1-aiplatform.googleapis.com/v1/projects/${projectId}/locations/us-central1/models`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@WafaeBakkali Not sure this change went through. Looks like you're still using the raw REST calls here

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.

2 participants