Repository navigation
feat(collector): keep Paseo quota fresh and use OpenCode Go plan limits for 0.11.1 - #46
Merged
Merged
Conversation
…ch wrapper Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
变化
scripts/paseo-claude-quota.sh,作为 Paseo 的 Claude 启动命令。它把参数和输入原样交给 Claude Code,从输出流的rate_limit_event里抄下 5 小时与 7 天额度写进状态栏额度缓存,不读凭据、不发额外请求。设置了ANTHROPIC_BASE_URL、Bedrock 或 Vertex 的会话直接放行。采集器本身不变。modelAccounts可设"plan": "go"或"go-plus",徽标显示 Go 或 Go Plus。设了档位后,周窗口和月窗口的预估直接用公布的模型上限(按本周期各模型花费比例折算),方法标为plan-limit。本周期有上限表外模型的花费或未设档位时沿用原外推逻辑。验证
bun run typecheck、bun test tests(497 通过,0 失败)、bun run build通过。ANTHROPIC_BASE_URL时不写额度。通过 Paseo 启动的 Haiku 代理经过脚本后写出five_hour 2 / seven_day 82,采集器能正常解析。tests/quota-go-plan.test.ts覆盖 Go 周窗口 $0.44/1% 得 $40、Go Plus 月窗口 $160、零花费、表外模型回退、未知平台或档位、过期窗口。🤖 Generated with Claude Code