QwenPaw
Use Alibaba Cloud Model Studio models in QwenPaw.
Quick Start
- 1
Get an API key
Get the API key for your billing plan:
- Token Plan Personal Edition: Create or view API Key
- Token Plan Team Edition: Assign a seat and get the API Key
- Pay-as-you-go: Model Studio API key
- Coding Plan: Coding Plan API key
- 2
Configure the model
qwenpaw models configFollow 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)
- Token Plan: Aliyun Token Plan (
- 3
Verify
qwenpaw task -i "Hello"A
status: successresponse 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
Configure the provider
Go to Settings > Models and configure the provider for your billing plan:
Token Plan
Select the built-in Aliyun Token Plan provider and enter your Token Plan Personal Edition or Team Edition API key.
Pay-as-you-go
Select the DashScope provider, use
https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1as the Base URL, replace{WorkspaceId}with your Workspace ID, and enter your Model Studio API key.Coding Plan
Select the built-in Aliyun Coding Plan (China) provider and enter your Coding Plan API key.
- 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-maxorqwen3.8-flash - Coding Plan: for example,
qwen3.7-plus
- 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
Open or create the configuration file
~/.qwenpaw.secret/providers/custom/<provider-id>.json - 2
Write the configuration
Token Plan Personal Edition
{ "id": "bailian-token-plan", "name": "Alibaba Cloud Model Studio", "base_url": "https://token-plan.cn-beijing.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-preview", "name": "Qwen4.0 Max Preview", "supports_image": true, "max_tokens": 131072, "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 }Token Plan Team Edition
{ "id": "bailian-token-plan", "name": "Alibaba Cloud Model Studio", "base_url": "https://token-plan.cn-beijing.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-preview", "name": "Qwen4.0 Max Preview", "supports_image": true, "max_tokens": 131072, "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-plus", "name": "Qwen3.6 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": "kimi-k2.7-code", "name": "Kimi K2.7 Code", "supports_image": true, "max_tokens": 98304, "max_input_length": 262144, "generate_kwargs": {} }, { "id": "kimi-k2.6", "name": "Kimi K2.6", "supports_image": true, "max_tokens": 98304, "max_input_length": 262144, "generate_kwargs": {} }, { "id": "kimi-k2.5", "name": "Kimi K2.5", "supports_image": true, "max_tokens": 98304, "max_input_length": 262144, "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": {} }, { "id": "glm-5.1", "name": "GLM-5.1", "supports_image": false, "max_tokens": 16384, "max_input_length": 202752, "generate_kwargs": {} }, { "id": "glm-5", "name": "GLM-5", "supports_image": false, "max_tokens": 16384, "max_input_length": 202752, "generate_kwargs": {} }, { "id": "MiniMax-M2.5", "name": "MiniMax M2.5", "supports_image": false, "max_tokens": 32768, "max_input_length": 196608, "generate_kwargs": {} } ], "is_custom": true }Pay-as-you-go
Replace
{WorkspaceId}with your actual Workspace ID.{ "id": "bailian-payg", "name": "Alibaba Cloud Model Studio", "base_url": "https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1", "api_key": "YOUR_API_KEY", "chat_model": "OpenAIChatModel", "models": [ { "id": "qwen3.8-max", "name": "Qwen3.8 Max", "supports_image": true, "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.8-flash", "name": "Qwen3.8 Flash", "supports_image": true, "max_tokens": 131072, "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.1-flash", "name": "DeepSeek V4.1 Flash", "supports_image": true, "max_tokens": 65536, "max_input_length": 1000000, "generate_kwargs": {} } ], "is_custom": true }Coding Plan
{ "id": "bailian-coding-plan", "name": "Alibaba Cloud Model Studio", "base_url": "https://coding.dashscope.aliyuncs.com/v1", "api_key": "YOUR_API_KEY", "chat_model": "OpenAIChatModel", "models": [ { "id": "qwen3.7-plus", "name": "Qwen3.7 Plus", "supports_image": true, "max_tokens": 65536, "max_input_length": 1000000, "generate_kwargs": {} }, { "id": "qwen3.6-plus", "name": "Qwen3.6 Plus", "supports_image": true, "max_tokens": 65536, "max_input_length": 1000000, "generate_kwargs": {} }, { "id": "kimi-k2.5", "name": "Kimi K2.5", "supports_image": true, "max_tokens": 98304, "max_input_length": 262144, "generate_kwargs": {} }, { "id": "glm-5", "name": "GLM-5", "supports_image": false, "max_tokens": 16384, "max_input_length": 202752, "generate_kwargs": {} }, { "id": "MiniMax-M2.5", "name": "MiniMax M2.5", "supports_image": false, "max_tokens": 32768, "max_input_length": 196608, "generate_kwargs": {} }, { "id": "qwen3.5-plus", "name": "Qwen3.5 Plus", "supports_image": true, "max_tokens": 65536, "max_input_length": 1000000, "generate_kwargs": {} } ], "is_custom": true }NoteWhen using qwen4-max-preview, 1.1.x defaults to
max_tokens=8192; raise it ingenerate_kwargs.max_tokens. For 2.2.x, setting it explicitly is also recommended.NoteWhen using qwen4-max, the 1.1.x default is
max_tokens=8192. Increase it ingenerate_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:
- Token Plan: Personal Edition FAQ · Team Edition FAQ
- Pay-as-you-go: Error codes
- Coding Plan: Coding Plan FAQ
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:
- 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.
Context length exceeded during long conversations or tool calls
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
}