All Products
Search
Document Center

Alibaba Cloud Model Studio:Qwen Code

Last Updated:Mar 05, 2026

Set up and use Alibaba Cloud Model Studio's Coding Plan with Qwen Code.

Install and use

Install Qwen Code

macOS/Linux

In your terminal, install Qwen Code version ≥ 0.11.1:

curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh | bash

Verify the installation. If a version number appears, the installation succeeded:

qwen --version

Windows

In Command Prompt as an administrator, install Qwen Code version ≥ 0.11.1:

curl -fsSL -o %TEMP%\install-qwen.bat https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.bat && %TEMP%\install-qwen.bat

After installation, restart Command Prompt to apply environment variables.

Verify the installation. If a version number appears, the installation succeeded:

qwen --version

Connection settings

  1. Start Qwen Code from your project directory:

    qwen
  2. After you see the following screen, select Alibaba Cloud Coding Plan.

    If the Coding Plan option appears by default, go to the next step. If you land directly in the chat interface, run /auth to open the settings interface.

    2026-03-04_10-10-08

  3. Select Alibaba Cloud (alibabacloud.com). Qwen Code sets the Coding Plan base URL automatically.

    2026-03-04_10-12-18

  4. Enter your Coding Plan API key.

    2026-03-04_10-15-55

Start a conversation.

2026-03-04_10-25-32

Switch models

Run /model to switch between models supported by Coding Plan.

If your preferred model, such as MiniMax-M2.5 or glm-5, does not appear in the list, update Qwen Code:

  1. Run /quit to exit the current session.

  2. Update Qwen Code:

    npm install -g @qwen-code/qwen-code@latest

  3. Restart Qwen Code:

    qwen

  4. Run /model to select newly added models.

Common commands

Note

The following commands work in the Qwen Code CLI. The IDE extensions support only some of these commands. Use them as appropriate.

Command

Description

Example

/model

Switch the model used in the current session.

/model

/auth

Change the authentication method.

/auth

/init

Analyze the current directory and create an initial context file (QWEN.md) to define project-level instructions and context.

/init

/clear

Clear the terminal screen and start a new chat.

/clear

/compress

Replace chat history with a summary to save tokens.

/compress

/settings

Open the settings editor to configure language, theme, and other options.

/settings

/summary

Generate a project summary from chat history.

/summary

/resume

Resume a previous chat session.

/resume

/stats

Show detailed performance statistics for the current session.

/stats

/help

Show help information for available commands.

/help or /?

/quit

Exit Qwen Code.

/quit

For more commands and usage details, see the official Qwen Code documentation.

Install and use the Qwen Code IDE extension

The Qwen Code IDE extension works with VS Code and JetBrains IDEs, adding AI-powered coding capabilities to your IDE.

VS Code IDE

Make sure you are using VS Code version 1.85.0 or later.

  1. In VS Code, open the Extensions Marketplace, search for Qwen Code Companion, and install it.2026-02-26_19-30-08

  2. Edit or create the settings.json file. Replace YOUR_API_KEY with your Coding Plan API key. Save the file at one of the following paths:

    • macOS / Linux: ~/.qwen/settings.json

    • Windows: C:\Users\your-username\.qwen\settings.json

    Skip this step if you have already installed and configured the Qwen Code CLI with the Coding Plan. Qwen Code has already applied the configuration automatically.
    {
      "env": {
        "BAILIAN_CODING_PLAN_API_KEY": "YOUR_API_KEY"
      },
      "modelProviders": {
        "openai": [
          {
            "id": "qwen3.5-plus",
            "name": "[Bailian Coding Plan for Global/Intl] qwen3.5-plus",
            "baseUrl": "https://coding-intl.dashscope.aliyuncs.com/v1",
            "envKey": "BAILIAN_CODING_PLAN_API_KEY",
            "generationConfig": {
              "extra_body": {
                "enable_thinking": true
              }
            }
          },
          {
            "id": "qwen3-coder-plus",
            "name": "[Bailian Coding Plan for Global/Intl] qwen3-coder-plus",
            "baseUrl": "https://coding-intl.dashscope.aliyuncs.com/v1",
            "envKey": "BAILIAN_CODING_PLAN_API_KEY"
          },
          {
            "id": "qwen3-coder-next",
            "name": "[Bailian Coding Plan for Global/Intl] qwen3-coder-next",
            "baseUrl": "https://coding-intl.dashscope.aliyuncs.com/v1",
            "envKey": "BAILIAN_CODING_PLAN_API_KEY"
          },
          {
            "id": "qwen3-max-2026-01-23",
            "name": "[Bailian Coding Plan for Global/Intl] qwen3-max-2026-01-23",
            "baseUrl": "https://coding-intl.dashscope.aliyuncs.com/v1",
            "envKey": "BAILIAN_CODING_PLAN_API_KEY",
            "generationConfig": {
              "extra_body": {
                "enable_thinking": true
              }
            }
          },
          {
            "id": "glm-4.7",
            "name": "[Bailian Coding Plan for Global/Intl] glm-4.7",
            "baseUrl": "https://coding-intl.dashscope.aliyuncs.com/v1",
            "envKey": "BAILIAN_CODING_PLAN_API_KEY",
            "generationConfig": {
              "extra_body": {
                "enable_thinking": true
              }
            }
          },
          {
            "id": "glm-5",
            "name": "[Bailian Coding Plan for Global/Intl] glm-5",
            "baseUrl": "https://coding-intl.dashscope.aliyuncs.com/v1",
            "envKey": "BAILIAN_CODING_PLAN_API_KEY",
            "generationConfig": {
              "extra_body": {
                "enable_thinking": true
              }
            }
          },
          {
            "id": "MiniMax-M2.5",
            "name": "[Bailian Coding Plan for Global/Intl] MiniMax-M2.5",
            "baseUrl": "https://coding-intl.dashscope.aliyuncs.com/v1",
            "envKey": "BAILIAN_CODING_PLAN_API_KEY",
            "generationConfig": {
              "extra_body": {
                "enable_thinking": true
              }
            }
          },
          {
            "id": "kimi-k2.5",
            "name": "[Bailian Coding Plan for Global/Intl] kimi-k2.5",
            "baseUrl": "https://coding-intl.dashscope.aliyuncs.com/v1",
            "envKey": "BAILIAN_CODING_PLAN_API_KEY",
            "generationConfig": {
              "extra_body": {
                "enable_thinking": true
              }
            }
          }
        ]
      },
      "security": {
        "auth": {
          "selectedType": "openai"
        }
      },
      "codingPlan": {
        "region": "global",
        "version": "b52d5e055670583e6835f2fa5494bdc1b83c6c63516151eaa828774068fccb51"
      },
      "model": {
        "name": "qwen3.5-plus"
      },
      "$version": 3
    }
  3. Click the icon in the top-right corner to launch Qwen Code. Type /, then select Switch model to change models.

    2026-02-27_10-38-30

JetBrains IDE

Make sure your JetBrains IDE supports the Agent Client Protocol (ACP).

  1. The Qwen Code IDE extension depends on the Qwen Code CLI. First, install and set up Qwen Code.

  2. In your JetBrains IDE, open the AI Chat page and click Install Plugin. The IDE installs the JetBrains AI Assistant plugin.

    image

  3. In the AI Chat window, click the three-dot menu in the top-right corner and select Add Custom Agent. Fill in the fields as shown below. Replace /path/to/qwen with the path where Qwen Code is installed. Run one of the following commands to find the path:

    • macOS / Linux: which qwen

    • Windows: where qwen (Command Prompt) or Get-Command qwen (PowerShell)

    {
      "agent_servers": {
        "qwen": {
          "command": "/path/to/qwen",
          "args": ["--acp"],
          "env": {}
        }
      }
    }
  4. After configuration, Qwen Code appears in the AI Chat panel. Switch models in the bottom-right corner.

    2026-02-27_09-52-59

Learn more

To learn about advanced features such as sub-agents, MCP, and skills, see the Qwen Code official documentation.

Error codes

See Common errors and solutions.

FAQ

See FAQ.