Elffuss BraidHub

kikocis/continue public

91fbf794ce85 · 14.8 KiBRenderedRawPermalink
1---
2title: Reference
3description: Reference for the Continue _config.json_ configuration file
4keywords: [config, config_schema.json, json]
5---
6
7Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json).
8
9**All properties at all levels are optional unless explicitly marked required**
10
11### `models`
12
13Your **chat** models are defined here, which are used for [Chat](./chat/how-to-use-it.md), [Edit](./edit/how-to-use-it.md), and [Actions](./actions/how-to-use-it.md).
14Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json.
15
16**Properties:**
17
18- `title` (**required**): The title to assign to your model, shown in dropdowns, etc.
19- `provider` (**required**): The provider of the model, which determines the type and interaction method. Options inclued `openai`, `ollama`, etc., see intelliJ suggestions.
20- `model` (**required**): The name of the model, used for prompt template auto-detection.
21- `apiKey`: API key required by providers like OpenAI, Anthropic, and Cohere.
22- `apiBase`: The base URL of the LLM API.
23- `contextLength`: Maximum context length of the model, typically in tokens (default: 2048).
24- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists.
25- `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions.
26- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt).
27- `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override.
28- `systemMessage`: A system message that will precede responses from the LLM.
29- `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override.
30- `apiType`: Specifies the type of API (`openai` or `azure`).
31- `apiVersion`: Azure API version (e.g., `2023-07-01-preview`).
32- `engine`: Engine for Azure OpenAI requests.
33- `capabilities`: Override auto-detected capabilities:
34 - `uploadImage`: Boolean indicating if the model supports image uploads.
35
36_(AWS Only)_
37
38- `profile`: AWS security profile for authorization.
39- `modelArn`: AWS ARN for imported models (e.g., for `bedrockimport` provider).
40- `region`: Region where the model is hosted (e.g., `us-east-1`, `eu-central-1`).
41
42Example:
43
44```json title="config.json"
45{
46 "models": [
47 {
48 "title": "Ollama",
49 "provider": "ollama",
50 "model": "AUTODETECT"
51 },
52 {
53 "model": "gpt-4o",
54 "contextLength": 128000,
55 "title": "GPT-4o",
56 "provider": "openai",
57 "apiKey": "YOUR_API_KEY"
58 }
59 ]
60}
61```
62
63### `tabAutocompleteModel`
64
65Specifies the model or models for tab autocompletion, defaulting to an Ollama instance. This property uses the same format as `models`. Can be an array of models or an object for one model.
66
67Example
68
69```json title="config.json"
70{
71 "tabAutocompleteModel": {
72 "title": "My Starcoder",
73 "provider": "ollama",
74 "model": "starcoder2:3b"
75 }
76}
77```
78
79### `tabAutocompleteOptions`
80
81Specifies options for tab autocompletion behavior.
82
83**Properties:**
84
85- `disable`: If `true`, disables tab autocomplete (default: `false`).
86- `maxPromptTokens`: Maximum number of tokens for the prompt (default: `1024`).
87- `debounceDelay`: Delay (in ms) before triggering autocomplete (default: `350`).
88- `maxSuffixPercentage`: Maximum percentage of prompt for suffix (default: `0.2`).
89- `prefixPercentage`: Percentage of input for prefix (default: `0.3`).
90- `template`: Template string for autocomplete, using Mustache templating.
91- `multilineCompletions`: Controls multiline completions (`"always"`, `"never"`, or `"auto"`) (default: `auto`).
92- `useCache`: If `true`, caches completions (default: `true`).
93- `onlyMyCode`: If `true`, only includes code within the repository (default: `true`).
94- `disableInFiles`: Array of glob patterns for files where autocomplete is disabled (default: `[]`).
95
96Example
97
98```json title="config.json"
99{
100 "tabAutocompleteOptions": {
101 "debounceDelay": 500,
102 "maxPromptTokens": 1500,
103 "disableInFiles": ["*.md"]
104 }
105}
106```
107
108### `embeddingsProvider`
109
110Embeddings model settings - the model used for @Codebase and @docs.
111
112**Properties:**
113
114- `provider` (**required**): Specifies the embeddings provider, with options including `transformers.js`, `ollama`, `openai`, `cohere`, `gemini`, etc
115- `model`: Model name for embeddings.
116- `apiKey`: API key for the provider.
117- `apiBase`: Base URL for API requests.
118- `requestOptions`: Additional HTTP request settings specific to the embeddings provider.
119- `maxEmbeddingChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens.
120- `maxEmbeddingBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk.
121
122(AWS ONLY)
123
124- `region`: Specifies the region hosting the model.
125- `profile`: AWS security profile.
126
127Example:
128
129```json title="config.json"
130{
131 "embeddingsProvider": {
132 "provider": "openai",
133 "model": "text-embedding-ada-002",
134 "apiKey": "<API_KEY>",
135 "maxEmbeddingChunkSize": 256,
136 "maxEmbeddingBatchSize": 5
137 }
138}
139```
140
141### `completionOptions`
142
143Parameters that control the behavior of text generation and completion settings. Top-level `completionOptions` apply to all models, _unless overridden at the model level_.
144
145**Properties:**
146
147- `stream`: Whether to stream the LLM response. Currently only respected by the `anthropic` and `ollama` providers; other providers will always stream (default: `true`).
148- `temperature`: Controls the randomness of the completion. Higher values result in more diverse outputs.
149- `topP`: The cumulative probability for nucleus sampling. Lower values limit responses to tokens within the top probability mass.
150- `topK`: The maximum number of tokens considered at each step. Limits the generated text to tokens within this probability.
151- `presencePenalty`: Discourages the model from generating tokens that have already appeared in the output.
152- `frequencyPenalty`: Penalizes tokens based on their frequency in the text, reducing repetition.
153- `mirostat`: Enables Mirostat sampling, which controls the perplexity during text generation. Supported by Ollama, LM Studio, and llama.cpp providers (default: `0`, where `0` = disabled, `1` = Mirostat, and `2` = Mirostat 2.0).
154- `stop`: An array of stop tokens that, when encountered, will terminate the completion. Allows specifying multiple end conditions.
155- `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`).
156- `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`.
157- `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes).
158- `numGpu`: For Ollama, this parameter overrides the number of gpu layers that will be used to load the model into VRAM.
159- `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream.
160
161Example
162
163```json title="config.json"
164{
165 "completionOptions": {
166 "stream": false,
167 "temperature": 0.5
168 }
169}
170```
171
172### `requestOptions`
173
174Default HTTP request options that apply to all models and context providers, unless overridden at the model level.
175
176**Properties:**
177
178- `timeout`: Timeout for each request to the LLM (default: 7200 seconds).
179- `verifySsl`: Whether to verify SSL certificates for requests.
180- `caBundlePath`: Path to a custom CA bundle for HTTP requests - path to `.pem` file (or array of paths)
181- `proxy`: Proxy URL to use for HTTP requests.
182- `headers`: Custom headers for HTTP requests.
183- `extraBodyProperties`: Additional properties to merge with the HTTP request body.
184- `noProxy`: List of hostnames that should bypass the specified proxy.
185- `clientCertificate`: Client certificate for HTTP requests.
186
187 - `cert`: Path to the client certificate file.
188 - `key`: Path to the client certificate key file.
189 - `passphrase`: Optional passphrase for the client certificate key file.
190
191Example
192
193```json title="config.json"
194{
195 "requestOptions": {
196 "headers": {
197 "X-Auth-Token": "xxx"
198 }
199 }
200}
201```
202
203### `reranker`
204
205Configuration for the reranker model used in response ranking.
206
207**Properties:**
208
209- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `huggingface-tei`
210- `params`:
211 - `model`: Model name
212 - `apiKey`: Api key
213
214Example
215
216```json title="config.json"
217{
218 "reranker": {
219 "name": "voyage",
220 "params": {
221 "model": "rerank-2",
222 "apiKey": "<VOYAGE_API_KEY>"
223 }
224 }
225}
226```
227
228### `docs`
229
230List of documentation sites to index.
231
232**Properties:**
233
234- `title` (**required**): Title of the documentation site, displayed in dropdowns, etc.
235- `startUrl` (**required**): Start page for crawling - usually root or intro page for docs
236<!-- - `rootUrl`: Crawler will only index docs within this domain - pages that contain this URL -->
237- `maxDepth`: Maximum link depth for crawling. Default `4`
238- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`).
239
240Example
241
242```json title="config.json"
243"docs": [
244 {
245 "title": "Continue",
246 "startUrl": "https://docs.continue.dev/intro",
247 "faviconUrl": "https://docs.continue.dev/favicon.ico",
248 }
249]
250```
251
252### `analytics`
253
254Configuration for analytics tracking.
255
256**Properties:**
257
258- `provider`: Analytics provider (`"posthog"` or `"logstash"`).
259- `url`: URL for analytics data.
260- `clientKey`: Client key for analytics.
261
262### `slashCommands`
263
264Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined.
265
266**Properties:**
267
268- `name`: The command name. Options include "issue", "share", "cmd", "http", "commit", and "review".
269- `description`: Brief description of the command.
270- `step`: (Deprecated) Used for built-in commands; set the name for pre-configured options.
271- `params`: Additional parameters to configure command behavior (command-specific - see code for command)
272
273Example:
274
275```json title="config.json"
276{
277 "slashCommands": [
278 {
279 "name": "commit",
280 "description": "Generate a commit message"
281 },
282 {
283 "name": "share",
284 "description": "Export this session as markdown"
285 },
286 {
287 "name": "cmd",
288 "description": "Generate a shell command"
289 }
290 ]
291}
292```
293
294### `customCommands`
295
296User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions.
297
298**Properties:**
299
300- `name`: The name of the custom command.
301- `prompt`: Text prompt for the command.
302- `description`: Brief description explaining the command's function.
303
304Example:
305
306```json title="config.json"
307{
308 "customCommands": [
309 {
310 "name": "test",
311 "prompt": "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
312 "description": "Write unit tests for highlighted code"
313 }
314 ]
315}
316```
317
318### `contextProviders`
319
320List of the pre-defined context providers that will show up as options while typing in the chat, and their customization with `params`.
321
322**Properties:**
323
324- `name`: Name of the context provider, e.g. `docs` or `web`
325- `params`: A context-provider-specific record of params to configure the context behavior
326
327Example
328
329```json title="config.json"
330{
331 "contextProviders": [
332 {
333 "name": "code",
334 "params": {}
335 },
336 {
337 "name": "docs",
338 "params": {}
339 },
340 {
341 "name": "diff",
342 "params": {}
343 },
344 {
345 "name": "open",
346 "params": {}
347 }
348 ]
349}
350```
351
352### `disableSessionTitles`
353
354Prevents generating summary titles for each chat session when set to `true`.
355
356### `ui`
357
358Customizable UI settings to control interface appearance and behavior.
359
360**Properties:**
361
362- `codeBlockToolbarPosition`: Sets the toolbar position within code blocks, either `top` (default) or `bottom`.
363- `fontSize`: Specifies font size for UI elements.
364- `displayRawMarkdown`: If `true`, shows raw markdown in responses.
365- `showChatScrollbar`: If `true`, enables a scrollbar in the chat window.
366
367Example:
368
369```json title="config.json"
370{
371 "ui": {
372 "codeBlockToolbarPosition": "bottom",
373 "fontSize": 14,
374 "displayRawMarkdown": false
375 }
376}
377```
378
379### `allowAnonymousTelemetry`
380
381When `true`, anonymous usage data is collected using Posthog, to improve features. Default is `true`.
382
383### `userToken`
384
385An optional token that identifies the user, primarily for authenticated services.
386
387### `systemMessage`
388
389Defines a system message that appears before every response from the language model, providing guidance or context.
390
391### `disableIndexing`
392
393Prevents indexing of the codebase, useful primarily for debugging purposes.
394
395### `experimental`
396
397Several experimental config parameters are available, as described below:
398
399`experimental`:
400
401- `defaultContext`: Defines the default context for the LLM. Uses the same format as `contextProviders` but includes an additional `query` property to specify custom query parameters.=
402- `modelRoles`:
403 - `inlineEdit`: Model title for inline edits.
404 - `applyCodeBlock`: Model title for applying code blocks.
405 - `repoMapFileSelection`: Model title for repo map selections.
406- `readResponseTTS`: If `true`, reads LLM responses aloud with TTS. Default is `true`.
407- `promptPath`: Change the path to custom prompt files from the default ".prompts"
408- `quickActions`: Array of custom quick actions
409 - `title` (**required**): Display title for the quick action.
410 - `prompt` (**required**): Prompt for quick action.
411 - `sendToChat`: If `true`, sends result to chat; else inserts in document. Default is `false`.
412- `contextMenuPrompts`:
413 - `comment`: Prompt for commenting code.
414 - `docstring`: Prompt for adding docstrings.
415 - `fix`: Prompt for fixing code.
416 - `optimize`: Prompt for optimizing code.
417 - `fixGrammar`: Prompt for fixing grammar or spelling.
418- `useChromiumForDocsCrawling`: Use Chromium to crawl docs locally. Useful if the default Cheerio crawler fails on sites that require JavaScript rendering. Downloads and installs Chromium to `~/.continue/.utils`..
419
420Example
421
422```json title="config.json"
423{
424 "experimental": {
425 "modelRoles": {
426 "inlineEdit": "Edit Model"
427 },
428 "promptPath": "custom/.prompts",
429 "quickActions": [
430 {
431 "title": "Tags",
432 "prompt": "Return a list of any function and class names from the included code block",
433 "sendToChat": true
434 }
435 ],
436 "contextMenuPrompts": {
437 "fixGrammar": "Fix grammar in the above but allow for typos."
438 },
439 "readResponseTTS": false,
440 "useChromiumForDocsCrawling": true
441 }
442}
443```