Persistent 404 NOT_FOUND on Vertex AI for all Gemini models from Google Apps Script, despite full configuration

Hello everyone,

I’m facing a persistent 404 NOT_FOUND error when trying to call any Gemini model (e.g., gemini-1.5-pro-latest, gemini-1.0-pro) via the Vertex AI API from a Google Apps Script. I have exhausted all standard debugging steps and believe this might be a backend provisioning issue specific to my Google Cloud project.
The Error:
When calling the Vertex AI endpoint from Apps Script, I receive a 404 NOT_FOUND error. The error message is:
code
JSON
{
“error”: {
“code”: 404,
“message”: “models/gemini-1.0-pro is not found for API version v1, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.”,
“status”: “NOT_FOUND”
}
}
What I Have Already Done (The Debugging Journey):
Project Setup: Created a new, clean Google Cloud Project (PII Removed by Staff).
Billing: Verified that a valid and active billing account is linked to the project.
API Enablement: Confirmed that the “Vertex AI API” is enabled.
IAM Permissions: Granted extensive permissions to my primary user (PII Removed by Staff), including “Owner” and “Vertex AI Administrator”. I also granted “Vertex AI User” to the default Compute Engine and App Engine service accounts after enabling their respective APIs.
OAuth Consent Screen: Configured the OAuth screen as “External” and added my email as a “Test User”.
Apps Script Authorization: Successfully completed the OAuth2 authorization flow, granting the script all necessary scopes, including cloud-platform.
Model Variations: Tried calling multiple models (gemini-1.5-pro-latest, gemini-1.5-pro-001, gemini-1.0-pro) via both v1 and v1beta endpoints, all resulting in the same 404 error.
Google Issue Tracker: I have already reported this issue, and it was marked as Infeasible for the public tracker, with the recommendation to open a direct support ticket (which requires a paid plan). Link to issue: Google Issue Tracker .
Conclusion:
After all these steps, the error remains. It seems that despite the correct user-side configuration, the models are not being provisioned or made available to my specific project on the backend.
Has anyone faced a similar “models not found” issue on a fully configured project? Is there any other provisioning step or hidden setting I might be missing?
Thank you for any insights.

Hello @Winnersul,

I think that you’re trying to call retired models. Try with latest stable models.