gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Feat add new setting for gemini api key

Open aka1976mb opened this issue 2 months ago • 1 comments

Summary

Details

Related Issues

How to Validate

Pre-Merge Checklist

  • [ ] Updated relevant documentation and README (if needed)
  • [ ] Added/updated tests (if needed)
  • [ ] Noted breaking changes (if any)
  • [ ] Validated on required platforms/methods:
    • [ ] MacOS
      • [ ] npm run
      • [ ] npx
      • [ ] Docker
      • [ ] Podman
      • [ ] Seatbelt
    • [ ] Windows
      • [ ] npm run
      • [ ] npx
      • [ ] Docker
    • [ ] Linux
      • [ ] npm run
      • [ ] npx
      • [ ] Docker

aka1976mb avatar Dec 06 '25 00:12 aka1976mb

Summary of Changes

Hello @aka1976mb, I'm Gemini Code Assist[^1]! 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 introduces a dedicated configuration option for the Gemini API key, providing a more structured and explicit way to manage API access. The changes include updates to the configuration schema, revised API key loading logic with defined prioritization, and new test coverage to ensure secure handling of the API key, especially in proxy configurations. Additionally, minor development environment settings and dependency adjustments were made.

Highlights

  • Gemini API Key Configuration: A new geminiApiKey setting has been added to the application's configuration schema, allowing users to explicitly define their Gemini API key.
  • API Key Loading Priority: The logic for retrieving the Gemini API key has been updated to prioritize the new configuration setting, followed by the GEMINI_API_KEY environment variable, and then any previously loaded API key.
  • API Key Security: New tests ensure that the Gemini API key is correctly handled and not inadvertently exposed, particularly when proxy settings are involved.
  • Development Environment Enhancements: VS Code settings have been updated to ignore main branch pull requests and enable Copilot's next edit suggestions, streamlining development workflows.
Ignored Files
  • Ignored by pattern: .gemini/** (1)
    • .gemini/config.yaml
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 :thumbsup: and :thumbsdown: 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.

[^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.

gemini-code-assist[bot] avatar Dec 06 '25 00:12 gemini-code-assist[bot]

Hi @aka1976mb thanks for the PR.

Unfortunately you have not provided a linked issue or a proper PR body for us to understand the feature or bug fix being implemented.

Because of this we can not move forward with a review so I will close this out.

Please follow the contribution guidelines in our repository, it helps us be able to review.

This is like the 5th time you have opened a PR without descriptions or details for the same thing. If this trend continues we will have no choice but to block your account from engaging with this repo.

jackwotherspoon avatar Dec 07 '25 20:12 jackwotherspoon