Continue

Continue is a development tool (VS Code extension and CLI) that uses AI models to assist with coding tasks such as autocompletion, explanation, refactoring, and more. To make AI requests, Continue needs a model provider, which can be configured to use your AI Gateway.

You can view Help Guidearrow-up-right for more details.

API Endpoint Management

  1. In VS Code, install the Continue extension if not already installed.

  2. Open the Continue settings:

    • Press Ctrl/Cmd + P to open the command palette.

    • Type: Continue: Open Settings.

    • Or open the extension sidebar and click the gear / settings icon for Continue.

  3. Open (or create) the Continue configuration file:

    vim ~/.continue/config.json

    If the file does not exist, create it manually.

  4. Paste the following example configuration and replace the apiKey with your own values:

    {
      "models": [
        {
          "title": "AI Gateway Chat Model",
          "provider": "openai",
          "model": "gpt-4o",
          "apiKey": "sk-xxxxxxxxxxxxxx",
          "apiBase": "https://gateway.theturbo.ai"
        }
      ],
      "tabAutocompleteModel": {
        "title": "AI Gateway Autocomplete",
        "provider": "openai",
        "model": "gpt-4o-mini",
        "apiKey": "sk-xxxxxxxxxxxxxx",
        "apiBase": "https://gateway.theturbo.ai"
      }
    }

Continue uses different models for different purposes:

  • models Used for chat and general AI interactions, such as:

    • Asking questions

    • Explaining code

    • Refactoring

    • Generating code snippets

  • tabAutocompleteModel Used specifically for code auto-completion, for example:

    • Suggestions that appear while typing

    • Pressing Tab to complete code

You can use the same model for both, or different models depending on your needs.

Last updated