Hello Google Cloud Community,
I'm facing a persistent 404 Publisher Model ... was not found or your project does not have access to it error when trying to use gemini-1.0-pro with ChatVertexAI from LangChain on a brand new Google Cloud project (let's call its ID my-new-genai-project). I've been troubleshooting this for days and have gone through extensive steps, including creating this new project, but the issue remains. I'm hoping someone here can shed some light on what might be going wrong, as my account has Basic Support, and I'm unable to open a direct technical support case.
My Setup & What I've Tried:
from langchain_google_vertexai import ChatVertexAI # Assuming other necessary imports like os, load_dotenv, config.settings are correct # from config.settings import LLM_TEMPERATURE, LLM_MAX_TOKENS class LLMClient: def __init__(self): self.llm = ChatVertexAI( model_name="gemini-1.0-pro", project="my-new-genai-project", # Using the placeholder ID location="asia-southeast1", # temperature=LLM_TEMPERATURE, # max_output_tokens=LLM_MAX_TOKENS ) def get_llm(self): return self.llm
The Persistent Error:
Despite all the above configurations, when I run my script (python -m scripts.run_lucy), I consistently get the following error:
google.api_core.exceptions.NotFound: 404 Publisher Model `projects/my-new-genai-project/locations/asia-southeast1/publishers/google/models/gemini-1.0-pro` was not found or your project does not have access to it. Please ensure you are using a valid model version. For more information, see: https://cloud.google.com/vertex-ai/generative-ai/docs/learn/model-versions
This issue was also experienced on a previous project (ID redacted) with various models, which led to creating this new project.
Any help or insights would be greatly appreciated, as this is blocking my project development.
Thanks, Surachet K.