KIDLi1412/dsh-session-cost ↗★ 0
@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.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:KIDLi1412/dsh-session-cost说明文档
阅读完整 README ↗~/.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