@alexgreensh/token-optimizer 5.13.74 → 5.13.75

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.
@@ -13,7 +13,7 @@
13
13
  "name": "token-optimizer",
14
14
  "source": "./",
15
15
  "description": "Audit, fix, and monitor Claude Code context window usage. Find the ghost tokens.",
16
- "version": "5.13.74",
16
+ "version": "5.13.75",
17
17
  "author": {
18
18
  "name": "Alex Greenshpun",
19
19
  "url": "https://linkedin.com/in/alexgreensh"
@@ -55,7 +55,7 @@
55
55
  "name": "token-optimizer-cowork",
56
56
  "source": "./cowork/token-optimizer",
57
57
  "description": "Token Optimizer for Claude Cowork \u2014 full skills + Cowork-native hooks (beta). Install THIS in Cowork; the standard token-optimizer entry is for desktop Claude Code.",
58
- "version": "5.13.74",
58
+ "version": "5.13.75",
59
59
  "author": {
60
60
  "name": "Alex Greenshpun",
61
61
  "url": "https://linkedin.com/in/alexgreensh"
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "homepage": "https://github.com/alexgreensh/token-optimizer",
9
9
  "repository": "https://github.com/alexgreensh/token-optimizer",
10
- "version": "5.13.74",
10
+ "version": "5.13.75",
11
11
  "license": "PolyForm-Noncommercial-1.0.0",
12
12
  "keywords": [
13
13
  "token",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgreensh/token-optimizer",
3
- "version": "5.13.74",
3
+ "version": "5.13.75",
4
4
  "description": "Token Optimizer for Claude Code cloud sessions: the real plugin, installed by your cloud environment's setup script.",
5
5
  "license": "PolyForm-Noncommercial-1.0.0",
6
6
  "author": "Alex Greenshpun (https://linkedin.com/in/alexgreensh)",
@@ -4947,7 +4947,11 @@ def _estimate_before_after_savings(days=None, estimated_pools=None, model_routin
4947
4947
  # Anthropic runtime; with none, the current mix. A frozen share is trusted as-is;
4948
4948
  # a non-Anthropic user is priced at their own measured mix, never fabricated Opus.
4949
4949
  anthropic = _measure_facade.detect_runtime() not in {"codex", "hermes", "copilot", "opencode", "cursor", "antigravity", "grok"}
4950
- before_shares = dict((baseline.get("model_shares") if anthropic else None) or after_shares)
4950
+ # Older baseline files carry only opus_share (no model_shares); keep honoring it.
4951
+ legacy_shares = ({"opus": frozen_opus, "sonnet": round(1.0 - frozen_opus, 4)}
4952
+ if frozen_opus > 0 else None)
4953
+ before_shares = dict((baseline.get("model_shares") or legacy_shares if anthropic else None)
4954
+ or after_shares)
4951
4955
  baseline_opus_share = float(before_shares.get("opus", 0.0))
4952
4956
  # Baseline cache-hit pattern, defined over the FRESH+CACHE_READ POOL only (cache
4953
4957
  # write excluded). C1/C2: the counterfactual redistributes caching over the pool,