Cline

Updated at:

Use Alibaba Cloud Model Studio models in Cline.

Quick Start

  1. 1

    Get an API Key

    Obtain an API Key for your billing plan:

  2. 2

    Configure the model

    Open the Cline panel, click Bring my own API key, set API Provider to OpenAI Compatible, and enter the values for your billing plan. If Cline has been configured before, click the settings icon in the upper-right corner to open the configuration interface.

    Token Plan

    ItemValue
    Base URLhttps://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1
    API KeyToken Plan API Key
    Model IDEnter a text generation model supported by Personal Edition or Team Edition

    Pay-as-you-go

    Replace {WorkspaceId} with your actual Workspace ID.

    ItemValue
    Base URLhttps://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1
    API KeyAlibaba Cloud Model Studio API Key
    Model IDFor example, qwen3.8-max or qwen3.8-flash

    Coding Plan

    ItemValue
    Base URLhttps://coding.dashscope.aliyuncs.com/v1
    API KeyCoding Plan API Key
    Model IDEnter a supported text generation model
  3. 3

    Verify

    Send a message in the Cline chat panel. A normal response confirms the configuration.

Integrate Bailian CLI

Bailian CLI registers a Skill at ~/.cline/skills/bailian-cli/ during installation, allowing Cline to invoke Bailian capabilities through conversation. For the full capability list, see the Bailian CLI console. Prerequisite: Node.js 18+.

  1. 1

    Install Bailian CLI

    In the Cline chat, run:

    Please install the Alibaba Cloud Bailian CLI globally: npm install -g bailian-cli
    
  2. 2

    Configure the API Key

    Obtain an API Key, then ask Cline to configure it in the chat.

Error Codes

If you encounter errors during configuration, refer to the FAQ for your billing plan:

FAQ

How do I use savings plans and resource plans with pay-as-you-go?

The pay-as-you-go setup remains the same: use your general Model Studio API key and Base URL. After you purchase a savings plan or resource plan, it takes effect automatically and eligible usage is deducted automatically. See Savings plans and resource plans.

Error: 401 Incorrect API key provided

Possible causes:

  • The API Key does not match the Base URL. API Keys are not interchangeable across billing plans. Verify that the API Key and Base URL belong to the same plan.
  • For Pay-as-you-go, the API Key region does not match the Base URL region. Verify that both correspond to the same region.

Error: 400 InternalError.Algo.InvalidParameter

When using Qwen3 thinking mode or the QwQ model, click MODEL CONFIGURATION in the settings interface and check Enable R1 messages format.