integrations
Cline
Configure Cline VS Code extension to use LW AI API for autonomous coding.
Cline is an autonomous AI coding agent that runs in VS Code. It can use LW AI's OpenAI-compatible API as its backend.
Installation
- Open VS Code Extensions (
Cmd+Shift+X) - Search for "Cline" and install it
Configuration
- Open the Cline sidebar in VS Code
- Click the settings icon (gear)
- Set API Provider to "OpenAI Compatible"
- Configure:
| Setting | Value |
|---|---|
| Base URL | https://api.atrouter.cn/v1 |
| API Key | Your LW AI API key |
| Model ID | deepseek/deepseek-v4-pro |
Recommended Models
| Task | Model |
|---|---|
| Complex coding & reasoning | deepseek/deepseek-v4-pro |
| Fast iterations | deepseek/deepseek-v4-flash |
| Chinese-language tasks | z-ai/glm-5.1 |
Environment Variable (Alternative)
export OPENAI_API_KEY="YOUR_API_KEY"
export OPENAI_BASE_URL="https://api.atrouter.cn/v1"Cline will automatically detect these environment variables.
Tips
- Use
deepseek/deepseek-v4-profor best coding results with Cline's autonomous mode - Set temperature to 0 for deterministic code generation
- Use
deepseek/deepseek-v4-flashfor quick tasks to save costs