@joyfoxai/dsh-eco-router
Token-efficient model-routing flywheel for the DeepSeek Harness — observes (task → model → result), distills a routing table, and routes each task to the cheapest historically-successful model.
AI Analysis
核心用途是通过智能路由降低 API 费用。适合多模型混合使用、追求极致性价比的用户。注意:目前依赖的内部包尚未发布至 npm。
Install
This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗
README
Read the full README ↗使用方式
1. 前置条件(依赖状态)
⚠️ 本插件依赖的
@deepseek-ai/*包(@deepseek-ai/cordis、@deepseek-ai/schemastery、@deepseek-ai/dsh-agent、@deepseek-ai/dsh-fs、@deepseek-ai/dsh-llm、@deepseek-ai/dsh-settings、@deepseek-ai/dsh-tools,以及客户端dsh-client-runtime/dsh-client-ui-settings/dsh-client-ui-slots/dsh-client-ui-settings-plugins)尚未发布到 npm,它们是 deepseek-harness monorepo 的workspace:内部包。在仓库之外直接npm install会解析失败。
目前要构建,二选一:
- 在 harness monorepo 内构建 —— 把本包放进
packages/(或作为 workspace 引入),让@deepseek-ai/*以 workspace 包形式解析; - 等上游发布 —— 待
@deepseek-ai/*上 npm 后,锁定peerDependencies版本再正常安装。
2. 构建
npm install
npm run build # 宿主半部 → lib/index.js
DSH_BUILD_FACE=client npm run bundle # 浏览器半部 → lib/client.js(需 harness 环境)
3. 挂载(preset 配置)
把本目录复制到你的用户 preset 根目录并挂载,或在自己的组合里加一行:
- id: dsh-eco-router
name: '@joyfoxai/dsh-eco-router'
config:
tiers: [deepseek-v4-flash, deepseek-v4-pro] # 从便宜到贵
autoRoute: false # true → 在 agent/request 直接覆盖
tiers—— 有序模型 id,最便宜在前。eco_route推荐该任务类型下无错误记录的最便宜档位。autoRoute—— 为true时,插件会在agent/request瀑布里直接覆盖所路由的模型(而不只是推荐)。
插件只注入宿主服务(fs、tools、settings、llm),自身不发布任何服务,因此这一行直接平铺即可,无需 isolate 域。
4. 设置界面(运行时配置)
tiers 和 autoRoute 也可在运行时通过 dsh-eco-router 设置命名空间修改(组合的 config 是其 base 层)。浏览器端注册了一张 settings.plugin.item 卡片——位于 设置 → 插件——内含 autoRoute 开关和一个 tiers 多选下拉(数据源来自宿主枚举的模型 llm.listModels)。改动经设置 watch 热生效,无需重启。
3. 挂载(preset 配置)
把本目录复制到你的用户 preset 根目录并挂载,或在自己的组合里加一行:
- id: dsh-eco-router
name: '@joyfoxai/dsh-eco-router'
config:
tiers: [deepseek-v4-flash, deepseek-v4-pro] # 从便宜到贵
autoRoute: false # true → 在 agent/request 直接覆盖
tiers—— 有序模型 id,最便宜在前。eco_route推荐该任务类型下无错误记录的最便宜档位。autoRoute—— 为true时,插件会在agent/request瀑布里直接覆盖所路由的模型(而不只是推荐)。
插件只注入宿主服务(fs、tools、settings、llm),自身不发布任何服务,因此这一行直接平铺即可,无需 isolate 域。
4. 设置界面(运行时配置)
tiers 和 autoRoute 也可在运行时通过 dsh-eco-router 设置命名空间修改(组合的 config 是其 base 层)。浏览器端注册了一张 settings.plugin.item 卡片——位于 设置 → 插件——内含 autoRoute 开关和一个 tiers 多选下拉(数据源来自宿主枚举的模型 llm.listModels)。改动经设置 watch 热生效,无需重启。