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.

包名
@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