feat(pricing): 新增 GPT-6 Sol 和 Luna 内置价格支持 - #37
Merged
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 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.
当前内置价格表缺少
gpt-6-sol和gpt-6-luna,在离线或在线价格缓存尚未包含这两个模型时,对应会话无法估算 API 等价成本。本次补齐内置价格,使这些情况下的会话统计也能按模型计价。价格依据 OpenAI 官方标准价格,核对日期为 2026-09-26,以下单位为美元/百万 token:
gpt-6-solgpt-6-luna同时补齐缓存写入和长上下文价格字段,将内置价格版本更新为
openai-builtin-2026-09-26,沿用现有成本计算逻辑。补充回归测试,覆盖在线价格覆盖、离线与旧缓存回退、带日期后缀的模型名称、大小写和首尾空格处理、未知模型保持未定价,以及旧版成本缓存失效;并验证索引仓库、流式扫描和最近会话的计价一致性。
验证结果
swift test:544 个 core 测试全部通过;217 个 UI 测试中有 1 条失败。swift run CodexRunway --self-check:通过。git diff --check:通过。全量测试中的失败位于
ControlPanelTabBarTests.swift:50,控制面板宽度实际为 552,断言预期为 546。通过swift test --filter ControlPanelTabBarTests可单独复现;相关布局代码和测试本次未修改,且不涉及计价逻辑。