Skip to content

Conversation

@MengqinShen
Copy link
Contributor

@MengqinShen MengqinShen commented Jan 31, 2026

System prompt field accessible for all samples that use genai models - updated google.py to preserve the full metadata structure (label + nested supports)
image

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @MengqinShen, 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 focuses on enhancing the integration and usability of Gemini models within the Python Genkit framework. It updates several samples to leverage the latest preview versions of Gemini models, ensuring they reflect current capabilities. A key change involves refining how Gemini model metadata is exposed, providing more comprehensive information and potentially enabling features like system prompts. Additionally, the PR improves the robustness of environment variable checks in samples and includes minor configuration and documentation updates for better clarity and developer experience.

Highlights

  • Gemini Model Metadata Enhancement: The handling of Gemini model metadata has been improved by exposing the full model information, including a new 'label' field, and refining how supported features are retrieved. This change potentially makes more model capabilities, such as a system prompt field, accessible.
  • Sample Model Version Updates: Multiple Python samples have been updated to utilize newer preview versions of Gemini models (e.g., 'gemini-3-pro-preview', 'gemini-3-pro-image-preview') for both Google AI and Vertex AI integrations.
  • Robust Environment Variable Handling: Environment variable checks for 'GEMINI_API_KEY' and 'GCLOUD_PROJECT' in various samples have been made more robust, improving user experience and setup reliability by checking alternative variable names and providing clearer prompts/errors.
  • Configuration and Documentation Refinements: Minor adjustments include adding a test import path in 'pyproject.toml', updating sample documentation tables, and removing redundant version specifications in model configurations for cleaner code.

🧠 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.

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 refactors the model metadata handling to better expose model capabilities, such as system prompt support. It also updates several Python samples to use newer Gemini models and improves environment variable handling for API keys and project IDs. While the changes are mostly positive, I've identified a couple of areas for improvement in the samples: a duplicated code block that should be removed, and an inconsistent approach to handling missing environment variables which I've suggested aligning for a better developer experience.

@yesudeep yesudeep self-requested a review January 31, 2026 22:39
@MengqinShen MengqinShen marked this pull request as ready for review February 1, 2026 00:17
@MengqinShen MengqinShen merged commit 3e74f06 into main Feb 1, 2026
23 checks passed
@MengqinShen MengqinShen deleted the elisa/fix/add-system-prompt-genai branch February 1, 2026 01:33
This was referenced Feb 4, 2026
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.

3 participants