| 1 | --- |
| 2 | title: "How to Configure Vertex AI with Continue" |
| 3 | slug: ../vertexai |
| 4 | sidebarTitle: "Vertex AI" |
| 5 | --- |
| 6 | |
| 7 | <Info> |
| 8 | Enable the [Vertex AI API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com) |
| 9 | and set up [Google Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc) |
| 10 | </Info> |
| 11 | |
| 12 | ## Configuration |
| 13 | |
| 14 | <Tabs> |
| 15 | <Tab title="YAML"> |
| 16 | ```yaml title="config.yaml" |
| 17 | models: |
| 18 | - name: <MODEL_NAME> |
| 19 | provider: vertexai |
| 20 | model: <MODEL_ID> |
| 21 | env: |
| 22 | projectId: <PROJECT_ID> |
| 23 | region: us-east5 |
| 24 | ``` |
| 25 | </Tab> |
| 26 | <Tab title="JSON (Deprecated)"> |
| 27 | ```json title="config.json" |
| 28 | { |
| 29 | "models": [ |
| 30 | { |
| 31 | "title": "<MODEL_NAME>", |
| 32 | "provider": "vertexai", |
| 33 | "model": "<MODEL_ID>", |
| 34 | "projectId": "[PROJECT_ID]", |
| 35 | "region": "us-east5" |
| 36 | } |
| 37 | ] |
| 38 | } |
| 39 | ``` |
| 40 | </Tab> |
| 41 | </Tabs> |
| 42 | |
| 43 | ## How to Enable Vertex AI Express Mode |
| 44 | |
| 45 | You can use Vertex AI in [express mode](https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview) by only providing an API Key. Only some Gemini models are supported in express mode for now. |
| 46 | |
| 47 | <Tabs> |
| 48 | <Tab title="YAML"> |
| 49 | ```yaml title="config.yaml" |
| 50 | models: |
| 51 | - name: <MODEL_NAME> |
| 52 | provider: vertexai |
| 53 | model: <MODEL_ID> |
| 54 | apiKey: <YOUR_GOOGLE_CLOUD_API_KEY> |
| 55 | ``` |
| 56 | </Tab> |
| 57 | <Tab title="JSON (Deprecated)"> |
| 58 | ```json title="config.json" |
| 59 | { |
| 60 | "models": [ |
| 61 | { |
| 62 | "title": "<MODEL_NAME>", |
| 63 | "provider": "vertexai", |
| 64 | "model": "<MODEL_ID>", |
| 65 | "apiKey": "<YOUR_GOOGLE_CLOUD_API_KEY>", |
| 66 | } |
| 67 | ] |
| 68 | } |
| 69 | ``` |
| 70 | </Tab> |
| 71 | </Tabs> |