repospend 0.1.4 → 0.1.6
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 +15 -0
- package/README.md +13 -1
- package/dist/cli.js +42 -10
- package/docs/llms.txt +3 -0
- package/docs/pricing.md +14 -2
- package/package.json +1 -1
- package/web-dist/assets/{index-C9ld0JFH.js → index-B2mGGjf_.js} +12 -12
- package/web-dist/index.html +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to RepoSpend will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.1.6
|
|
6
|
+
|
|
7
|
+
- Add explicit GPT-6.1 Sol Standard API-equivalent pricing, including its lower $0.10 cached-input rate, without changing GPT-6 Sol estimates.
|
|
8
|
+
- Resolve date-suffixed GPT model IDs to the correct generation while preserving custom snapshot overrides, including case-insensitive and provider-prefixed aliases, and unknown fast-mode cards.
|
|
9
|
+
- Add model pricing and Codex usage guide links to the README and AI-readable documentation, with current pricing sources and estimate limits.
|
|
10
|
+
|
|
11
|
+
## 0.1.5
|
|
12
|
+
|
|
13
|
+
- Correct GPT-5.6 Sol and its alias to the current promotional rates, preserving custom pricing overrides.
|
|
14
|
+
- Add explicit Claude Sonnet 5.5 rates and newer Gemini Flash, MAI-Code, Grok, and Kimi Copilot models.
|
|
15
|
+
- Price Claude Opus 4.8, 5, and 5.5 fast-mode usage separately, including mixed-speed sessions and cached token buckets.
|
|
16
|
+
- Keep fast requests without a published rate unpriced rather than inheriting Standard rates.
|
|
17
|
+
- Prevent date-suffixed older Claude model IDs from inheriting newer model prices.
|
|
18
|
+
- Record promotional pricing dates and update model aliases and pricing documentation.
|
|
19
|
+
|
|
5
20
|
## 0.1.4
|
|
6
21
|
|
|
7
22
|
- Add exact Standard API-equivalent rates for GPT-6 Astra, Sol, and Luna, including cached input and cache writes.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# RepoSpend
|
|
1
|
+
# RepoSpend — local AI coding cost tracker
|
|
2
2
|
|
|
3
3
|
RepoSpend is a local-first dashboard for tracking AI coding token usage and API-equivalent spend by repository, session, model, and tool. It supports local Codex, Claude Code, and GitHub Copilot usage data, runs with `npx repospend`, and does not upload prompts, code, transcripts, or usage data.
|
|
4
4
|
|
|
@@ -19,6 +19,18 @@ Project links:
|
|
|
19
19
|
- npm package: [`repospend`](https://www.npmjs.com/package/repospend)
|
|
20
20
|
- AI-readable summary: [docs/llms.txt](docs/llms.txt)
|
|
21
21
|
|
|
22
|
+
## Model pricing and usage guides
|
|
23
|
+
|
|
24
|
+
RepoSpend includes explicit **GPT-6.1 Sol** API-equivalent pricing: $2 input,
|
|
25
|
+
$0.10 cached input, $2.50 cache writes, and $10 output per million tokens at
|
|
26
|
+
Standard short-context rates. GPT-6 Sol keeps its separate $0.20 cache-read rate.
|
|
27
|
+
Estimates describe local token usage, not your ChatGPT or Codex subscription bill.
|
|
28
|
+
|
|
29
|
+
- [GPT-6.1 Sol pricing and Codex cost tracking](https://repospend.com/guides/gpt-6-1-sol-pricing) — caching, a worked estimate, and local repository usage.
|
|
30
|
+
- [The AI coding price war: Claude 5.5 vs GPT-6.1 Sol](https://repospend.com/guides/ai-coding-price-war) — provider rates and cost per successful task.
|
|
31
|
+
- [Pricing methodology and local overrides](docs/pricing.md)
|
|
32
|
+
- [Token accounting: input, caching, output, and reasoning](docs/token-accounting.md)
|
|
33
|
+
|
|
22
34
|
```bash
|
|
23
35
|
npx repospend
|
|
24
36
|
```
|
package/dist/cli.js
CHANGED
|
@@ -229,7 +229,7 @@ import path from "node:path";
|
|
|
229
229
|
|
|
230
230
|
// packages/types/src/index.ts
|
|
231
231
|
function normalizePricingModelId(model) {
|
|
232
|
-
return model.toLowerCase().replace(/^github_copilot\//, "").replace(/^github-copilot\//, "").replace(/^copilot\//, "").replace(/claude-(opus|sonnet|haiku)-(\d+)\.(\d+)(?=$|[-.])/, "claude-$1-$2-$3");
|
|
232
|
+
return model.toLowerCase().replace(/-\d{8}(?=-fast-mode(?:$|-))/, "").replace(/^github_copilot\//, "").replace(/^github-copilot\//, "").replace(/^copilot\//, "").replace(/claude-(opus|sonnet|haiku)-(\d+)\.(\d+)(?=$|[-.])/, "claude-$1-$2-$3");
|
|
233
233
|
}
|
|
234
234
|
function claudePricingFamilyModel(model, isUsable = () => true) {
|
|
235
235
|
const families = [
|
|
@@ -237,6 +237,8 @@ function claudePricingFamilyModel(model, isUsable = () => true) {
|
|
|
237
237
|
"claude-fable-5",
|
|
238
238
|
"claude-mythos-5-1",
|
|
239
239
|
"claude-mythos-5",
|
|
240
|
+
"claude-opus-5-5-fast-mode",
|
|
241
|
+
"claude-opus-5-fast-mode",
|
|
240
242
|
"claude-opus-5-5",
|
|
241
243
|
"claude-opus-5",
|
|
242
244
|
"claude-opus-4-8-fast-mode",
|
|
@@ -245,6 +247,7 @@ function claudePricingFamilyModel(model, isUsable = () => true) {
|
|
|
245
247
|
"claude-opus-4-5",
|
|
246
248
|
"claude-opus-4-1",
|
|
247
249
|
"claude-opus-4",
|
|
250
|
+
"claude-sonnet-5-5",
|
|
248
251
|
"claude-sonnet-5",
|
|
249
252
|
"claude-sonnet-4-6",
|
|
250
253
|
"claude-sonnet-4-5",
|
|
@@ -268,6 +271,9 @@ function copilotPricingFamilyModel(model, isUsable = () => true) {
|
|
|
268
271
|
if ((normalized === "gemini-3-flash" || normalized.startsWith("gemini-3-flash-")) && isUsable("gemini-3-flash")) return "gemini-3-flash";
|
|
269
272
|
if ((normalized === "gemini-3.1-pro" || normalized.startsWith("gemini-3.1-pro-")) && isUsable("gemini-3.1-pro")) return "gemini-3.1-pro";
|
|
270
273
|
if ((normalized === "gemini-3.5-flash" || normalized.startsWith("gemini-3.5-flash-")) && isUsable("gemini-3.5-flash")) return "gemini-3.5-flash";
|
|
274
|
+
for (const candidate of ["gemini-3.6-flash", "gemini-3.7-flash", "gemini-3.8-flash", "grok-4.5", "grok-4.6", "grok-4.7", "mai-code-1.1-flash", "kimi-k3"]) {
|
|
275
|
+
if ((normalized === candidate || normalized.startsWith(`${candidate}-`)) && isUsable(candidate)) return candidate;
|
|
276
|
+
}
|
|
271
277
|
if ((normalized === "raptor-mini" || normalized.startsWith("raptor-mini-") || normalized.startsWith("oswe-vscode")) && isUsable("raptor-mini")) return "raptor-mini";
|
|
272
278
|
if ((normalized === "lark" || normalized.startsWith("lark-")) && isUsable("lark")) return "lark";
|
|
273
279
|
if ((normalized === "goldeneye" || normalized.startsWith("goldeneye-")) && isUsable("goldeneye")) return "goldeneye";
|
|
@@ -277,12 +283,13 @@ function copilotPricingFamilyModel(model, isUsable = () => true) {
|
|
|
277
283
|
}
|
|
278
284
|
function parseVersionedModel(normalized) {
|
|
279
285
|
if (normalized.includes("fast-mode")) return void 0;
|
|
280
|
-
const claude = normalized.match(/^(claude-(?:fable|mythos|opus|sonnet|haiku))-(\d+)(?:-(\d
|
|
286
|
+
const claude = normalized.match(/^(claude-(?:fable|mythos|opus|sonnet|haiku))-(\d+)(?:-(\d{1,2}))?(?!\d)/);
|
|
281
287
|
if (claude) {
|
|
282
288
|
const minor = claude[3] ? Number(claude[3]) : 0;
|
|
283
289
|
return { tier: claude[1], version: Number(claude[2]) + minor / 100 };
|
|
284
290
|
}
|
|
285
|
-
const
|
|
291
|
+
const gptModel = normalized.replace(/-(?:\d{4}-\d{2}-\d{2}|\d{8})$/, "");
|
|
292
|
+
const gpt = gptModel.match(/^(gpt)-(\d)(?:\.(\d+))?(-[a-z][a-z0-9-]*)?$/);
|
|
286
293
|
if (gpt) {
|
|
287
294
|
const minor = gpt[3] ? Number(gpt[3]) : 0;
|
|
288
295
|
return { tier: `gpt${gpt[4] ?? ""}`, version: Number(gpt[2]) + minor / 100 };
|
|
@@ -303,7 +310,7 @@ function versionedFallbackModel(model, knownModels, isUsable = () => true) {
|
|
|
303
310
|
}
|
|
304
311
|
function isCopilotAliasModel(model) {
|
|
305
312
|
const normalized = normalizePricingModelId(model);
|
|
306
|
-
return normalized.startsWith("raptor-mini") || normalized.startsWith("oswe-vscode") || normalized === "lark" || normalized.startsWith("lark-") || normalized.startsWith("goldeneye") || normalized.startsWith("mai-code-1-flash") || normalized.startsWith("kimi-k2.7-code");
|
|
313
|
+
return normalized.startsWith("raptor-mini") || normalized.startsWith("oswe-vscode") || normalized === "lark" || normalized.startsWith("lark-") || normalized.startsWith("goldeneye") || normalized.startsWith("mai-code-1-flash") || normalized.startsWith("kimi-k2.7-code") || normalized.startsWith("mai-code-1.1-flash") || (normalized === "kimi-k3" || normalized.startsWith("kimi-k3-")) || /^grok-4\.[567](?:$|-)/.test(normalized);
|
|
307
314
|
}
|
|
308
315
|
function positiveRate(value) {
|
|
309
316
|
return typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
@@ -331,21 +338,23 @@ var pricingInfo = {
|
|
|
331
338
|
sourceUrls: [
|
|
332
339
|
{ label: "OpenAI pricing reference", url: "https://developers.openai.com/api/docs/pricing" },
|
|
333
340
|
{ label: "OpenAI GPT-6 model reference", url: "https://developers.openai.com/api/docs/models" },
|
|
341
|
+
{ label: "OpenAI GPT-6.1 Sol reference", url: "https://developers.openai.com/api/docs/models/gpt-6.1-sol" },
|
|
334
342
|
{ label: "OpenAI GPT-5.6 preview pricing", url: "https://openai.com/index/previewing-gpt-5-6-sol/" },
|
|
335
343
|
{ label: "OpenAI GPT-5.6 price update", url: "https://openai.com/index/advancing-the-price-performance-frontier-with-gpt-5-6/" },
|
|
336
344
|
{ label: "Claude pricing reference", url: "https://platform.claude.com/docs/en/about-claude/pricing" },
|
|
337
345
|
{ label: "GitHub Copilot model pricing reference", url: "https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing" }
|
|
338
346
|
],
|
|
339
347
|
unit: "USD per 1M tokens",
|
|
340
|
-
updatedAt: "2026-09-
|
|
341
|
-
note: "RepoSpend estimates API-equivalent cost from local token counts and public Standard pricing. GPT-6 defaults use short-context rates. Long-context,
|
|
348
|
+
updatedAt: "2026-09-29",
|
|
349
|
+
note: "RepoSpend estimates API-equivalent cost from local token counts and public Standard pricing. GPT-6 defaults use short-context rates. Claude transcript fast-mode speeds use explicit published cards. Long-context, other processing modes, regional, and account-specific pricing can differ. This is not your actual bill."
|
|
342
350
|
};
|
|
343
351
|
var defaultPricing = {
|
|
344
352
|
"gpt-6-astra": { inputPerMillion: 10, cachedInputPerMillion: 1, cacheCreationInputPerMillion: 12.5, outputPerMillion: 50, reasoningOutputPerMillion: 50 },
|
|
345
353
|
"gpt-6-sol": { inputPerMillion: 2, cachedInputPerMillion: 0.2, cacheCreationInputPerMillion: 2.5, outputPerMillion: 10, reasoningOutputPerMillion: 10 },
|
|
354
|
+
"gpt-6.1-sol": { inputPerMillion: 2, cachedInputPerMillion: 0.1, cacheCreationInputPerMillion: 2.5, outputPerMillion: 10, reasoningOutputPerMillion: 10 },
|
|
346
355
|
"gpt-6-luna": { inputPerMillion: 0.1, cachedInputPerMillion: 0.01, cacheCreationInputPerMillion: 0.125, outputPerMillion: 0.5, reasoningOutputPerMillion: 0.5 },
|
|
347
|
-
"gpt-5.6": { inputPerMillion:
|
|
348
|
-
"gpt-5.6-sol": { inputPerMillion:
|
|
356
|
+
"gpt-5.6": { inputPerMillion: 4, cachedInputPerMillion: 0.4, cacheCreationInputPerMillion: 5, outputPerMillion: 20, reasoningOutputPerMillion: 20, note: "GPT-5.6 aliases Sol. Promotional Standard short-context rates are available at least through November 21, 2026: $4 input / $20 output, $0.40 cache reads, and $5 cache writes per 1M tokens." },
|
|
357
|
+
"gpt-5.6-sol": { inputPerMillion: 4, cachedInputPerMillion: 0.4, cacheCreationInputPerMillion: 5, outputPerMillion: 20, reasoningOutputPerMillion: 20, note: "Promotional Standard short-context rates available at least through November 21, 2026." },
|
|
349
358
|
"gpt-5.6-terra": { inputPerMillion: 2, cachedInputPerMillion: 0.2, cacheCreationInputPerMillion: 2.5, outputPerMillion: 12, reasoningOutputPerMillion: 12, note: "GPT-5.6 Terra reduced API pricing effective July 30, 2026. Cache reads are 90% below input and cache writes are 1.25x input." },
|
|
350
359
|
"gpt-5.6-luna": { inputPerMillion: 0.2, cachedInputPerMillion: 0.02, cacheCreationInputPerMillion: 0.25, outputPerMillion: 1.2, reasoningOutputPerMillion: 1.2, note: "GPT-5.6 Luna reduced API pricing effective July 30, 2026. Cache reads are 90% below input and cache writes are 1.25x input." },
|
|
351
360
|
"gpt-5.5": { inputPerMillion: 5, cachedInputPerMillion: 0.5, outputPerMillion: 30, reasoningOutputPerMillion: 30 },
|
|
@@ -375,6 +384,14 @@ var defaultPricing = {
|
|
|
375
384
|
"gemini-3-flash": { inputPerMillion: 0.5, cachedInputPerMillion: 0.05, outputPerMillion: 3, note: "GitHub Copilot supported Google-hosted model; API-equivalent estimate, not a Copilot bill." },
|
|
376
385
|
"gemini-3.1-pro": { inputPerMillion: 2, cachedInputPerMillion: 0.2, outputPerMillion: 12, note: "GitHub Copilot supported Google-hosted model; API-equivalent estimate, not a Copilot bill." },
|
|
377
386
|
"gemini-3.5-flash": { inputPerMillion: 1.5, cachedInputPerMillion: 0.15, outputPerMillion: 9, note: "GitHub Copilot supported Google-hosted model; API-equivalent estimate, not a Copilot bill." },
|
|
387
|
+
"gemini-3.6-flash": { inputPerMillion: 0.75, cachedInputPerMillion: 0.075, outputPerMillion: 3.75, note: "GitHub Copilot promotional rates through December 31, 2026; API-equivalent estimate." },
|
|
388
|
+
"gemini-3.7-flash": { inputPerMillion: 0.75, cachedInputPerMillion: 0.075, outputPerMillion: 3.75, note: "GitHub Copilot promotional rates through December 31, 2026; API-equivalent estimate." },
|
|
389
|
+
"gemini-3.8-flash": { inputPerMillion: 0.75, cachedInputPerMillion: 0.075, outputPerMillion: 3.75, note: "GitHub Copilot promotional rates through December 31, 2026; API-equivalent estimate." },
|
|
390
|
+
"grok-4.5": { inputPerMillion: 2, cachedInputPerMillion: 0.5, outputPerMillion: 6, note: "GitHub Copilot Standard rates up to 200K input tokens; longer requests use different rates." },
|
|
391
|
+
"grok-4.6": { inputPerMillion: 2, cachedInputPerMillion: 0.5, outputPerMillion: 6, note: "GitHub Copilot Standard rates up to 200K input tokens; longer requests use different rates." },
|
|
392
|
+
"grok-4.7": { inputPerMillion: 2, cachedInputPerMillion: 0.5, outputPerMillion: 6, note: "GitHub Copilot Standard rates up to 200K input tokens; longer requests use different rates." },
|
|
393
|
+
"mai-code-1.1-flash": { inputPerMillion: 0.2, cachedInputPerMillion: 0.02, outputPerMillion: 1.2, note: "GitHub Copilot Microsoft model; API-equivalent estimate." },
|
|
394
|
+
"kimi-k3": { inputPerMillion: 3, cachedInputPerMillion: 0.3, outputPerMillion: 15, note: "GitHub Copilot Moonshot AI model; API-equivalent estimate." },
|
|
378
395
|
"raptor-mini": { inputPerMillion: 0.25, cachedInputPerMillion: 0.025, outputPerMillion: 2, note: "GitHub Copilot fine-tuned model using GPT-5 mini pricing." },
|
|
379
396
|
"oswe-vscode-prime": { inputPerMillion: 0.25, cachedInputPerMillion: 0.025, outputPerMillion: 2, note: "GitHub Copilot Raptor mini internal model id." },
|
|
380
397
|
"lark": { inputPerMillion: 0.25, cachedInputPerMillion: 0.025, outputPerMillion: 2, note: "GitHub Copilot preview model; estimated with lightweight Copilot pricing." },
|
|
@@ -385,7 +402,9 @@ var defaultPricing = {
|
|
|
385
402
|
"claude-fable-5-1": { inputPerMillion: 10, cacheCreationInput5mPerMillion: 12.5, cacheCreationInput1hPerMillion: 20, cacheCreationInputPerMillion: 20, cachedInputPerMillion: 0.25, outputPerMillion: 50 },
|
|
386
403
|
"claude-mythos-5": { inputPerMillion: 10, cacheCreationInput5mPerMillion: 12.5, cacheCreationInput1hPerMillion: 20, cacheCreationInputPerMillion: 20, cachedInputPerMillion: 1, outputPerMillion: 50, note: "Limited availability Anthropic model; same public API-equivalent pricing as Claude Fable 5." },
|
|
387
404
|
"claude-mythos-5-1": { inputPerMillion: 10, cacheCreationInput5mPerMillion: 12.5, cacheCreationInput1hPerMillion: 20, cacheCreationInputPerMillion: 20, cachedInputPerMillion: 0.25, outputPerMillion: 50, note: "Limited availability Anthropic model; same public API-equivalent pricing as Claude Fable 5.1." },
|
|
405
|
+
"claude-opus-5-5-fast-mode": { inputPerMillion: 8, cacheCreationInput5mPerMillion: 10, cacheCreationInput1hPerMillion: 16, cacheCreationInputPerMillion: 16, cachedInputPerMillion: 0.4, outputPerMillion: 40, note: "Anthropic first-party fast mode rates; cache multipliers apply." },
|
|
388
406
|
"claude-opus-5-5": { inputPerMillion: 4, cacheCreationInput5mPerMillion: 5, cacheCreationInput1hPerMillion: 8, cacheCreationInputPerMillion: 8, cachedInputPerMillion: 0.2, outputPerMillion: 20 },
|
|
407
|
+
"claude-opus-5-fast-mode": { inputPerMillion: 10, cacheCreationInput5mPerMillion: 12.5, cacheCreationInput1hPerMillion: 20, cacheCreationInputPerMillion: 20, cachedInputPerMillion: 1, outputPerMillion: 50, note: "Anthropic first-party fast mode rates; cache multipliers apply." },
|
|
389
408
|
"claude-opus-5": { inputPerMillion: 5, cacheCreationInput5mPerMillion: 6.25, cacheCreationInput1hPerMillion: 10, cacheCreationInputPerMillion: 10, cachedInputPerMillion: 0.5, outputPerMillion: 25 },
|
|
390
409
|
"claude-opus-4-8": { inputPerMillion: 5, cacheCreationInput5mPerMillion: 6.25, cacheCreationInput1hPerMillion: 10, cacheCreationInputPerMillion: 10, cachedInputPerMillion: 0.5, outputPerMillion: 25 },
|
|
391
410
|
"claude-opus-4-8-fast-mode": { inputPerMillion: 10, cacheCreationInput5mPerMillion: 12.5, cacheCreationInput1hPerMillion: 20, cacheCreationInputPerMillion: 12.5, cachedInputPerMillion: 1, outputPerMillion: 50, note: "Claude Opus 4.8 fast mode research preview pricing. Prompt caching multipliers apply on top of fast mode pricing." },
|
|
@@ -395,6 +414,7 @@ var defaultPricing = {
|
|
|
395
414
|
"claude-opus-4-5": { inputPerMillion: 5, cacheCreationInput5mPerMillion: 6.25, cacheCreationInput1hPerMillion: 10, cacheCreationInputPerMillion: 10, cachedInputPerMillion: 0.5, outputPerMillion: 25 },
|
|
396
415
|
"claude-opus-4-1": { inputPerMillion: 15, cacheCreationInput5mPerMillion: 18.75, cacheCreationInput1hPerMillion: 30, cacheCreationInputPerMillion: 30, cachedInputPerMillion: 1.5, outputPerMillion: 75 },
|
|
397
416
|
"claude-opus-4": { inputPerMillion: 15, cacheCreationInput5mPerMillion: 18.75, cacheCreationInput1hPerMillion: 30, cacheCreationInputPerMillion: 30, cachedInputPerMillion: 1.5, outputPerMillion: 75 },
|
|
417
|
+
"claude-sonnet-5-5": { inputPerMillion: 2, cacheCreationInput5mPerMillion: 2.5, cacheCreationInput1hPerMillion: 4, cacheCreationInputPerMillion: 4, cachedInputPerMillion: 0.2, outputPerMillion: 10 },
|
|
398
418
|
"claude-sonnet-5": { inputPerMillion: 2, cacheCreationInput5mPerMillion: 2.5, cacheCreationInput1hPerMillion: 4, cacheCreationInputPerMillion: 4, cachedInputPerMillion: 0.2, outputPerMillion: 10, note: "Anthropic made the $2 input / $10 output introductory pricing permanent on August 10, 2026." },
|
|
399
419
|
"claude-sonnet-4-6": { inputPerMillion: 3, cacheCreationInput5mPerMillion: 3.75, cacheCreationInput1hPerMillion: 6, cacheCreationInputPerMillion: 6, cachedInputPerMillion: 0.3, outputPerMillion: 15 },
|
|
400
420
|
"claude-sonnet-4-5": { inputPerMillion: 3, cacheCreationInput5mPerMillion: 3.75, cacheCreationInput1hPerMillion: 6, cacheCreationInputPerMillion: 6, cachedInputPerMillion: 0.3, outputPerMillion: 15 },
|
|
@@ -403,6 +423,8 @@ var defaultPricing = {
|
|
|
403
423
|
"claude-3-5-haiku": { inputPerMillion: 0.8, cacheCreationInput5mPerMillion: 1, cacheCreationInput1hPerMillion: 1.6, cacheCreationInputPerMillion: 1.6, cachedInputPerMillion: 0.08, outputPerMillion: 4 }
|
|
404
424
|
};
|
|
405
425
|
var legacyBundledPricing = {
|
|
426
|
+
"gpt-5.6": { inputPerMillion: 5, cachedInputPerMillion: 0.5, cacheCreationInputPerMillion: 6.25, outputPerMillion: 30, reasoningOutputPerMillion: 30, note: "GPT-5.6 Sol flagship tier. OpenAI preview pricing lists Sol at $5 input / $30 output per 1M tokens, cache writes at 1.25x input, and cache reads at a 90% discount." },
|
|
427
|
+
"gpt-5.6-sol": { inputPerMillion: 5, cachedInputPerMillion: 0.5, cacheCreationInputPerMillion: 6.25, outputPerMillion: 30, reasoningOutputPerMillion: 30 },
|
|
406
428
|
"gpt-5.6-terra": { inputPerMillion: 2.5, cachedInputPerMillion: 0.25, cacheCreationInputPerMillion: 3.125, outputPerMillion: 15, reasoningOutputPerMillion: 15 },
|
|
407
429
|
"gpt-5.6-luna": { inputPerMillion: 1, cachedInputPerMillion: 0.1, cacheCreationInputPerMillion: 1.25, outputPerMillion: 6, reasoningOutputPerMillion: 6 },
|
|
408
430
|
"claude-sonnet-5": { inputPerMillion: 2, cacheCreationInput5mPerMillion: 2.5, cacheCreationInput1hPerMillion: 4, cacheCreationInputPerMillion: 4, cachedInputPerMillion: 0.2, outputPerMillion: 10, note: "Anthropic introductory pricing through August 31, 2026. Standard pricing from September 1, 2026 is $3 input / $15 output per 1M tokens." }
|
|
@@ -3031,11 +3053,21 @@ function claudeBreakdownToUsage(file, index, options, breakdown, idSuffix = "")
|
|
|
3031
3053
|
promptTimeline: breakdown.promptTimeline,
|
|
3032
3054
|
sessionOutcome: inferOutcome2(breakdown)
|
|
3033
3055
|
};
|
|
3034
|
-
const
|
|
3056
|
+
const costBuckets = /* @__PURE__ */ new Map();
|
|
3057
|
+
for (const event of breakdown.usageEvents) {
|
|
3058
|
+
const model = event.model ?? breakdown.model;
|
|
3059
|
+
const normalized = model ? normalizePricingModelId(model) : void 0;
|
|
3060
|
+
const pricingModel = normalized && normalizedServiceTier(event.usage.speed) === "fast" && !normalized.includes("fast-mode") && !/^claude-opus-4-6(?:$|-)/.test(normalized) ? `${normalized}-fast-mode` : model;
|
|
3061
|
+
const totals = costBuckets.get(pricingModel) ?? emptyBreakdown2();
|
|
3062
|
+
applyUsage(totals, event.usage);
|
|
3063
|
+
costBuckets.set(pricingModel, totals);
|
|
3064
|
+
}
|
|
3065
|
+
const costs = hasTokenBreakdown ? [...costBuckets].map(([model, totals]) => calculateCostUsd({ ...totals, model, reasoningTokens: 0 }, options.pricing)) : [];
|
|
3066
|
+
const cost = costs.length && costs.every((value) => value !== void 0) ? Number(costs.reduce((sum2, value) => sum2 + (value ?? 0), 0).toFixed(6)) : void 0;
|
|
3035
3067
|
return {
|
|
3036
3068
|
...usage,
|
|
3037
3069
|
estimatedCostUsd: cost,
|
|
3038
|
-
warnings: cost === void 0 ? [...usage.warnings, "unknown_pricing"] : usage.warnings
|
|
3070
|
+
warnings: cost === void 0 ? [...usage.warnings, "unknown_pricing", ...costs.some((value, index2) => value === void 0 && [...costBuckets.keys()][index2]?.includes("fast-mode")) ? ["unknown_fast_mode_pricing"] : []] : usage.warnings
|
|
3039
3071
|
};
|
|
3040
3072
|
}
|
|
3041
3073
|
function inferClaudeEntrypointFromPath(filePath) {
|
package/docs/llms.txt
CHANGED
|
@@ -9,6 +9,8 @@ Canonical URLs:
|
|
|
9
9
|
- npm: https://www.npmjs.com/package/repospend
|
|
10
10
|
- Package name: repospend
|
|
11
11
|
- Run command: npx repospend
|
|
12
|
+
- GPT-6.1 Sol pricing and Codex tracking: https://repospend.com/guides/gpt-6-1-sol-pricing
|
|
13
|
+
- AI coding price comparison: https://repospend.com/guides/ai-coding-price-war
|
|
12
14
|
|
|
13
15
|
What RepoSpend is:
|
|
14
16
|
- A local-first AI coding token usage dashboard.
|
|
@@ -56,5 +58,6 @@ Positioning:
|
|
|
56
58
|
- RepoSpend totals can intentionally differ from ccusage or Tokscale because it includes Claude Desktop/local-agent session roots when present, treats cache reads/writes as input sub-buckets, prices Claude cache writes by recorded 5-minute vs 1-hour TTL, and separates Codex visible output from reasoning output.
|
|
57
59
|
|
|
58
60
|
Cost language:
|
|
61
|
+
- GPT-6.1 Sol has an explicit Standard short-context card: $2 input, $0.10 cached input, $2.50 cache writes, $10 output per million tokens, checked September 29, 2026.
|
|
59
62
|
- RepoSpend shows estimated API-equivalent cost.
|
|
60
63
|
- RepoSpend does not claim to show actual bills, invoices, subscription usage, savings, credits, or account-specific charges.
|
package/docs/pricing.md
CHANGED
|
@@ -4,14 +4,26 @@ RepoSpend estimates API-equivalent cost from a local pricing table. The bundled
|
|
|
4
4
|
|
|
5
5
|
The bundled table is seeded from public OpenAI, Anthropic, Google, and GitHub Copilot model references and is expressed as USD per 1M tokens. Pricing changes over time, so treat RepoSpend costs as API-equivalent estimates rather than invoice-grade accounting.
|
|
6
6
|
|
|
7
|
-
The bundled defaults use
|
|
7
|
+
The GPT-6.1 Sol card was checked on September 29, 2026; other bundled defaults were checked on September 28, 2026. Defaults use published Standard API prices. Claude Sonnet 5.5 has explicit $2 input / $10 output rates with the same cache rates as Sonnet 5. Claude Sonnet 5 remains at $2 input and $10 output per 1M tokens because Anthropic made its introductory rate permanent on August 10, 2026.
|
|
8
8
|
|
|
9
9
|
GPT-6 Astra, Sol, and Luna use OpenAI's Standard short-context rates. Their long-context requests above 272,000 input tokens use different rates, and local session totals do not identify every request's pricing tier. Fast, batch, and regional processing can also differ from these defaults. RepoSpend keeps the result labeled as an API-equivalent estimate.
|
|
10
10
|
|
|
11
|
+
### GPT-6.1 Sol (September 29, 2026)
|
|
12
|
+
|
|
13
|
+
The explicit `gpt-6.1-sol` card uses $2 input, $0.10 cached input, $2.50 cache writes, and $10 output/reasoning per 1M tokens, verified against [OpenAI's model reference](https://developers.openai.com/api/docs/models/gpt-6.1-sol) on September 29. GPT-6 Sol remains separate at $0.20 for cached input. Case-insensitive and Copilot-prefixed IDs resolve to the same card; terminal snapshot dates preserve the model generation. Snapshot support is defensive parsing, not a claim that OpenAI publishes those snapshot IDs. Custom exact-ID overrides continue to take precedence.
|
|
14
|
+
|
|
15
|
+
Above 272K input tokens per request, GPT-6.1 Sol's Standard rates become $4 input, $0.20 cached input, $5 cache writes, and $15 output per 1M tokens. Fast costs twice Standard; Batch and Flex cost half Standard. RepoSpend's default estimate uses Standard short-context pricing because aggregate local usage cannot reliably identify these modifiers for every request. See the [GPT-6.1 Sol pricing and Codex tracking guide](https://repospend.com/guides/gpt-6-1-sol-pricing) for a worked example.
|
|
16
|
+
|
|
11
17
|
Claude Fable 5.1 and Mythos 5.1 retain their predecessor's base rates but have lower cache-read pricing. Claude Opus 5.5 has its own lower base and cache rates. These model rows use Anthropic's global Standard rates.
|
|
12
18
|
|
|
13
19
|
OpenAI reduced GPT-5.6 pricing effective July 30, 2026. RepoSpend uses $2 input and $12 output per 1M tokens for Terra, and $0.20 input and $1.20 output for Luna. Cached input remains 90% below the uncached input rate, and cache writes are billed at 1.25x the uncached input rate, so Luna's bundled cache-write rate is $0.25 per 1M tokens.
|
|
14
20
|
|
|
21
|
+
GPT-5.6 Sol and its `gpt-5.6` alias use promotional $4 input, $0.40 cached input, $5 cache writes, and $20 output/reasoning per 1M tokens, available at least through November 21, 2026. Older full bundled pricing files receive this correction; intentionally saved sparse overrides remain unchanged.
|
|
22
|
+
|
|
23
|
+
Gemini 3.6, 3.7, and 3.8 Flash use GitHub Copilot promotional rates through December 31, 2026. MAI-Code-1.1-Flash, Grok 4.5–4.7, and Kimi K3 have explicit Copilot reference cards. Grok rates use the up-to-200K input tier; longer requests cost more.
|
|
24
|
+
|
|
25
|
+
Claude transcript `usage.speed: "fast"` selects a fast-mode card per model and speed bucket, preserving accurate estimates for mixed-speed sessions. Opus 5.5 uses $8 input / $40 output, and Opus 5 uses $10 / $50; caching multipliers apply. Unknown fast cards remain unpriced with a visible warning. [Anthropic's current pricing documentation](https://platform.claude.com/docs/en/about-claude/pricing) states that Opus 4.6 ignores fast speed and uses Standard pricing. Regional and account modifiers are not applied.
|
|
26
|
+
|
|
15
27
|
The Settings page persists only custom or intentionally edited model rows. This lets future bundled rate updates flow through automatically. Older full pricing files are migrated for the GPT-5.6 Terra and Luna reductions when they still contain the previous bundled rates.
|
|
16
28
|
|
|
17
29
|
Some GitHub Copilot model rows are hosted or fine-tuned vendor models such as Raptor mini, MAI-Code-1-Flash, and Kimi K2.7 Code. RepoSpend prices those rows from GitHub's public per-token table as API-equivalent estimates, not as a Copilot invoice.
|
|
@@ -61,7 +73,7 @@ sessions that mostly used 5-minute cache writes. RepoSpend prices the buckets
|
|
|
61
73
|
recorded in the local Claude transcript instead of forcing every cache write into
|
|
62
74
|
one column.
|
|
63
75
|
|
|
64
|
-
When an exact model id is not present in the pricing table, RepoSpend first tries conservative family matching for known provider naming patterns. For example, a nearby newer Claude Opus 4.x or GPT 5.x variant can inherit the closest older bundled rate so the dashboard stays useful while public rate cards catch up. Inherited rates are labeled in Settings.
|
|
76
|
+
When an exact model id is not present in the pricing table, RepoSpend first tries the closest older version in the same model tier, then conservative family matching for known provider naming patterns. For example, a nearby newer Claude Opus 4.x or GPT 5.x variant can inherit the closest older bundled rate so the dashboard stays useful while public rate cards catch up. Inherited rates are labeled in Settings.
|
|
65
77
|
|
|
66
78
|
If RepoSpend cannot resolve a usable rate, it still displays token totals and marks cost as unknown. Unknown pricing does not stop scans, dashboard responses, CLI output, or exports.
|
|
67
79
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repospend",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Local-first dashboard for tracking AI coding token usage and API-equivalent spend by repository, session, model, and tool.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Mehmet Mustafa Demir",
|