Inconsistent Model Name: gemini-flash-latest Works in API but Dashboard Shows gemini-2.5-flash

Hi everyone, I ran into something interesting while working with the Gemini API and wanted to share here in case others have seen the same or have insights.

I was using gemini-flash-latest as my model name in API calls, and everything worked correctly β€” responses were returned as expected.

However, when I checked my Google AI Studio dashboard to review usage, limits, and request stats, I noticed that:

:check_mark: The API calls with gemini-flash-latest succeeded
:bar_chart: The dashboard logged those requests under gemini-2.5-flash
:red_exclamation_mark: There is no model labeled gemini-flash-latest visible in the dashboard UI

This makes it unclear whether:

  • gemini-flash-latest is an alias for gemini-2.5-flash, or

  • It’s an undocumented or unintended reporting discrepancy between the API and dashboard


:test_tube: Minimal Code Example

Here’s the small snippet I used to invoke the model:

from langchain_google_genai import ChatGoogleGenerativeAI
from dotenv import load_dotenv
import os

load_dotenv()
api = os.getenv("GEMINI_API_KEY")

llm = ChatGoogleGenerativeAI(
    model="gemini-flash-latest",
    api_key=api,
    temperature=0.7,
)


:red_question_mark: Questions for the Community

  1. Has anyone else seen this behavior with gemini-flash-latest?

  2. Is the dashboard internally mapping it to gemini-2.5-flash?

  3. Does this impact billing, quotas, or usage tracking reliably?

  4. If it is an alias, is there any official documentation on this behavior?


:pushpin: What I’ve Tried

  • Checked available models in the dashboard (didn’t find gemini-flash-latest)

  • Verified the requests were successfully routed through the API

  • Confirmed billing and usage shown against gemini-2.5-flash


Thanks in advance β€” appreciate any insights! If needed, I can share sample logs or timing details (sanitized).

Hi @Ravi_Sharma87, welcome to the community!

gemini-flash-latest is an alias that points to whichever model is latest at the time.
In logs as well, if you check your metadata, it will be pointing to a specific model, not gemini-flash-latest, as there is no model named gemini-flash-latest.

Billing will be done based on the specific model, hence you see your bills for 2.5-flash.

Here is the simple script you can run, which clearly shows which model it is pointing to.

import google.generativeai as genai
from google.colab import userdata

try:
    GOOGLE_API_KEY = userdata.get('YOU_GEMINI_KEY')
    genai.configure(api_key=GOOGLE_API_KEY)
except Exception as e:
    print(f"Error loading key: {e}")

alias_name = 'gemini-flash-latest'

print(f"--- Sending request to alias: {alias_name} ---")

try:
    model = genai.GenerativeModel(alias_name)

    response = model.generate_content("Hello")

    print(f"\nResponse successfully received!")
    print(f"Check the 'model_version' in the raw output below:\n")
    print("-" * 20)
    print(response) 
    print("-" * 20)

    if hasattr(response, 'model_version'):
        print(f"\nResolved Model ID: {response.model_version}")
    else:
        print("\n(Look for 'model_version=' in the text block above)")

except Exception as e:
    print(f"\nError: {e}")

Please avoid using aliases in production and always specifically mention which model you want to use.

Thank you!

1 Like