Your privacy choices

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

VS Code Setup Guide

Connect VS Code + Cline to the LLM API Gateway with OpenAI Compatible settings.

Goal: Install Cline in VS Code and connect it to the LLM API Gateway using OpenAI Compatible settings. After setup, AI can read and edit code, write commands, and explain errors directly in VS Code.

SettingValueNotes
API ProviderOpenAI CompatibleCline officially supports OpenAI-compatible providers.
Base URLhttps://api.llm-token.cn/v1Do not enter the full /chat/completions path.
API Keysk-xxxxxxxxPaste your complete Key.
Model IDCopy the complete model name from the model listAn incorrect value here causes most Model Not Found errors.

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 select 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.

VS Code Extensions view with cline in the search box, highlighting the Extensions icon and the Cline coding assistant result with its Install button.VS Code Extensions view with cline in the search box, highlighting the E…

3. Open Cline Settings

Select the Cline icon in the left sidebar, then open Settings in the Cline panel.

Cline onboarding screen in VS Code asking how the user will use Cline, with Bring my own API key selected from three options.Cline onboarding screen in VS Code asking how the user will use Cline, w…

Cline API Configuration in VS Code showing Plan Mode and Act Mode, with Act Mode selected and fields for an OpenAI Compatible provider, the displayed Base URL http://api.vectorengine.a, API Key, Model ID, and custom headers.Cline API Configuration in VS Code showing Plan Mode and Act Mode, with…

4. Enter the LLM API Gateway Details

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

If saving reports an error: Confirm that the Base URL is not https://api.llm-token.cn/v1/chat/completions. Cline expects the API root path, which is /v1.

5. Testing and Troubleshooting

SymptomResolution
Cannot enter a URLConfirm that OpenAI Compatible is selected instead of the standard official OpenAI provider.
Model Not FoundThe model ID must exactly match the model list.
Connection failedCheck the Key, Base URL, and network proxy. On a corporate or campus network, test with a phone hotspot.
Cline icon is missingRestart VS Code. If it is still missing, reinstall the extension.