Skill: Model Selection and Validation Rules
This skill provides strict rules for selecting and validating Gemini models in Vertex AI, ensuring the agent utilizes the latest available models and handles preview suffixes correctly.
1. Priority of Models
- DO NOT default to Gemini 1.5 models unless explicitly instructed by the user or if all attempts to use newer models have failed after troubleshooting.
- Always prioritize the Gemini 3.1 series for advanced reasoning and data processing tasks.
2. Handling Preview Models
- Be aware that during preview phases, models are often not available in standard regional formats without the specific suffix.
- Always append
-previewto the model name when attempting to use the latest unreleased or preview models. - Note: For the Gemini 3 series, the model name might be
gemini-3-flash-preview(without the.1in the middle).
3. Validation Against Vertex Model Garden
- Before falling back to an older model generation when encountering a
404 Not Founderror, verify if the error was caused by a missing-previewsuffix. - Instruct the execution environment to check available models if uncertainty exists regarding the exact naming convention in Vertex AI Model Garden.
4. Regionality and Endpoints
- While Vertex AI Search supports
globallocations, Gemini foundation models typically require specific regional configurations in the SDK (likeus-central1). - However, for preview models like
gemini-3-flash-preview, passinglocation: 'global'directly to thegenai.Client(orGoogleGenAI) initialization is supported in the newgoogle-genaiSDK to access models pinned to the global endpoint.