Elffuss BraidHub

kikocis/continue public

80eede9a6f83 · 17.0 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/prompts) 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) and [Edit](/features/edit/how-it-works).
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<Info>
111 **Note**: Many of these parameters can also be configured per-model using the
112 `autocompleteOptions` field in `config.yaml`. See the [YAML
113 Reference](/reference#models) for more details.
114</Info>
115
116**Properties:**
117
118- `disable`: If `true`, disables tab autocomplete (default: `false`).
119- `maxPromptTokens`: Maximum number of tokens for the prompt (default: `1024`).
120- `debounceDelay`: Delay (in ms) before triggering autocomplete (default: `350`).
121- `maxSuffixPercentage`: Maximum percentage of prompt for suffix (default: `0.2`).
122- `prefixPercentage`: Percentage of input for prefix (default: `0.3`).
123- `template`: Template string for autocomplete, using Mustache templating. You can use the `{{{ prefix }}}`, `{{{ suffix }}}`, `{{{ filename }}}`, `{{{ reponame }}}`, and `{{{ language }}}` variables.
124- `onlyMyCode`: If `true`, only includes code within the repository (default: `true`).
125
126Example
127
128config.json
129
130```json
131{
132 "tabAutocompleteOptions": {
133 "debounceDelay": 500,
134 "maxPromptTokens": 1500,
135 "disableInFiles": ["*.md"]
136 }
137}
138```
139
140## `embeddingsProvider`
141
142Embeddings model settings - the model used for @Codebase and @docs.
143
144**Properties:**
145
146- `provider` (**required**): Specifies the embeddings provider, with options including `transformers.js`, `ollama`, `openai`, `cohere`, `gemini`, etc
147- `model`: Model name for embeddings.
148- `apiKey`: API key for the provider.
149- `apiBase`: Base URL for API requests.
150- `requestOptions`: Additional HTTP request settings specific to the embeddings provider.
151- `maxEmbeddingChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens.
152- `maxEmbeddingBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk.
153
154(AWS ONLY)
155
156- `region`: Specifies the region hosting the model.
157- `profile`: AWS security profile.
158
159Example:
160
161config.json
162
163```json
164{
165 "embeddingsProvider": {
166 "provider": "openai",
167 "model": "text-embedding-ada-002",
168 "apiKey": "<API_KEY>",
169 "maxEmbeddingChunkSize": 256,
170 "maxEmbeddingBatchSize": 5
171 }
172}
173```
174
175## `completionOptions`
176
177Parameters that control the behavior of text generation and completion settings. Top-level `completionOptions` apply to all models, _unless overridden at the model level_.
178
179**Properties:**
180
181- `stream`: Whether to stream the LLM response. Currently only respected by the `anthropic` and `ollama` providers; other providers will always stream (default: `true`).
182- `temperature`: Controls the randomness of the completion. Higher values result in more diverse outputs.
183- `topP`: The cumulative probability for nucleus sampling. Lower values limit responses to tokens within the top probability mass.
184- `topK`: The maximum number of tokens considered at each step. Limits the generated text to tokens within this probability.
185- `presencePenalty`: Discourages the model from generating tokens that have already appeared in the output.
186- `frequencyPenalty`: Penalizes tokens based on their frequency in the text, reducing repetition.
187- `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).
188- `stop`: An array of stop tokens that, when encountered, will terminate the completion. Allows specifying multiple end conditions.
189- `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`).
190- `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`.
191- `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).
192- `numGpu`: For Ollama, this parameter overrides the number of gpu layers that will be used to load the model into VRAM.
193- `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.
194- `reasoning`: Enables thinking/reasoning for Anthropic Claude 3.7+ and some Ollama models.
195- `reasoningBudgetTokens`: Sets budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models.
196
197Example
198
199config.json
200
201```json
202{ "completionOptions": { "stream": false, "temperature": 0.5 } }
203```
204
205## `requestOptions`
206
207Default HTTP request options that apply to all models and context providers, unless overridden at the model level.
208
209**Properties:**
210
211- `timeout`: Timeout for each request to the LLM (default: 7200 seconds).
212
213- `verifySsl`: Whether to verify SSL certificates for requests.
214
215- `caBundlePath`: Path to a custom CA bundle for HTTP requests - path to `.pem` file (or array of paths)
216
217- `proxy`: Proxy URL to use for HTTP requests.
218
219- `headers`: Custom headers for HTTP requests.
220
221- `extraBodyProperties`: Additional properties to merge with the HTTP request body.
222
223- `noProxy`: List of hostnames that should bypass the specified proxy.
224
225- `clientCertificate`: Client certificate for HTTP requests.
226 - `cert`: Path to the client certificate file.
227 - `key`: Path to the client certificate key file.
228 - `passphrase`: Optional passphrase for the client certificate key file.
229
230Example
231
232config.json
233
234```json
235{ "requestOptions": { "headers": { "X-Auth-Token": "xxx" } } }
236```
237
238### `reranker`
239
240Configuration for the reranker model used in response ranking.
241
242**Properties:**
243
244- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `huggingface-tei`, `bedrock`
245
246- `params`:
247 - `model`: Model name
248 - `apiKey`: Api key
249 - `region`: Region (for Bedrock only)
250
251Example
252
253config.json
254
255```json
256{
257 "reranker": {
258 "name": "voyage",
259 "params": { "model": "rerank-2", "apiKey": "<VOYAGE_API_KEY>" }
260 }
261}
262```
263
264## `docs`
265
266List of documentation sites to index.
267
268**Properties:**
269
270- `title` (**required**): Title of the documentation site, displayed in dropdowns, etc.
271- `startUrl` (**required**): Start page for crawling - usually root or intro page for docs
272
273- `maxDepth`: Maximum link depth for crawling. Default `4`
274- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`).
275- `useLocalCrawling`: Skip the default crawler and only crawl using a local crawler.
276
277Example
278
279config.json
280
281```
282"docs": [ { "title": "Continue", "startUrl": "https://docs.continue.dev/intro", "faviconUrl": "https://docs.continue.dev/favicon.ico", }]
283```
284
285## `slashCommands`
286
287Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined.
288
289**Properties:**
290
291- `name`: The command name. Options include "issue", "share", "cmd", "http", "commit", and "review".
292- `description`: Brief description of the command.
293- `step`: (Deprecated) Used for built-in commands; set the name for pre-configured options.
294- `params`: Additional parameters to configure command behavior (command-specific - see code for command)
295
296The following commands are built-in and can be added to `config.json` to make them visible:
297
298### `/share`
299
300Generate a shareable markdown transcript of your current chat history.
301
302config.json
303
304```json
305{
306 "slashCommands": [
307 {
308 "name": "share",
309 "description": "Export the current chat session to markdown",
310 "params": { "outputDir": "~/.continue/session-transcripts" }
311 }
312 ]
313}
314```
315
316Use the `outputDir` parameter to specify where you want to the markdown file to be saved.
317
318### `/cmd`
319
320Generate a shell command from natural language and (only in VS Code) automatically paste it into the terminal.
321
322config.json
323
324```json
325{
326 "slashCommands": [
327 { "name": "cmd", "description": "Generate a shell command" }
328 ]
329}
330```
331
332### `/commit`
333
334Shows the LLM your current git diff and asks it to generate a commit message.
335
336config.json
337
338```json
339{
340 "slashCommands": [
341 {
342 "name": "commit",
343 "description": "Generate a commit message for the current changes"
344 }
345 ]
346}
347```
348
349### `/http`
350
351Write 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.
352
353config.json
354
355```json
356{
357 "slashCommands": [
358 {
359 "name": "http",
360 "description": "Does something custom",
361 "params": { "url": "<my server endpoint>" }
362 }
363 ]
364}
365```
366
367### `/issue`
368
369Describe 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.
370
371config.json
372
373```json
374{
375 "slashCommands": [
376 {
377 "name": "issue",
378 "description": "Generate a link to a drafted GitHub issue",
379 "params": { "repositoryUrl": "https://github.com/continuedev/continue" }
380 }
381 ]
382}
383```
384
385### `/onboard`
386
387The 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.
388
389config.json
390
391```json
392{
393 "slashCommands": [
394 {
395 "name": "onboard",
396 "description": "Familiarize yourself with the codebase"
397 }
398 ]
399}
400```
401
402Example:
403
404config.json
405
406```json
407{
408 "slashCommands": [
409 { "name": "commit", "description": "Generate a commit message" },
410 { "name": "share", "description": "Export this session as markdown" },
411 { "name": "cmd", "description": "Generate a shell command" }
412 ]
413}
414```
415
416### `customCommands`
417
418User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions.
419
420**Properties:**
421
422- `name`: The name of the custom command.
423- `prompt`: Text prompt for the command.
424- `description`: Brief description explaining the command's function.
425
426Example:
427
428config.json
429
430```json
431{
432 "customCommands": [
433 {
434 "name": "test",
435 "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.",
436 "description": "Write unit tests for highlighted code"
437 }
438 ]
439}
440```
441
442### `contextProviders`
443
444List of the pre-defined context providers that will show up as options while typing in the chat, and their customization with `params`.
445
446**Properties:**
447
448- `name`: Name of the context provider, e.g. `docs` or `web`
449- `params`: A context-provider-specific record of params to configure the context behavior
450
451Example
452
453config.json
454
455```json
456{
457 "contextProviders": [
458 { "name": "code", "params": {} },
459 { "name": "docs", "params": {} },
460 { "name": "diff", "params": {} },
461 { "name": "open", "params": {} }
462 ]
463}
464```
465
466## `userToken`
467
468An optional token that identifies the user, primarily for authenticated services.
469
470## `systemMessage`
471
472Defines a system message that appears before every response from the language model, providing guidance or context.
473
474## `experimental`
475
476Several experimental config parameters are available, as described below:
477
478`experimental`:
479
480- `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.=
481
482- `modelRoles`:
483
484 - `inlineEdit`: Model title for inline edits.
485 - `applyCodeBlock`: Model title for applying code blocks.
486 - `repoMapFileSelection`: Model title for repo map selections.
487
488- `modelContextProtocolServers`: See [Model Context Protocol](/customize/deep-dives/mcp)
489
490Example
491
492config.json
493
494```json
495{
496 "experimental": {
497 "modelRoles": { "inlineEdit": "Edit Model" },
498 "modelContextProtocolServers": [
499 {
500 "transport": {
501 "type": "stdio",
502 "command": "uvx",
503 "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
504 }
505 }
506 ]
507 }
508}
509```
510
511## Fully deprecated settings
512
513Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the user settings. If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`.
514
515- `allowAnonymousTelemetry`: This value will be migrated to the safest merged value (`false` if either are `false`).
516
517- `promptPath`: This value will override during migration.
518
519- `disableIndexing`: This value will be migrated to the safest merged value (`true` if either are `true`).
520
521- `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
522
523- `tabAutocompleteOptions`
524
525 - `useCache`: This value will override during migration.
526 - `disableInFiles`: This value will be migrated to the safest merged value (arrays of file matches merged/deduplicated)
527 - `multilineCompletions`: This value will override during migration.
528
529- `experimental`
530
531 - `useChromiumForDocsCrawling`: This value will override during migration.
532 - `readResponseTTS`: This value will override during migration.
533
534- `ui` - all will override during migration
535
536 - `codeBlockToolbarPosition`
537 - `fontSize`
538 - `codeWrap`
539 - `displayRawMarkdown`
540 - `showChatScrollbar`