Repository navigation
Releases
Releases · lazybot114514/dsh-token-budget
dsh-token-budget v0.2.0
中文
给每次 AI 对话装一根 Token 保险丝。
v0.2.0 将插件重新设计为“单次对话总 Token 预算”:
- 每条用户消息拥有一份独立预算
- 统一计算输入、缓存、思考和最终回答
- 预算不足时停止继续请求或收紧回答长度
- 下一条用户消息自动重置预算
- 删除旧版
metric和scope多模式配置 - 新增已用量、剩余额度和百分比显示
- 保留蓝鲸预算滑杆
注意:请求发送前的输入量由 Harness Token Meter 估算,因此这是保守预算控制,不是供应商账单层面的绝对硬上限。
English
A token safety fuse for every AI conversation.
v0.2.0 redesigns the plugin around one per-conversation total Token budget:
- One independent budget for each user message
- Counts input, cache, reasoning, and final answer
- Stops further requests or reduces answer length when the budget runs low
- Automatically resets on the next user message
- Removes the previous
metricandscopemodes - Adds used, remaining, and percentage indicators
- Keeps the whale budget slider
Input is estimated before a request using the Harness Token Meter, so this is a conservative budget guard rather than an absolute provider billing limit.