Loading...
Loading...
Compare original and translation side by side
Agent setup: If your agent doesn't auto-load skills (e.g. Claude Code), see agent-compatibility.md once per session.
Agent 设置: 如果你的Agent不会自动加载技能(例如Claude Code), 每次会话请先查看一次 agent-compatibility.md。
| Location | Purpose |
|---|---|
| Default execution — chat/completions request, streaming, output save |
| Fallback: curl, Python SDK, function calling, thinking mode |
| API supplement and full code examples |
| Prompt engineering: CO-STAR framework, CoT, few-shot, task steps |
| Official documentation URLs (manual lookup only) |
| Agent self-check: register skills in project config for agents that don't auto-load |
| 位置 | 用途 |
|---|---|
| 默认执行入口 — 聊天/补全请求、流式输出、结果保存 |
| 备用方案:curl、Python SDK、函数调用、思考模式 |
| API补充说明与完整代码示例 |
| Prompt工程:CO-STAR框架、思维链、少样本提示、任务步骤 |
| 官方文档URL(仅手动查询使用) |
| Agent自检:针对不会自动加载技能的Agent,在项目配置中注册技能 |
$DASHSCOPE_API_KEYos.environ["DASHSCOPE_API_KEY"].env.envDASHSCOPE_API_KEY=sk-your-key-here$DASHSCOPE_API_KEYos.environ["DASHSCOPE_API_KEY"].env.envDASHSCOPE_API_KEY=sk-your-key-heresk-...sk-sp-...sk-sp-references/codingplan.mdsk-...sk-sp-...sk-sp-references/codingplan.md| Model | Use Case |
|---|---|
| Recommended default — balanced performance, cost, speed, 1M context |
| Fast, low-cost, 1M context |
| Strongest capability |
| General purpose |
| Cheapest, low latency |
| Recommended code model — best balance of quality, speed, cost; agentic coding |
| Code generation — highest quality for complex tasks |
| Code generation — fast responses, lower cost |
| Reasoning / chain-of-thought |
| Machine translation — best quality, 92 languages |
| Machine translation — fast, low cost, 92 languages |
| Machine translation — real-time chat, fastest, 31 languages |
| Role-playing — recommended for Singapore |
| Role-playing — character restoration, empathetic dialog |
| Role-playing — fast, lower cost |
qwen3.5-plusFallback: if model-selector is unavailable, the defaults in the table above apply.
⚠️ Important: The model list above is a point-in-time snapshot and may be outdated. Model availability changes frequently. Always check the official model list for the authoritative, up-to-date catalog before making model decisions.
| 模型 | 适用场景 |
|---|---|
| 推荐默认使用 — 性能、成本、速度均衡,支持1M上下文 |
| 速度快、成本低,支持1M上下文 |
| 能力最强的模型 |
| 通用场景 |
| 成本最低、延迟低 |
| 推荐代码模型 — 质量、速度、成本均衡性最佳;支持智能编码 |
| 代码生成 — 复杂任务下质量最高 |
| 代码生成 — 响应速度快、成本更低 |
| 推理/思维链场景 |
| 机器翻译 — 质量最佳,支持92种语言 |
| 机器翻译 — 速度快、成本低,支持92种语言 |
| 机器翻译 — 实时聊天场景,速度最快,支持31种语言 |
| 角色扮演 — 推荐新加坡地区使用 |
| 角色扮演 — 人设还原度高、对话共情能力强 |
| 角色扮演 — 速度快、成本更低 |
qwen3.5-plus备用方案:如果model-selector不可用,则使用上表中的默认值。
⚠️ 重要提示:上表的模型列表是当前时间点的快照,可能已过时。模型的可用性会频繁变化。在确定使用的模型之前,请始终查阅官方模型列表获取权威、最新的目录。
DASHSCOPE_API_KEYQWEN_API_KEY[ -n "$DASHSCOPE_API_KEY" ].envecho 'DASHSCOPE_API_KEY=sk-your-key-here' >> .env.envDASHSCOPE_API_KEYQWEN_API_KEY[ -n "$DASHSCOPE_API_KEY" ].envecho 'DASHSCOPE_API_KEY=sk-your-key-here' >> .env.envpython3 --version # must be 3.9+python3python --versionpy -3 --versionpython3 --version # 必须为3.9及以上版本python3python --versionpy -3 --versionscripts/cdpython3 <this-skill-dir>/scripts/text.py --helppython3 <this-skill-dir>/scripts/text.py \
--request '{"messages":[{"role":"user","content":"Hello!"}],"model":"qwen3.5-plus"}' \
--output output/qwencloud-text/ --print-responsepython3 <this-skill-dir>/scripts/text.py \
--request '{"messages":[{"role":"user","content":"Write a poem about the sea"}],"model":"qwen3.5-plus"}' \
--stream --print-response| Argument | Description |
|---|---|
| JSON request body |
| Load request from file (alternative to |
| Enable streaming output |
| Save response JSON to directory |
| Print response to stdout |
| Override model (also settable in request JSON) |
scripts/cdpython3 <this-skill-dir>/scripts/text.py --helppython3 <this-skill-dir>/scripts/text.py \
--request '{"messages":[{"role":"user","content":"Hello!"}],"model":"qwen3.5-plus"}' \
--output output/qwencloud-text/ --print-responsepython3 <this-skill-dir>/scripts/text.py \
--request '{"messages":[{"role":"user","content":"Write a poem about the sea"}],"model":"qwen3.5-plus"}' \
--stream --print-response| 参数 | 说明 |
|---|---|
| JSON请求体 |
| 从文件加载请求( |
| 启用流式输出 |
| 将响应JSON保存到指定目录 |
| 将响应打印到标准输出 |
| 覆盖指定模型(也可在请求JSON中设置) |
0choices"code""message"ErrorTraceback401403--outputchoices[ACTION_REQUIRED][UPDATE_AVAILABLE]0choices"code""message"ErrorTraceback401403--outputchoices[ACTION_REQUIRED][UPDATE_AVAILABLE]| Error Pattern | Diagnosis | Resolution |
|---|---|---|
| Python not on PATH | Try |
| Script version check failed | Upgrade Python to 3.9+ |
| Python < 3.9 | Upgrade Python to 3.9+ |
| Missing API key | Obtain key from QwenCloud Console; add to |
| Invalid or mismatched key | Run qwencloud-ops-auth (non-plaintext check only); verify key is valid |
| SSL cert issue (proxy/corporate) | macOS: run |
| Network unreachable | Check internet; set |
| Rate limited | Wait and retry with backoff |
| Server error | Retry with backoff |
| Can't write output | Use |
| 错误模式 | 诊断原因 | 解决方案 |
|---|---|---|
| Python不在PATH环境变量中 | 尝试 |
| 脚本版本检查失败 | 将Python升级到3.9及以上版本 |
类型提示附近出现 | Python版本低于3.9 | 将Python升级到3.9及以上版本 |
| 缺少API密钥 | 从QwenCloud控制台获取密钥;添加到 |
| 密钥无效或不匹配 | 运行qwencloud-ops-auth(仅执行非明文检查);验证密钥是否有效 |
| SSL证书问题(代理/企业网络) | macOS:运行 |
| 网络不可达 | 检查网络连接;如果使用代理请设置 |
| 触发限流 | 等待后指数退避重试 |
| 服务器错误 | 等待后指数退避重试 |
| 无法写入输出目录 | 使用 |
| Field | Type | Description |
|---|---|---|
| string | array | User input or message list |
| string | Model ID (e.g. |
| string | System prompt (optional) |
| float | 0–2, controls randomness |
| int | Max output tokens |
| array | Function definitions for tool calling |
| bool | Enable streaming (recommended for interactive use) |
| bool | Enable thinking mode. Model defaults apply: |
| 字段 | 类型 | 说明 |
|---|---|---|
| string | array | 用户输入或消息列表 |
| string | 模型ID(例如 |
| string | 系统提示词(可选) |
| float | 取值0–2,控制输出随机性 |
| int | 最大输出token数 |
| array | 工具调用的函数定义 |
| bool | 启用流式输出(推荐交互式场景使用) |
| bool | 启用思考模式。遵循模型默认设置: |
| Field | Description |
|---|---|
| Generated text content |
| Model used |
| Token usage (prompt_tokens, completion_tokens) |
| Function call requests (if tools used) |
| 字段 | 说明 |
|---|---|
| 生成的文本内容 |
| 使用的模型 |
| Token使用情况(prompt_tokens、completion_tokens) |
| 函数调用请求(如果使用了工具) |
chat/completions| Feature | How to Enable | Notes |
|---|---|---|
| Structured output | | Force JSON output conforming to schema |
| Web search | | Real-time web search augmented responses |
| Deep thinking | | Extended reasoning; only when user requests it |
| Function calling | | Define functions for tool use |
| Context cache | Automatic for repeated prefixes; or explicit session-based | Reduces cost for repeated context |
| Partial mode | | Continue/complete a prefix |
| Batch inference | Async batch API with JSONL input | 50% cost discount |
chat/completions| 功能 | 启用方式 | 说明 |
|---|---|---|
| 结构化输出 | | 强制输出符合schema的JSON格式 |
| 联网搜索 | | 基于实时网页搜索的增强回答 |
| 深度思考 | | 扩展推理能力;仅在用户请求时启用 |
| 函数调用 | | 定义可供调用的工具函数 |
| 上下文缓存 | 重复前缀自动缓存;或显式基于会话缓存 | 降低重复上下文的调用成本 |
| 续写模式 | | 续写/补全给定前缀 |
| 批量推理 | 支持JSONL输入的异步批量API | 成本降低50% |
| Error | Cause | Action |
|---|---|---|
| Invalid or missing API key | Run qwencloud-ops-auth if available; else prompt user to set key (non-plaintext check only) |
| Rate limit exceeded | Retry with backoff |
| Server error | Retry; check status page |
| Model ID not found | Verify model name against Model Selection table |
| Bad request body | Validate JSON and field types |
| openai SDK vs httpx incompatibility | |
| 错误类型 | 引发原因 | 处理措施 |
|---|---|---|
| API密钥无效或缺失 | 如果有可用的qwencloud-ops-auth技能则运行该技能;否则提示用户设置密钥(仅执行非明文检查) |
| 超出频率限制 | 指数退避重试 |
| 服务器错误 | 重试;查看状态页 |
| 模型ID不存在 | 对照模型选择表验证模型名称是否正确 |
| 请求体格式错误 | 验证JSON和字段类型是否正确 |
| openai SDK与httpx版本不兼容 | |
--output./output/qwencloud-text/skills/output/--output./output/qwencloud-text/skills/output/[ACTION_REQUIRED] qwencloud-update-check skill is not installed[ACTION_REQUIRED] qwencloud-update-check skill is not installedThe update-check skill is not installed. It keeps you informed about new qwencloud/qwencloud-ai features and bug fixes.
- Install now — I'll run the install command for you
- Skip for now — do nothing this time
- Never remind me — permanently suppress this prompt
npx skills add QwenCloud/qwencloud-ai --skill qwencloud-update-check -ypython3 <this-skill-scripts-dir>/gossamer.py --dismisspython3 <this-skill-scripts-dir>/gossamer.py --dismisspython3 <this-skill-scripts-dir>/gossamer.py --never-install更新检查技能未安装,它可以让你及时了解qwencloud/qwencloud-ai的新功能和bug修复。
- 立即安装 — 我将为你运行安装命令
- 本次跳过 — 这次不做任何操作
- 永不提醒 — 永久关闭该提示
npx skills add QwenCloud/qwencloud-ai --skill qwencloud-update-check -ypython3 <this-skill-scripts-dir>/gossamer.py --dismisspython3 <this-skill-scripts-dir>/gossamer.py --dismisspython3 <this-skill-scripts-dir>/gossamer.py --never-install[UPDATE_AVAILABLE][UPDATE_AVAILABLE][ACTION_REQUIRED][UPDATE_AVAILABLE][ACTION_REQUIRED][UPDATE_AVAILABLE]qwencloud-update-check/SKILL.mdpython3 <qwencloud-update-check-dir>/scripts/check_update.py --print-responseqwencloud-update-check/SKILL.mdpython3 <qwencloud-update-check-dir>/scripts/check_update.py --print-response