Elffuss BraidHub

kikocis/continue public

66e4dd9ea0d7 · 18.0 KiBSourceRawPermalink

title: config.json Reference description: Reference for the Continue config.json configuration file keywords: [config, config_schema.json, json]

:::info We recently introduced a new configuration format, config.yaml, to replace config.json. See the config.yaml reference and migration guide here. :::

Below are details for each property that can be set in config.json. The config schema code is found in extensions/vscode/config_schema.json.

All properties at all levels are optional unless explicitly marked required

models

Your chat models are defined here, which are used for Chat, Edit and VS Code actions.

Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json.

Properties:

(AWS Only)

Example:

{
  "models": [
    {
      "title": "Ollama",
      "provider": "ollama",
      "model": "AUTODETECT"
    },
    {
      "model": "gpt-4o",
      "contextLength": 128000,
      "title": "GPT-4o",
      "provider": "openai",
      "apiKey": "YOUR_API_KEY"
    }
  ]
}

tabAutocompleteModel

Specifies 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.

Example

{
  "tabAutocompleteModel": {
    "title": "My Starcoder",
    "provider": "ollama",
    "model": "starcoder2:3b"
  }
}

tabAutocompleteOptions

Specifies options for tab autocompletion behavior.

Properties:

Example

{
  "tabAutocompleteOptions": {
    "debounceDelay": 500,
    "maxPromptTokens": 1500,
    "disableInFiles": ["*.md"]
  }
}

embeddingsProvider

Embeddings model settings - the model used for @Codebase and @docs.

Properties:

(AWS ONLY)

Example:

{
  "embeddingsProvider": {
    "provider": "openai",
    "model": "text-embedding-ada-002",
    "apiKey": "<API_KEY>",
    "maxEmbeddingChunkSize": 256,
    "maxEmbeddingBatchSize": 5
  }
}

completionOptions

Parameters that control the behavior of text generation and completion settings. Top-level completionOptions apply to all models, unless overridden at the model level.

Properties:

Example

{
  "completionOptions": {
    "stream": false,
    "temperature": 0.5
  }
}

requestOptions

Default HTTP request options that apply to all models and context providers, unless overridden at the model level.

Properties:

Example

{
  "requestOptions": {
    "headers": {
      "X-Auth-Token": "xxx"
    }
  }
}

reranker

Configuration for the reranker model used in response ranking.

Properties:

Example

{
  "reranker": {
    "name": "voyage",
    "params": {
      "model": "rerank-2",
      "apiKey": "<VOYAGE_API_KEY>"
    }
  }
}

docs

List of documentation sites to index.

Properties:

Example

"docs": [
    {
    "title": "Continue",
    "startUrl": "https://docs.continue.dev/intro",
    "faviconUrl": "https://docs.continue.dev/favicon.ico",
  }
]

slashCommands

Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined.

Properties:

The following commands are built-in and can be added to config.json to make them visible:

/share

Generate a shareable markdown transcript of your current chat history.

{
  "slashCommands": [
    {
      "name": "share",
      "description": "Export the current chat session to markdown",
      "params": { "outputDir": "~/.continue/session-transcripts" }
    }
  ]
}

Use the outputDir parameter to specify where you want to the markdown file to be saved.

/cmd

Generate a shell command from natural language and (only in VS Code) automatically paste it into the terminal.

{
  "slashCommands": [
    {
      "name": "cmd",
      "description": "Generate a shell command"
    }
  ]
}

/commit

Shows the LLM your current git diff and asks it to generate a commit message.

{
  "slashCommands": [
    {
      "name": "commit",
      "description": "Generate a commit message for the current changes"
    }
  ]
}

/http

Write 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 for reference.

{
  "slashCommands": [
    {
      "name": "http",
      "description": "Does something custom",
      "params": { "url": "<my server endpoint>" }
    }
  ]
}

/issue

Describe 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.

{
  "slashCommands": [
    {
      "name": "issue",
      "description": "Generate a link to a drafted GitHub issue",
      "params": { "repositoryUrl": "https://github.com/continuedev/continue" }
    }
  ]
}

/onboard

The 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.

{
  "slashCommands": [
    {
      "name": "onboard",
      "description": "Familiarize yourself with the codebase"
    }
  ]
}

Example:

{
  "slashCommands": [
    {
      "name": "commit",
      "description": "Generate a commit message"
    },
    {
      "name": "share",
      "description": "Export this session as markdown"
    },
    {
      "name": "cmd",
      "description": "Generate a shell command"
    }
  ]
}

customCommands

User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions.

Properties:

Example:

{
  "customCommands": [
    {
      "name": "test",
      "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.",
      "description": "Write unit tests for highlighted code"
    }
  ]
}

contextProviders

List of the pre-defined context providers that will show up as options while typing in the chat, and their customization with params.

Properties:

Example

{
  "contextProviders": [
    {
      "name": "code",
      "params": {}
    },
    {
      "name": "docs",
      "params": {}
    },
    {
      "name": "diff",
      "params": {}
    },
    {
      "name": "open",
      "params": {}
    }
  ]
}

userToken

An optional token that identifies the user, primarily for authenticated services.

systemMessage

Defines a system message that appears before every response from the language model, providing guidance or context.

experimental

Several experimental config parameters are available, as described below:

experimental:

Example

{
  "experimental": {
    "modelRoles": {
      "inlineEdit": "Edit Model"
    },
    "quickActions": [
      {
        "title": "Tags",
        "prompt": "Return a list of any function and class names from the included code block",
        "sendToChat": true
      }
    ],
    "contextMenuPrompts": {
      "fixGrammar": "Fix grammar in the above but allow for typos."
    },
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "uvx",
          "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
        }
      }
    ]
  }
}

Fully deprecated settings

Some deprecated config.json settings are no longer stored in config and have been moved to be editable through the User Settings Page. If found in config.json, they will be auto-migrated to User Settings and removed from config.json.