Skip to main content
Watch: Anthropic Just Hit the Brakes on Its Next AI Model

Setup guide - Documented by Qwen

Use Qwen in Kilo Code

Model Studio documents Kilo CLI, the command-line client for Kilo Code, two ways: the built-in /connect providers (Alibaba (China) for pay-as-you-go, Alibaba Coding Plan (China), Alibaba Token Plan (China)), or a custom provider in ~/.config/kilo/config.json that uses @ai-sdk/anthropic against Model Studio's Anthropic-compatible endpoint (/apps/anthropic/v1) for all three plans.

Last verified 8 steps2 official sources

Steps

  1. Step 1.

    Start Kilo CLI.

    Terminal
    kilo
  2. Step 2.

    Enter /connect, select the provider for your billing plan, and enter the API key: Alibaba (China) with your Model Studio API key, Alibaba Coding Plan (China) with your Coding Plan API key, or Alibaba Token Plan (China) with your Token Plan API key.

    Snippet
    /connect
  3. Step 3.

    Enter /models and select the model you want.

    Snippet
    /models
  4. Step 4.

    Verify.

    Terminal
    kilo run "Hello"
  5. Step 5.

    Config file alternative: open or create ~/.config/kilo/config.json (Windows: C:\Users\<username>\.config\kilo\config.json). Pay-as-you-go example (replace YOUR_API_KEY and {WorkspaceId}; the Alibaba example also lists deepseek-v4-pro-0813 and deepseek-v4.1-flash):

    JSON
    {
      "$schema": "https://kilo.ai/config.json",
      "provider": {
        "bailian-payg": {
          "npm": "@ai-sdk/anthropic",
          "name": "Alibaba Cloud Model Studio",
          "options": {
            "baseURL": "https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/apps/anthropic/v1",
            "apiKey": "YOUR_API_KEY"
          },
          "models": {
            "qwen3.8-max": {
              "name": "Qwen3.8 Max",
              "modalities": {
                "input": ["text", "image"],
                "output": ["text"]
              }
            },
            "qwen3.7-plus": {
              "name": "Qwen3.7 Plus",
              "modalities": {
                "input": ["text", "image"],
                "output": ["text"]
              }
            },
            "qwen3.8-flash": {
              "name": "Qwen3.8 Flash",
              "modalities": {
                "input": ["text", "image"],
                "output": ["text"]
              }
            }
          }
        }
      }
    }
  6. Step 6.

    Coding Plan alternative: provider bailian-coding-plan with "npm": "@ai-sdk/anthropic" and the baseURL below, using the Coding Plan key (models qwen3.7-plus, qwen3.6-plus, kimi-k2.5, glm-5, MiniMax-M2.5, qwen3.5-plus).

    JSON
    "options": {
      "baseURL": "https://coding-intl.dashscope.aliyuncs.com/apps/anthropic/v1",
      "apiKey": "YOUR_API_KEY"
    }
  7. Step 7.

    Token Plan alternative: provider bailian-token-plan with "npm": "@ai-sdk/anthropic" and the baseURL below (models include auto, qwen3.8-max, qwen3.8-flash, qwen3.7-max, qwen3.7-plus, qwen3.6-flash; the Team Edition example adds qwen3.6-plus).

    JSON
    "options": {
      "baseURL": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic/v1",
      "apiKey": "YOUR_API_KEY"
    }
  8. Step 8.

    Verify the config file setup, replacing <provider>/<model> with your provider and model (for example bailian-token-plan/auto).

    Terminal
    kilo run "Hello" -m <provider>/<model>

Caveats

  • The Alibaba guide covers Kilo CLI specifically, not the Kilo Code IDE extension.
  • The config-file examples store the API key inline in config.json.
  • Requests returning 401 Unauthorized mean the API key does not match the baseURL or belongs to another billing plan.
  • A model missing from the list can be added to models in config.json in the same format; replace {WorkspaceId} in the pay-as-you-go baseURL.

FAQ

How do I use Qwen in Kilo Code?

Model Studio documents Kilo CLI, the command-line client for Kilo Code, two ways: the built-in /connect providers (Alibaba (China) for pay-as-you-go, Alibaba Coding Plan (China), Alibaba Token Plan (China)), or a custom provider in ~/.config/kilo/config.json that uses @ai-sdk/anthropic against Model Studio's Anthropic-compatible endpoint (/apps/anthropic/v1) for all three plans.

Which Qwen model ids work in Kilo Code?

The official docs read for this guide list qwen3.8-max, qwen3.7-plus, qwen3.8-flash, qwen3.6-plus, qwen3.5-plus, qwen3.7-max, qwen3.6-flash and auto. Requests go to https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/apps/anthropic/v1.

Is this an official Qwen and Kilo Code setup?

Qwen documents this setup in its own docs. It was last checked against 2 official pages on November 8, 2026.

Sources

Last verified against 2 official pages.

Newsletter

New models, set up the day they ship

One email per week. New model releases, the coding tools that support them and how to wire them up.