Repository navigation
fix(usage): read Fable weekly quotas from scoped limits - #8644
Merged
Wei-Shaw merged 1 commit intoNov 16, 2026
Merged
Conversation
riofutab
added a commit
to riofutab/sub2api
that referenced
this pull request
Nov 10, 2026
- Claude OAuth 用量接口新版 limits[] 中 weekly_scoped 的 Fable 条目映射到 seven_day_fable - 只取没有 surface 限定的条目,保留显式 0% 与原时间格式 - 旧字段 seven_day_overage_included 仍然优先,都缺失时继续用被动采样回填 service 与 repository 相关单测通过,去掉实现时新增测试失败。
riofutab
added a commit
to riofutab/sub2api
that referenced
this pull request
Nov 10, 2026
- 带入上游 Wei-Shaw#8639 Fable 5.2 与 Mythos 5.2 支持,按 fork 的 5.5 校验结构适配 - 带入上游 Wei-Shaw#8644 从用量接口 limits[] 读取 Fable 周额度 - 带入上游 Wei-Shaw#8634 内置价格目录的 5.2 价卡 - Claude Code 内置版本基线升到 2.1.321 全量 unit、golangci-lint、前端检查通过。
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Claude OAuth 主动额度查询目前忽略 #8641 中的新版
limits[],导致 Fable 周额度缺失,或回填为旧的被动采样。合成 HTTP 对照中,上游返回的 5.25% 和显式 0% 都被旧的 87% 覆盖。将
group=weekly、kind=weekly_scoped、scope.model.display_name=Fable且无 surface 限定的条目映射到现有seven_day_fable。保留百分比原单位、显式零值及时间精度/时区;旧版seven_day_overage_included继续优先,无可用主动窗口时继续被动回填。其他模型、限定 surface 或不完整条目不会制造 Fable 窗口。本 PR 处理 #8641 的独立
limits[]兼容问题;五小时重置清空周额度的主要问题由 #7990 独立跟进。验证(Go 1.27.3,macOS arm64):
go test -json -tags=unit ./...:25,931 项通过、41 项条件跳过,无失败。go test -json -tags=integration ./...:15,684 项通过、16 项条件跳过,无失败。golangci-lint run --timeout=30m(CI 固定 v2.14.0):0 issues;git diff --check通过。以上使用合成 HTTP/JSON,未调用真实 Anthropic/provider,也未验证用户部署。
AI 披露:由 AI agent 自主编写和验证,未经人工 review。