Cline is a coding agent that runs inside VS Code and other editors. Its OpenAI Compatible provider works with Yunshu Router, so Cline can plan, edit and run commands on the model you choose, billed per token to your prepaid balance.
What you need
- The Cline extension installed.
- A Yunshu Router account with credit on the balance.
- An API key from the console. Use a separate key for Cline.
Set it up
-
Create a key in the console (API keys → Create key) and copy it.
-
In VS Code, open the Cline panel and click the settings (gear) icon.
-
Set API Provider to OpenAI Compatible.
-
Fill in the fields:
Base URL: https://api.yunshurouter.com/v1 API Key: YOUR_YUNSHU_KEY Model: deepseek-v4-proKeep the
/v1in the base URL. -
Open Model Configuration and set:
- Image Support: on only if the model page lists image input.
-
Click Done (or close settings). Cline saves the provider.
Check it works
- Start a new task: “List the files in this folder and say what the project does.”
- Approve the file read. A sensible answer means requests and tool calls work.
- In the console, open Usage: the requests show under the Cline key with model and cost. Cline’s own cost estimate is only as good as the prices you entered in step 5.
Recommended models
| Model ID | Use it for |
|---|---|
deepseek-v4-pro |
Act mode, everyday work at a low price |
kimi-k3 |
Plan mode and long multi-step tasks |
glm-5.3 |
Small edits and quick fixes |
Cline can use a different model for Plan and Act modes.
Set a budget on the key
Cline can run long tasks with auto-approve on. In the console, open API keys, pick the Cline
key and set a monthly budget, a model allow-list, and a budget alert. A request that
would pass the budget is refused with 402 budget_exceeded and Cline shows the error.
Known limitations
- Cline needs the model to support tool calls. All models we suggest do; check a model’s page before using another.
- Cline’s cost display uses the prices you type in. Our console shows what you were charged.
- Exact repeats are answered from cache and not charged; agent tasks rarely repeat exactly.
Troubleshooting
| What you see | Likely cause | Fix |
|---|---|---|
“Invalid API Key” / 401 |
Key mistyped or revoked | Paste the key again. |
“Model Not Found” / 404 naming the model |
Typo in the Model ID | Copy the ID from the models page. |
404 on every request |
Base URL without / |
Use https:/. |
403 naming the model |
Not on the key’s allow-list | Add the model to the key. |
402 |
Budget or balance used up | Raise the budget or top up. |
| Context errors on long tasks | Context Window set higher than the model’s | Set it to the value on the model page. |
| Tool calls show as plain text | The model doesn’t handle tool calls well | Switch to a suggested model. |