[Vertex AI] Cannot access Generative AI models (Gemini/PaLM 2) - NotFound Error (404) despite active

Hello Google Cloud Community and Support,

I’m encountering a persistent NotFound error (HTTP Status 404) when attempting to access Generative AI models (Gemini 1.0 Pro, text-bison) via the google-cloud-aiplatform Python SDK. This issue occurs across multiple projects and regions, including newly created projects, and even persists when testing from Google Colaboratory.

Summary of the Problem:
When calling GenerativeModel(“text-bison”).generate_content() (or “gemini-1.0-pro” / “gemini-pro”), I consistently receive a google.api_core.exceptions.NotFound error with the detail:
“Publisher Model projects/{YOUR_PROJECT_ID}/locations/{REGION}/publishers/google/models/{MODEL_NAME} was not found or your project does not have access to it.”

Environment & Setup:

  • Local Python Environment: VS Code, Python 3.x, google-cloud-aiplatform, google-cloud-texttospeech installed in a virtual environment.

  • Authentication: gcloud auth application-default login successfully completed.

  • Colaboratory Environment: Tested in a new Colab notebook with auth.authenticate_user() for authentication.

  • Google Cloud Projects: Tested on my original project and a newly created project.

  • Billing: Active billing account is linked to both projects.

  • APIs Enabled:

  • Regions Tested: asia-northeast1 (Tokyo) and us-central1 (Iowa).

  • Models Tested: gemini-1.0-pro, gemini-pro, text-bison.

Specific Observations:

  1. The NotFound error message explicitly indicates the correct project ID, region, and model name being used in the API call.

  2. In the Google Cloud Console, navigating to Vertex AI → Vertex AI Studio → Prompt Gallery:

    • There is no prominent banner or pop-up asking for agreement to terms of service or explicit activation for Generative AI models (like Gemini/PaLM 2).

    • Only “Converse with Gemini” is visible under “Prompt Gallery”, but clicking it doesn’t prompt for any additional activation.

  3. My Google Account (PII Removed by Staff) has the Owner role on the project.

  4. I’ve also explicitly added Vertex AI User, Vertex AI Admin, Vertex AI Developer, and Vertex AI API Service Agent roles to my account and the Compute Engine default service account (where applicable), but the issue persists.

  5. I tried to open a support case, but received “You don’t have permission to file technical support cases for projects/manga-youtube-project.” notification.

Code Snippet (test_gemini.py simplified):

Generated python

Code Snippet (test_gemini.py simplified):

import vertexai
from vertexai.generative_models import GenerativeModel
# from google.colab import auth # Uncommented in Colab
# from google.auth import default # Uncommented in Colab

PROJECT_ID = "manga-youtube-project" # Placeholder for actual project ID
LOCATION = "us-central1" # Also tested asia-northeast1
PROMPT = "Generate 3 catchy YouTube manga video ideas."

def initialize_vertexai(project_id, location):
vertexai.init(project=project_id, location=location)

def generate_text(prompt_text):
model = GenerativeModel("text-bison") # Also tested "gemini-1.0-pro" / "gemini-pro"
response = model.generate_content(prompt_text)
return response.text

if __name__ == "__main__":
# In Colab, auth.authenticate_user() is called here
initialize_vertexai(PROJECT_ID, LOCATION)
generated_text = generate_text(PROMPT)
print(generated_text)

content_copydownload
Use code [with caution](https://support.google.com/legal/answer/13505487).Python

**Question:**
Given that Text-to-Speech API works perfectly and I've tried all standard troubleshooting steps (billing, API enablement, IAM roles, different projects/regions/models, Colab), what could be preventing access to Generative AI models for my project/account? Is there a hidden consent form, a specific organization policy, or a known backend issue that might cause this persistent NotFound error for Generative AI models exclusively?

Any insights or suggestions from the community or Google Cloud staff would be greatly appreciated. Thank you in advance for your time and help.

Hi @yavu1111 ,

Welcome to Google Cloud Community!

The main reason you’re seeing a NotFound error when accessing the Gemini or text-bison models via the Vertex AI SDK is that these models have been retired. Even if billing is active and IAM permissions are correctly configured, access to these models may be restricted.

Here’s what you can try to resolve the issue:

  1. Check the latest stable models to ensure compatibility and access.

  2. Enable Generative AI Access via Vertex AI Studio: Try running a prompt with Gemini or PaLM models, This may trigger backend activation for your project.

  3. Update SDK to Latest Version: If you’re using the google-cloud-aiplatform SDK, make sure it’s updated to version 1.82.0 or later to avoid compatibility issues.

Here are some resources that provide deeper insight into the NotFound error and access issues with Generative AI models in the Vertex AI Python SDK:

If none of the above works, you may need to reach out to Google Cloud Support. When reaching out, include detailed information and relevant screenshots of the errors you’ve encountered. This will assist them in diagnosing and resolving your issue more efficiently.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

1 Like

Hi dawnberdan,

Thank you so much for your prompt and helpful response! Your guidance was instrumental in resolving the issue I was facing.

The problem stemmed from my Python code, where I had incorrectly specified gemini-1.0-pro as the model and asia-northeast1 as the region. As you pointed out, these are no longer valid options.

After updating my code to use the correct choices, gemini-2.5-flash for the model and global for the region, everything is now working perfectly.

I really appreciate your expertise and the time you took to assist me.

Best regards,

yavu1111

1 Like