Skip to content

models.get() does not resolve alias to underlying model version on Vertex AI #2271

@tracymelody

Description

@tracymelody

Description

When calling client.models.get(model="gemini-flash-latest") on Vertex AI (location=global), the response only echoes the alias name back (publishers/google/models/gemini-flash-latest) with version: "default". There is no field that reveals the actual resolved model version.

Similarly, GenerateContentResponse.model_version just returns "gemini-flash-latest".

This makes it impossible to:

  1. Know which model you're actually calling in production
  2. Pin to a specific version before an alias rotates
  3. Debug behavioral differences between alias and named models

Empirical evidence

We ran side-by-side tests (temperature=0, no thinking, identical prompts) comparing gemini-flash-latest against known model versions on Vertex AI (location=global):

Test (7 deterministic prompts) Exact output hash match with gemini-flash-latest
gemini-2.5-flash 5/7
gemini-3-flash-preview 4/7

gemini-flash-latest produces byte-different output from both named models on several prompts, making it impossible to determine which model it actually resolves to.

According to the changelog (Jan 21, 2026), gemini-flash-latest was switched to gemini-3-flash-preview on the Google AI API — but this does not appear to match Vertex AI behavior.

Expected behavior

models.get() should return a resolved_model or base_model field with the actual underlying model identifier (e.g., gemini-2.5-flash-20250617), so users can:

  • Audit what they're running in production
  • Pin to the resolved version before an alias rotates
  • Report accurate model versions in bug reports

Reproduction

from google import genai

client = genai.Client(vertexai=True, project="YOUR_PROJECT", location="global")

# models.get returns no resolution info
info = client.models.get(model="gemini-flash-latest")
print(info.name)     # "publishers/google/models/gemini-flash-latest"
print(info.version)  # "default"
# No resolved_model, base_model, or similar field

# Response metadata also just echoes the alias
resp = client.models.generate_content(
    model="gemini-flash-latest",
    contents="hello",
)
print(resp.model_version)  # "gemini-flash-latest" — not the actual model

Additional context

  • Platform: Vertex AI (not Google AI API)
  • Location: global
  • SDK: google-genai (Python)
  • Use case: Production conversational AI agent using Google ADK with heavy tool calling. We rely on gemini-flash-latest for its quality but cannot pin it, and the documented alias rotation schedule appears to only apply to the Google AI API, not Vertex AI.

Metadata

Metadata

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions