Yvesgao/dsh-cost-estimate ↗★ 1
dsh-cost-estimate
DSH plugin: before answering a large question, show an estimate of tokens and DeepSeek API cost as an inline row in the Web chat stream, then update it with the actual usage after the answer.
AI 分析
核心用途是提供消费透明度与心理预期。适合频繁进行长文本提问、需要实时监控单次对话 API 费用的用户。支持在配置文件中自定义显示阈值和默认模型参数。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Yvesgao/dsh-cost-estimateドキュメント
README 全文を読む ↗配置
cordis.patch.yml 中 config 支持以下键:
| 键 | 默认值 | 说明 |
|---|---|---|
minInputTokens | 8000 | 预估输入超过该 token 数才显示 |
minCostCny | 0.01 | 或预估费用上限超过该元数才显示 |
defaultModel | deepseek-v4-flash | 首次 usage 锚定前的模型回退值 |
headerTokensEstimate | 6000 | 首次 usage 锚定前,系统提示词 + 工具 schema 的启发式 token 数 |
defaultCacheHitRatio | 0.5 | 首次 usage 锚定前假定的缓存命中率 |
示例:
- id: cost-estimate
name: dsh-cost-estimate
config:
minInputTokens: 20000
minCostCny: 0.05