You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/ai-presets.mdx
+49-6Lines changed: 49 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,22 @@ To use Claude models, create a preset like this:
70
70
}
71
71
```
72
72
73
+
### OpenAI
74
+
75
+
To use OpenAI's models:
76
+
77
+
```json
78
+
{
79
+
"ai@openai-gpt41": {
80
+
"display:name": "GPT-4.1",
81
+
"display:order": 2,
82
+
"ai:*": true,
83
+
"ai:model": "gpt-4.1",
84
+
"ai:apitoken": "<your OpenAI API key>"
85
+
}
86
+
}
87
+
```
88
+
73
89
### Local LLMs (Ollama)
74
90
75
91
To connect to a local Ollama instance:
@@ -78,7 +94,7 @@ To connect to a local Ollama instance:
78
94
{
79
95
"ai@ollama-llama": {
80
96
"display:name": "Ollama - Llama2",
81
-
"display:order": 2,
97
+
"display:order": 3,
82
98
"ai:*": true,
83
99
"ai:baseurl": "http://localhost:11434/v1",
84
100
"ai:name": "llama2",
@@ -98,7 +114,7 @@ To connect to Azure AI services:
98
114
{
99
115
"ai@azure-gpt4": {
100
116
"display:name": "Azure GPT-4",
101
-
"display:order": 3,
117
+
"display:order": 4,
102
118
"ai:*": true,
103
119
"ai:apitype": "azure",
104
120
"ai:baseurl": "<your Azure AI base URL>",
@@ -118,7 +134,7 @@ To use Perplexity's models:
118
134
{
119
135
"ai@perplexity-sonar": {
120
136
"display:name": "Perplexity Sonar",
121
-
"display:order": 4,
137
+
"display:order": 5,
122
138
"ai:*": true,
123
139
"ai:apitype": "perplexity",
124
140
"ai:model": "llama-3.1-sonar-small-128k-online",
@@ -135,7 +151,7 @@ To use Google's Gemini models from [Google AI Studio](https://aistudio.google.co
135
151
{
136
152
"ai@gemini-2.0": {
137
153
"display:name": "Gemini 2.0",
138
-
"display:order": 5,
154
+
"display:order": 6,
139
155
"ai:*": true,
140
156
"ai:apitype": "google",
141
157
"ai:model": "gemini-2.0-flash-exp",
@@ -158,9 +174,16 @@ You can define multiple presets in your `ai.json` file:
158
174
"ai:model": "claude-3-5-sonnet-latest",
159
175
"ai:apitoken": "<your anthropic API key>"
160
176
},
177
+
"ai@openai-gpt41": {
178
+
"display:name": "GPT-4.1",
179
+
"display:order": 2,
180
+
"ai:*": true,
181
+
"ai:model": "gpt-4.1",
182
+
"ai:apitoken": "<your OpenAI API key>"
183
+
},
161
184
"ai@ollama-llama": {
162
185
"display:name": "Ollama - Llama2",
163
-
"display:order": 2,
186
+
"display:order": 3,
164
187
"ai:*": true,
165
188
"ai:baseurl": "http://localhost:11434/v1",
166
189
"ai:name": "llama2",
@@ -169,7 +192,7 @@ You can define multiple presets in your `ai.json` file:
169
192
},
170
193
"ai@perplexity-sonar": {
171
194
"display:name": "Perplexity Sonar",
172
-
"display:order": 3,
195
+
"display:order": 4,
173
196
"ai:*": true,
174
197
"ai:apitype": "perplexity",
175
198
"ai:model": "llama-3.1-sonar-small-128k-online",
@@ -187,3 +210,23 @@ Remember to set your default preset in `settings.json`:
187
210
"ai:preset": "ai@claude-sonnet"
188
211
}
189
212
```
213
+
214
+
## Using a Proxy
215
+
216
+
If you need to route AI requests through an HTTP proxy, you can add the `ai:proxyurl` setting to any preset:
217
+
218
+
```json
219
+
{
220
+
"ai@claude-with-proxy": {
221
+
"display:name": "Claude 3 Sonnet (via Proxy)",
222
+
"display:order": 1,
223
+
"ai:*": true,
224
+
"ai:apitype": "anthropic",
225
+
"ai:model": "claude-3-5-sonnet-latest",
226
+
"ai:apitoken": "<your anthropic API key>",
227
+
"ai:proxyurl": "http://proxy.example.com:8080"
228
+
}
229
+
}
230
+
```
231
+
232
+
The proxy URL should be in the format `http://host:port` or `https://host:port`. This setting works with all AI providers except Wave Cloud AI (the default).
0 commit comments