repospend 0.1.4 → 0.1.5
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 +9 -0
- package/dist/cli.js +38 -9
- package/docs/pricing.md +8 -2
- package/package.json +1 -1
- package/web-dist/assets/{index-C9ld0JFH.js → index-aLOshIdm.js} +12 -12
- package/web-dist/index.html +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to RepoSpend will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.1.5
|
|
6
|
+
|
|
7
|
+
- Correct GPT-5.6 Sol and its alias to the current promotional rates, preserving custom pricing overrides.
|
|
8
|
+
- Add explicit Claude Sonnet 5.5 rates and newer Gemini Flash, MAI-Code, Grok, and Kimi Copilot models.
|
|
9
|
+
- Price Claude Opus 4.8, 5, and 5.5 fast-mode usage separately, including mixed-speed sessions and cached token buckets.
|
|
10
|
+
- Keep fast requests without a published rate unpriced rather than inheriting Standard rates.
|
|
11
|
+
- Prevent date-suffixed older Claude model IDs from inheriting newer model prices.
|
|
12
|
+
- Record promotional pricing dates and update model aliases and pricing documentation.
|
|
13
|
+
|
|
5
14
|
## 0.1.4
|
|
6
15
|
|
|
7
16
|
- Add exact Standard API-equivalent rates for GPT-6 Astra, Sol, and Luna, including cached input and cache writes.
|
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,7 +283,7 @@ 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 };
|
|
@@ -303,7 +309,7 @@ function versionedFallbackModel(model, knownModels, isUsable = () => true) {
|
|
|
303
309
|
}
|
|
304
310
|
function isCopilotAliasModel(model) {
|
|
305
311
|
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");
|
|
312
|
+
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
313
|
}
|
|
308
314
|
function positiveRate(value) {
|
|
309
315
|
return typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
@@ -337,15 +343,15 @@ var pricingInfo = {
|
|
|
337
343
|
{ label: "GitHub Copilot model pricing reference", url: "https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing" }
|
|
338
344
|
],
|
|
339
345
|
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,
|
|
346
|
+
updatedAt: "2026-09-28",
|
|
347
|
+
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
348
|
};
|
|
343
349
|
var defaultPricing = {
|
|
344
350
|
"gpt-6-astra": { inputPerMillion: 10, cachedInputPerMillion: 1, cacheCreationInputPerMillion: 12.5, outputPerMillion: 50, reasoningOutputPerMillion: 50 },
|
|
345
351
|
"gpt-6-sol": { inputPerMillion: 2, cachedInputPerMillion: 0.2, cacheCreationInputPerMillion: 2.5, outputPerMillion: 10, reasoningOutputPerMillion: 10 },
|
|
346
352
|
"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:
|
|
353
|
+
"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." },
|
|
354
|
+
"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
355
|
"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
356
|
"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
357
|
"gpt-5.5": { inputPerMillion: 5, cachedInputPerMillion: 0.5, outputPerMillion: 30, reasoningOutputPerMillion: 30 },
|
|
@@ -375,6 +381,14 @@ var defaultPricing = {
|
|
|
375
381
|
"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
382
|
"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
383
|
"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." },
|
|
384
|
+
"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." },
|
|
385
|
+
"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." },
|
|
386
|
+
"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." },
|
|
387
|
+
"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." },
|
|
388
|
+
"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." },
|
|
389
|
+
"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." },
|
|
390
|
+
"mai-code-1.1-flash": { inputPerMillion: 0.2, cachedInputPerMillion: 0.02, outputPerMillion: 1.2, note: "GitHub Copilot Microsoft model; API-equivalent estimate." },
|
|
391
|
+
"kimi-k3": { inputPerMillion: 3, cachedInputPerMillion: 0.3, outputPerMillion: 15, note: "GitHub Copilot Moonshot AI model; API-equivalent estimate." },
|
|
378
392
|
"raptor-mini": { inputPerMillion: 0.25, cachedInputPerMillion: 0.025, outputPerMillion: 2, note: "GitHub Copilot fine-tuned model using GPT-5 mini pricing." },
|
|
379
393
|
"oswe-vscode-prime": { inputPerMillion: 0.25, cachedInputPerMillion: 0.025, outputPerMillion: 2, note: "GitHub Copilot Raptor mini internal model id." },
|
|
380
394
|
"lark": { inputPerMillion: 0.25, cachedInputPerMillion: 0.025, outputPerMillion: 2, note: "GitHub Copilot preview model; estimated with lightweight Copilot pricing." },
|
|
@@ -385,7 +399,9 @@ var defaultPricing = {
|
|
|
385
399
|
"claude-fable-5-1": { inputPerMillion: 10, cacheCreationInput5mPerMillion: 12.5, cacheCreationInput1hPerMillion: 20, cacheCreationInputPerMillion: 20, cachedInputPerMillion: 0.25, outputPerMillion: 50 },
|
|
386
400
|
"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
401
|
"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." },
|
|
402
|
+
"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
403
|
"claude-opus-5-5": { inputPerMillion: 4, cacheCreationInput5mPerMillion: 5, cacheCreationInput1hPerMillion: 8, cacheCreationInputPerMillion: 8, cachedInputPerMillion: 0.2, outputPerMillion: 20 },
|
|
404
|
+
"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
405
|
"claude-opus-5": { inputPerMillion: 5, cacheCreationInput5mPerMillion: 6.25, cacheCreationInput1hPerMillion: 10, cacheCreationInputPerMillion: 10, cachedInputPerMillion: 0.5, outputPerMillion: 25 },
|
|
390
406
|
"claude-opus-4-8": { inputPerMillion: 5, cacheCreationInput5mPerMillion: 6.25, cacheCreationInput1hPerMillion: 10, cacheCreationInputPerMillion: 10, cachedInputPerMillion: 0.5, outputPerMillion: 25 },
|
|
391
407
|
"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 +411,7 @@ var defaultPricing = {
|
|
|
395
411
|
"claude-opus-4-5": { inputPerMillion: 5, cacheCreationInput5mPerMillion: 6.25, cacheCreationInput1hPerMillion: 10, cacheCreationInputPerMillion: 10, cachedInputPerMillion: 0.5, outputPerMillion: 25 },
|
|
396
412
|
"claude-opus-4-1": { inputPerMillion: 15, cacheCreationInput5mPerMillion: 18.75, cacheCreationInput1hPerMillion: 30, cacheCreationInputPerMillion: 30, cachedInputPerMillion: 1.5, outputPerMillion: 75 },
|
|
397
413
|
"claude-opus-4": { inputPerMillion: 15, cacheCreationInput5mPerMillion: 18.75, cacheCreationInput1hPerMillion: 30, cacheCreationInputPerMillion: 30, cachedInputPerMillion: 1.5, outputPerMillion: 75 },
|
|
414
|
+
"claude-sonnet-5-5": { inputPerMillion: 2, cacheCreationInput5mPerMillion: 2.5, cacheCreationInput1hPerMillion: 4, cacheCreationInputPerMillion: 4, cachedInputPerMillion: 0.2, outputPerMillion: 10 },
|
|
398
415
|
"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
416
|
"claude-sonnet-4-6": { inputPerMillion: 3, cacheCreationInput5mPerMillion: 3.75, cacheCreationInput1hPerMillion: 6, cacheCreationInputPerMillion: 6, cachedInputPerMillion: 0.3, outputPerMillion: 15 },
|
|
400
417
|
"claude-sonnet-4-5": { inputPerMillion: 3, cacheCreationInput5mPerMillion: 3.75, cacheCreationInput1hPerMillion: 6, cacheCreationInputPerMillion: 6, cachedInputPerMillion: 0.3, outputPerMillion: 15 },
|
|
@@ -403,6 +420,8 @@ var defaultPricing = {
|
|
|
403
420
|
"claude-3-5-haiku": { inputPerMillion: 0.8, cacheCreationInput5mPerMillion: 1, cacheCreationInput1hPerMillion: 1.6, cacheCreationInputPerMillion: 1.6, cachedInputPerMillion: 0.08, outputPerMillion: 4 }
|
|
404
421
|
};
|
|
405
422
|
var legacyBundledPricing = {
|
|
423
|
+
"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." },
|
|
424
|
+
"gpt-5.6-sol": { inputPerMillion: 5, cachedInputPerMillion: 0.5, cacheCreationInputPerMillion: 6.25, outputPerMillion: 30, reasoningOutputPerMillion: 30 },
|
|
406
425
|
"gpt-5.6-terra": { inputPerMillion: 2.5, cachedInputPerMillion: 0.25, cacheCreationInputPerMillion: 3.125, outputPerMillion: 15, reasoningOutputPerMillion: 15 },
|
|
407
426
|
"gpt-5.6-luna": { inputPerMillion: 1, cachedInputPerMillion: 0.1, cacheCreationInputPerMillion: 1.25, outputPerMillion: 6, reasoningOutputPerMillion: 6 },
|
|
408
427
|
"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 +3050,21 @@ function claudeBreakdownToUsage(file, index, options, breakdown, idSuffix = "")
|
|
|
3031
3050
|
promptTimeline: breakdown.promptTimeline,
|
|
3032
3051
|
sessionOutcome: inferOutcome2(breakdown)
|
|
3033
3052
|
};
|
|
3034
|
-
const
|
|
3053
|
+
const costBuckets = /* @__PURE__ */ new Map();
|
|
3054
|
+
for (const event of breakdown.usageEvents) {
|
|
3055
|
+
const model = event.model ?? breakdown.model;
|
|
3056
|
+
const normalized = model ? normalizePricingModelId(model) : void 0;
|
|
3057
|
+
const pricingModel = normalized && normalizedServiceTier(event.usage.speed) === "fast" && !normalized.includes("fast-mode") && !/^claude-opus-4-6(?:$|-)/.test(normalized) ? `${normalized}-fast-mode` : model;
|
|
3058
|
+
const totals = costBuckets.get(pricingModel) ?? emptyBreakdown2();
|
|
3059
|
+
applyUsage(totals, event.usage);
|
|
3060
|
+
costBuckets.set(pricingModel, totals);
|
|
3061
|
+
}
|
|
3062
|
+
const costs = hasTokenBreakdown ? [...costBuckets].map(([model, totals]) => calculateCostUsd({ ...totals, model, reasoningTokens: 0 }, options.pricing)) : [];
|
|
3063
|
+
const cost = costs.length && costs.every((value) => value !== void 0) ? Number(costs.reduce((sum2, value) => sum2 + (value ?? 0), 0).toFixed(6)) : void 0;
|
|
3035
3064
|
return {
|
|
3036
3065
|
...usage,
|
|
3037
3066
|
estimatedCostUsd: cost,
|
|
3038
|
-
warnings: cost === void 0 ? [...usage.warnings, "unknown_pricing"] : usage.warnings
|
|
3067
|
+
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
3068
|
};
|
|
3040
3069
|
}
|
|
3041
3070
|
function inferClaudeEntrypointFromPath(filePath) {
|
package/docs/pricing.md
CHANGED
|
@@ -4,7 +4,7 @@ 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 bundled defaults were checked on September 28, 2026 and 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
|
|
|
@@ -12,6 +12,12 @@ Claude Fable 5.1 and Mythos 5.1 retain their predecessor's base rates but have l
|
|
|
12
12
|
|
|
13
13
|
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
14
|
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
15
21
|
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
22
|
|
|
17
23
|
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 +67,7 @@ sessions that mostly used 5-minute cache writes. RepoSpend prices the buckets
|
|
|
61
67
|
recorded in the local Claude transcript instead of forcing every cache write into
|
|
62
68
|
one column.
|
|
63
69
|
|
|
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.
|
|
70
|
+
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
71
|
|
|
66
72
|
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
73
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repospend",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
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",
|