$npx -y skills add cinience/alicloud-skills --skill aliyun-qwen-generationUse when generating or reasoning over text with Alibaba Cloud Model Studio Qwen flagship text models (qwen3-max, qwen3.5-plus, qwen3.5-flash, snapshots, and compatible open-source variants). Use when building chat, agent, tool-calling, or long-context text generation workfl
| 1 | Category: provider |
| 2 | |
| 3 | # Model Studio Qwen Text Generation |
| 4 | |
| 5 | ## Validation |
| 6 | |
| 7 | ```bash |
| 8 | mkdir -p output/aliyun-qwen-generation |
| 9 | python -m py_compile skills/ai/text/aliyun-qwen-generation/scripts/prepare_generation_request.py && echo "py_compile_ok" > output/aliyun-qwen-generation/validate.txt |
| 10 | ``` |
| 11 | |
| 12 | Pass criteria: command exits 0 and `output/aliyun-qwen-generation/validate.txt` is generated. |
| 13 | |
| 14 | ## Output And Evidence |
| 15 | |
| 16 | - Save prompt templates, normalized request payloads, and response summaries under `output/aliyun-qwen-generation/`. |
| 17 | - Keep one reproducible request example with model name, region, and key parameters. |
| 18 | |
| 19 | Use this skill for general text generation, reasoning, tool-calling, and long-context chat on Alibaba Cloud Model Studio. |
| 20 | |
| 21 | ## Critical model names |
| 22 | |
| 23 | Prefer the current flagship families: |
| 24 | - `qwen3-max` |
| 25 | - `qwen3-max-2026-01-23` |
| 26 | - `qwen3.5-plus` |
| 27 | - `qwen3.5-plus-2026-02-15` |
| 28 | - `qwen3.5-flash` |
| 29 | - `qwen3.5-flash-2026-02-23` |
| 30 | |
| 31 | Common related variants listed in the official model catalog: |
| 32 | - `qwen3.5-397b-a17b` |
| 33 | - `qwen3.5-122b-a10b` |
| 34 | - `qwen3.5-35b-a3b` |
| 35 | - `qwen3.5-27b` |
| 36 | |
| 37 | ## Prerequisites |
| 38 | |
| 39 | - Install SDK in a virtual environment: |
| 40 | |
| 41 | ```bash |
| 42 | python3 -m venv .venv |
| 43 | . .venv/bin/activate |
| 44 | python -m pip install dashscope |
| 45 | ``` |
| 46 | |
| 47 | - Set `DASHSCOPE_API_KEY` in your environment, or add `dashscope_api_key` to `~/.alibabacloud/credentials`. |
| 48 | |
| 49 | ## Normalized interface (text.generate) |
| 50 | |
| 51 | ### Request |
| 52 | - `messages` (array<object>, required): standard chat turns. |
| 53 | - `model` (string, optional): default `qwen3.5-plus`. |
| 54 | - `temperature` (number, optional) |
| 55 | - `top_p` (number, optional) |
| 56 | - `max_tokens` (int, optional) |
| 57 | - `enable_thinking` (bool, optional) |
| 58 | - `tools` (array<object>, optional) |
| 59 | - `response_format` (object, optional) |
| 60 | - `stream` (bool, optional) |
| 61 | |
| 62 | ### Response |
| 63 | - `text` (string): assistant output. |
| 64 | - `finish_reason` (string, optional) |
| 65 | - `usage` (object, optional) |
| 66 | - `raw` (object, optional) |
| 67 | |
| 68 | ## Quick start (OpenAI-compatible endpoint) |
| 69 | |
| 70 | ```bash |
| 71 | curl -sS https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions \ |
| 72 | -H "Authorization: Bearer $DASHSCOPE_API_KEY" \ |
| 73 | -H "Content-Type: application/json" \ |
| 74 | -d '{ |
| 75 | "model": "qwen3.5-plus", |
| 76 | "messages": [ |
| 77 | {"role": "system", "content": "You are a concise assistant."}, |
| 78 | {"role": "user", "content": "Summarize why object storage helps media pipelines."} |
| 79 | ], |
| 80 | "stream": false |
| 81 | }' |
| 82 | ``` |
| 83 | |
| 84 | ## Local helper script |
| 85 | |
| 86 | ```bash |
| 87 | python skills/ai/text/aliyun-qwen-generation/scripts/prepare_generation_request.py \ |
| 88 | --prompt "Draft a concise architecture summary for a media ingestion pipeline." \ |
| 89 | --model qwen3.5-plus |
| 90 | ``` |
| 91 | |
| 92 | ## Operational guidance |
| 93 | |
| 94 | - Use snapshot IDs when reproducibility matters. |
| 95 | - Prefer `qwen3.5-flash` for lower-latency simple tasks and `qwen3-max` for harder multi-step tasks. |
| 96 | - Keep tool schemas minimal and explicit when enabling tool calls. |
| 97 | - For multimodal input, route to dedicated VL or Omni skills unless the task is primarily text-centric. |
| 98 | |
| 99 | ## Output location |
| 100 | |
| 101 | - Default output: `output/aliyun-qwen-generation/requests/` |
| 102 | - Override base dir with `OUTPUT_DIR`. |
| 103 | |
| 104 | ## References |
| 105 | |
| 106 | - `references/sources.md` |