Back to all posts
2026-08-19By Lynio Team

How to Connect VS Code to Lynio AI Gateway Using Continue.dev

Introduction

Modern development workflows increasingly depend on AI-assisted coding tools for code generation, inline autocompletion, debugging, and refactoring. However, sending proprietary source code and intellectual property to offshore hyperscalers presents significant compliance, privacy, and GDPR challenges for European organizations.

Lynio AI Gateway provides a high-performance, 100% sovereign OpenAI-compatible API hosted exclusively on European GPU infrastructure. By connecting the popular open-source Continue extension in Visual Studio Code to Lynio, you get the best of both worlds: an enterprise-grade AI pair programmer directly in your editor, with absolute data privacy and guaranteed European data residency.

In this tutorial, you will learn how to configure ~/.continue/config.json to connect VS Code to Lynio AI Gateway for both interactive coding chat and inline tab-autocomplete.


Prerequisites

Before starting, ensure you have:

  1. Visual Studio Code (or Cursor / VSCodium) installed.
  2. The Continue extension installed from the VS Code Marketplace (Search for Continue - Code AI by Continue).
  3. A valid Lynio API Key or JWT Bearer Token generated from the LYNIO Web Console.

Step 1: Locating Your Continue Configuration File

The Continue extension stores all model configurations, API keys, and context providers in a central JSON configuration file.

You can locate config.json depending on your operating system:

  • Linux & macOS: ~/.continue/config.json
  • Windows: %USERPROFILE%\.continue\config.json (e.g. C:\Users\<username>\.continue\config.json)

Quick Access from Inside VS Code

  1. Open Visual Studio Code.
  2. Click on the Continue icon in the sidebar (or press Cmd+L on macOS / Ctrl+L on Windows/Linux).
  3. Click the Gear icon (⚙️) in the bottom-right corner of the Continue sidebar.
  4. VS Code will automatically open your config.json file in the editor.

Step 2: Configuring Lynio AI Gateway in config.json

Option A: Continue YAML Configuration (~/.continue/config.yaml)

name: Main Config
version: 1.0.0
schema: v1

models:
  - name: Lynio - Qwen 3.5 2B
    provider: openai
    model: qwen3.5:2b
    apiBase: https://api.lynio.cloud/api/v1/ai/v1
    apiKey: <LYNIO_KEY_ID>:<LYNIO_KEY_SECRET>
    contextLength: 32768

  - name: Lynio - Gemma4 2B
    provider: openai
    model: gemma4:e2b
    apiBase: https://api.lynio.cloud/api/v1/ai/v1
    apiKey: <LYNIO_KEY_ID>:<LYNIO_KEY_SECRET>
    contextLength: 32768

tabAutocompleteModel:
  name: Lynio - Tab Autocomplete (Qwen 2B)
  provider: openai
  model: qwen3.5:2b
  apiBase: https://api.lynio.cloud/api/v1/ai/v1
  apiKey: <LYNIO_KEY_ID>:<LYNIO_KEY_SECRET>

Option B: Continue JSON Configuration (~/.continue/config.json)

{
  "models": [
    {
      "title": "Lynio - Qwen 3.5 2B",
      "provider": "openai",
      "model": "qwen3.5:2b",
      "apiBase": "https://api.lynio.cloud/api/v1/ai/v1",
      "apiKey": "<LYNIO_KEY_ID>:<LYNIO_KEY_SECRET>",
      "contextLength": 32768,
      "roles": ["chat", "edit"]
    },
    {
      "title": "Lynio - Gemma4 2B",
      "provider": "openai",
      "model": "gemma4:e2b",
      "apiBase": "https://api.lynio.cloud/api/v1/ai/v1",
      "apiKey": "<LYNIO_KEY_ID>:<LYNIO_KEY_SECRET>",
      "contextLength": 32768,
      "roles": ["chat", "edit"]
    }
  ],
  "tabAutocompleteModel": {
    "title": "Lynio - Tab Autocomplete (Qwen 2B)",
    "provider": "openai",
    "model": "qwen3.5:2b",
    "apiBase": "https://api.lynio.cloud/api/v1/ai/v1",
    "apiKey": "<LYNIO_KEY_ID>:<LYNIO_KEY_SECRET>"
  }
}

IMPORTANT

API Key Format: In apiKey, provide your Key-ID and Key-Secret separated by a colon (<KEY_ID>:<KEY_SECRET>, e.g. lk_...:lks_...), or a valid Bearer JWT token. Lynio AI Gateway automatically validates and caches the credential securely.


Step 3: Understanding the Configuration Options

Let's break down the key settings:

  1. apiBase: Points to https://api.lynio.cloud/api/v1/ai/v1. This standard OpenAI prefix allows Continue to issue standard /chat/completions and /models requests directly to Lynio's GPU load balancer.
  2. provider: "openai": Instructs Continue to format all payloads according to OpenAI streaming specifications (SSE with delta chunks).
  3. model: The exact model tag hosted in your Lynio region (e.g. qwen3.5:2b, gemma4:e2b).
  4. tabAutocompleteModel: Dedicated low-latency model used for real-time Fill-in-the-Middle (FIM) inline code ghost text as you type.
  5. apiKey: Your Lynio Key-ID and Secret pair (lk_...:lks_...).

Step 4: Using Lynio AI in Visual Studio Code

Once saved, Continue automatically reloads the new configuration. You can immediately start using your sovereign AI assistant:

1. Interactive Chat & Codebase Explanation (Ctrl+L / Cmd+L)

  • Highlight any function or block of code.
  • Press Ctrl+L (or Cmd+L on macOS) to open the chat sidebar.
  • Type @codebase How does our authentication middleware handle JWT expiration? or ask for architecture advice.
  • Switch seamlessly between Lynio - Qwen 3.5 2B and Lynio - Gemma4 2B in the model selector.

2. Inline Code Edits & Refactoring (Ctrl+I / Cmd+I)

  • Highlight a function or class you want to modify.
  • Press Ctrl+I (or Cmd+I on macOS).
  • Enter an instruction, such as: Convert this function to async/await with structured error handling.
  • Continue streams the inline diff directly into your editor. Press Accept (Cmd+Shift+Enter) or Reject.

3. Real-time Tab Autocompletion

  • As you write code, Lynio AI Gateway predicts subsequent lines and suggests ghost text in light grey.
  • Press Tab to accept suggestions, or continue typing to ignore.

Step 5: Monitoring Credit Usage

All requests executed via VS Code are metered through your tenant's monthly AI token allowance.

  • Check Real-time Usage: Open the LYNIO Web Console to inspect your real-time token consumption, pacing limits, and active GPU nodes.
  • Credit Multiplier: Fast models like qwen3.5:2b and gemma4:e2b maximize token throughput and credit efficiency for everyday development and inline autocomplete.

Conclusion

By pairing Visual Studio Code with Lynio AI Gateway and Continue.dev, development teams gain a state-of-the-art AI assistant without compromising on compliance, data sovereignty, or privacy. Your code never leaves verified European borders, and your developers benefit from ultra-low latency GPU acceleration.

Happy coding!