cctally 1.81.0 → 1.82.0

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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.82.0] - 2026-07-24
9
+
10
+ ### Added
11
+ - Embedded pricing for Claude Opus 5 (`claude-opus-5`) so Opus 5 sessions are costed correctly instead of contributing $0 as an unrecognized model. Anthropic ships it at the standard Opus rate — $5 / MTok input, $25 / MTok output, $6.25 / MTok 5-minute cache write, $0.50 / MTok cache read — with the full 1M-token context window at standard pricing (no long-context premium), verified against Anthropic's published pricing table; the pricing snapshot date moves to 2026-07-24. LiteLLM carries no Opus 5 entry yet, so the embedded table is simply ahead of it and `pricing-check` does not report drift.
12
+
13
+ ### Fixed
14
+ - `cctally statusline`'s 🧠 context segment now measures a `claude-opus-5[1m]` session against its real 1,000,000-token window instead of silently falling back to the 200K family default, which inflated the reported context percentage roughly fivefold.
15
+
8
16
  ## [1.81.0] - 2026-07-24
9
17
 
10
18
  ### Added
@@ -59,6 +59,7 @@ def _cctally():
59
59
  # Unknown model id → segment renders `🧠 N/A` + one-shot stderr warn.
60
60
  CLAUDE_MODEL_CONTEXT_WINDOWS = {
61
61
  # 1M-token variants (explicit IDs override the family default).
62
+ "claude-opus-5[1m]": 1_000_000,
62
63
  "claude-opus-4-8[1m]": 1_000_000,
63
64
  "claude-opus-4-7[1m]": 1_000_000,
64
65
  "claude-sonnet-4-5[1m]": 1_000_000,
@@ -53,7 +53,7 @@ def _chip_for_model(name: str) -> str:
53
53
  # Date the embedded pricing snapshots below were last verified against
54
54
  # vendor sources. Bump whenever CLAUDE_MODEL_PRICING / CODEX_MODEL_PRICING
55
55
  # is synced. Read by `pricing-check` + the release pre-flight staleness nudge.
56
- PRICING_SNAPSHOT_DATE = "2026-07-19"
56
+ PRICING_SNAPSHOT_DATE = "2026-07-24"
57
57
  PRICING_STALENESS_DAYS = 60 # release pre-flight WARNs past this age
58
58
 
59
59
  # Canonical machine-readable pricing source (Claude values + Codex values).
@@ -99,7 +99,7 @@ PRICING_DRIFT_ALLOWLIST: list[dict] = [
99
99
 
100
100
  # Anthropic API pricing snapshot:
101
101
  # - Source: https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json
102
- # - Captured: 2026-07-19 (see PRICING_SNAPSHOT_DATE)
102
+ # - Captured: 2026-07-24 (see PRICING_SNAPSHOT_DATE)
103
103
  # - Verified by maintainer against docs.claude.com/en/docs/about-claude/pricing;
104
104
  # update in PRs touching this table.
105
105
  # 2026-06-10: added claude-fable-5 ($10/$50 per MTok; 1M context, no
@@ -114,6 +114,22 @@ PRICING_DRIFT_ALLOWLIST: list[dict] = [
114
114
  # value_drift on all four cost fields. Suppressed via PRICING_DRIFT_ALLOWLIST
115
115
  # above (the non-vacuity guard forces removal once LiteLLM reverts to the
116
116
  # standard rate after 2026-08-31).
117
+ # 2026-07-24: added claude-opus-5 ($5/$25 per MTok — identical to Opus
118
+ # 4.5/4.6/4.7/4.8; $6.25 5-minute cache write and $0.50 cache read at the
119
+ # standard 1.25x/0.1x multipliers). 1M context at standard pricing, so NO
120
+ # above-200k tier. Dateless pinned id with no dated twin (matches Anthropic's
121
+ # published ID/alias table). LiteLLM has no opus-5 entry yet, so this table is
122
+ # simply ahead of it — `ahead_of_litellm` is never a drift finding, so no
123
+ # PRICING_DRIFT_ALLOWLIST entry is needed.
124
+ #
125
+ # Known gap — Claude *fast mode* is not modelled. Anthropic bills fast mode at a
126
+ # premium ($10/$50 per MTok on Opus 5 and Opus 4.8; $30/$150 on Opus 4.7), and
127
+ # Claude Code records the tier per assistant entry at `message.usage.speed`
128
+ # ("standard" | "fast"), so it IS derivable from the JSONL we already ingest —
129
+ # but this table is one rate per model and `_calculate_entry_cost` ignores speed,
130
+ # so a fast-mode entry is priced at the standard rate (2x undercount on Opus 5).
131
+ # The Codex side already carries the shape for this
132
+ # (`_calculate_codex_entry_cost(..., speed=...)` + its fast-tier multiplier).
117
133
  CLAUDE_MODEL_PRICING: dict[str, dict[str, Any]] = {
118
134
  "claude-3-5-haiku-20241022": {
119
135
  "input_cost_per_token": 8e-07,
@@ -269,6 +285,12 @@ CLAUDE_MODEL_PRICING: dict[str, dict[str, Any]] = {
269
285
  "cache_creation_input_token_cost": 6.25e-06,
270
286
  "cache_read_input_token_cost": 5e-07,
271
287
  },
288
+ "claude-opus-5": {
289
+ "input_cost_per_token": 5e-06,
290
+ "output_cost_per_token": 2.5e-05,
291
+ "cache_creation_input_token_cost": 6.25e-06,
292
+ "cache_read_input_token_cost": 5e-07,
293
+ },
272
294
  "claude-sonnet-4-20250514": {
273
295
  "input_cost_per_token": 3e-06,
274
296
  "output_cost_per_token": 1.5e-05,
@@ -321,7 +343,9 @@ _unknown_model_warnings: set[str] = set()
321
343
  #
322
344
  # Codex (OpenAI) API pricing snapshot:
323
345
  # - Source: https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json
324
- # - Captured: 2026-07-19 (see PRICING_SNAPSHOT_DATE)
346
+ # - Captured: 2026-07-19 the last full Codex sync. PRICING_SNAPSHOT_DATE moved
347
+ # ahead to 2026-07-24 for the Claude-side opus-5 sync; these Codex values were
348
+ # NOT re-verified that day.
325
349
  # - As of the 2026-07-19 sync this carries every openai-provider
326
350
  # gpt-5* model the LiteLLM snapshot lists, so `pricing-check`'s scope finds
327
351
  # nothing missing. Models absent from this table still fall back to `gpt-5`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cctally",
3
- "version": "1.81.0",
3
+ "version": "1.82.0",
4
4
  "description": "Claude Code usage tracker and local dashboard for Pro/Max subscription limits - weekly cost-per-percent trend, quota forecasts, threshold alerts. ccusage-compatible.",
5
5
  "homepage": "https://github.com/omrikais/cctally",
6
6
  "repository": {