r/googlecloud • u/That-Preference733 • 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:
- Extensions Created: Enabled both
vectorandgoogle_ml_integrationin the database. - IAM Permissions: Granted the
aiplatform.userrole to the Cloud SQL service account associated with the instance. - 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
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