Repository navigation
feat: 按订阅档位收窄模型目录(0.2.38) - #3
Merged
Merged
Conversation
平台把同一个模型的 basic / pro / ultra 三个额度池都列出来,basic 账号拿到 pro / ultra 那几条,选了就是 403 —— 这正是用户说的「怎么这么多」。 - credits.mjs 新增 resolveTier():先看 /users/subscription 的 plan, 拿不到再用钱包的 daily_token_limit 反推(10M/100M/300M),都不中就 undefined - catalog.mjs 新增 filterByTier():无前缀(积分)与 basic 池谁都能用, pro 要 pro 及以上,ultra 只有 ultra;档位未知 / 收窄后为空都原样返回 - warmCatalog / refreshCatalog / SSO 导入全部带上 tier - 实测:国际站 basic 账号 4 条 -> 2 条;国内站 21 条 -> 13 条 - 测试:filterByTier 四档 + 未知档位 + 空结果兜底
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.
承接 #2 的后续:光去掉内置快照还不够 —— 平台目录本身就把同一个模型的 basic / pro / ultra 三个额度池各列一条。
问题
国际站账号档位是 basic( →
basic,日额度 10M),但平台在这份清单里也给了monkeycode-pro/glm-5.2和monkeycode-pro/deepseek-flash—— 选了就是 403。国内站同理:21 条里 6 pro + 2 ultra。改法
credits.mjs新增resolveTier():先看/api/v1/users/subscription的plan;拿不到就用钱包的daily_token_limit反推(10M = basic / 100M = pro / 300M = ultra);都不中返回undefinedcatalog.mjs新增filterByTier():无前缀(按积分计费)与monkeycode-basic/谁都能用;monkeycode-pro/要 pro 及以上;monkeycode-ultra/只有 ultrawarmCatalog/refreshCatalog/ SSO 导入 全部带上tier实测(真实账号)
验证