As of September 24, 2025, Gemini 1.5 (pro and flash) were retired and became a legacy model. That's why you are getting the 404 error when using the retired models. You should migrate to Gemini 2.0/2.5 Flash and later instead. Please follow [the latest Gemini migration guide](https://cloud.google.com/vertex-ai/generative-ai/docs/migrate) to migrate.
As of September 24, 2025 (a day before your testing), Gemini 1.5 (pro and flash) were retired and became a legacy model. That's why you are getting the 404 error when using the retired models. You should migrate to Gemini 2.0/2.5 Flash and later instead. Please follow [the latest Gemini migration guide](https://cloud.google.com/vertex-ai/generative-ai/docs/migrate) to migrate.