Elffuss BraidHub

kikocis/continue public

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