1569126506-sudo/dsh-team-cost ↗★ 0
dsh-team-cost
DeepSeek Harness 团队成本管家:按成员/项目精确计量每次模型调用的 token 用量与费用(含子代理,修复团队场景下用量少算),内置 DeepSeek 2026-09 价格表、成员日/月预算、阈值告警与 Webhook 通知、可选超支拦截、成本报表工具与 CSV 导出。Team cost captain for DeepSeek Harness: per-member, per-project token & cost metering of every model call (subagents included), with a built-in DeepSeek 2026-09 price catalog, member budgets, threshold alerts via webhook, optional over-budget enforcement, and a cost report tool with CSV export.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:1569126506-sudo/dsh-team-cost说明文档
阅读完整 README ↗配置
插件配置(cordis 设置页 / patch):
| 键 | 默认 | 说明 |
|---|---|---|
dataDir | ~/.dsh/.dsh-team-cost | 数据目录(JSONL 账本、rollups、members.json、导出文件) |
enabled | true | 总开关 |
currency | CNY | 内置价目表币种:CNY / USD |
deepseekPeakPricing | false | DeepSeek 使用峰价而非谷价 |
enforce | off | off / total / members,见上文 |
totalDailyCost | 0 | 团队日预算(enforce: total 时生效) |
alertThresholds | ["80","100"] | 告警阈值(百分比) |
alertWebhook | 空 | 告警 Webhook POST 地址 |
attributionRules | [] | 成员归因规则 "成员=工作空间路径前缀" |
defaultMember | unassigned | 未匹配会话的归属成员 |
flushIntervalSec | 15 | 聚合落盘间隔 |
成员预算示例(~/.dsh/.dsh-team-cost/members.json):
{
"members": [
{ "name": "alice", "dailyCost": 20, "monthlyCost": 400 },
{ "name": "bob", "dailyCost": 20, "dailyTokens": 50000000 }
]
}
价格覆盖示例(price-overrides.json,单位:每百万 token):
{ "kimi-k3": { "cr": 0.5, "in": 4, "out": 16 } }