Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

"ValueError(\nValueError: Unknown model publishers/google/models/gemini-1.5-pro-001

Hello Google Cloud Community,
 
I'm using gemini-1.5-pro-001 for some classification pipelines using vertexai and I'm getting the following error in one of my prober tests --

 

ValueError: Unknown model publishers/google/models/gemini-1.5-pro-001; {'gs://google-cloud-aiplatform/schema/predict/instance/text_embedding_1.0.0.yaml': <class 'vertexai.preview.language_models._PreviewTextEmbeddingModel'>}.​


What's interesting is that this error is only occurring when I'm changing the deployment region to 'euwest1' using --

 if constants.DEPLOYMENT_REGION == "EU":
        deployment_region = constants.EU_DEPLOYMENT_REGION_CODE
        base_logger.info("Deployment region is EU, using %s", deployment_region)
        try:
            vertexai.init(location=deployment_region)
            base_logger.info("Vertex AI initialized in %s", deployment_region)
        # if the initialization fails in europe-west1 for any reason, terminate the process
        except Exception as e:
            base_logger.error(
                "Failed to initialize Vertex AI in %s, aborting process",
                deployment_region,
                extra={"error": str(e)},
            )
            raise

 

 

Could anyone provide insights into what might be causing this issue or how to resolve it? Happy to provide more information in case you need!

 

Thank you for your assistance!

Solved Solved
0 2 327
1 ACCEPTED SOLUTION

Hi @rg97,

Welcome to Google Cloud Community!

I’m seeing that europe-west1 region is included in the list that supports gemini-1.5-pro-001. You may also try to verify that the model reference in your code is correct. Sometimes, a typo or incorrect model name can cause such errors.

Make sure that your Vertex AI service is correctly configured to use the europe-west1 region. You might need to update your configuration settings or specify the region explicitly in your code.

Also ensure that you're using the correct methods to interact with the Gemini model. If you need embeddings, use a dedicated embedding model. Here are the supported embeddings stable model versions. For text generation functionalities, use the appropriate Gemini API calls. Look at the Vertex AI documentation for Gemini's usage patterns. Incorrect usage can lead to errors even if the model is available in the region.

If the issue persists, consider reaching out to Google Cloud support for further assistance. They can provide more detailed insights and help resolve any region-specific issues.

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.

View solution in original post

2 REPLIES 2

Hi @rg97,

Welcome to Google Cloud Community!

I’m seeing that europe-west1 region is included in the list that supports gemini-1.5-pro-001. You may also try to verify that the model reference in your code is correct. Sometimes, a typo or incorrect model name can cause such errors.

Make sure that your Vertex AI service is correctly configured to use the europe-west1 region. You might need to update your configuration settings or specify the region explicitly in your code.

Also ensure that you're using the correct methods to interact with the Gemini model. If you need embeddings, use a dedicated embedding model. Here are the supported embeddings stable model versions. For text generation functionalities, use the appropriate Gemini API calls. Look at the Vertex AI documentation for Gemini's usage patterns. Incorrect usage can lead to errors even if the model is available in the region.

If the issue persists, consider reaching out to Google Cloud support for further assistance. They can provide more detailed insights and help resolve any region-specific issues.

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.

Thanks for the reply. I wanted to use an embedding model and I forgot to change the model_name. 

Thanks for the help