Skip to main content

QwenPaw

Use Alibaba Cloud Model Studio models in QwenPaw.

Quick Start

  1. 1

    Get an API key

    Get the API key for your billing plan:
  2. 2

    Configure the model

    qwenpaw models config
    
    Follow the prompts to select a provider, paste the API key, and select a model. Provider mapping:
    • Token Plan: Aliyun Token Plan (aliyun-tokenplan)
    • Pay-as-you-go: DashScope (dashscope)
    • Coding Plan: Aliyun Coding Plan (China) (aliyun-codingplan)
  3. 3

    Verify

    qwenpaw task -i "Hello"
    
    A status: success response confirms the configuration.

Configure in the Console

You can also configure it in the Console: start QwenPaw and open QwenPaw Console at http://127.0.0.1:8088/.
  1. 1

    Configure the provider

    Go to Settings > Models and configure the provider for your billing plan:
    • Token Plan
    • Pay-as-you-go
    • Coding Plan
    Select the built-in Aliyun Token Plan provider and enter your Token Plan Personal Edition or Team Edition API key.
  2. 2

    Select or add a model

    Common models are preconfigured. To add one, click Add Model and enter a model ID:
    • Token Plan: a text generation model supported by Personal Edition or Team Edition
    • Pay-as-you-go: for example, qwen3.8-max or qwen3.8-flash
    • Coding Plan: for example, qwen3.7-plus
  3. 3

    Set the default model

    Go to Settings > Models > Default LLM, select a model, and click Save.

Configure with a configuration file

In addition to the options above, you can also connect using a configuration file.
  1. 1

    Open or create the configuration file

    ~/.qwenpaw.secret/providers/custom/<provider-id>.json
  2. 2

    Write the configuration

    • Token Plan Personal Edition
    • Token Plan Team Edition
    • Pay-as-you-go
    • Coding Plan
    {
      "id": "bailian-token-plan",
      "name": "Alibaba Cloud Model Studio",
      "base_url": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",
      "api_key": "YOUR_API_KEY",
      "chat_model": "OpenAIChatModel",
      "models": [
        {
          "id": "auto",
          "name": "Auto",
          "supports_image": false,
          "max_tokens": 65536,
          "max_input_length": 1000000,
          "generate_kwargs": {}
        },
        {
          "id": "qwen4-max",
          "name": "Qwen4 Max",
          "supports_image": true,
          "max_tokens": 262144,
          "max_input_length": 983616,
          "generate_kwargs": {}
        },
        {
          "id": "qwen3.8-max",
          "name": "Qwen3.8 Max",
          "supports_image": true,
          "max_tokens": 131072,
          "max_input_length": 1000000,
          "generate_kwargs": {}
        },
        {
          "id": "qwen3.8-flash",
          "name": "Qwen3.8 Flash",
          "supports_image": true,
          "max_tokens": 131072,
          "max_input_length": 1000000,
          "generate_kwargs": {}
        },
        {
          "id": "qwen3.7-max",
          "name": "Qwen3.7 Max",
          "supports_image": false,
          "max_tokens": 131072,
          "max_input_length": 1000000,
          "generate_kwargs": {}
        },
        {
          "id": "qwen3.7-plus",
          "name": "Qwen3.7 Plus",
          "supports_image": true,
          "max_tokens": 65536,
          "max_input_length": 1000000,
          "generate_kwargs": {}
        },
        {
          "id": "qwen3.6-flash",
          "name": "Qwen3.6 Flash",
          "supports_image": true,
          "max_tokens": 65536,
          "max_input_length": 1000000,
          "generate_kwargs": {}
        },
        {
          "id": "deepseek-v4.1-flash",
          "name": "DeepSeek V4.1 Flash",
          "supports_image": true,
          "max_tokens": 65536,
          "max_input_length": 1000000,
          "generate_kwargs": {}
        },
        {
          "id": "deepseek-v4.1-flash-1017",
          "name": "DeepSeek V4.1 Flash 1017",
          "supports_image": true,
          "max_tokens": 65536,
          "max_input_length": 1000000,
          "generate_kwargs": {}
        },
        {
          "id": "deepseek-v4-pro",
          "name": "DeepSeek V4 Pro",
          "supports_image": false,
          "max_tokens": 65536,
          "max_input_length": 1000000,
          "generate_kwargs": {}
        },
        {
          "id": "deepseek-v4-pro-0813",
          "name": "DeepSeek V4 Pro 0813",
          "supports_image": false,
          "max_tokens": 65536,
          "max_input_length": 1000000,
          "generate_kwargs": {}
        },
        {
          "id": "deepseek-v4-flash-0731",
          "name": "DeepSeek V4 Flash 0731",
          "supports_image": false,
          "max_tokens": 65536,
          "max_input_length": 1000000,
          "generate_kwargs": {}
        },
        {
          "id": "glm-5.3",
          "name": "GLM-5.3",
          "supports_image": false,
          "max_tokens": 16384,
          "max_input_length": 202752,
          "generate_kwargs": {}
        },
        {
          "id": "glm-5.2",
          "name": "GLM-5.2",
          "supports_image": false,
          "max_tokens": 16384,
          "max_input_length": 202752,
          "generate_kwargs": {}
        }
      ],
      "is_custom": true
    }
    
    When using qwen4-max, the 1.1.x default is max_tokens=8192. Increase it in generate_kwargs.max_tokens. For 2.2.x, set it explicitly as well. qwen4-max has a 1M-token context. The maximum output is 131,072 tokens in non-thinking mode and 262,144 tokens for thinking and the final answer combined. The defaults are reasoning_effort=high and thinking_budget=131072.

Error codes

Troubleshoot by billing plan:

FAQ

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, it takes effect automatically and eligible usage is deducted automatically. See Savings plans.
Possible causes:
  • API keys are not interchangeable across billing plans. Make sure the API key and Base URL come from the same plan.
  • The Pay-as-you-go API key and Base URL are in different regions.
On the provider Settings page for that model, expand Advanced Configuration and adjust generation parameters such as max_tokens in JSON format, then save:
{
  "temperature": 0.7,
  "top_p": 0.9,
  "max_tokens": 4096
}