@trazum/cli 1.81.0 → 1.83.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/README.md CHANGED
@@ -72,7 +72,7 @@ trazum optimize --all-labels --from-log usage.jsonl
72
72
 
73
73
  ```
74
74
  Input tokens
75
- 190 → 137 -27.9% (estimated, ±10%)
75
+ 190 → 137 -27.9% (estimated, ±6%)
76
76
 
77
77
  Cost with Claude Opus 5
78
78
  50,000 calls/month · 300 output tokens per call
@@ -1 +1 @@
1
- {"version":3,"file":"gateway-server.d.ts","sourceRoot":"","sources":["../src/gateway-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,OAAO,KAAK,EAAmB,MAAM,EAAkB,MAAM,WAAW,CAAC;AAEzE,OAAO,KAAK,EAEV,aAAa,EACb,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACX,MAAM,cAAc,CAAC;AAEtB,wCAAwC;AACxC,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,QAAkB,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,IAAI,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;CAC5B;AAED,iEAAiE;AACjE,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,M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;IAC5E,4EAA4E;IAC5E,OAAO,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAChC;;;;;;OAMG;IACH,MAAM,EAAE,CAAC,QAAQ,EAAE;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,gBAAgB,EAAE,MAAM,CAAC;QACzB,WAAW,EAAE,OAAO,CAAC;KACtB,KAAK,IAAI,CAAC;IACX;;;;;;;;;;;;;;;;;;OAkBG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC9C,oEAAoE;IACpE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,iEAAiE;IACjE,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAoID,wBAAgB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAuS5D;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAC3C,OAAO,CAAC,MAAM,CAAC,CAajB"}
@@ -80,6 +80,20 @@ export const UPSTREAMS = {
80
80
  * the kind of detail recall gets wrong.
81
81
  */
82
82
  deepseek: { origin: 'https://api.deepseek.com', path: '/chat/completions' },
83
+ /**
84
+ * Mistral, on the same rule as DeepSeek and from the same evidence.
85
+ *
86
+ * `scripts/measure-token-band.mjs` sends a real key to
87
+ * `https://api.mistral.ai/v1/chat/completions`, and it was run: the corpus is
88
+ * measured against Mistral's own tokenizer and the fixture is committed. The
89
+ * guard in `trusted-hosts.test.js` is what forced this entry to exist rather
90
+ * than letting the harness quietly become a second place credentials leave
91
+ * from — *"a measuring script is not a side door"*. Reusing the endpoint the
92
+ * repository already trusts with a credential is the difference between
93
+ * adding an upstream and inventing one, and this path does carry `/v1` where
94
+ * DeepSeek's does not.
95
+ */
96
+ mistral: { origin: 'https://api.mistral.ai', path: '/v1/chat/completions' },
83
97
  /**
84
98
  * Google, on the same rule and from a fuller record than DeepSeek's.
85
99
  *
@@ -1 +1 @@
1
- {"version":3,"file":"gateway-server.js","sourceRoot":"","sources":["../src/gateway-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAWxG,wCAAwC;AACxC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AAErC,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AA8DtD,MAAM,CAAC,MAAM,SAAS,GAAuC;IAC3D,SAAS,EAAE;QACT,MAAM,EAAE,2BAA2B;QACnC,IAAI,EAAE,cAAc;QACpB;;;;;;;;;;;;;;;WAeG;QACH,IAAI,EAAE;YACJ,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,EAAE;YACrD,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE;SACtC;KACF;IACD,MAAM,EAAE,EAAE,MAAM,EAAE,wBAAwB,EAAE,IAAI,EAAE,sBAAsB,EAAE;IAC1E;;;;;;;OAOG;IACH,QAAQ,EAAE,EAAE,MAAM,EAAE,0BAA0B,EAAE,IAAI,EAAE,mBAAmB,EAAE;IAC3E;;;;;;;;;;;;;;;OAeG;IACH,MAAM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MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE;YACxC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;YACjC,MAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;YACzF,OAAO,CAAC,UAAU,SAAS,IAAI,IAAI,EAAE,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAqB9C;;;;;;GAMG;AACH,eAAO,MAAM,EAAE,EAAE,WAu/FhB,CAAC"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAqB9C;;;;;;GAMG;AACH,eAAO,MAAM,EAAE,EAAE,WA+oGhB,CAAC"}
package/dist/i18n/en.js CHANGED
@@ -50,8 +50,12 @@ ${bold('USAGE')}
50
50
  trazum schema <contract>
51
51
  trazum rollup <document...|dir> [--json] [--html-out <file>]
52
52
  trazum position <usage.jsonl>
53
+ trazum receipt <usage.jsonl|dir> [--stamp] [-o <file>]
53
54
  trazum from-claude-code <file|dir> [--label <name>] [-o <file>]
54
55
  trazum from-otel <file|dir> [--label-from-service] [-o <file>]
56
+ trazum from-litellm <file|dir> [-o <file>]
57
+ trazum from-helicone <file|dir> [-o <file>]
58
+ trazum from-langsmith <file|dir> [-o <file>]
55
59
  trazum switch <usage.jsonl> --to <model> [--migration-usd <n>] [--cases <n>]
56
60
  trazum ownrate --gpu-usd-hour <n> --tokens-per-second <n> [--utilization <0-1>]
57
61
  trazum pulse [--max-stale-hours <n>]
@@ -158,6 +162,41 @@ ${bold('OPTIONS FOR ownrate')}
158
162
  into trazum.config.json, so the model you run yourself becomes a
159
163
  first-class row in every report, priced by you and marked as such.
160
164
 
165
+ ${bold('OPTIONS FOR from-helicone')}
166
+ -o, --out <file> Write the usage log there instead of stdout.
167
+
168
+ A Helicone request export, read as a usage log: model, timestamp, label and
169
+ the token counts from each row, and nothing else. The request body, the
170
+ response body and the user id stay in the row. The model that answered is
171
+ what is priced, and rows answered by a different model than the one
172
+ requested are counted. cache_enabled is a flag and never a token split, so
173
+ cache verdicts read "cannot tell". A request id is one call and never a
174
+ conversation, so the records carry no session and the conversation findings
175
+ cannot be answered from this log; that is said on every run.
176
+
177
+ ${bold('OPTIONS FOR from-langsmith')}
178
+ -o, --out <file> Write the usage log there instead of stdout.
179
+
180
+ A LangSmith run export, read as a usage log: model, timestamp, label, the
181
+ trace as the session, and the token counts, and nothing else. The inputs and
182
+ the outputs stay in the run, and the metadata bag is read for named keys and
183
+ never copied. Only run_type "llm" is a call: chains, tools and retrievers are
184
+ skipped and counted, because the chain wrapping a call repeats its child's
185
+ tokens. A run whose metadata names no model is refused rather than priced by
186
+ the run's name, which is a client class. LangSmith's own cost is reported on
187
+ its own and never merged into Trazum's.
188
+
189
+ ${bold('OPTIONS FOR from-litellm')}
190
+ -o, --out <file> Write the usage log there instead of stdout.
191
+
192
+ A LiteLLM spend log, read as a usage log: model, timestamp, label, session
193
+ and the token counts from each row, and nothing else. The messages, the
194
+ response, the hashed key, the requester address and the end user stay in the
195
+ row. cache_hit is a flag and never a token split, so cache verdicts read
196
+ "cannot tell" rather than a guessed one. Rows naming no model are counted
197
+ and left out: model_group is a route, not a model. LiteLLM's own spend
198
+ figure is printed beside Trazum's and never merged into it.
199
+
161
200
  ${bold('OPTIONS FOR from-otel')}
162
201
  --label-from-service Label each record with its span's service name,
163
202
  so a per-service bill falls out.
@@ -196,6 +235,26 @@ ${bold('OPTIONS FOR position')}
196
235
  floor, on an over, and on a zero rate: never a forecast, and no field in
197
236
  the document names a date.
198
237
 
238
+ ${bold('OPTIONS FOR receipt')}
239
+ --stamp Record the emission time in the document. Off by
240
+ default so two runs on one log produce the same
241
+ bytes: the period the figures cover is already in
242
+ there, from the log's own clock.
243
+ -o, --out <file> Write the receipt there instead of to standard
244
+ output. The summary always goes to standard
245
+ error, so a redirect writes a document and not a
246
+ document with a summary stapled to the front.
247
+ --pricing <file> Price it with your own card instead of the
248
+ bundled catalogue.
249
+ --pricing-live Price it against live rates via OpenRouter.
250
+
251
+ A profile answers where it ran. A receipt is the same figures shaped so they
252
+ still answer somewhere else: every line carries the rates behind its money
253
+ and the date that provider's rates were last read off its own page. What is
254
+ not in it is prompt text, answers, file paths, branch names, credentials and
255
+ sessions: not redacted, absent, because the shape it is built from has no
256
+ field that can hold them. It sends nothing anywhere.
257
+
199
258
  ${bold('OPTIONS FOR pulse')}
200
259
  --max-stale-hours <n> Exit 1 when something that runs here has not run
201
260
  in over n hours. Without it, the ages are
@@ -970,6 +1029,10 @@ ${bold('EXAMPLES')}
970
1029
  used: (hits, misses) => `Suggestions: ${hits} from cache, ${misses} asked. Cached answers are what the model said last time; --clear-suggestion-cache to start over.`,
971
1030
  },
972
1031
  errors: {
1032
+ fileNotFound: (path) => `${path}: not found. Check the path, or point this at the directory that holds it.`,
1033
+ fileIsDirectory: (path) => `${path} is a directory, and this command reads a file. Name the file inside it, or use a command that walks a folder.`,
1034
+ fileIsDirectoryUnnamed: () => 'that path is a directory, and this command reads a file. Name the file inside it, or use a command that walks a folder.',
1035
+ fileNotReadable: (path) => `${path}: no permission to read it. Check the file's owner and mode, then run this again.`,
973
1036
  livePricingFailed: (url, detail) => `Could not load live prices from ${url}: ${detail}. The bundled prices are still there. Drop --pricing-live to use them.`,
974
1037
  optionNeedsValue: (name) => `Option --${name} needs a value.`,
975
1038
  mustBeNonNegative: (name, raw) => `--${name} must be a non-negative number (received: "${raw}").`,
@@ -1019,9 +1082,15 @@ ${bold('EXAMPLES')}
1019
1082
  },
1020
1083
  report: {
1021
1084
  inputTokens: () => 'Input tokens',
1022
- estimated: (offFamily) => offFamily === null
1023
- ? ' (estimated, ±10%)'
1024
- : ` (estimated: the counter is calibrated on Claude, not ${offFamily})`,
1085
+ estimated: (offFamily, band, measuredOff) => {
1086
+ if (offFamily === null)
1087
+ return ` (estimated, ±${band}%)`;
1088
+ return measuredOff === null
1089
+ ? ` (estimated: the counter is calibrated on Claude, not ${offFamily}, and nobody has`
1090
+ + ' measured how far off it is there)'
1091
+ : ` (estimated: the counter is calibrated on Claude, not ${offFamily}, where it has`
1092
+ + ` measured up to ${measuredOff}% out)`;
1093
+ },
1025
1094
  exactCount: () => ' (exact count)',
1026
1095
  rulesApplied: () => 'Rules applied',
1027
1096
  nothingToTrim: () => ' No rule found anything to trim.',
@@ -1082,7 +1151,7 @@ ${bold('EXAMPLES')}
1082
1151
  windowNegligible: (tokens, model, window) => `${tokens} tokens of ${model}'s ${window}-token window, under a tenth of a percent, so the window is not what constrains this prompt.`,
1083
1152
  windowUnmoved: (share, model, window) => `${share} of ${model}'s ${window}-token window, before and after: this change is too small to move it.`,
1084
1153
  beyondThisPromptTokensOnly: () => 'Shortening a prompt is the smallest lever there is: measured on an ordinary support prompt, the rules recover about 1% of a monthly bill. If any of your prompts go to a metered API, "trazum profile <usage.jsonl>" reads what the provider actually charged and prices the levers that are not the prompt. Recording that log is a few lines and it never contains prompt text.',
1085
- beyondThisPrompt: () => 'Shortening a prompt is the smallest lever there is: measured on an ordinary support prompt, the rules recover about 1% of a monthly bill. On a metered API the things that move 40% to 80% are which model the call goes to, the Batch API, prompt caching, and what re-sending the conversation costs, and "trazum profile <usage.jsonl>" prices all four from what the provider actually charged. Recording that log is a few lines and it never contains prompt text.',
1154
+ beyondThisPrompt: () => 'Shortening a prompt is the smallest lever there is: measured on an ordinary support prompt, the rules recover about 1% of a monthly bill. On a metered API the things that move 60% to 80% are which model the call goes to, the Batch API, prompt caching, and what re-sending the conversation costs, and "trazum profile <usage.jsonl>" prices all four from what the provider actually charged. Recording that log is a few lines and it never contains prompt text.',
1086
1155
  windowUse: (before, after, model, window) => `Context window: ${before} → ${after} of ${model}'s ${window} tokens, room the conversation gets instead.`,
1087
1156
  tokensOnlyAskedFor: () => 'You named a scenario, and it was not priced: Trazum is running somewhere that bills by subscription, so there is no bill here to reduce. Add --cost to price it anyway: the host says where Trazum runs, not where your prompt goes.',
1088
1157
  tokensOnlyCost: () => 'Pass --cost if this prompt is bound for a metered API.',
@@ -1488,6 +1557,15 @@ ${bold('EXAMPLES')}
1488
1557
  declared: () => 'Derived from your declaration, honest only if the throughput was measured. Every report that prices this model will rest on these two numbers.',
1489
1558
  snippetHeading: () => 'Paste into trazum.config.json (the "pricing" overlay file):',
1490
1559
  },
1560
+ receipt: {
1561
+ noLog: () => 'Name a usage log to make a receipt from.',
1562
+ written: (file, lines) => `Wrote a receipt of ${lines} line(s) to ${file}.`,
1563
+ summary: (lines, usd) => `${lines} line(s), ${usd} priced. Every figure carries the rate behind it and the date that rate was reviewed.`,
1564
+ unpriced: (models, calls) => `${models} model(s) the catalogue does not price, covering ${calls} call(s): named in the receipt's gaps, and kept out of the total rather than costed at zero.`,
1565
+ unread: (count) => `${count} line(s) of the log could not be read, and the receipt says so.`,
1566
+ noClock: () => 'The log carries no clock, so the receipt is unbounded in time and states that rather than inventing a period.',
1567
+ nothingToBill: () => 'Nothing in this log could be priced, so the receipt has no lines.',
1568
+ },
1491
1569
  fromOtel: {
1492
1570
  noPath: () => 'from-otel needs an OTLP file or directory: trazum from-otel spans.json',
1493
1571
  notFound: (path) => `${path}: not found`,
@@ -1498,6 +1576,43 @@ ${bold('EXAMPLES')}
1498
1576
  unparseable: (count) => `${count} line(s) did not parse as JSON.`,
1499
1577
  written: (file) => `Wrote ${file}.`,
1500
1578
  },
1579
+ fromHelicone: {
1580
+ noPath: () => 'from-helicone needs a request export or a directory: trazum from-helicone requests.json',
1581
+ notFound: (path) => `${path}: not found`,
1582
+ noExports: (path) => `${path}: no .json/.jsonl/.ndjson exports under it. Helicone's requests come out of its POST /v1/request/query endpoint, or the export button on the requests table.`,
1583
+ summary: (files, rows) => `${files} file(s), ${rows} request(s) read.`,
1584
+ unnamedModel: (count) => `${count} row(s) named no model in any of the three columns and are not in the output: nothing on the row says what answered, so nothing can price it.`,
1585
+ disagreements: (count) => `${count} row(s) were answered by a different model than the one requested. The model that answered is what is priced, because a bill is about what was billed; the count is here so a substitution is something you see rather than find inside a total.`,
1586
+ noTokens: (count) => `${count} row(s) carried zero tokens on both sides: logged requests nobody can price. Counted here and worth a look at Helicone.`,
1587
+ cacheFlagged: (count) => `${count} row(s) were served from Helicone's cache. That is a flag on the row and never a token split, so the cache verdicts read "cannot tell" on this log rather than a fabricated one.`,
1588
+ noSessions: () => 'No session identity: a Helicone request id names one call, not a conversation, so the conversation findings (single-turn cache waste, context pressure) cannot be answered from this log. Passing a per-call id off as a conversation would report every call as a conversation of one.',
1589
+ unparseable: (count) => `${count} line(s) did not parse as JSON.`,
1590
+ written: (file) => `Wrote ${file}.`,
1591
+ },
1592
+ fromLangsmith: {
1593
+ noPath: () => 'from-langsmith needs a run export or a directory: trazum from-langsmith runs.json',
1594
+ notFound: (path) => `${path}: not found`,
1595
+ noExports: (path) => `${path}: no .json/.jsonl/.ndjson exports under it. LangSmith's runs come out of its list-runs endpoint, the SDK's list_runs(), or the export button on a project's runs table.`,
1596
+ summary: (files, rows) => `${files} file(s), ${rows} model call(s) read.`,
1597
+ notModelCalls: (count) => `${count} run(s) were not model calls and are not in the output: chains, tools, retrievers and prompts. A LangSmith trace is a tree and the chain wrapping a call repeats its child's tokens, so summing the tree would bill the same tokens once per level.`,
1598
+ unnamedModel: (count) => `${count} model call(s) named no model in their metadata and are not in the output. The run's own name is a client class: "ChatAnthropic" is not a model anybody can price, so it is refused rather than guessed at. Set ls_model_name, or record the invocation params.`,
1599
+ noTokens: (count) => `${count} model call(s) carried no token counts and are not in the output: logged runs nobody can price. Counted here and worth a look at the tracer.`,
1600
+ reportedCost: (usd) => `LangSmith priced these same calls at ${usd} with its own table. That figure is not merged into anything Trazum computes: two price tables summed into one total is how a report becomes quietly wrong. Compare them deliberately or not at all.`,
1601
+ unparseable: (count) => `${count} line(s) did not parse as JSON.`,
1602
+ written: (file) => `Wrote ${file}.`,
1603
+ },
1604
+ fromLiteLlm: {
1605
+ noPath: () => 'from-litellm needs a spend-log export or a directory: trazum from-litellm spend.json',
1606
+ notFound: (path) => `${path}: not found`,
1607
+ noExports: (path) => `${path}: no .json/.jsonl/.ndjson exports under it. LiteLLM's spend logs come out of the LiteLLM_SpendLogs table, or from the proxy's own /spend endpoints.`,
1608
+ summary: (files, rows) => `${files} file(s), ${rows} logged call(s) read.`,
1609
+ unnamedModel: (count) => `${count} row(s) named no model and are not in the output. "model_group" is the name of a proxy route and several models can sit behind one, so pricing those calls by the route they took would attribute a figure to something it does not describe.`,
1610
+ noTokens: (count) => `${count} row(s) carried zero tokens on both sides: logged calls nobody can price. They are counted here and worth a look at the proxy.`,
1611
+ cacheFlagged: (count) => `${count} row(s) are marked as a cache hit. LiteLLM records that as a flag and never as a token split, so the cache verdicts read "cannot tell" on this log rather than a fabricated one.`,
1612
+ reportedSpend: (usd) => `LiteLLM priced these same calls at ${usd} with its own table. That figure is not merged into anything Trazum computes: two price tables summed into one total is how a report becomes quietly wrong. Compare them deliberately or not at all.`,
1613
+ unparseable: (count) => `${count} line(s) did not parse as JSON.`,
1614
+ written: (file) => `Wrote ${file}.`,
1615
+ },
1501
1616
  fromClaudeCode: {
1502
1617
  noPath: () => 'from-claude-code needs a transcript file or directory: trazum from-claude-code ~/.claude/projects',
1503
1618
  notFound: (path) => `${path}: not found`,
@@ -1638,6 +1753,8 @@ ${bold('EXAMPLES')}
1638
1753
  title: () => 'Models and pricing',
1639
1754
  unit: () => ' (USD per million tokens)',
1640
1755
  reviewedOn: (date, days) => ` Table reviewed on ${date}${ago(days)}. Verify before budgeting.`,
1756
+ reviewedByProvider: (rows) => ` Per provider: ${rows}`,
1757
+ reviewedGroup: (date, days, providers) => `${date}${ago(days)} ${providers}`,
1641
1758
  columns: {
1642
1759
  model: 'model',
1643
1760
  input: 'input',
@@ -1682,7 +1799,7 @@ ${bold('EXAMPLES')}
1682
1799
  goneAt: () => 'not present',
1683
1800
  truncated: (shown) => `Showing the most recent ${shown}. Pass --limit for more.`,
1684
1801
  followedRename: (from) => `Followed a rename: earlier revisions are ${from}.`,
1685
- estimateNote: () => 'Token counts are estimates (±10%). The trend is the point; the absolute figures are not.',
1802
+ estimateNote: (band) => `Token counts are estimates (±${band}% for text of this kind). The trend is the point; the absolute figures are not.`,
1686
1803
  },
1687
1804
  languages: {
1688
1805
  and: 'and',
@@ -1845,7 +1962,7 @@ ${bold('EXAMPLES')}
1845
1962
  truncated: () => 'Stopped early: the directory is larger than the walk limit, so this is not the whole picture.',
1846
1963
  footer: (source, level) => `Token counts ${source} · rule level \`${level}\``,
1847
1964
  pricingOverlaid: (count, lastReviewed) => `Prices for ${count} ${count === 1 ? 'model' : 'models'} came from a local overlay reviewed ${lastReviewed}.`,
1848
- sourceEstimated: () => 'estimated, ±10%',
1965
+ sourceEstimated: (band) => `estimated, ±${band}%`,
1849
1966
  sourceExact: () => 'counted exactly',
1850
1967
  measuringOptimised: () => 'Measuring what the rules would leave, not what is written in the file.',
1851
1968
  metricTokens: (before, after) => `Input tokens (${before} → ${after})`,
@@ -2122,6 +2239,10 @@ ${bold('EXAMPLES')}
2122
2239
  windowRelativeEmpty: () => 'A relative window is measured from this machine\'s clock: if this log was exported earlier, ask for the dates it covers instead.',
2123
2240
  windowNeedsClock: () => 'No record in this log carries a timestamp, so --since/--until have nothing to filter by. A time window over a clockless log would gate nothing, which is not an answer. Add "ts" to the records, the recipe in the README shows where.',
2124
2241
  windowMatchesNothing: (from, to) => `No record falls inside this window. The log covers ${from} → ${to}. A window matching nothing must not become a $0 report, under --max-usd it would pass a budget gate over a period the log does not cover.`,
2242
+ gateNothingMeasured: (reason) => `A spend gate is armed and there was nothing to judge: ${reason}. An absence is not a pass, so this exits 1 rather than reporting $0 against your budget. Fix the log, or pass --allow-empty if a period with no calls is the expected answer.`,
2243
+ nothingUnreadable: (lines) => `every one of the ${count(lines)} ${lines === 1 ? 'line' : 'lines'} in that file was unreadable`,
2244
+ nothingUnpriced: (calls) => `${count(calls)} ${calls === 1 ? 'call was' : 'calls were'} recorded and none of their models are in the price table`,
2245
+ nothingEmpty: () => 'the log holds no records at all',
2125
2246
  sinceAfterUntil: () => '--since is at or after --until, so the window contains no time at all. Check the two dates.',
2126
2247
  badWhen: (flag, value) => `--${flag} could not read "${value}". It takes a UTC day (2026-08-14) or a full ISO 8601 timestamp (2026-08-14T09:30:00Z).`,
2127
2248
  singleTurnCeiling: (label, model, single, sessions, usd) => `${label} on ${model}: ${single} of ${sessions} conversations ended after their first turn, and their cache writes, ${usd}, paid for reuse their own conversation never made. Another conversation sharing the same prefix within the TTL could have read them; the log cannot see whose write a read hit, so that figure is a ceiling on the waste, not a bill.`,