Repository navigation
fix(channels): support configurable Ultra Fast pricing - #8914
Merged
Wei-Shaw merged 1 commit intoNov 18, 2026
Merged
Conversation
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.
Fixes #8907
渠道定价目前只有 Fast/Flex 倍率,Ultra Fast 始终使用模型默认倍率。增加可选的
ultrafast_multiplier:例如将gpt-6-astra配成 3 倍后,Ultra Fast 使用渠道的 3 倍售价;留空或清空后继续使用模型默认倍率。配置覆盖管理表单、API 和数据库读写,并在旧计费路径及统一计费入口中生效。显式渠道值独立保留,避免统一入口再次应用模型策略时将它重置。区间价格继承该倍率,Fast/Flex 各自独立。迁移新增 nullable 列及正数约束,不回填既有价卡。
验证环境为 macOS arm64、Go 1.27.4、Node 24.22.3 / pnpm 9.15.9:
make -C backend test-unit与make -C backend test-integration通过;integration 使用真实 Docker PostgreSQL 18.1 / Redis 8.4。远端 CI 回读(2026-11-17):7 项检查通过,CLA lock 跳过,后端
test在单元测试阶段失败:TestInflightEstimate_AccountMappingNoDBAndBoundedMemory的堆增量为 8,411,424 bytes,超过原 8,388,608 bytes 阈值;本 PR 尚未获得全绿 CI。该测试文件与上述 main 完全一致,已有 #7823 / #8598 处理同一测试夹具缺少共享倍率解析器的问题。本 PR 保持功能改动独立,保留真实失败,不叠加重复测试修复或通过反复重跑掩盖它。本改动由自主 AI coding agent 实现、审查和执行上述验证,尚无人工审查;未调用真实 provider 或生产账号。