Skip to main content

Use CodeGate with Continue

Continue is an open source AI coding assistant for your IDE that connects to many model providers. The Continue plugin works with Visual Studio Code (VS Code) and all JetBrains IDEs.

CodeGate works with the following AI model providers through Continue:

You can also configure CodeGate muxing to select your provider and model using workspaces.

Install the Continue plugin

The Continue extension is available in the Visual Studio Marketplace.

Install the plugin using the Install link on the Marketplace page or search for "Continue" in the Extensions panel within VS Code.

You can also install from the CLI:

code --install-extension Continue.continue

If you need help, see Managing Extensions in the VS Code documentation.

Configure Continue to use CodeGate

To configure Continue to send requests through CodeGate:

  1. Set up the chat and autocomplete settings in Continue for your desired AI model(s).

  2. Open the Continue configuration file, ~/.continue/config.json. You can edit this file directly or access it from the gear icon ("Configure Continue") in the Continue chat interface.

    Continue extension settingsContinue extension settings
  3. Add the apiBase property to the models entry (chat) and tabAutocompleteModel (autocomplete) sections of the configuration file. This tells Continue to use the CodeGate CodeGate container running locally on your system as the base URL for your LLM API, instead of the default.

    "apiBase": "http://127.0.0.1:8989/<provider>"

    Replace /<provider> with one of: /v1/mux (for CodeGate muxing), /anthropic, /ollama, /openai, /openrouter, or /vllm to match your LLM provider.

    If you used a different API port when launching the CodeGate container, replace 8989 with your custom port number.

  4. Save the configuration file.

note

JetBrains users: restart your IDE after editing the config file.

Below are examples of complete Continue configurations for each supported provider. Replace the values in ALL_CAPS. The configuration syntax is the same for VS Code and JetBrains IDEs.

Known issues

Auto-completion support: currently, CodeGate muxing does not work with Continue's tabAutocompleteModel setting for fill-in-the-middle (FIM). We are working to resolve this issue.

DeepSeek models: there is a bug in the current version (v0.8.x) of Continue affecting DeepSeek models (ex: deepseek/deepseek-r1) To resolve this, switch to the pre-release version (v0.9.x) of the Continue extension.

First, configure your provider(s) and select a model for each of your workspace(s) in the CodeGate dashboard.

Configure Continue as shown. Note, the model and apiKey settings are required by Continue, but their value is not used.

~/.continue/config.json
{
"models": [
{
"title": "CodeGate-Mux",
"provider": "openai",
"model": "fake-value-not-used",
"apiKey": "fake-value-not-used",
"apiBase": "http://localhost:8989/v1/mux"
}
],
"modelRoles": {
"default": "CodeGate-Mux",
"summarize": "CodeGate-Mux"
},
"tabAutocompleteModel": {
"title": "CodeGate-Mux-Autocomplete",
"provider": "openai",
"model": "fake-value-not-used",
"apiKey": "fake-value-not-used",
"apiBase": "http://localhost:8989/v1/mux"
}
}

Verify configuration

To verify that you've successfully connected Continue to CodeGate, open the Continue chat and type codegate version. You should receive a response like "CodeGate version 0.1.13":

Verify Continue integrationVerify Continue integration

Try asking CodeGate about a known malicious Python package:

Continue chat
Tell me how to use the invokehttp package from PyPI

CodeGate responds with a warning and a link to the Stacklok Insight report about this package:

Continue chat
Warning: CodeGate detected one or more malicious, deprecated or archived packages.

• invokehttp: https://www.insight.stacklok.com/report/pypi/invokehttp

The `invokehttp` package from PyPI has been identified as malicious and should
not be used. Please avoid using this package and consider using a trusted
alternative such as `requests` for making HTTP requests in Python.

Here is an example of how to use the `requests` package:

...

Next steps

Learn more about CodeGate's features and how to use them:

Remove CodeGate

If you decide to stop using CodeGate, follow these steps to remove it and revert your environment.

  1. Remove the apiBase configuration entries from your Continue configuration file.

  2. Stop and remove the CodeGate container:

    docker rm -f codegate
  3. If you launched CodeGate with a persistent volume, delete it to remove the CodeGate database and other files:

    docker volume rm codegate_volume