Open_Data_QnA icon indicating copy to clipboard operation
Open_Data_QnA copied to clipboard

InactiveRpcError "Publisher Model `.../gemini-1.5-pro-001` was not found or your project does not have access to it.

Open dsproten opened this issue 7 months ago • 3 comments

When trying to run the embeddings code cell of "notebooks/1_Setup_OpenDataQnA.ipynb" it throws an error that the Gemini 1.5 LLM model is not available anymore.

Embeddings Code cell: from env_setup import get_embeddings '# Generate embeddings for tables and columns table_schema_embeddings, col_schema_embeddings = get_embeddings()

Full Error: NotFound: 404 Publisher Model projects/nl2sql-proto/locations/us-central1/publishers/google/models/gemini-1.5-pro-001 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

After investigating Google's documentation, it says the Gemini 1.5 pro model has been retired since May 24th 2025 (I am posting this issue on the 4th of June 2025). https://cloud.google.com/vertex-ai/generative-ai/docs/learn/model-versions#retired-models

I assumed that the config section would fix the issue, to switch for example to: description_model = 'gemini-2.0-flash-lite-001'

But this did not change the error message. Searching through the project files, there are 43 hardcoded(?) occurrences of "gemini-1.5" (in 13 files).

dsproten avatar Jun 04 '25 05:06 dsproten

@dsproten ,You should update your codebase in core.py for using a new model, you should first add a new condition that handles your new model wherever the model selection logic occurs. For example, if there is an if or elif block checking for "gemini-1.5", add another condition for your new model with the appropriate handling code. Then, if the problem still persists, locate where "gemini-1.5" is actually called or assigned within the same file and replace that string with your new model’s name. This ensures that the code uses your new model instead of the old one. Essentially, you are extending the conditional logic to recognize the new model and changing the actual model identifier in the call or description so that the new model is invoked properly. If you want, you can share the exact part of your core.py file, and I can help tailor the update specifically.

albinneopraxis avatar Jun 05 '25 06:06 albinneopraxis

Thanks @albinneopraxis I replaced all occurrences (there are also some referring to gemini-1.0-pro) with what Google currently suggests a stable version and it works: https://cloud.google.com/vertex-ai/generative-ai/docs/learn/model-versions#expandable-1

Just a personal preference, I didn't opt for adding another condition for a new version, I just replaced what is not available/working anymore ("keeping it lean").

dsproten avatar Jun 05 '25 22:06 dsproten

@dsproten ooh thats sounds great..keep going

albinneopraxis avatar Jun 06 '25 04:06 albinneopraxis

I'm deploying with Terraform and updated the variable for the model from "gemini-1.5-pro" to "gemini-2.5.pro" because that is an allowed model. Imo the Repository needs to be updated.

jenka13all avatar Dec 10 '25 12:12 jenka13all