You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(aiplatform): update Gemini model from 2.0-flash to gemini-2.5-flash (#3342)
# 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
0 commit comments