Skip to main content
Cline (formerly Claude Dev) is a powerful AI programming assistant plugin for VS Code that supports multiple AI models. Through APIYI, you can flexibly switch between various mainstream AI models to assist with programming.

Quick Installation

1. Install Plugin

Search for “Cline” in VS Code extension store and install

2. Configure APIYI

  1. Click the Cline icon on the left
  2. Click settings button (gear icon)
  3. Select OpenAI Compatible
  4. Configure parameters:
    • Base URL: https://api.apiyi.com/v1
    • API Key: Your APIYI key
    • Model Name: Enter model name

🎯 Programming Development First Choice

  • claude-sonnet-4-20250514 ⭐ (Claude 4 latest, extremely strong programming)
  • o4-mini (OpenAI reasoning model, first choice for programming tasks)
  • gemini-2.5-pro ⭐ (2M context, strong multimodal)
  • deepseek-coder (Code-specialized model, 128K context)

💡 Complex Reasoning Tasks

  • o3 ⭐ (Latest reasoning model, significantly reduced pricing)
  • claude-sonnet-4-20250514-thinking (Claude 4 chain-of-thought mode)
  • deepseek-r1 ⭐ (Latest reasoning model, 64K context)
  • grok-3-mini (Lightweight model with reasoning)

🚀 Fast Response

  • gpt-3.5-turbo (Classic model, high cost-performance)
  • gemini-2.5-flash ⭐ (Fast, low cost, 1M context)
  • claude-3-haiku (Lightweight fast version, 200K context)
  • gpt-4o-mini (Lightweight fast version, 128K context)

💰 Super Cost-Effective

  • deepseek-chat (128K context, strong overall capability)
  • qwen-turbo (Alibaba Qwen fast version)
  • gpt-4.1-nano (Ultra-low cost version, 128K context)

Core Features

Smart Code Completion

Code Explanation

Select code snippet and use:
  • Cline: Explain Code: Explain code
  • Cline: Explain Error: Explain errors

Code Refactoring

  • Performance Optimization: Provide optimization suggestions
  • Improve Readability: Refactor complex code
  • Fix Issues: Auto-fix common problems

Generate Tests

Common Commands

Advanced Features

Multi-File Operations

Cline can understand and operate on multiple related files:

Architecture Design

Generate project architecture:

Code Review

Usage Tips

1. Context Management

Provide better context:

2. Custom Prompts

Configure in settings:

3. Project-Level Configuration

Create .cline/config.json:

Troubleshooting

Connection Failed

Check configuration:
  • Base URL: https://api.apiyi.com/v1
  • API key is valid
  • Network connection is normal

Response Timeout

Solutions:
  1. Use faster models
  2. Reduce request complexity
  3. Break down large tasks

Poor Generation Quality

Improvement methods:
  1. Provide more context
  2. Use more powerful models
  3. Specify requirements clearly

gpt-5.6 / gpt-5.5 / gpt-5.4 fails with 400

The error Function tools with reasoning_effort are not supported for ... in /v1/chat/completions (400) is an official OpenAI restriction introduced with the GPT-5.4 series: on /v1/chat/completions, tool calling cannot be combined with reasoning_effort other than none (the default medium counts). Cline’s OpenAI Compatible path is hard-wired to the chat/completions endpoint and does not support /v1/responses yet, so there is no client-side workaround. What to do:
  1. Switch to an unaffected model: gpt-5.1 / gpt-5.2, Claude, Gemini, DeepSeek, etc.
  2. Use a client that supports the Responses endpoint — see the full client support table in the OpenAI Responses API Native Guide

Best Practices

1. Model Selection Strategy

2. Prompt Optimization

3. Progressive Development

  1. Generate basic framework first
  2. Gradually add features
  3. Finally optimize performance
  4. Add error handling

4. Security Awareness

  • Don’t include sensitive information in code
  • Review AI-generated code
  • Verify third-party dependencies
  • Watch for security vulnerabilities

Integration Workflow

Git Integration

Test-Driven Development

  1. Write test cases first
  2. Cline generates implementation code
  3. Run tests to verify
  4. Iterate and optimize

CI/CD Integration

Generate configuration files:

Token Optimization & Cost Control

1. Monitor Token Usage

  • Real-time Monitoring: Check estimated cost in Cline sidebar
  • Session Limits: Keep sessions short, avoid context accumulation
  • Regular Reset: Complete long tasks in multiple sessions

2. Smart Model Switching

3. Using .clinerules Configuration

Create .clinerules file in project root:

4. Alternative Solutions to Reduce Cost

GitHub Copilot Pro Integration

  • Monthly fee only $10, unlimited use
  • Use through VSCode LM API
  • Suitable for high-frequency scenarios

Local Models (Ollama)

Use Domestic Models to Reduce Cost

  • qwen-turbo (Alibaba Qwen)
  • glm-4 (Zhipu Tsinghua)
  • ernie-4.0 (Baidu Wenxin)

5. Cache Optimization

  • Use services like Requesty Router
  • Can save over 50% API cost
  • Auto-cache repeated requests

Advanced Best Practices

1. Plan/Act Mode Usage

  • Plan Mode: For design and review, read-only
  • Act Mode: Direct implementation, suitable for simple tasks
  • Model Memory: Cline remembers model preference for each mode

2. Context Management Skills

3. Task Management System

  • Bookmark Important Conversations: Use star feature
  • Export Valuable Content: Save as Markdown
  • Task Sorting: Sort by cost, Token usage
  • Batch Cleanup: Regularly clean low-value sessions

4. Avoid Token Explosion

5. Cost-Benefit Analysis

6. Workflow Optimization

Performance Optimization

1. Model Switching

Choose model based on task:
  • Development phase: Lightweight models
  • Complex tasks: Advanced models
  • Production: Balance performance and cost

2. Caching Strategy

  • Enable response caching
  • Cache common code snippets
  • Regularly clean cache

3. Request Optimization

  • Batch related requests
  • Use streaming responses
  • Set reasonable timeouts
Need more help? Please check the Detailed Integration Documentation.