8000 fix(quota): reconcile Go plan limits by request count for 0.11.2 by InfinityPacer · Pull Request #47 · InfinityPacer/meterleaf · GitHub
[go: up one dir, main page]

Skip to content

fix(quota): reconcile Go plan limits by request count for 0.11.2 - #47

Merged
InfinityPacer merged 1 commit into
mainfrom
fix/go-plan-limit-requests
Oct 23, 2026
Merged

InfinityPacer merged 1 commit into
mainfrom
fix/go-plan-limit-requests

Conversation

@InfinityPacer
Copy link
Copy Markdown
Owner

问题

0.11.1 判断能否用 OpenCode Go 套餐上限作为预估时按金额核对。没有价格的模型(例如映射到 Go 账户的 Gemini)不计入金额,本周期同时用了 DeepSeek V4.1 Flash 和这类模型时,金额正好对上,页面会把 DeepSeek 的周上限 $40 当成整窗价值。本周期还没有请求时,也会默认显示 DeepSeek 的上限,而实际所用模型未知。

变化

  • 改为按请求次数核对。本周期每一次请求都来自上限表里的模型时才显示套餐上限,否则沿用百分比外推。
  • 本周期没有请求时不再假定模型,沿用原逻辑。
  • 部署指南写明上限表目前只有 DeepSeek V4.1 Flash 以及回退条件。版本 0.11.2,数据库结构未变。

验证

  • bun run typecheck、bun test tests(498 通过,0 失败)。
  • tests/quota-go-plan.test.ts 新增「DeepSeek 加无价格的 Gemini 请求」回退场景,「无请求」改为回退并与不传档位的结果完全一致。

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@InfinityPacer
InfinityPacer merged commit b131483 into main Oct 23, 2026
2 checks passed
@InfinityPacer
InfinityPacer deleted the fix/go-plan-limit-requests branch October 23, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0