Elffuss BraidHub

kikocis/continue public

bd86bc3e9206 · 17.5 KiBRawPermalink
1---
2title: "config.json Reference"
3---
4
5<Info>
6 We recently introduced a new configuration format, `config.yaml`, to replace
7 `config.json`. See the `config.yaml` reference and migration guide
8 [here](/reference).
9</Info>
10
11Below 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).
12
13**All properties at all levels are optional unless explicitly marked required**
14
15### `models`
16
17Your **chat** models are defined here, which are used for [Chat](/features/chat/how-it-works), [Edit](/features/edit/how-it-works) and [VS Code actions](/customization/overview#vscode-actions).
18
19Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json.
20
21**Properties:**
22
23- `title` (**required**): The title to assign to your model, shown in dropdowns, etc.
24
25- `provider` (**required**): The provider of the model, which determines the type and interaction method. Options inclued `openai`, `ollama`, `xAI`, etc., see IntelliJ suggestions.
26
27- `model` (**required**): The name of the model, used for prompt template auto-detection. Use `AUTODETECT` special name to get all available models.
28
29- `apiKey`: API key required by providers like OpenAI, Anthropic, Cohere, and xAI.
30
31- `apiBase`: The base URL of the LLM API.
32
33- `contextLength`: Maximum context length of the model, typically in tokens (default: 2048).
34
35- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists.
36
37- `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions.
38
39- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. See the [Deep Dives section](/customize/deep-dives/prompts) for customization details.
40
41- `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override.
42
43- `systemMessage`: A system message that will precede responses from the LLM.
44
45- `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override.
46
47- `apiType`: Specifies the type of API (`openai` or `azure`).
48
49- `apiVersion`: Azure API version (e.g., `2023-07-01-preview`).
50
51- `engine`: Engine for Azure OpenAI requests.
52
53- `capabilities`: Override auto-detected capabilities:
54 - `uploadImage`: Boolean indicating if the model supports image uploads.
55 - `tools`: Boolean indicating if the model supports tool use.
56
57_(AWS Only)_
58
59- `profile`: AWS security profile for authorization.
60- `modelArn`: AWS ARN for imported models (e.g., for `bedrockimport` provider).
61- `region`: Region where the model is hosted (e.g., `us-east-1`, `eu-central-1`).
62
63Example:
64
65config.json
66
67```json
68{
69 "models": [
70 { "title": "Ollama", "provider": "ollama", "model": "AUTODETECT" },
71 {
72 "model": "gpt-4o",
73 "contextLength": 128000,
74 "title": "GPT-4o",
75 "provider": "openai",
76 "apiKey": "YOUR_API_KEY"
77 }
78 ]
79}
80```
81
82### `tabAutocompleteModel`
83
84Specifies 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.
85
86Example
87
88config.json
89
90```json
91{
92 "tabAutocompleteModel": {
93 "title": "My Starcoder",
94 "provider": "ollama",
95 "model": "starcoder2:3b"
96 }
97}
98```
99
100### `tabAutocompleteOptions`
101
102Specifies options for tab autocompletion behavior.
103
104**Properties:**
105
106- `disable`: If `true`, disables tab autocomplete (default: `false`).
107- `maxPromptTokens`: Maximum number of tokens for the prompt (default: `1024`).
108- `debounceDelay`: Delay (in ms) before triggering autocomplete (default: `350`).
109- `maxSuffixPercentage`: Maximum percentage of prompt for suffix (default: `0.2`).
110- `prefixPercentage`: Percentage of input for prefix (default: `0.3`).
111- `template`: Template string for autocomplete, using Mustache templating. You can use the `{{{ prefix }}}`, `{{{ suffix }}}`, `{{{ filename }}}`, `{{{ reponame }}}`, and `{{{ language }}}` variables.
112- `onlyMyCode`: If `true`, only includes code within the repository (default: `true`).
113
114Example
115
116config.json
117
118```json
119{
120 "tabAutocompleteOptions": {
121 "debounceDelay": 500,
122 "maxPromptTokens": 1500,
123 "disableInFiles": ["*.md"]
124 }
125}
126```
127
128### `embeddingsProvider`
129
130Embeddings model settings - the model used for @Codebase and @docs.
131
132**Properties:**
133
134- `provider` (**required**): Specifies the embeddings provider, with options including `transformers.js`, `ollama`, `openai`, `cohere`, `gemini`, etc
135- `model`: Model name for embeddings.
136- `apiKey`: API key for the provider.
137- `apiBase`: Base URL for API requests.
138- `requestOptions`: Additional HTTP request settings specific to the embeddings provider.
139- `maxEmbeddingChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens.
140- `maxEmbeddingBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk.
141
142(AWS ONLY)
143
144- `region`: Specifies the region hosting the model.
145- `profile`: AWS security profile.
146
147Example:
148
149config.json
150
151```json
152{
153 "embeddingsProvider": {
154 "provider": "openai",
155 "model": "text-embedding-ada-002",
156 "apiKey": "<API_KEY>",
157 "maxEmbeddingChunkSize": 256,
158 "maxEmbeddingBatchSize": 5
159 }
160}
161```
162
163### `completionOptions`
164
165Parameters that control the behavior of text generation and completion settings. Top-level `completionOptions` apply to all models, _unless overridden at the model level_.
166
167**Properties:**
168
169- `stream`: Whether to stream the LLM response. Currently only respected by the `anthropic` and `ollama` providers; other providers will always stream (default: `true`).
170- `temperature`: Controls the randomness of the completion. Higher values result in more diverse outputs.
171- `topP`: The cumulative probability for nucleus sampling. Lower values limit responses to tokens within the top probability mass.
172- `topK`: The maximum number of tokens considered at each step. Limits the generated text to tokens within this probability.
173- `presencePenalty`: Discourages the model from generating tokens that have already appeared in the output.
174- `frequencyPenalty`: Penalizes tokens based on their frequency in the text, reducing repetition.
175- `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).
176- `stop`: An array of stop tokens that, when encountered, will terminate the completion. Allows specifying multiple end conditions.
177- `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`).
178- `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`.
179- `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).
180- `numGpu`: For Ollama, this parameter overrides the number of gpu layers that will be used to load the model into VRAM.
181- `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.
182- `reasoning`: Enables thinking/reasoning for Anthropic Claude 3.7+ models.
183- `reasoningBudgetTokens`: Sets budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models.
184
185Example
186
187config.json
188
189```json
190{ "completionOptions": { "stream": false, "temperature": 0.5 } }
191```
192
193### `requestOptions`
194
195Default HTTP request options that apply to all models and context providers, unless overridden at the model level.
196
197**Properties:**
198
199- `timeout`: Timeout for each request to the LLM (default: 7200 seconds).
200
201- `verifySsl`: Whether to verify SSL certificates for requests.
202
203- `caBundlePath`: Path to a custom CA bundle for HTTP requests - path to `.pem` file (or array of paths)
204
205- `proxy`: Proxy URL to use for HTTP requests.
206
207- `headers`: Custom headers for HTTP requests.
208
209- `extraBodyProperties`: Additional properties to merge with the HTTP request body.
210
211- `noProxy`: List of hostnames that should bypass the specified proxy.
212
213- `clientCertificate`: Client certificate for HTTP requests.
214 - `cert`: Path to the client certificate file.
215 - `key`: Path to the client certificate key file.
216 - `passphrase`: Optional passphrase for the client certificate key file.
217
218Example
219
220config.json
221
222```json
223{ "requestOptions": { "headers": { "X-Auth-Token": "xxx" } } }
224```
225
226### `reranker`
227
228Configuration for the reranker model used in response ranking.
229
230**Properties:**
231
232- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `huggingface-tei`, `bedrock`
233
234- `params`:
235 - `model`: Model name
236 - `apiKey`: Api key
237 - `region`: Region (for Bedrock only)
238
239Example
240
241config.json
242
243```json
244{
245 "reranker": {
246 "name": "voyage",
247 "params": { "model": "rerank-2", "apiKey": "<VOYAGE_API_KEY>" }
248 }
249}
250```
251
252### `docs`
253
254List of documentation sites to index.
255
256**Properties:**
257
258- `title` (**required**): Title of the documentation site, displayed in dropdowns, etc.
259- `startUrl` (**required**): Start page for crawling - usually root or intro page for docs
260
261- `maxDepth`: Maximum link depth for crawling. Default `4`
262- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`).
263- `useLocalCrawling`: Skip the default crawler and only crawl using a local crawler.
264
265Example
266
267config.json
268
269```
270"docs": [ { "title": "Continue", "startUrl": "https://docs.continue.dev/intro", "faviconUrl": "https://docs.continue.dev/favicon.ico", }]
271```
272
273### `slashCommands`
274
275Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined.
276
277**Properties:**
278
279- `name`: The command name. Options include "issue", "share", "cmd", "http", "commit", and "review".
280- `description`: Brief description of the command.
281- `step`: (Deprecated) Used for built-in commands; set the name for pre-configured options.
282- `params`: Additional parameters to configure command behavior (command-specific - see code for command)
283
284The following commands are built-in and can be added to `config.json` to make them visible:
285
286#### `/share`
287
288Generate a shareable markdown transcript of your current chat history.
289
290config.json
291
292```json
293{
294 "slashCommands": [
295 {
296 "name": "share",
297 "description": "Export the current chat session to markdown",
298 "params": { "outputDir": "~/.continue/session-transcripts" }
299 }
300 ]
301}
302```
303
304Use the `outputDir` parameter to specify where you want to the markdown file to be saved.
305
306#### `/cmd`
307
308Generate a shell command from natural language and (only in VS Code) automatically paste it into the terminal.
309
310config.json
311
312```json
313{
314 "slashCommands": [
315 { "name": "cmd", "description": "Generate a shell command" }
316 ]
317}
318```
319
320#### `/commit`
321
322Shows the LLM your current git diff and asks it to generate a commit message.
323
324config.json
325
326```json
327{
328 "slashCommands": [
329 {
330 "name": "commit",
331 "description": "Generate a commit message for the current changes"
332 }
333 ]
334}
335```
336
337#### `/http`
338
339Write a custom slash command at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup. The endpoint should return a sequence of string updates, which will be streamed to the Continue sidebar. See our basic [FastAPI example](https://github.com/continuedev/continue/blob/74002369a5e435735b83278fb965e004ae38a97d/core/context/providers/context_provider_server.py#L34-L45) for reference.
340
341config.json
342
343```json
344{
345 "slashCommands": [
346 {
347 "name": "http",
348 "description": "Does something custom",
349 "params": { "url": "<my server endpoint>" }
350 }
351 ]
352}
353```
354
355#### `/issue`
356
357Describe the issue you'd like to generate, and Continue will turn into a well-formatted title and body, then give you a link to the draft so you can submit. Make sure to set the URL of the repository you want to generate issues for.
358
359config.json
360
361```json
362{
363 "slashCommands": [
364 {
365 "name": "issue",
366 "description": "Generate a link to a drafted GitHub issue",
367 "params": { "repositoryUrl": "https://github.com/continuedev/continue" }
368 }
369 ]
370}
371```
372
373#### `/onboard`
374
375The onboard slash command helps to familiarize yourself with a new project by analyzing the project structure, READMEs, and dependency files. It identifies key folders, explains their purpose, and highlights popular packages used. Additionally, it offers insights into the project's architecture.
376
377config.json
378
379```json
380{
381 "slashCommands": [
382 {
383 "name": "onboard",
384 "description": "Familiarize yourself with the codebase"
385 }
386 ]
387}
388```
389
390Example:
391
392config.json
393
394```json
395{
396 "slashCommands": [
397 { "name": "commit", "description": "Generate a commit message" },
398 { "name": "share", "description": "Export this session as markdown" },
399 { "name": "cmd", "description": "Generate a shell command" }
400 ]
401}
402```
403
404### `customCommands`
405
406User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions.
407
408**Properties:**
409
410- `name`: The name of the custom command.
411- `prompt`: Text prompt for the command.
412- `description`: Brief description explaining the command's function.
413
414Example:
415
416config.json
417
418```json
419{
420 "customCommands": [
421 {
422 "name": "test",
423 "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.",
424 "description": "Write unit tests for highlighted code"
425 }
426 ]
427}
428```
429
430### `contextProviders`
431
432List of the pre-defined context providers that will show up as options while typing in the chat, and their customization with `params`.
433
434**Properties:**
435
436- `name`: Name of the context provider, e.g. `docs` or `web`
437- `params`: A context-provider-specific record of params to configure the context behavior
438
439Example
440
441config.json
442
443```json
444{
445 "contextProviders": [
446 { "name": "code", "params": {} },
447 { "name": "docs", "params": {} },
448 { "name": "diff", "params": {} },
449 { "name": "open", "params": {} }
450 ]
451}
452```
453
454### `userToken`
455
456An optional token that identifies the user, primarily for authenticated services.
457
458### `systemMessage`
459
460Defines a system message that appears before every response from the language model, providing guidance or context.
461
462### `experimental`
463
464Several experimental config parameters are available, as described below:
465
466`experimental`:
467
468- `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.=
469
470- `modelRoles`:
471 - `inlineEdit`: Model title for inline edits.
472 - `applyCodeBlock`: Model title for applying code blocks.
473 - `repoMapFileSelection`: Model title for repo map selections.
474
475- `quickActions`: Array of custom quick actions
476 - `title` (**required**): Display title for the quick action.
477 - `prompt` (**required**): Prompt for quick action.
478 - `sendToChat`: If `true`, sends result to chat; else inserts in document. Default is `false`.
479
480- `contextMenuPrompts`:
481 - `comment`: Prompt for commenting code.
482 - `docstring`: Prompt for adding docstrings.
483 - `fix`: Prompt for fixing code.
484 - `optimize`: Prompt for optimizing code.
485
486- `modelContextProtocolServers`: See [Model Context Protocol](/customization/mcp-tools)
487
488Example
489
490config.json
491
492```json
493{
494 "experimental": {
495 "modelRoles": { "inlineEdit": "Edit Model" },
496 "quickActions": [
497 {
498 "title": "Tags",
499 "prompt": "Return a list of any function and class names from the included code block",
500 "sendToChat": true
501 }
502 ],
503 "contextMenuPrompts": {
504 "fixGrammar": "Fix grammar in the above but allow for typos."
505 },
506 "modelContextProtocolServers": [
507 {
508 "transport": {
509 "type": "stdio",
510 "command": "uvx",
511 "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
512 }
513 }
514 ]
515 }
516}
517```
518
519### Fully deprecated settings
520
521Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](/customize/settings). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`.
522
523- `allowAnonymousTelemetry`: This value will be migrated to the safest merged value (`false` if either are `false`).
524
525- `promptPath`: This value will override during migration.
526
527- `disableIndexing`: This value will be migrated to the safest merged value (`true` if either are `true`).
528
529- `disableSessionTitles`/`ui.getChatTitles`: This value will be migrated to the safest merged value (`true` if either are `true`). `getChatTitles` takes precedence if set to false
530
531- `tabAutocompleteOptions`
532 - `useCache`: This value will override during migration.
533 - `disableInFiles`: This value will be migrated to the safest merged value (arrays of file matches merged/deduplicated)
534 - `multilineCompletions`: This value will override during migration.
535
536- `experimental`
537 - `useChromiumForDocsCrawling`: This value will override during migration.
538 - `readResponseTTS`: This value will override during migration.
539
540- `ui` - all will override during migration
541 - `codeBlockToolbarPosition`
542 - `fontSize`
543 - `codeWrap`
544 - `displayRawMarkdown`
545 - `showChatScrollbar`
546
547 See [User Settings Page](/customize/settings) for more information about each option.