Cline + NezhaGate: Code with DeepSeek, Kimi, GLM, Qwen
Set up Cline in VS Code with NezhaGate as an OpenAI-compatible provider and code with DeepSeek, Kimi, GLM, Qwen or Claude on one key. Cost tips included.
약 10분 · 기준 버전: Cline 4.1
이 가이드는 아직 한국어로 제공되지 않아 영어판을 보여 드립니다.
What you need
- VS Code installed (Windows, macOS or Linux).
- A NezhaGate account and API key (step 1 shows you how).
- About 10 minutes.
Step 1: Sign up for NezhaGate and create an API key
- Open nezhagate.com and click Sign up free in the top-right corner. Email works, and so does one-click sign-in with Google or GitHub.
- Go to Console → API Keys. Under Create API Key, name the key (for example
cline). Cline calls the model many times in a row, so set a Per-Key Limit (say 5) to keep a runaway task from overspending. Then click Create Key. - A key starting with
sk-appears. Copy it right away: it is shown only once.
[Screenshot: Console → API Keys, highlighting the Per-Key Limit field and the Create Key button]
Check and top up your balance on the Billing page. You pay only for what you use, and failed requests are never billed. Per-model rates are on the pricing page.
Step 2: Install Cline in VS Code
- Open VS Code and press
Ctrl+Shift+X(Cmd+Shift+Xon macOS) to open Extensions. - Search for Cline, make sure the publisher is saoudrizwan, and click Install.
- When it finishes, click the new Cline icon in the left activity bar to open the Cline panel.
Prefer the command line? This does the same:
code --install-extension saoudrizwan.claude-dev
[Screenshot: the VS Code Extensions view with Cline in the results and the Install button marked]
Step 3: Point Cline at NezhaGate
- On first launch Cline asks How will you use Cline?. Choose Bring my own API key and click Continue to reach the provider setup. (To change it later: the gear at the top right of the Cline panel → API Configuration.)
- API Provider: search for and select OpenAI Compatible.
- Base URL: enter the address below.
https://nezhagate.com/v1
- OpenAI Compatible API Key: paste the key from step 1.
- Model ID: the list loads by itself; pick
deepseek-v4.1-flash. If the model you want is not listed, choose Use custom model ID… and type its ID. - Expand MODEL CONFIGURATION:
- Supports Images: untick it for DeepSeek, GLM, Kimi and Qwen (they do not read images); keep it ticked for Claude.
- Context Window Size: keep the default 128000.
- Input Price / 1M tokens and Output Price / 1M tokens: optionally copy them from the pricing page (US dollars per million tokens). They only drive the cost Cline displays, not what you are billed; left empty, Cline shows $0.
- Click Continue (or close the settings) to save.
[Screenshot: the OpenAI Compatible settings with API Provider, Base URL, API key, Model ID and MODEL CONFIGURATION marked in order]
Stop the address at
/v1; do not add /chat/completions.Step 4: Run your first task
- Open a folder in VS Code (an empty one is fine).
- Next to Cline's task box (Type your task here...), pick a mode: Plan works out an approach with you first; Act gets straight to changing code. Use Act for this first run.
- Type
Create hello.py that prints Hello, NezhaGateand press Enter. - Before Cline writes a file or runs a command it asks for your approval. Look over what it proposes and approve it. When it is done,
hello.pyis in your folder.
[Screenshot: Cline running the first task, with the Plan / Act switch and the approval button marked]
Recommended models
Cline relies on tool calling (function calling) to read and write files and run commands. All of these support it:
| Model ID | Best for | Notes |
|---|---|---|
deepseek-v4.1-flash | Everyday coding at the lowest cost | Thinks before acting by default; cheap enough for most tasks. |
glm-5.3 | Coding and agent tasks | The GLM-5 flagship, built for coding and agent workflows; always thinks first. |
kimi-k3 | Big projects, long context | Strong long-context understanding and tool use; supports prompt caching. |
qwen3.7-max | Hard reasoning and coding | Dependable in English and Chinese; supports prompt caching. |
claude-opus-5 | The hardest engineering work | The steadiest on complex engineering and agents; priced higher. |
A thrifty setup: tick Use different models for Plan and Act modes, plan with
kimi-k3 or glm-5.3, and let deepseek-v4.1-flash do the work in Act mode.About cost
- At every step Cline sends the task's context to the model again, so token use grows quickly on long tasks. Start a new task when one is finished instead of continuing in the same one.
- Kimi K3, Qwen3.7 Max and GLM-5.3 support prompt caching: a repeated long prefix is billed at the cache rate, far below the normal input rate.
- The per-key limit from step 1 is the simplest safety net: once it is reached, requests return 402 and nothing more is charged.
Common problems and errors
| What you see | What to do |
|---|---|
| The Model ID list fails to load, and an Enter Model ID... box appears with an error | Check the Base URL and key. You can also type the model ID straight into the box, for example deepseek-v4.1-flash. |
| 401 | The key is wrong or was deleted. Create a new one in the console and copy it. |
| 402 | Your balance ran out, or the key hit the limit you set. Top up on the Billing page or raise the key's limit. |
| 404 | The Base URL ends in /chat/completions. Change it to https://nezhagate.com/v1. |
| 400 mentioning an image | The model cannot read images: untick Supports Images under MODEL CONFIGURATION. |
| Cline keeps failing or tool calls break | Switch to one of the models above. Image and video models do not work in Cline. |
| Cost always shows $0 | Expected when no prices are filled in; your real spend is in the NezhaGate console. |
다른 가이드: SillyTavern · Cherry Studio