Add "service_tier" to JSONL token usage logs
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.
2 Comments
Gentle bump. Would love to see this added. Seems like a minor thing that would drastically improve client analytics.
For downstream cost tools, it would be helpful to record the actual
response.completedservice tier alongside that response’s raw token usage, separately from the requested or configured tier. If the actual tier is missing, consumers would be able to treat it as unknown (rather than infer it from/fast).