Model Recommendations for Autocomplete
Model role | Best open models | Best closed models | Notes |
---|---|---|---|
Autocomplete | Closed models are slightly better than open models |
How to Set Up Autocomplete in Continue with Codestral (Recommended)
If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the Mistral API. To do this, obtain an API key and add it to your config:Codestral API Key: The API keys for Codestral and the general Mistral APIs
are different. If you are using Codestral, you probably want a Codestral API
key, but if you are sharing the key as a team or otherwise want to use
api.mistral.ai
, then make sure to set "apiBase": "https://api.mistral.ai/v1"
in your tabAutocompleteModel
.How to Set Up Autocomplete in Continue with Ollama (Local Model)
If you’d like to run your autocomplete model locally, we recommend using Ollama. To do this, first download the latest version of Ollama from here. Then, run the following command to download our recommended model:Typically, thinking-type models are not recommended as they generate more
slowly and are not suitable for scenarios that require speed.
config.yaml
Autocomplete Configuration Options in Continue
Autocomplete Models Available on the Continue Hub
Explore autocomplete model configurations on the hubCustomize Autocomplete User Settings in the Continue Extension
The following settings can be configured for autocompletion in the IDE extension User Settings Page:Multiline Autocompletions
: Controls multiline completions for autocomplete. Can be set toalways
,never
, orauto
. Defaults toauto
Disable autocomplete in files
: List of comma-separated glob pattern to disable autocomplete in matching files. E.g., ”_/.md, */.txt”
How to Configure Autocomplete with config.json
(Deprecated Format)
YAML Configuration
Theconfig.yaml
format offers model-level configuration using the autocompleteOptions
field. See the YAML Reference for more details.
JSON Configuration (Deprecated)
Theconfig.json
configuration format offers configuration options through tabAutocompleteOptions
. See the JSON Reference for more details.
Autocomplete FAQs and Troubleshooting in Continue
I want better completions, should I use GPT-4?
Perhaps surprisingly, the answer is no. The models that we suggest for autocomplete are trained with a highly specific prompt format, which allows them to respond to requests for completing code (see examples of these prompts here). Some of the best commercial models like GPT-4 or Claude are not trained with this prompt format, which means that they won’t generate useful completions. Luckily, a huge model is not required for great autocomplete. Most of the state-of-the-art autocomplete models are no more than 10b parameters, and increasing beyond this does not significantly improve performance.Autocomplete Not Working – How to Fix It
Follow these steps to ensure that everything is set up correctly:- Make sure you have the “Enable Tab Autocomplete” setting checked (in VS Code, you can toggle by clicking the “Continue” button in the status bar, and in JetBrains by going to Settings -> Tools -> Continue).
- Make sure you have downloaded Ollama.
- Run
ollama run qwen2.5-coder:1.5b
to verify that the model is downloaded. - Make sure that any other completion providers are disabled (e.g. Copilot), as they may interfere.
- Check the output of the logs to find any potential errors: cmd/ctrl + shift + P -> “Toggle Developer Tools” -> “Console” tab in VS Code, ~/.continue/logs/core.log in JetBrains.
- Check VS Code settings to make sure that
"editor.inlineSuggest.enabled"
is set totrue
(use cmd/ctrl + , then search for this and check the box) - If you are still having issues, please let us know in our Discord and we’ll help as soon as possible.
Why Are My Completions Only Single-Line?
To ensure that you receive multi-line completions, you can set"multilineCompletions": "always"
in tabAutocompleteOptions
. By default, it is "auto"
. If you still find that you are only seeing single-line completions, this may be because some models tend to produce shorter completions when starting in the middle of a file. You can try temporarily moving text below your cursor out of your active file, or switching to a larger model.
How to Set a Trigger Key for Autocomplete Suggestions
In VS Code, if you don’t want to be shown suggestions automatically you can:- Set
"editor.inlineSuggest.enabled": false
in VS Code settings to disable automatic suggestions - Open “Keyboard Shortcuts” (cmd/ctrl+k, cmd/ctrl+s) and search for
editor.action.inlineSuggest.trigger
- Click the ”+” icon to add a new keybinding
- Press the key combination you want to use to trigger suggestions (e.g. cmd/ctrl + space)
- Now whenever you want to see a suggestion, you can press your key binding (e.g. cmd/ctrl + space) to trigger suggestions manually
Shortcut for Accepting One Line at a Time in Autocomplete
This is a built-in feature of VS Code, but it’s just a bit hidden. Follow these settings to reassign the keyboard shortcuts in VS Code:- Press Ctrl+Shift+P, type the command:
Preferences: Open Keyboard Shortcuts
, and enter the keyboard shortcuts settings page. - Search for
editor.action.inlineSuggest.acceptNextLine
. - Set the key binding to Tab.
- Set the trigger condition (when) to
inlineSuggestionVisible && !editorReadonly
. This will make multi-line completion (including continue and from VS Code built-in or other plugin snippets) still work, and you will see multi-line completion. However, Tab will only fill in one line at a time. Any unnecessary code can be canceled with Esc. If you need to apply all the code, just press Tab multiple times.