cctrack 0.7.0__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
 
5
5
  ## Project Overview
6
6
 
7
- cctrack-py is a zero-dependency Python CLI that scans Claude Code JSONL log files and reports token usage and estimated cost. It's a Python port of the Go-based [cctrack dashboard](https://github.com/ksred/cctrack), stripped down to a single command that parses logs and prints a cost report.
7
+ cctrack-py is a zero-dependency Python CLI that scans Claude Code and Codex CLI log files and reports token usage and estimated cost. It's a Python port of the Go-based [cctrack dashboard](https://github.com/ksred/cctrack), stripped down to a single command that parses logs and prints a cost report.
8
8
 
9
9
  ## Commands
10
10
 
@@ -31,9 +31,10 @@ uv build
31
31
 
32
32
  This is a single-module CLI tool. All logic lives in `src/cctrack/__init__.py`:
33
33
 
34
- 1. **Rate card** (`RATES`, `get_rates`, `calculate_cost`, `is_known_model`) - Model-to-price mapping using prefix matching. Order matters: longer/more-specific prefixes must come first (the legacy `claude-opus-4` 15/75 entry must stay below every `claude-opus-4-x`). Unknown models fall back to Sonnet rates and are flagged with `?` in the report. `get_rates`/`calculate_cost` take the usage date so time-limited `intro` pricing (e.g. Sonnet 5 through 2026-08-31) applies to past usage correctly.
34
+ 1. **Rate card** (`RATES`, `_an`/`_oa` row builders, `_family_matches`, `get_rates`, `calculate_cost`, `is_known_model`) - Anthropic and OpenAI prices. **Every model version needs its own row**: `_family_matches` lets a row absorb only the exact id, dated snapshots (`-20250514`, `-2025-08-07`) and non-version suffixes (`-codex`) — never a short-number minor version (`claude-opus-5` does NOT match `claude-opus-5-5`) or a size-tier word (`mini`, `nano`, `pro`, `max`, `luna`, `terra`, `sol`, `astra`). This is deliberate: prefix inheritance silently mispriced opus-4-8 (3×) and opus-5-5 (84%) before. Unknown models are flagged `?` and fall back to Sonnet (Claude) or GPT-5 (OpenAI) rates. `get_rates` takes the usage date (time-limited `intro` pricing) and the request's prompt size (`long_context` tiers: Haiku 5.5 >100K, several OpenAI models >272K). Re-verify against the official pricing pages when adding rows; don't infer a price from a neighbouring model.
35
35
  1a. **Energy model** (`ENERGY_WH_PER_MTOK`, `estimate_energy_wh`) - Opt-in (`--energy`) order-of-magnitude estimate keyed off each rate entry's `tier`. Deliberately NOT a function of price: both cache-write TTLs use one figure because a 1h write costs more money but the same compute.
36
36
  2. **File discovery** (`default_dirs`, `discover_files`) - Walks `~/.claude/projects/` and `~/.sandy/sandboxes/` for `.jsonl` files.
37
+ 2a. **Codex** (`discover_codex_files`, `parse_codex_lines`, `parse_codex_events`, `fetch_remote_codex`) - Reads `$CODEX_HOME` (default `~/.codex`) `sessions/` + `archived_sessions/` rollouts, incl. `.jsonl.zst` (stdlib `compression.zstd` on 3.14+, else the `zstd` CLI, else skipped and counted). Lines are `{timestamp, type, payload}`. Prefer `token_usage_record` items (per-response, dedup by `response_id` — forks replay parent history); fall back to legacy `event_msg`/`token_count` only before a file's first record, counting `last_token_usage` only when `total_token_usage.total_tokens` moved (it's re-emitted unchanged). **`input_tokens` includes `cached_input_tokens` and `cache_write_input_tokens`; `output_tokens` includes reasoning** — uncached input = input − cached − cache_write. Model/cwd from the latest `turn_context`; thread id + git branch from `session_meta`. Codex events carry `agent="codex"`.
37
38
  3. **Remote aggregation** (`fetch_remote_jsonl`, `parse_remote_events`, `fetch_remote_hook_data`, `parse_remote_hook_data`) - SSHs to hosts, cats all JSONL logs plus statusline hook data (statusline files, monthly summaries, session baselines) with file separators, parses locally.
38
39
  3a. **Hook parsing** (`parse_hook_rows`, `compute_hook_deltas`) - The hook gives **cost only**. Its `input_tokens`/`output_tokens`/`cache_*` fields are context-window SNAPSHOTS (`input_tokens` ≈ `cache_read + cache_write`; `output_tokens` is just the last message's), not cumulative — never use them for token counts. `cost_usd` is a session-lifetime cumulative that is unreliable in two ways handled by `compute_hook_deltas`: (1) it can already be large the first time a session is observed (a long-running/unattended session that only rendered its statusline partway through), so the **first observation is a baseline that is NOT counted** — booking a session's pre-existing cumulative onto its first-seen day is what produced a bogus $3,370 day; (2) it **drops** on resume/compaction (or when parallel processes share one session id), so a drop **rebaselines without counting the new level** — otherwise a day's booked spend can exceed the counter's own peak, which is impossible for real money. Net rule: **book only observed upward increments**; a rolled-up baseline seeds `prev` so already-counted days aren't recounted.
39
40
  4. **JSONL parsing** (`parse_lines`, `parse_events`, `dedup_events`) - Extracts `assistant` events with token usage. Deduplicates by `requestId` across all of a host's files (last event wins) — resumed sessions (`--resume`/`--continue`) repeat events with the same `requestId` in new files. Events without `requestId` are never deduped.
@@ -49,6 +50,8 @@ Entry point: `cctrack:main` (registered in `pyproject.toml` as a console script)
49
50
  - Deduplication is global per host by `requestId` (last wins) - resumed sessions replay history into new files and must not double count. Cross-host `requestId` collisions can't occur (distinct API calls).
50
51
  - Hook data is authoritative for **cost only**; every token count comes from the JSONL logs. Never mix the two in one figure - the hook's token fields are snapshots and would double count against JSONL cache columns.
51
52
  - Never let one machine's hook coverage suppress another machine's JSONL cost - compose per source.
53
+ - Each coding agent is its own source. Codex sources are `exact`: priced straight from their logs, never replaced by the Claude hook and never scaled by the (Claude-derived) accuracy factor. In `--explore`, hook comparisons use only the Claude slice of the JSONL total.
54
+ - Costs are API list prices. For subscription users (ChatGPT plans, Claude subscriptions) they're API-equivalent values, not invoices.
52
55
  - Cumulative counters from the hook are not monotonic and don't start at zero when first observed. `compute_hook_deltas` books only observed upward increments (first observation and post-drop levels are baselines, never counted), so a day's hook cost can never exceed the counter's peak and a session's pre-observation history is never mis-dated onto its first-seen day. Test fixtures must start sessions at ~$0 to mirror real statusline behavior.
53
56
  - `session-baselines.json` carries each session's rolled-up cumulative across the 90-day retention boundary so straddling sessions aren't re-counted from zero.
54
57
  - Build system is Hatch (`hatchling`)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: cctrack
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: Claude Code cost tracker — scans JSONL logs and reports token usage + estimated cost
5
5
  Project-URL: Homepage, https://github.com/rappdw/cctrack
6
6
  Project-URL: Repository, https://github.com/rappdw/cctrack
@@ -25,7 +25,7 @@ Description-Content-Type: text/markdown
25
25
 
26
26
  # cctrack
27
27
 
28
- A lightweight CLI tool that scans [Claude Code](https://docs.anthropic.com/en/docs/claude-code) JSONL logs and reports token usage and estimated cost. Zero dependencies, runs anywhere Python 3.10+ is available.
28
+ A lightweight CLI tool that scans [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [Codex CLI](https://github.com/openai/codex) logs and reports token usage and estimated cost. Zero dependencies, runs anywhere Python 3.10+ is available.
29
29
 
30
30
  ## Install
31
31
 
@@ -51,6 +51,10 @@ cctrack --remote dgx macbook-air
51
51
 
52
52
  # Custom log directories
53
53
  cctrack --dirs ~/.claude/projects ~/.sandy/sandboxes
54
+
55
+ # Only one coding agent (default: all found)
56
+ cctrack --agent claude
57
+ cctrack --agent codex
54
58
  ```
55
59
 
56
60
  ## Example output
@@ -84,6 +88,19 @@ Daily breakdown:
84
88
  4. Calculates cost using Anthropic's published rates per model
85
89
  5. Prints daily breakdown with input/output/cache token splits and monthly summaries
86
90
 
91
+ ## Codex CLI
92
+
93
+ cctrack also reads [Codex CLI](https://github.com/openai/codex) usage from `$CODEX_HOME` (default `~/.codex`) — `sessions/` and `archived_sessions/` — and with `--remote`, from each host. When both agents have spend, the month-to-date block and `--explore` show a per-agent split.
94
+
95
+ How it's counted (verified against the Codex source, not inferred):
96
+
97
+ - **Per-response usage.** Newer Codex versions log a `token_usage_record` for every API response with a unique `response_id`; those are counted and deduplicated across files, so forked and resumed threads (which replay their parent's history) aren't double counted. Older versions only log `token_count` events, which are re-emitted with unchanged totals — only events whose running total moved are counted.
98
+ - **Cached tokens are inside `input_tokens`.** Codex reports cached reads and cache writes as parts of `input_tokens`, and reasoning tokens as part of `output_tokens`. Billable uncached input is `input − cached − cache_write`; reasoning is never added on top.
99
+ - **Its own cost source.** Codex spend is priced directly from its logs and is never replaced by, or scaled with, Claude Code's statusline-hook figures.
100
+ - **Compressed rollouts.** Codex compresses older rollouts to `.jsonl.zst`. Python's standard library only reads zstd from 3.14, so on older Pythons cctrack uses the `zstd` command if it's installed, and otherwise skips those files and says how many it skipped.
101
+
102
+ Costs are at OpenAI's **API list prices**. If you use Codex through a ChatGPT plan, that's an API-equivalent value, not what you're billed — the same is true of Claude Code on a Claude subscription.
103
+
87
104
  ## Explore a day
88
105
 
89
106
  When a day's cost looks wrong or surprisingly high, `--explore` breaks it down:
@@ -124,22 +141,50 @@ cctrack --install-hook --remote dgx macbook-air
124
141
 
125
142
  ## Rate card
126
143
 
127
- Prices per million tokens, from [Anthropic's pricing page](https://platform.claude.com/docs/en/about-claude/pricing). Cache writes are priced per TTL: 5-minute at 1.25× input, 1-hour at 2× input.
144
+ Prices per million tokens. Claude prices are from [Anthropic's pricing page](https://platform.claude.com/docs/en/about-claude/pricing); cache writes are priced per TTL (5-minute and 1-hour).
128
145
 
129
- | Model | Input | Output | Cache Read | Cache Write 5m | Cache Write 1h |
146
+ | Claude model | Input | Output | Cache Read | Cache Write 5m | Cache Write 1h |
130
147
  |---|---|---|---|---|---|
148
+ | Fable 5.1 / Mythos 5.1 | $10.00 | $50.00 | $0.25 | $12.50 | $20.00 |
131
149
  | Fable 5 / Mythos 5 | $10.00 | $50.00 | $1.00 | $12.50 | $20.00 |
150
+ | Opus 5.5 | $4.00 | $20.00 | $0.20 | $5.00 | $8.00 |
132
151
  | Opus 5 / 4.8 / 4.7 / 4.6 / 4.5 | $5.00 | $25.00 | $0.50 | $6.25 | $10.00 |
133
- | Opus 4 / 4.1 | $15.00 | $75.00 | $1.50 | $18.75 | $30.00 |
134
- | Sonnet 5 (through 2026-08-31) | $2.00 | $10.00 | $0.20 | $2.50 | $4.00 |
135
- | Sonnet 5 (from 2026-09-01) / 4.x / 3.7 | $3.00 | $15.00 | $0.30 | $3.75 | $6.00 |
136
- | Haiku 4.x | $1.00 | $5.00 | $0.10 | $1.25 | $2.00 |
152
+ | Opus 4.1 / 4 | $15.00 | $75.00 | $1.50 | $18.75 | $30.00 |
153
+ | Sonnet 5.5 | $2.00 | $10.00 | $0.10 | $2.50 | $4.00 |
154
+ | Sonnet 5 | $2.00 | $10.00 | $0.20 | $2.50 | $4.00 |
155
+ | Sonnet 4.6 / 4.5 / 4 / 3.7 | $3.00 | $15.00 | $0.30 | $3.75 | $6.00 |
156
+ | Haiku 5.5 (prompt ≤ 100K) | $0.10 | $0.50 | $0.01 | $0.125 | $0.20 |
157
+ | Haiku 5.5 (prompt > 100K) | $0.50 | $2.50 | $0.05 | $0.625 | $1.00 |
158
+ | Haiku 4.5 | $1.00 | $5.00 | $0.10 | $1.25 | $2.00 |
137
159
  | Haiku 3.5 | $0.80 | $4.00 | $0.08 | $1.00 | $1.60 |
138
160
  | Haiku 3 | $0.25 | $1.25 | $0.03 | $0.30 | $0.50 |
139
161
 
140
- Usage is priced with the rates in effect on the day it happened, so time-limited introductory pricing is applied correctly to past usage.
162
+ OpenAI prices (for Codex) are from [OpenAI's pricing page](https://developers.openai.com/api/docs/pricing), Standard tier. OpenAI has a single cache-write price, listed only for some models; elsewhere cache writes bill as ordinary input.
141
163
 
142
- Unknown models fall back to Sonnet rates and are flagged with `?` in the report's Model column — a prompt to update the rate card rather than a silent guess.
164
+ | OpenAI model | Input | Cached input | Output | Cache write | Over 272K input |
165
+ |---|---|---|---|---|---|
166
+ | gpt-6-astra | $10.00 | $1.00 | $50.00 | $12.50 | $20 / $2 / $75 / $25 |
167
+ | gpt-6.1-sol | $2.00 | $0.10 | $10.00 | $2.50 | $4 / $0.20 / $15 / $5 |
168
+ | gpt-6-sol | $2.00 | $0.20 | $10.00 | $2.50 | $4 / $0.40 / $15 / $5 |
169
+ | gpt-6-luna | $0.10 | $0.01 | $0.50 | $0.125 | $0.20 / $0.02 / $0.75 / $0.25 |
170
+ | gpt-5.6-sol | $4.00 | $0.40 | $20.00 | $5.00 | $8 / $0.80 / $30 / $10 |
171
+ | gpt-5.6-terra | $2.00 | $0.20 | $12.00 | $2.50 | $4 / $0.40 / $18 / $5 |
172
+ | gpt-5.6-luna | $0.20 | $0.02 | $1.20 | $0.25 | $0.40 / $0.04 / $1.80 / $0.50 |
173
+ | gpt-5.5 | $5.00 | $0.50 | $30.00 | — | $10 / $1 / $45 |
174
+ | gpt-5.5-pro / gpt-5.4-pro | $30.00 | — | $180.00 | — | $60 / — / $270 |
175
+ | gpt-5.4 | $2.50 | $0.25 | $15.00 | — | $5 / $0.50 / $22.50 |
176
+ | gpt-5.4-mini | $0.75 | $0.075 | $4.50 | — | |
177
+ | gpt-5.4-nano | $0.20 | $0.02 | $1.25 | — | |
178
+ | gpt-5.3-codex / gpt-5.2 | $1.75 | $0.175 | $14.00 | — | |
179
+ | gpt-5.2-pro | $21.00 | — | $168.00 | — | |
180
+ | gpt-5.1 / gpt-5 | $1.25 | $0.125 | $10.00 | — | |
181
+ | gpt-5-pro | $15.00 | — | $120.00 | — | |
182
+ | gpt-5-mini | $0.25 | $0.025 | $2.00 | — | |
183
+ | gpt-5-nano | $0.05 | $0.005 | $0.40 | — | |
184
+
185
+ Codex variants without their own price (e.g. `gpt-5.1-codex`) are priced as their base model, consistent with the one variant OpenAI does list (`gpt-5.3-codex` = `gpt-5.2`). Long-context and Haiku 5.5 prompt-length tiers are applied per request.
186
+
187
+ **Every model version has its own row.** A model only matches a row if it is that version or a dated snapshot of it — never a newer minor version. So a newly released model (say `claude-opus-5-7`, or `gpt-5.1-codex-mini`) shows as unknown and is flagged with `?` in the Model column, rather than silently inheriting its predecessor's price. Unknown Claude models are estimated at Sonnet rates, unknown OpenAI models at GPT-5 rates. Pricing is date-aware, so any time-limited introductory price applies only to usage on the days it was in effect.
143
188
 
144
189
  ## Energy estimate
145
190
 
@@ -1,6 +1,6 @@
1
1
  # cctrack
2
2
 
3
- A lightweight CLI tool that scans [Claude Code](https://docs.anthropic.com/en/docs/claude-code) JSONL logs and reports token usage and estimated cost. Zero dependencies, runs anywhere Python 3.10+ is available.
3
+ A lightweight CLI tool that scans [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [Codex CLI](https://github.com/openai/codex) logs and reports token usage and estimated cost. Zero dependencies, runs anywhere Python 3.10+ is available.
4
4
 
5
5
  ## Install
6
6
 
@@ -26,6 +26,10 @@ cctrack --remote dgx macbook-air
26
26
 
27
27
  # Custom log directories
28
28
  cctrack --dirs ~/.claude/projects ~/.sandy/sandboxes
29
+
30
+ # Only one coding agent (default: all found)
31
+ cctrack --agent claude
32
+ cctrack --agent codex
29
33
  ```
30
34
 
31
35
  ## Example output
@@ -59,6 +63,19 @@ Daily breakdown:
59
63
  4. Calculates cost using Anthropic's published rates per model
60
64
  5. Prints daily breakdown with input/output/cache token splits and monthly summaries
61
65
 
66
+ ## Codex CLI
67
+
68
+ cctrack also reads [Codex CLI](https://github.com/openai/codex) usage from `$CODEX_HOME` (default `~/.codex`) — `sessions/` and `archived_sessions/` — and with `--remote`, from each host. When both agents have spend, the month-to-date block and `--explore` show a per-agent split.
69
+
70
+ How it's counted (verified against the Codex source, not inferred):
71
+
72
+ - **Per-response usage.** Newer Codex versions log a `token_usage_record` for every API response with a unique `response_id`; those are counted and deduplicated across files, so forked and resumed threads (which replay their parent's history) aren't double counted. Older versions only log `token_count` events, which are re-emitted with unchanged totals — only events whose running total moved are counted.
73
+ - **Cached tokens are inside `input_tokens`.** Codex reports cached reads and cache writes as parts of `input_tokens`, and reasoning tokens as part of `output_tokens`. Billable uncached input is `input − cached − cache_write`; reasoning is never added on top.
74
+ - **Its own cost source.** Codex spend is priced directly from its logs and is never replaced by, or scaled with, Claude Code's statusline-hook figures.
75
+ - **Compressed rollouts.** Codex compresses older rollouts to `.jsonl.zst`. Python's standard library only reads zstd from 3.14, so on older Pythons cctrack uses the `zstd` command if it's installed, and otherwise skips those files and says how many it skipped.
76
+
77
+ Costs are at OpenAI's **API list prices**. If you use Codex through a ChatGPT plan, that's an API-equivalent value, not what you're billed — the same is true of Claude Code on a Claude subscription.
78
+
62
79
  ## Explore a day
63
80
 
64
81
  When a day's cost looks wrong or surprisingly high, `--explore` breaks it down:
@@ -99,22 +116,50 @@ cctrack --install-hook --remote dgx macbook-air
99
116
 
100
117
  ## Rate card
101
118
 
102
- Prices per million tokens, from [Anthropic's pricing page](https://platform.claude.com/docs/en/about-claude/pricing). Cache writes are priced per TTL: 5-minute at 1.25× input, 1-hour at 2× input.
119
+ Prices per million tokens. Claude prices are from [Anthropic's pricing page](https://platform.claude.com/docs/en/about-claude/pricing); cache writes are priced per TTL (5-minute and 1-hour).
103
120
 
104
- | Model | Input | Output | Cache Read | Cache Write 5m | Cache Write 1h |
121
+ | Claude model | Input | Output | Cache Read | Cache Write 5m | Cache Write 1h |
105
122
  |---|---|---|---|---|---|
123
+ | Fable 5.1 / Mythos 5.1 | $10.00 | $50.00 | $0.25 | $12.50 | $20.00 |
106
124
  | Fable 5 / Mythos 5 | $10.00 | $50.00 | $1.00 | $12.50 | $20.00 |
125
+ | Opus 5.5 | $4.00 | $20.00 | $0.20 | $5.00 | $8.00 |
107
126
  | Opus 5 / 4.8 / 4.7 / 4.6 / 4.5 | $5.00 | $25.00 | $0.50 | $6.25 | $10.00 |
108
- | Opus 4 / 4.1 | $15.00 | $75.00 | $1.50 | $18.75 | $30.00 |
109
- | Sonnet 5 (through 2026-08-31) | $2.00 | $10.00 | $0.20 | $2.50 | $4.00 |
110
- | Sonnet 5 (from 2026-09-01) / 4.x / 3.7 | $3.00 | $15.00 | $0.30 | $3.75 | $6.00 |
111
- | Haiku 4.x | $1.00 | $5.00 | $0.10 | $1.25 | $2.00 |
127
+ | Opus 4.1 / 4 | $15.00 | $75.00 | $1.50 | $18.75 | $30.00 |
128
+ | Sonnet 5.5 | $2.00 | $10.00 | $0.10 | $2.50 | $4.00 |
129
+ | Sonnet 5 | $2.00 | $10.00 | $0.20 | $2.50 | $4.00 |
130
+ | Sonnet 4.6 / 4.5 / 4 / 3.7 | $3.00 | $15.00 | $0.30 | $3.75 | $6.00 |
131
+ | Haiku 5.5 (prompt ≤ 100K) | $0.10 | $0.50 | $0.01 | $0.125 | $0.20 |
132
+ | Haiku 5.5 (prompt > 100K) | $0.50 | $2.50 | $0.05 | $0.625 | $1.00 |
133
+ | Haiku 4.5 | $1.00 | $5.00 | $0.10 | $1.25 | $2.00 |
112
134
  | Haiku 3.5 | $0.80 | $4.00 | $0.08 | $1.00 | $1.60 |
113
135
  | Haiku 3 | $0.25 | $1.25 | $0.03 | $0.30 | $0.50 |
114
136
 
115
- Usage is priced with the rates in effect on the day it happened, so time-limited introductory pricing is applied correctly to past usage.
137
+ OpenAI prices (for Codex) are from [OpenAI's pricing page](https://developers.openai.com/api/docs/pricing), Standard tier. OpenAI has a single cache-write price, listed only for some models; elsewhere cache writes bill as ordinary input.
116
138
 
117
- Unknown models fall back to Sonnet rates and are flagged with `?` in the report's Model column — a prompt to update the rate card rather than a silent guess.
139
+ | OpenAI model | Input | Cached input | Output | Cache write | Over 272K input |
140
+ |---|---|---|---|---|---|
141
+ | gpt-6-astra | $10.00 | $1.00 | $50.00 | $12.50 | $20 / $2 / $75 / $25 |
142
+ | gpt-6.1-sol | $2.00 | $0.10 | $10.00 | $2.50 | $4 / $0.20 / $15 / $5 |
143
+ | gpt-6-sol | $2.00 | $0.20 | $10.00 | $2.50 | $4 / $0.40 / $15 / $5 |
144
+ | gpt-6-luna | $0.10 | $0.01 | $0.50 | $0.125 | $0.20 / $0.02 / $0.75 / $0.25 |
145
+ | gpt-5.6-sol | $4.00 | $0.40 | $20.00 | $5.00 | $8 / $0.80 / $30 / $10 |
146
+ | gpt-5.6-terra | $2.00 | $0.20 | $12.00 | $2.50 | $4 / $0.40 / $18 / $5 |
147
+ | gpt-5.6-luna | $0.20 | $0.02 | $1.20 | $0.25 | $0.40 / $0.04 / $1.80 / $0.50 |
148
+ | gpt-5.5 | $5.00 | $0.50 | $30.00 | — | $10 / $1 / $45 |
149
+ | gpt-5.5-pro / gpt-5.4-pro | $30.00 | — | $180.00 | — | $60 / — / $270 |
150
+ | gpt-5.4 | $2.50 | $0.25 | $15.00 | — | $5 / $0.50 / $22.50 |
151
+ | gpt-5.4-mini | $0.75 | $0.075 | $4.50 | — | |
152
+ | gpt-5.4-nano | $0.20 | $0.02 | $1.25 | — | |
153
+ | gpt-5.3-codex / gpt-5.2 | $1.75 | $0.175 | $14.00 | — | |
154
+ | gpt-5.2-pro | $21.00 | — | $168.00 | — | |
155
+ | gpt-5.1 / gpt-5 | $1.25 | $0.125 | $10.00 | — | |
156
+ | gpt-5-pro | $15.00 | — | $120.00 | — | |
157
+ | gpt-5-mini | $0.25 | $0.025 | $2.00 | — | |
158
+ | gpt-5-nano | $0.05 | $0.005 | $0.40 | — | |
159
+
160
+ Codex variants without their own price (e.g. `gpt-5.1-codex`) are priced as their base model, consistent with the one variant OpenAI does list (`gpt-5.3-codex` = `gpt-5.2`). Long-context and Haiku 5.5 prompt-length tiers are applied per request.
161
+
162
+ **Every model version has its own row.** A model only matches a row if it is that version or a dated snapshot of it — never a newer minor version. So a newly released model (say `claude-opus-5-7`, or `gpt-5.1-codex-mini`) shows as unknown and is flagged with `?` in the Model column, rather than silently inheriting its predecessor's price. Unknown Claude models are estimated at Sonnet rates, unknown OpenAI models at GPT-5 rates. Pricing is date-aware, so any time-limited introductory price applies only to usage on the days it was in effect.
118
163
 
119
164
  ## Energy estimate
120
165
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cctrack"
7
- version = "0.7.0"
7
+ version = "0.8.0"
8
8
  description = "Claude Code cost tracker — scans JSONL logs and reports token usage + estimated cost"
9
9
  readme = "README.md"
10
10
  license = "MIT"