There are currently two supported approaches to use Vertex AI with Onyx:
  1. Use the gcloud CLI to authenticate
  2. Set up a service account, and use the service account to authenticate

Use the gcloud CLI to authenticate

  1. Install the gcloud CLI
  2. Authenticate with the gcloud CLI using gcloud auth application-default login on the machine that Onyx is running on.
  3. Set up a Custom LLM Provider in the Admin Panel. See the screenshots below for an example of what this should look like. Replace YOUR_GCP_PROJECT_ID with your actual GCP project ID.
VertexAILLMProvider
VertexAILLMProvider
VertexAILLMProvider
  1. Start using Vertex AI with Onyx!

Use a service account to authenticate

  1. Go the Service Accounts page in the GCP Console.
  2. Click + Create Service Account and set one up with a name like onyx-vertex-ai. Give it access to the Vertex AI Administrator role. Create!
VertexAILLMProvider
  1. Click into the created service account, navigate to the Keys tab, then click Add Key. Select JSON as the key type, and click Create. This will download a JSON file to your machine.
VertexAILLMProvider
  1. Back in the Onyx Admin Panel, click on the “Set up” button next to the “GCP Vertex AI” section. Drag and drop your JSON credentials file into the file box, or click it to select it from your file explorer.
VertexAILLMProvider
  1. Next, choose your GCP Vertex AI model’s location. This is not a required step, so feel free to skip. The valid options are one of:
  • us-central1
  • us-east1
  • us-east4
  • us-east5
  • us-south1
  • us-west1
  • us-west2
  • us-west3
  • us-west4
  • northamerica-northeast1
  • northamerica-northeast2
  • southamerica-east1
  • europe-central2
  • europe-north1
  • europe-southwest1
  • europe-west1
  • europe-west2
  • europe-west3
  • europe-west4
  • europe-west6
  • europe-west8
  • europe-west9
  • asia-east1
  • asia-east2
  • asia-northeast1
  • asia-northeast2
  • asia-northeast3
  • asia-south1
  • asia-south2
  • asia-southeast1
  • asia-southeast2
  • australia-southeast1
  • australia-southeast2
  • me-west1
  • africa-south1
VertexAILLMProvider
  1. Start using Vertex AI with Onyx!