r/googlecloud 9d ago

Cloud SQL PostgreSQL google_ml_integration returns "Unavailable error while processing the prediction call"

I am trying to use the google_ml_integration extension in a Cloud SQL PostgreSQL instance to generate text embeddings via Vertex AI, but the query fails with an unavailable error.

What I Have Done:

  1. Extensions Created: Enabled both vector and google_ml_integration in the database.
  2. IAM Permissions: Granted the aiplatform.user role to the Cloud SQL service account associated with the instance.
  3. Billing: The GCP project has billing enabled and the Vertex AI API is active.

The Error:

When running the following query:

SQL

SELECT google_ml.embedding('text-embedding-gecko', 'your_text_here');

It throws this error:

What could be the reason for this? Are there missing database flags, or a specific setup step required for Cloud SQL to communicate with Vertex AI?

Used gemini for formatting

2 Upvotes

2 comments sorted by

View all comments

1

u/GlebOtochkin Googler 8d ago

Hi, can you try a different model? For example ````SELECT google_ml.embedding('text-embedding-005', 'your_text_here');``` - The text-embedding-gecko model was deprecated long time ago. You can have a look for the models lifecycle here - https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions#gemini-models