You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every row of ccusage hermes daily shows $0.00 even though token counts are clearly non‑zero. In my case ccusage sums to 10.2M input / 790K output / 267M cache‑read tokens (model gpt-5.5) but the cost column is $0 for every day.
Tracing it down: ccusage reads estimated_cost_usd / actual_cost_usd from Hermes' state.db. When Hermes is pointed at a subscription endpoint (in my config: provider: openai-codex → base_url: https://chatgpt.com/backend-api/codex), Hermes intentionally writes estimated_cost_usd = 0.0, actual_cost_usd = NULL, billing_mode = subscription_included, because those tokens are covered by the user's ChatGPT Plus/Pro subscription rather than metered.
calculate_hermes_cost in rust/crates/ccusage/src/adapter/hermes.rs short-circuits on Some(cost) regardless of whether the recorded cost is zero, so it returns 0.0 and never falls through to pricing-based calculation. The codex adapter doesn't have this short‑circuit and prices the same gpt-5.5 model correctly — ccusage codex daily shows a real dollar amount for the same model on my machine, while ccusage hermes daily shows $0.00.
Steps to reproduce
Run Hermes against the ChatGPT subscription endpoint (provider: openai-codex, base_url: https://chatgpt.com/backend-api/codex) so it writes estimated_cost_usd = 0.0 with billing_mode = subscription_included into ~/.hermes/state.db.
Accumulate non‑zero token usage on a model that exists in ccusage's pricing table, e.g. gpt-5.5.
ccusage hermes daily --offline. Every row shows $0.00.
Compare with ccusage codex daily for the same gpt-5.5 model — it shows a real cost.
Expected behavior
If a Hermes session's recorded cost is zero but it has non‑zero token usage, ccusage should fall back to pricing‑based calculation (the same path the codex adapter uses), so the user still sees a meaningful cost number. A recorded positive cost should still be trusted as is.
Version
20.0.1
I have a fix ready (very small change to calculate_hermes_cost + two regression tests; full crate cargo test passes 219/219). Happy to open the PR once approved.
This issue was auto-closed. Issues from new contributors are auto-closed by default.
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.
Keep the issue short, concrete, and written in your own voice.
If a maintainer replies lgtmi, your future issues will stay open. If a maintainer replies lgtm, your future issues and PRs will stay open.
Historical audit: this discussion was auto-closed by the legacy contributor gate. That closure did not assess technical importance.
Audit result: resolved. A later merged change or the current main implementation covers this request. This item is kept for history and does not need to be reopened.
Activity
github-actions commentedon May 21, 2026
This issue was auto-closed. Issues from new contributors are auto-closed by default.
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.
Keep the issue short, concrete, and written in your own voice.
If a maintainer replies
lgtmi, your future issues will stay open. If a maintainer replieslgtm, your future issues and PRs will stay open.See CONTRIBUTING.md.
fix(hermes): price subscription-included sessions (#1113)
ryoppippi commentedon Aug 31, 2026
Historical audit: this discussion was auto-closed by the legacy contributor gate. That closure did not assess technical importance.
Audit result: resolved. A later merged change or the current
mainimplementation covers this request. This item is kept for history and does not need to be reopened.