fix(usage): correct replay and pricing accounting - #1437
Conversation
Fast pricing previously doubled usage whenever a model lacked a known multiplier, which turned missing rate data into an unsupported estimate. Apply only explicit multipliers, keep unknown rates at standard pricing, refresh the report snapshot, and remove the obsolete timing-inference scratch plan.
A global package-file rule can classify Rust golden snapshots as binary, hiding reviewable output changes. Override that classification only under snapshot directories while leaving actual package archives binary.
The unsuffixed family alias matched the longest sibling key and selected the balanced tier rather than the documented flagship tier. Preserve exact user overrides, resolve canonical aliases before fuzzy fallback, and apply the same mapping to context limits and request-tier thresholds. Partial overrides now inherit unspecified canonical rates.
|
This PR was auto-closed. Only contributors approved with Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply. If a maintainer replies See CONTRIBUTING.md. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughUpdated pricing alias resolution, Codex fast-pricing fallback behavior, related documentation and tests, snapshot attributes, and removed the Codex speed inference plan. ChangesCodex pricing behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches🧪 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
Correct usage reports that can count inherited child-session history more than once, and fix several pricing paths involving speed tiers, default family aliases, and partial overrides.
Current child-session rollouts now establish an inherited baseline before counting the child's advancing usage. Unknown speed-tier rates retain standard pricing, while known aliases resolve to their documented default entries before fuzzy matching.
What Changed
Notes
Testing
nix --extra-experimental-features 'nix-command flakes' develop -c cargo test --manifest-path rust/Cargo.toml --workspace adapter::codexnix --extra-experimental-features 'nix-command flakes' develop -c just testnix --extra-experimental-features 'nix-command flakes' develop -c just typechecknix --extra-experimental-features 'nix-command flakes' flake checkgit diff --cached --checkRelated: #1434, #1436