@ljcscp/dsh-session-cost
在Web界面显示DeepSeek账户余额与会话费用,含官方定价与分模型计费。 适合关心API余额与单次会话花费的DSH Web用户,默认零配置即可使用。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ljcscp/dsh-session-cost说明文档
阅读完整 README ↗Configuration
Zero-config by default. Optional composition settings:
- insert:
- id: session-cost
name: '@ljcscp/dsh-session-cost'
config:
refreshMs: 60000 # balance cache lifetime (ms)
pricingRefreshHours: 6 # official-pricing page refresh cadence
apiKeyEnv: DEEPSEEK_API_KEY
baseURL: https://api.deepseek.com
| Key | Type | Default | Meaning |
|---|---|---|---|
refreshMs | number | 60000 | Balance cache lifetime in ms (failures retry after 10s) |
pricingRefreshHours | number | 6 | Hours between official-pricing page refreshes |
apiKeyEnv | string | DEEPSEEK_API_KEY | Credential ref storing the DeepSeek API key |
baseURL | string | https://api.deepseek.com | Endpoint base; /user/balance is appended |
trustedHosts | string[] | [] | Non-loopback authorities served beyond the trust fence |