Skip to content

fix(aiplatform): update Gemini model from 2.0-flash to gemini-2.5-flash - #3342

Draft
angelcaamal wants to merge 5 commits into
GoogleCloudPlatform:mainfrom
angelcaamal:fix/aiplatform-update-gemini-model
Draft

fix(aiplatform): update Gemini model from 2.0-flash to gemini-2.5-flash#3342
angelcaamal wants to merge 5 commits into
GoogleCloudPlatform:mainfrom
angelcaamal:fix/aiplatform-update-gemini-model

Conversation

@angelcaamal

@angelcaamal angelcaamal commented Aug 4, 2026

Copy link
Copy Markdown

fix(aiplatform): update Gemini models and rewrite image generation sample

Description

This PR updates the model references and APIs used across the .NET AI Platform samples (aiplatform/api/AIPlatform.Samples) and integration tests to align with current Vertex AI standards:

  • Gemini Models Update: Upgrades text and multimodal model references across all samples and tests from gemini-2.0-flash-001 to gemini-2.5-flash.
  • Image Sample Refactor: Rewrites GenerateImage.cs to use the modern Generative AI API (GenerateContentAsync) and the gemini-2.5-flash-image model. This replaces the legacy PredictAsync API pattern and JSON-encoded structures.

Reason for Update:

  • gemini-2.0-flash-001 reached end-of-life and was decommissioned on June 1, 2026.
  • The legacy imagegeneration@006 model was also decommissioned, causing NotFound RPC errors in CI (GenerateImageTest.TestGenerateImageAsync). Migrating to gemini-2.5-flash-image via the GenerateContent API ensures active service availability and fixes the CI pipeline.

Fixes Internal: b/542706371

@angelcaamal
angelcaamal requested review from a team and meteatamel as code owners August 4, 2026 21:09
@product-auto-label product-auto-label Bot added api: aiplatform Issues related to the AI Platform API. samples Issues that are directly related to samples. labels Aug 4, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

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 updates the default model parameter from 'gemini-2.0-flash-001' to 'gemini-2.5-flash' across multiple C# sample files in the AI Platform samples directory. I have no feedback to provide as there are no review comments.

@Kef131 Kef131 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Update deprecated gemini model correctly.

@angelcaamal
angelcaamal marked this pull request as draft August 5, 2026 18:42
@angelcaamal
angelcaamal marked this pull request as ready for review August 5, 2026 18:43
@angelcaamal
angelcaamal marked this pull request as draft August 5, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: aiplatform Issues related to the AI Platform API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants