mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-22 18:24:21 +01:00
docs: Add Google Vertex AI provider documentation (#3349)
This commit is contained in:
@@ -119,12 +119,6 @@ To use Amazon Bedrock with OpenCode:
|
||||
AWS_ACCESS_KEY_ID=XXX opencode
|
||||
```
|
||||
|
||||
Or add it to a `.env` file in the project root.
|
||||
|
||||
```bash title=".env"
|
||||
AWS_ACCESS_KEY_ID=XXX
|
||||
```
|
||||
|
||||
Or add it to your bash profile.
|
||||
|
||||
```bash title="~/.bash_profile"
|
||||
@@ -225,12 +219,6 @@ Or if you already have an API key, you can select **Manually enter API Key** and
|
||||
AZURE_RESOURCE_NAME=XXX opencode
|
||||
```
|
||||
|
||||
Or add it to a `.env` file in the project root:
|
||||
|
||||
```bash title=".env"
|
||||
AZURE_RESOURCE_NAME=XXX
|
||||
```
|
||||
|
||||
Or add it to your bash profile:
|
||||
|
||||
```bash title="~/.bash_profile"
|
||||
@@ -422,6 +410,42 @@ Some models need to be manually enabled in your [GitHub Copilot settings](https:
|
||||
|
||||
---
|
||||
|
||||
### Google Vertex AI
|
||||
|
||||
To use Google Vertex AI with OpenCode:
|
||||
|
||||
1. Head over to the **Model Garden** in the Google Cloud Console and check the
|
||||
models available in your region.
|
||||
|
||||
:::tip
|
||||
You need to have a Google Cloud project with Vertex AI API enabled.
|
||||
:::
|
||||
|
||||
1. You'll need to set the following environment variables:
|
||||
- `GOOGLE_VERTEX_PROJECT`: Your Google Cloud project ID
|
||||
- `GOOGLE_VERTEX_REGION` (optional): The region for Vertex AI (defaults to us-east5)
|
||||
- One of these authentication options:
|
||||
- `GOOGLE_APPLICATION_CREDENTIALS`: Path to your service account JSON key file
|
||||
- Or authenticate using gcloud CLI with `gcloud auth application-default login`
|
||||
|
||||
Once you have these, set them while running opencode.
|
||||
|
||||
```bash
|
||||
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json GOOGLE_VERTEX_PROJECT=your-project-id opencode
|
||||
```
|
||||
|
||||
Or add them to your bash profile.
|
||||
|
||||
```bash title="~/.bash_profile"
|
||||
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
|
||||
export GOOGLE_VERTEX_PROJECT=your-project-id
|
||||
export GOOGLE_VERTEX_REGION=us-central1
|
||||
```
|
||||
|
||||
1. Run the `/models` command to select the model you want.
|
||||
|
||||
---
|
||||
|
||||
### LM Studio
|
||||
|
||||
You can configure opencode to use local models through LM Studio.
|
||||
|
||||
Reference in New Issue
Block a user