Skip to content

codex-usage v2.4.0

Choose a tag to compare

@github-actions github-actions released this 07 Sep 15:44
· 15 commits to main since this release
aed1b7e

codex-usage v2.4.0

新增 Fast 模式用量统计与费用折算。

  • 按 turn 区分常规、Fast 和模式未确认的用量。常规为主要指标;未确认部分明确标注并暂归常规,Fast 原始 token 不乘倍率。
  • 从 JSONL 明确字段或同一 Codex Home 的诊断记录精确关联模式,后台补齐仍有证据的历史。v2.3.7 升级采用增量迁移,不重建原始 token 账目。
  • 概览、小时/每日趋势、模型与任务明细支持模式拆分,筛选统一作用于统计、费用及 JSON/CSV 导出。
  • 新增“API 等价成本(含 Fast 折算)”:在 Standard API 基础估算上,Astra、GPT-5.6 Sol/Terra/Luna、GPT-5.5 的 Fast 用量按 2.5 倍折算,GPT-5.4 按 2 倍折算。未知单价或倍率保留为未定价。
  • 费用详情保留常规、Fast、Standard 基础费用及新增折算金额。旧费用 API 调用默认保持 Standard 基础估算;新界面显式请求 Fast 折算口径。
  • 同步中英文、浅深色主题、窄屏布局和合成演示数据。

历史模式覆盖率取决于仍保留的本地证据。统计表示 turn 请求选择的模式;费用折算不代表实际 API 账单或账号额度扣除。倍率规则核对于 2026-09-07。

验证:Go 测试、go vet、18 项 Playwright 测试通过;独立数据库副本的历史补齐保持原始账目哈希一致。


Fast mode usage accounting and cost adjustment are now available.

  • Classify usage by turn as standard, Fast, or unconfirmed. Regular tokens remain the primary metric and include clearly labeled unconfirmed usage. Raw Fast tokens are never multiplied.
  • Backfill retained historical evidence using explicit JSONL fields or exact session/turn matches in read-only diagnostics from the same Codex Home. Upgrading from v2.3.7 uses an additive migration without rebuilding the token ledger.
  • Split overview, hourly/daily trends, model and session details by mode. Mode filters apply to statistics, costs, and JSON/CSV exports.
  • Add API-equivalent cost with Fast adjustment: Standard base estimates use a 2.5x ChatGPT Codex credit factor for Astra, GPT-5.6 Sol/Terra/Luna, and GPT-5.5, or 2x for GPT-5.4. Missing rates or factors remain unpriced.
  • Retain regular/Fast totals, Standard base estimates, and the Fast surcharge. Existing cost API calls default to Standard estimates; the Dashboard explicitly requests the new basis.
  • Update English/Chinese text, light/dark themes, narrow layouts, and synthetic demo data.

Historical coverage depends on retained local evidence. Modes describe the turn's requested setting; adjusted estimates are neither actual API bills nor account credit deductions. Factor rules were verified on 2026-09-07.

Validation: Go tests, go vet, and 18 Playwright tests passed. Backfill on an isolated database copy preserved the original ledger hash.