Add "service_tier" to JSONL token usage logs

Open 💬 1 comment Opened Apr 30, 2026 by robinebers

What variant of Codex are you using?

CLI/App

What feature would you like to see?

The current JSONL files persist token usage via event_msg / token_count, including input, cached input, output, reasoning output, and total tokens.

Notably missing however is something like service_tier to understand if it was a normal or fast request.

This could be used to accurately estimate token usage and cost.

Minimal useful shape:

{
  "type": "token_count",
  "info": {
    "last_token_usage": { "...": "..." },
    "total_token_usage": { "...": "..." },
    "service_tier": "priority"
  }
}

Even adding service_tier to TurnContextItem or TokenCountEvent would be enough.

The service tier appears to already be logged temporarily in other logs, but they are not stable enough to use.

Additional information

Community tools like ccusage and OpenUsage calculate cost to provide an idea of how incredibly valuable the Codex subscription actually is.

It is however completely inaccurate, due to not knowing if a request was priority or not.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗