Elffuss BraidHub

kikocis/continue public

f433400a74a4 · 3.4 KiBRawPermalink
1---
2title: Vertex AI
3slug: ../vertexai
4---
5
6<Info>
7 You need to enable the [Vertex AI
8 API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com)
9 and set up the [Google Application Default
10 Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc).
11</Info>
12
13## Chat model
14
15We recommend configuring **Claude 3.5 Sonnet** as your chat model.
16
17<Tabs>
18 <Tab title="YAML">
19 ```yaml title="config.yaml"
20 models:
21 - name: Claude 3.5 Sonnet
22 provider: vertexai
23 model: claude-3-5-sonnet-20240620
24 env:
25 projectId: <PROJECT_ID>
26 region: us-east5
27 ```
28 </Tab>
29 <Tab title="JSON">
30 ```json title="config.json"
31 {
32 "models": [
33 {
34 "title": "Claude 3.5 Sonnet",
35 "provider": "vertexai",
36 "model": "claude-3-5-sonnet-20240620",
37 "projectId": "[PROJECT_ID]",
38 "region": "us-east5"
39 }
40 ]
41 }
42 ```
43 </Tab>
44</Tabs>
45
46## Autocomplete model
47
48We recommend configuring **Codestral** or **code-gecko** as your autocomplete model.
49
50<Tabs>
51 <Tab title="YAML">
52 ```yaml title="config.yaml"
53 models:
54 - name: Codestral (Vertex AI)
55 provider: vertexai
56 model: codestral
57 roles:
58 - autocomplete
59 env:
60 projectId: <PROJECT_ID>
61 region: us-central1
62
63 ```
64 </Tab>
65 <Tab title="JSON">
66 ```json title="config.json"
67 {
68 "tabAutocompleteModel": {
69 "title": "Codestral (Vertex AI)",
70 "provider": "vertexai",
71 "model": "codestral",
72 "projectId": "[PROJECT_ID]",
73 "region": "us-central1"
74 }
75 }
76 ```
77 </Tab>
78</Tabs>
79
80## Embeddings model
81
82We recommend configuring **text-embedding-004** as your embeddings model.
83
84<Tabs>
85 <Tab title="YAML">
86 ```yaml title="config.yaml"
87 models:
88 - name: Text Embedding-004
89 provider: vertexai
90 model: text-embedding-004
91 env:
92 projectId: <PROJECT_ID>
93 region: us-central1
94 roles:
95 - embed
96 ```
97 </Tab>
98 <Tab title="JSON">
99 ```json title="config.json"
100 {
101 "embeddingsProvider": {
102 "provider": "vertexai",
103 "model": "text-embedding-004",
104 "projectId": "[PROJECT_ID]",
105 "region": "us-central1"
106 }
107 }
108 ```
109 </Tab>
110</Tabs>
111
112## Reranking model
113
114Vertex AI currently does not offer any reranking models.
115
116[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
117
118## Express mode
119
120You can use VertexAI 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.
121
122<Tabs groupId="config-example">
123 <TabItem value="yaml" label="YAML">
124 ```yaml title="config.yaml"
125 models:
126 - name: Gemini 2.5 Flash - VertexAI
127 provider: vertexai
128 model: gemini-2.5-flash
129 apiKey: ${{ secrets.GOOGLE_CLOUD_API_KEY }}
130 ```
131 </TabItem>
132 <TabItem value="json" label="JSON">
133 ```json title="config.json"
134 {
135 "models": [
136 {
137 "title": "Gemini 2.5 Flash - VertexAI",
138 "provider": "vertexai",
139 "model": "gemini-2.5-flash",
140 "apiKey": "[YOUR_GOOGLE_CLOUD_API_KEY]",
141 }
142 ]
143 }
144 ```
145 </TabItem>
146</Tabs>