Skip to main content
Clients & tools

Cline

VSCode AI coding assistant

Cline is an AI-powered VSCode extension that helps you write, debug, and refactor code. Connect it to Qwen Cloud's pay-as-you-go API for powerful coding assistance through the OpenAI-compatible endpoint.

Quick start

Get running in a few minutes:
# 1. Install
Open VSCode Extensions, search "Cline", click Install

# 2. Configure (click Cline icon in sidebar → Bring my own API key)
API Provider: OpenAI Compatible
Base URL: https://dashscope-intl.aliyuncs.com/compatible-mode/v1
API Key: sk-xxx
Model ID: qwen3.5-plus

# 3. Test (type in Cline chat)
Ask: "Write a Python function to validate email addresses"
You should see: Cline generates the email validation code

Configuration

Basic setup

Configure Cline to use Qwen Cloud:
  • API endpoint: https://dashscope-intl.aliyuncs.com/compatible-mode/v1
  • Authentication: API key required
  • Model selection: Enter any Qwen model ID directly
Free quota and billing:
  • First-time users get a free quota (valid for 90 days)
  • Enable Free quota only to prevent unexpected charges
For Coding Plan users: Use your exclusive base URL and API key instead. See Coding Plan for Cline.
  • Alibaba Qwen

Model recommendations

TaskModelWhy
General codingqwen3.5-plusBalanced performance
Complex algorithmsqwen3-coder-plusSpecialized for code
Fast iterationsqwen3-coder-nextQuick responses

Limitations

  • High token usage: Cline scans project files and makes multiple API calls
  • Qwen3 (thinking mode) and QwQ models: Require "R1 messages format" enabled

Examples

Plan vs Act modes

Cline operates in two modes:
  • Plan mode: Analyzes and designs solutions without modifying files
  • Act mode: Creates and modifies files directly

Basic usage

Plan mode (information only):
"Analyze this codebase and suggest refactoring opportunities"
Act mode (file modifications):
"Create a REST API with Flask for user management"

Auto-approve settings

Control Cline's permissions:
  • Read: Let Cline analyze your files
  • Write: Allow file creation and modification
  • Execute: Permit running commands
Auto-approve increases token consumption significantly. Start with manual approval.

Troubleshooting

401 Incorrect API key error
Solution:
  • Use "OpenAI Compatible" provider if "Alibaba Qwen" fails
  • Check API key validity in Qwen Cloud
High token consumption
Solution:
  • Use Plan mode for analysis tasks
  • Clear Auto-approve for manual control
  • Work in focused project directories
  • Use /compact to summarize long conversations
"InvalidParameter" with QwQ models
Solution: Enable R1 messages format in MODEL CONFIGURATION
Model not found
Solution: Check Model selection guide for exact model IDs

Token optimization

Reduce consumption by:
  1. Focused workspace: Open Cline in specific project folders
  2. Clear instructions: Avoid vague requests that trigger full scans
  3. Compact conversations: Use /compact command regularly
  4. Plan first: Use Plan mode before Act mode
  5. Manual approval: Review actions before execution