feat(codex): account for fast mode pricing - #996
Conversation
Add a Codex speed option that defaults to reading CODEX_HOME config.toml and treats service_tier priority or legacy fast as fast mode. This lets reports estimate costs correctly even though Codex token_count logs do not include the active service tier. Thread the resolved speed into Codex pricing, using model-specific LiteLLM fast multipliers when present and a Codex 2x fallback when pricing data has not caught up. Document the auto, fast, and standard options in the package README and Codex guides.
ccusage performance comparisonThis compares the PR build against the base branch build on the same CI runner. Committed fixture performanceCommitted small fixture for stable PR-to-PR feedback and output-shape regressions. Fixture:
Large real-world-shaped fixture performanceGenerated fixture around 1 GiB shaped from aggregate local Claude-log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixture. Fixture:
Package size
Lower medians and smaller packed package sizes are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
📝 WalkthroughWalkthroughThis PR introduces a configurable speed-based pricing feature to the Codex CLI. Users can now pass ChangesSpeed-based pricing for Codex CLI
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary:
Testing:
Summary by CodeRabbit
New Features
--speedCLI option (auto|standard|fast) to daily, monthly, and session commands for pricing tier control--speed autois usedDocumentation
--speedoption details and behavior