Your privacy choices

Allow optional cookies for referral attribution, visit analytics, and Google Ads purchase measurement.

VS Code Configuration Guide

Use OpenAI Compatible mode in VS Code + Cline to connect your LLM API Gateway Token.

**Goal: **Install Cline in VS Code and connect your LLM API Gateway Token via OpenAI Compatible mode. Once configured, you can use VS Code to let the AI read code, edit code, run commands, and explain errors.

OptionValueNotes
API ProviderOpenAI CompatibleCline natively supports OpenAI-compatible providers.
Base URLhttps://api.llm-token.cn/v1Do not enter the full /chat/completions path.
API Keysk-xxxxxxxxPaste your full key.
Model IDCopy the full model name from the model listIf the model does not exist, it is almost always entered incorrectly here.

1. Prerequisites

  1. Install VS Code: https://code.visualstudio.com/
  2. Install Git: https://git-scm.com/downloads
  3. Windows users should restart the computer after installing Git so the environment variables take effect.

2. Install the Cline extension

  1. Open VS Code and click Extensions in the left sidebar.
  2. Search for Cline and click Install.
  3. After installation, the Cline icon appears in the left sidebar.
  4. If the icon does not appear, restart VS Code.

Interface for searching the Cline plugin in VS Code. The icons on the left include an Extensions icon highlighted with a red border. The search box shows "cline", and in the results below the Cline plugin is highlighted with a red border; its description reads "A self-driving coding assistant that can create/edit files, run commands, and use the browser", with an Install button on the right. This image relates to the "open Cline settings" step and shows the interface for searching the Cline plugin in VS Code.Interface for searching the Cline plugin in VS Code. The icons on the le…

3. Open the Cline settings

Click the Cline icon in the left sidebar and open the settings from the Cline panel.

Screenshot of the Cline settings screen in VS Code, corresponding to the step for opening Cline settings in the configuration guide. The top of the screen asks "How will you use Cline?", followed by three options from top to bottom: "Absolutely Free", "Frontier Model", and "Bring my own API key", of which "Bring my own API key" is selected. Below it the description reads "Use Cline with your provider of choice". This step selects how the API key is used and is the prerequisite for the later step of entering the LLM API Gateway Token interface.Screenshot of the Cline settings screen in VS Code, corresponding to the…

Settings screen for the Cline plugin in VS Code. The left side lists options such as "API Configuration", "Plan Mode", and "Act Mode", of which "Act Mode" is highlighted with a red border. On the right, API Provider is "OpenAI Compatible", Base URL is "http://api.vectorengine.a...", the OpenAI Compatible API Key area is hidden, Model ID is "claude - opus - 4 - 6", and there are settings such as Custom Headers. This image corresponds to section 4, "Enter the LLM API Gateway Token interface", and shows the settings under API Configuration.Settings screen for the Cline plugin in VS Code. The left side lists opt…

The image above is only for locating the fields in Cline. The third-party http://... address and model name in the image are not LLM API Gateway settings; do not copy them. Use the HTTPS Base URL from the table in this article and the model list on this site.

4. Enter the LLM API Gateway Token interface

  1. **API Provider: **Select OpenAI Compatible.
  2. **Base URL: **Enter https://api.llm-token.cn/v1.
  3. **API Key: **Paste your key that starts with sk-.
  4. **Model ID: **Enter the full model ID, for example claude-sonnet-4-6.
  5. Save the configuration and create a new task to test.

If saving fails: First check that the Base URL is not set to https://api.llm-token.cn/v1/chat/completions. Cline should be the API root path, i.e. /v1.

5. Testing and troubleshooting

SymptomFix
Cannot enter URLMake sure you selected OpenAI Compatible, not the regular OpenAI official provider.
Model Not FoundThe model ID must match the model list exactly.
Connection failedCheck the key, Base URL, and network proxy; on a company or campus network, try a phone hotspot.
No Cline iconRestart VS Code; if it still does not appear, reinstall the extension.