deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:MoRanYue/dsh-openrouter-providers
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DeepSeek Harness 插件:在设置页填写 OpenRouter 请求使用的提供商列表,并把列表作为 provider.only / provider.order 路由参数注入到所有 OpenRouter 模型请求中。设置持久化到工作区状态文件,重启后自动恢复。
provider: { only: [...], allow_fallbacks: false }provider: { order: [...], allow_fallbacks: true }<workspaceRoot>/.dsh-plugins/openrouter-providers.jsonllm/stream waterfall——当请求的 provider 路由为 openrouter 且列表非空时,把请求重路由到插件自研的 chat-completions adapter,由它构造请求体注入 provider 字段;reasoning.effort(off/low/medium/high/max,均为 OpenRouter 合法值)按契约透传。会话日志与 UI 仍显示 openrouter。OPENROUTER_API_KEY(通过 credentials 服务解析,与 llm-pi-ai 的 apiKeyEnv 一致)。插件以 bundle 包形式挂载,与其他插件(dshmarket、dsh-recall-plugin 等)一致,通过 cordis.patch.yml 的 insert 行自动合并进 profile composition。
在 profile 目录(如 ~/.dsh/profiles/web/)执行:
pnpm add dsh-openrouter-providers@latest
然后把包加入 profile 的 package.json 的 dsh.profile.bundles 列表:
"dsh": { "profile": { "bundles": [ ..., "dsh-openrouter-providers" ] } }
再重启 dsh web。bundle 协调器自动合并包内的 cordis.patch.yml(insert 行:id: openrouter-providers)。
pnpm add dsh-openrouter-providers@github:MoRanYue/dsh-openrouter-providers
其余步骤与方式 A 相同(加入 dsh.profile.bundles 并重启)。
pnpm add dsh-openrouter-providers@file:D:\\path\\to\\dsh-openrouter-providers
# 然后同样把包名加入 dsh.profile.bundles 并重启
在 ~/.dsh/profiles/web/cordis.patch.yml 中追加:
- insert:
- id: openrouter-providers
name: 'dsh-openrouter-providers'
并在 profile 的 package.json 中把包加入 dependencies 与 dsh.profile.bundles,然后 pnpm install 并重启。
openrouter(模型选择器中选中 OpenRouter 下的模型)。DeepInfra、Together),选择路由模式,保存。提供商 slug 格式参见 OpenRouter Provider Routing 文档(
order/only字段)。
fetch 内置,adapter 通过 subprocess 服务派生 node -e 子进程执行 HTTP + SSE 流式解析(文本/推理/工具调用增量、usage、[DONE]、错误分类 AUTH/RATE_LIMIT/INVALID_REQUEST/SERVER 等)。fs 服务写入 <workspaceRoot>/.dsh-plugins/openrouter-providers.json(自动建目录),启动时加载;写入显式使用 workspace-write 沙箱策略。GET/POST /api/openrouter-providers/state 读写状态(Host 端经 webServer 注册)。UNSUPPORTED_CONTENT)。only 模式下 allow_fallbacks=false:列表中的提供商全部不可用时请求失败(OpenRouter 行为)。MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。