SuperAPI AI 工具集

qwen-runner

智能体与模型

查看项目

更新于 10-16 02:09

技能介绍

Qwen Runner 用于以 Qwen 席位执行提示词,底层通过共享的 pi-runner 实现,并经由 OpenRouter 提供服务。它取代了此前基于 Cline 的兼容层:每次调用都会固定 --provider openrouter --model qwen/qwen3.8-2.4t-a95b,因此该席位不再依赖 Cline 可变状态所指向的提供商,回答的模型始终是被转发的 Qwen 模型。

默认模型

qwen/qwen3.8-2.4t-a95b,即 Qwen3.8 27B(OpenRouter 目录中为 256K token 上下文;属于 Qwen3.8 Max 系列的稠密开放权重 VLM,1M 旗舰版是单独的 qwen/qwen3.8-max id)。每次运行都固定为 --provider openrouter --model qwen/qwen3.8-2.4t-a95b。可通过 --model 覆盖,将 Qwen 席位指向其他 OpenRouter 模型 id。

前置条件

需要安装 pi CLI 并位于 PATH 中(npm install -g @mariozechner/pi-coding-agent);需要在环境中设置 OPENROUTER_API_KEY,或在 Pi 的认证存储中配置 OpenRouter 凭据。

安全模型

该技能委托给 pi-runner,因此具有与 Pi 包装器相同的执行和数据共享模型,详见 ../pi-runner/SKILL.md。运行是封闭的(不发现扩展、技能或 AGENTS.md/CLAUDE.md)。分析类角色(除 implementer 外的所有角色)默认处于只读模式(仅启用 Pi 的文件读取工具)。传入 --allow-write 可选择退出只读,或传入 --no-tools 完全阻止工具。

共享包装器参考

支持的选项、角色、--json 输出信封键契约、返回码和注意事项与共享包装器相同,详见 shared/references/runner-common.md 中的共享标志、信封键、返回码和席位保真规则。信封由 pi-runner/scripts/run_pi.py 生成,其中 runner=qwen、effective_runner=pi、effective_provider=qwen(从 qwen/... 模型 id 推断);native_provider=openrouter 是服务网关。

使用方式

python3 .agents/skills/qwen-runner/scripts/run_qwen.py "your prompt here"

路径使用已安装的 .agents/skills/ 布局。在此源仓库中,调用 qwen-runner/scripts/run_qwen.py。

示例

python3 .agents/skills/qwen-runner/scripts/run_qwen.py "Explain the core module architecture" python3 .agents/skills/qwen-runner/scripts/run_qwen.py --prompt-file /tmp/review.md --role codereviewer python3 .agents/skills/qwen-runner/scripts/run_qwen.py "Read-only analysis" --restrict-tools --json python3 .agents/skills/qwen-runner/scripts/run_qwen.py "Apply the accepted fix" --role implementer python3 .agents/skills/qwen-runner/scripts/run_qwen.py "Answer from the brief only" --no-tools --json

行为

委托给共享的 pi-runner 实现,runner 身份设为 qwen(信封报告 runner=qwen、effective_runner=pi)。每次调用都固定 --provider openrouter --model qwen/qwen3.8-2.4t-a95b,因此实际回答的是 Qwen 席位,不存在可将其静默改道的可变提供商状态。绝不回退到其他提供商:缺少 CLI 会明确阻止席位(status: seat_unavailable,return_code -2);缺少凭据则报告 status: auth_missing 与 auth_ok: false。这就是席位保真,即每个 runner 都遵守的不变量:绝不用其他模型的回答替代 Qwen 席位。保留共享包装器信封,以便委员会能够一致地比较 Qwen 输出与其他 runner。

迁移说明

该技能不再使用基于 Cline 的兼容层,现在仅依赖 pi 和 OPENROUTER_API_KEY。此前复用该包装器基于 Cline 的 main() 的 Gemma 和 Minimax,现在直接委托给 cline-runner,不受影响。如果其他工具仍直接调用 cline,也不受此更改影响。

适用场景与限制

适用于需要通过 OpenRouter 以固定 Qwen 模型执行提示词、并希望与其他 runner 输出进行一致比较的场景,例如代码审查、只读分析或实现任务。限制包括:需要 pi CLI 与 OpenRouter 凭据;缺少 CLI 或凭据时不会回退到其他模型;分析角色默认只读,写入需显式开启;运行封闭,不发现扩展、技能或 AGENTS.md/CLAUDE.md。