The code is strctly using the gemini-1.5-flash model for any ai related feature

Hi, The code is strictly using the gemini-1.5-flash model for any ai related feature. Even when i change it to gemini-2.5-flash model manually it switches back to using the 1.5 model on next prompting. I am fed up with this. The 1.5 flash model has also been deprecated by the google. What to do?

Ya the model is not aware that Google retired the 1.5 series, it’s a huge pita, it’s constantly fighting me, even altering the airule.md file does not help.

What I did to “fix” it was to put the model name into the .env file which it can’t see and then use env variables in the code.

My model doesn’t even know that Next.js came out with 15 and even version 16. It says the latest stable version of Next.js is 14.2.5, and reverting to this version even after me manually changing it.
Now my whole app is stuck in a loop and not working at all.

I lost 1-2 days figuring this out

I have to explain it sometimes about the newest update to not correct it and crash my code