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

  1. Open VS Code Extensions (Cmd+Shift+X)
  2. Search for "Cline" and install it

Configuration

  1. Open the Cline sidebar in VS Code
  2. Click the settings icon (gear)
  3. Set API Provider to "OpenAI Compatible"
  4. Configure:
SettingValue
Base URLhttps://api.atrouter.cn/v1
API KeyYour LW AI API key
Model IDdeepseek/deepseek-v4-pro
TaskModel
Complex coding & reasoningdeepseek/deepseek-v4-pro
Fast iterationsdeepseek/deepseek-v4-flash
Chinese-language tasksz-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-pro for best coding results with Cline's autonomous mode
  • Set temperature to 0 for deterministic code generation
  • Use deepseek/deepseek-v4-flash for quick tasks to save costs