What's the applied model when model_name is "gemini-1.5-flash"?

model = genai.GenerativeModel(
model_name=“gemini-1.5-flash-002”,
generation_config=generation_config,
system_instruction=“XXXXX”,
)
What’s the difference of model_name between “gemini-1.5-flash-002” and “gemini-1.5-flash”?
I found they’re different. gemini-1.5-flash is easier to show safety exception.
If I set it to gemini-1.5-flash-002, the gemini-1.5-flash-002 will be changed in the future? We want to make the output as stable as possible.

Hi @bruce_tsai

Welcome to the forum! The gemini-1.5-flash-002 model is a stable version, while gemini-1.5-flash is an alias for the latest stable release that updates automatically. If you prefer consistency in your code and want to avoid frequent updates stable models like gemini-1.5-flash-002 is good option. Here is the link with more details.

Thanks

Thank you for your reply.
On other hand, it shows Gemini-1.5-Flash-002 Discontinuation date is September 24, 2025.
It makes us worried about it.
We build up some applications based on this model’s API and we hope it will keep for at least 5 years. Is it the same for API and vertex?
Hopefully, new model will be better than old model. However, some features or safety check may be diffrent for new models. It’s very important for our applications, please make the API model live at least for 5 years.
Thank you.