promptfoo / promptfoo

Test your prompts, agents, and RAGs. Redteaming, pentesting, vulnerability scanning for LLMs. Improve your app's quality and catch problems. Compare performance of GPT, Claude, Gemini, Llama, and more. Simple declarative configs with command line and CI/CD integration.

Home Page:https://www.promptfoo.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Integration of Google VertexAI gcloud auth

romaintoub opened this issue · comments

Hi!

So far for VertexAI users, the VERTEX_API_KEY must be provided as described here: https://www.promptfoo.dev/docs/providers/vertex

However its not really following best practices for GCP users and hard to implement for CI/CD
Would there be a way to use the google client client to authenticate with gcp projects without providing any API key? I see there are some google cloud node.js libraries: https://github.com/googleapis/google-cloud-node but I am not sure what would be the best way to implement this

Thanks for the suggestion. Based on my understanding, we'd need to switch over to a client library for vertex AI and/or REST authentication with application default credentials (docs). That probably means using google-auth-library

#580 updates the provider to use Application Default Credentials

This means a machine that is properly configured with a service account, or logged into the gcloud CLI, should "just work"

Will be included in the next published release!

amazing, thanks a lot!

Published in 0.49.0!