Skip to content

Access Claude and Gemini via GCP Vertex AI #1134

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Merged
merged 5 commits into from
Mar 23, 2025

Conversation

debanjum
Copy link
Member

Support accessing Claude and Gemini AI models via Vertex AI on Google Cloud

See the documentation for setup details.

@debanjum debanjum force-pushed the support-gemini-claude-via-gcp-vertex branch from 8edf944 to e49689f Compare March 23, 2025 10:36
Enable configuring a Khoj AI model API for Vertex AI using GCP credentials.

Specifically use the api key & api base url fields of the AI Model API
associated with the current chat model to extract gcp region, gcp
project id & credentials. This helps create a AnthropicVertex client.

The api key field should contain the GCP service account keyfile as a
base64 encoded string.

The api base url field should be of the form
`https://{MODEL_GCP_REGION}-aiplatform.googleapis.com/v1/projects/{YOUR_GCP_PROJECT_ID}`

Accepting GCP credentials via the AI model API makes it easy to use
across local and cloud environments. As it bypasses the need for a
separate service account key file on the Khoj server.
@debanjum debanjum force-pushed the support-gemini-claude-via-gcp-vertex branch from e49689f to 16ffebf Compare March 23, 2025 10:43
@debanjum debanjum added documentation Improve documentation coverage Add content type to search and index labels Mar 23, 2025
@debanjum debanjum merged commit 86a51d8 into master Mar 23, 2025
10 checks passed
@debanjum debanjum deleted the support-gemini-claude-via-gcp-vertex branch March 23, 2025 10:56
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
coverage Add content type to search and index documentation Improve documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant