QvShui/dsh-llm-qwen

QvShui★ 0JavaScriptLast synced: 2026-08-15

Open on GitHub

Qwen (DashScope) LLM 适配器插件

README excerpt

dsh-llm-qwen 让 DeepSeek Harness 使用通义千问(Qwen / DashScope)API 的 LLM 适配器插件,可分发。 在 ctx.llm 上注册 qwen provider 路由,走 DashScope 的 OpenAI 兼容协议( https://dashscope.aliyuncs.com/compatible-mode/v1 ), 与 dsh-llm-deepseek 同一套架构:传输层适配器 + 每请求解析的连接事实/密钥。 插件内不含任何 API key,密钥完全由用户在界面或凭证文件里管理。 能力 - 流式对话( stream options.include usage ,token 用量上报) - Qwen3 思考模式: enable thinking + reasoning effort (off/high/max 三档, 网关还支持 low/medium),思考内容经 delta.reasoning content 流入 harness 的 reasoning 块 - 工具调用( delta.tool calls + finish reason: tool calls ,含多轮工具结果回传) - 图片输入(qwen3-vl 系列:user 内容转 image url data-URL,经 attachments 服务读取) - 错误映射:401/403→ AUTH 、429→ RATE LIMIT 、余额不足→ QUOTA 、 上下文超限→ CONTEXT WINDOW EXCEEDED 、5xx→ SERVER - 流空闲看门狗、LLM 重试策略( llm/stream waterfall 兼容) 安装 1. 把本包( dsh-llm-qwen/ )放进 profile 的 node modules: cp -r dsh-llm-qwen /.dsh/profiles/node modules/ 2. 在 profile 补丁 /.dsh/profiles/web/cordis.patch.yml 里加一行 ( 注意:新增行必须用 insert: 包裹 ;裸 - id: 只能覆盖已存在的行, 目标不存在会被静默丢弃): 3. 重启 dsh web 。重启后 设置→模型 里出现 Qwen (DashScope) 提供商。 密钥:在前端填写,绝不进插件 插件自带前端设置页(client 半边, dsh.client 双端包): - 设置 → Qwen (DashScope) :API Key 输入框 + 已配置/未配置状态,保存即写入 /.dsh/.credentials.yaml 的 DASHSCOPE API KEY (插件默认凭证引用名), 每请求实时读取,改完立即生效,无需重启。 - 也可以手动编辑…

View full README on GitHub →
Tools / Devdsh-plugin

Category