feat(vertex_ai): add Gemini 3.1 Pro Preview model support#2604
feat(vertex_ai): add Gemini 3.1 Pro Preview model support#2604Eric-Geek wants to merge 0 commit intolanggenius:mainfrom
Conversation
Summary of ChangesHello @Eric-Geek, 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 the new Gemini 3.1 Pro Preview model from Vertex AI, significantly expanding the platform's large language model capabilities. This addition allows users to leverage advanced features such as multi-tool calls, agent thoughts, multimodal inputs (vision, document, video, audio), structured output, and fine-grained control over reasoning and media processing, thereby enhancing the system's ability to handle complex and diverse AI tasks. Highlights
🧠 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
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request adds support for the Gemini 3.1 Pro Preview model. The changes include a new YAML configuration file for the model and an update to the list of global-only models in the Python code. The changes are correct. I've added a couple of suggestions to improve code quality and consistency.
| default: 1 | ||
| min: 0 | ||
| max: 2 |
| GLOBAL_ONLY_MODELS_DEFAULT = ["gemini-2.5-pro-preview-06-05", "gemini-2.5-flash-lite-preview-06-17", | ||
| "gemini-2.5-flash-preview-09-2025", "gemini-2.5-flash-lite-preview-09-2025", | ||
| "gemini-3-pro-preview", "gemini-3-flash-preview", | ||
| "gemini-3.1-pro-preview", | ||
| "gemini-2.5-computer-use-preview-10-2025"] |
There was a problem hiding this comment.
For better readability and easier maintenance, it's a good practice to keep this list of models sorted alphabetically. Formatting it with one model per line also improves readability.
| GLOBAL_ONLY_MODELS_DEFAULT = ["gemini-2.5-pro-preview-06-05", "gemini-2.5-flash-lite-preview-06-17", | |
| "gemini-2.5-flash-preview-09-2025", "gemini-2.5-flash-lite-preview-09-2025", | |
| "gemini-3-pro-preview", "gemini-3-flash-preview", | |
| "gemini-3.1-pro-preview", | |
| "gemini-2.5-computer-use-preview-10-2025"] | |
| GLOBAL_ONLY_MODELS_DEFAULT = [ | |
| "gemini-2.5-computer-use-preview-10-2025", | |
| "gemini-2.5-flash-lite-preview-06-17", | |
| "gemini-2.5-flash-lite-preview-09-2025", | |
| "gemini-2.5-flash-preview-09-2025", | |
| "gemini-2.5-pro-preview-06-05", | |
| "gemini-3-flash-preview", | |
| "gemini-3-pro-preview", | |
| "gemini-3.1-pro-preview", | |
| ] |
|
Hi, I'm following up on support for the Gemini 3.1 series. As you can see, I added the basic configuration for the Gemini plugin in #2606. To avoid ambiguity, I want our YAML configurations to be as consistent as possible. |
👌 |
Related Issues or Context
This PR contains Changes to Non-Plugin
This PR contains Changes to Non-LLM Models Plugin
This PR contains Changes to LLM Models Plugin
Version Control (Any Changes to the Plugin Will Require Bumping the Version)
VersionField, Not in Meta Section)Dify Plugin SDK Version
dify_plugin>=0.3.0,<0.6.0is in requirements.txt (SDK docs)Environment Verification (If Any Code Changes)
Local Deployment Environment
SaaS Environment