Conversation
Summary of ChangesHello @thorwebdev, 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 updates the application's AI model configurations to align with recent deprecations and new model releases from Google's Gemini API. The changes primarily involve updating the lists of available generative, image, and live audio models to ensure the application uses the latest and supported versions, as per Google's official documentation. 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. 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 updates the model names to align with recent deprecations. While the updates for generative and live models seem correct, the change to AVAILABLE_IMAGEN_MODELS introduces an issue. You've correctly identified that the image models are not working, and the reason is that the new model names (gemini-*-image-*) are for Gemini models, but they are being used with an API function (getImagenModel) intended for Imagen models. This mismatch is causing the 400 Invalid argument error. To fix this, you'll need to either find the correct replacement model names for the Imagen family or refactor the image generation logic to use the appropriate API for Gemini models, which is likely getGenerativeModel.
| export const AVAILABLE_IMAGEN_MODELS = [ | ||
| "imagen-4.0-generate-001", | ||
| "imagen-4.0-fast-generate-001", | ||
| "imagen-4.0-ultra-generate-001" | ||
| "gemini-3-pro-image-preview", | ||
| "gemini-2.5-flash-image" | ||
| ]; |
There was a problem hiding this comment.
These model names belong to the Gemini family, not Imagen. The ImagenView.tsx component uses getImagenModel, which is likely causing the 400 Invalid argument error you're encountering because it expects Imagen-specific model names.
To resolve this, you have two options:
- Find the new Imagen model names that are the correct replacements for the deprecated ones.
- If image generation is now meant to be done through Gemini models, you will need to refactor
ImagenView.tsxto usegetGenerativeModelinstead ofgetImagenModel. The API call and response handling for image generation with Gemini models are different from Imagen.
Updating models as per https://ai.google.dev/gemini-api/docs/deprecations
However for some reason the image models aren't working:
Any idea why?