Skip to content

Add Codex Reconciled Token Usage script - #66

Open
QingJunXue wants to merge 1 commit into
BigPizzaV3:mainfrom
QingJunXue:feature/reconciled-token-usage
Open

Add Codex Reconciled Token Usage script#66
QingJunXue wants to merge 1 commit into
BigPizzaV3:mainfrom
QingJunXue:feature/reconciled-token-usage

Conversation

@QingJunXue

Copy link
Copy Markdown

Summary

  • publish Codex Reconciled Token Usage version 1.0.0 by QingJunXue
  • combine MessagePort real-time accounting with startup rollout rebuilding and 60-second incremental reconciliation
  • account for subagent usage and proxy request statuses without reading relay CSV or provider billing APIs
  • use empty default prices, multiplier 1, and no built-in price source, model alias, or long-context threshold
  • preserve request-level short/long context buckets
  • migrate legacy local state once and avoid focus/visibility-triggered disk scans
  • replace matching live/rollout records with richer proxy Usage instead of double counting

Requires the /token-usage/events bridge from: BigPizzaV3/CodexPlusPlus#1688

Verification

  • node --check scripts/codex-reconciled-token-usage.js
  • 9/9 Node tests passed
  • index.json parses successfully
  • script SHA-256 matches the market entry:

c5b6dedcfbc1212b45075e9bad899486cc84014aa94d12ea75ff0a03a3cddd43

Publish the 1.0.0 companion script for the Codex++ token usage bridge with empty local pricing defaults, request-level context tiers, one-to-one MessagePort/rollout/proxy reconciliation, and regression tests.
@BigPizzaV3

BigPizzaV3 commented Aug 17, 2026

Copy link
Copy Markdown
Owner

该脚本依赖 CodexPlusPlus 的 /token-usage/events bridge,但上游 PR BigPizzaV3/CodexPlusPlus#1688 目前仍是 Open 状态,因此市场脚本暂时无法独立工作。

请等待依赖合入后 rebase 到最新 main,再使用包含该 bridge 的实际 Codex++ 构建完成联调和回归测试。依赖未落地前暂不合并。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants