KIDLi1412/dsh-session-cost0

@kidli1412/dsh-session-cost

DSH web plugin: a status bar at the bottom of the conversation showing the estimated API cost of the current session (per-model token pricing, CNY) plus the live DeepSeek account balance queried through the official balance API.

AI 분석

核心用途是实时监控 API 消耗开销与账户余额。适合使用付费 API 且需要控制预算的 DSH 网页端用户,需配置 DeepSeek API Key。

패키지
@kidli1412/dsh-session-cost
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 8. 16.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:KIDLi1412/dsh-session-cost

~/.dsh/settings.yaml 或 profile 插件配置

session-cost: pricing: deepseek-v4-flash: input: 1 cacheRead: 0.02 cacheWrite: 1 output: 2


## 安全

- 两个端点均为 loopback-only 精确路由(peer socket 地址 + Host 双重校验),浏览器同源调用。
- API Key 不落盘:请求时经 credentials 缝解析 `llm-deepseek` 命名空间的 `apiKeyEnv`(默认 `DEEPSEEK_API_KEY`)。
- 余额缓存仅存于内存,2 分钟 TTL。

## License

MIT