ccus-cli 0.2.22 → 0.2.23
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
|
@@ -176,10 +176,15 @@ ccus aggregate serve --input-dir ./team-exports
|
|
|
176
176
|
- 当前导出 bundle / weeklySummary 的 `schemaVersion` 为 `12`。两处 `range.dayStart` 记录统计日开始时间(如 `07:00`),供聚合沿用导出口径。顶层 `pricing` 记录本地价格目录版本、USD 币种和 `event-time-standard-api` 基准;`weeklySummary.apiEquivalentCost` 与 `dailySummaries[].apiEquivalentCost` 分别包含 `claude`、`codex`、`total` 的金额及定价覆盖度。v10 延续 v9 的 Codex token 口径:`inputTokens = max(0, input_tokens - cached_input_tokens)`,缓存输入由 `cacheReadInputTokens` 单列
|
|
177
177
|
- v11 在有未定价请求的成本结果中增加 `unpricedModels: [{ model, requestCount }]`,按原始模型名累计请求数,模型缺失记为 `null`,无未定价请求时省略。该明细仅写入 JSON,不增加页面或 CSV 字段;v10 导出仍可读取,但没有模型明细。
|
|
178
178
|
- 等效 API 成本按每次请求的模型、发生时间和 token 分类套用内置标准同步 API 价格。Claude 区分输入、输出、缓存读取及 5 分钟/1 小时缓存写入;Codex 区分净输入、缓存输入和输出。它不是 Claude/Codex 订阅账单,也不含税费、折扣、批处理、工具附加费或区域溢价
|
|
179
|
-
- 未知模型不会丢弃:有部分请求可定价时金额是已知小计,页面显示“至少为”;全部请求均无法定价时金额为不可用。个人 dashboard 在顶部第五张卡显示 Claude 与 Codex 的合计成本,不显示来源分项。全部模型价格集中维护在 `src/lib/api-pricing-catalog.json`,价格目录随 ccus 发布,统计过程不联网;个人与多人 dashboard 的合计成本卡下链接独立 `pricing.html` 并在新页面打开,价格页只保留一套标题,Codex 排在 Claude 前并按模型版本从新到旧排列。当前 Claude 目录包含 Opus
|
|
180
|
-
- GPT-6 使用 `gpt-6-astra` 定价,兼容 `gpt-6` 别名及推理强度后缀。自 2026-09-03 起,每百万 token 输入 / 缓存读取 / 输出为 $10 / $1 / $50;输入与缓存读取合计超过 272K 时为 $20 / $2 / $75。来源:[OpenAI 模型定价](https://developers.openai.com/api/docs/models/gpt-6-astra)。价格目录版本为 `2026-
|
|
179
|
+
- 未知模型不会丢弃:有部分请求可定价时金额是已知小计,页面显示“至少为”;全部请求均无法定价时金额为不可用。个人 dashboard 在顶部第五张卡显示 Claude 与 Codex 的合计成本,不显示来源分项。全部模型价格集中维护在 `src/lib/api-pricing-catalog.json`,价格目录随 ccus 发布,统计过程不联网;个人与多人 dashboard 的合计成本卡下链接独立 `pricing.html` 并在新页面打开,价格页只保留一套标题,Codex 排在 Claude 前并按模型版本从新到旧排列。当前 Claude 目录包含 Opus / Sonnet / Haiku 5.5、Fable 5.1 与 Mythos 5 / 5.1,并保留历史模型价格
|
|
180
|
+
- GPT-6 使用 `gpt-6-astra` 定价,兼容 `gpt-6` 别名及推理强度后缀。自 2026-09-03 起,每百万 token 输入 / 缓存读取 / 输出为 $10 / $1 / $50;输入与缓存读取合计超过 272K 时为 $20 / $2 / $75。来源:[OpenAI 模型定价](https://developers.openai.com/api/docs/models/gpt-6-astra)。价格目录版本为 `2026-10-08`
|
|
181
181
|
- 自 2026-09-22 起,`gpt-6-sol` 每百万 token 输入 / 缓存读取 / 输出为 $2 / $0.20 / $10,`gpt-6-luna` 为 $0.10 / $0.01 / $0.50;输入与缓存读取合计超过 272K 时,分别为 $4 / $0.40 / $15 和 $0.20 / $0.02 / $0.75。均兼容推理强度后缀。来源:[OpenAI 价格表](https://developers.openai.com/api/docs/pricing)。
|
|
182
|
+
- 自 2026-09-29 起,`gpt-6.1-sol` 每百万 token 输入 / 缓存读取 / 输出为 $2 / $0.10 / $10;输入与缓存读取合计超过 272K 时为 $4 / $0.20 / $15。兼容推理强度后缀。来源:[OpenAI 模型定价](https://developers.openai.com/api/docs/models/gpt-6.1-sol)。
|
|
182
183
|
- 自 2026-09-22 起,`claude-opus-5-5`(目录名 `claude-opus-5.5`)每百万 token 输入 / 输出 / 缓存读取 / 5 分钟缓存写入 / 1 小时缓存写入为 $4 / $20 / $0.20 / $5 / $8。来源:[官方发布公告](https://www.anthropic.com/claude-opus-5-5)、[缓存计价说明](https://claude.com/blog/what-a-task-costs-on-opus-5-5)。
|
|
184
|
+
- 自 2026-09-01 起,Fable 5.1 与 Mythos 5.1 每百万 token 输入 / 输出 / 缓存读取 / 5 分钟缓存写入 / 1 小时缓存写入为 $10 / $50 / $0.25 / $12.50 / $20;Mythos 5 自 2026-06-09 起为 $10 / $50 / $1 / $12.50 / $20。Mythos 访问受限,但公开价格可用于成本估算。来源:[Claude 价格表](https://platform.claude.com/docs/en/about-claude/pricing)。
|
|
185
|
+
- Sonnet 5.5 自 2026-09-28 起为 $2 / $10 / $0.20 / $2.50 / $4,2026-10-07 起缓存读取降为 $0.10,其余不变。Haiku 5.5 自 2026-10-07 起为 $0.10 / $0.50 / $0.01 / $0.125 / $0.20;全部输入类 token 合计超过 100K 时为 $0.50 / $2.50 / $0.05 / $0.625 / $1。上述金额依次为每百万 token 输入 / 输出 / 缓存读取 / 5 分钟缓存写入 / 1 小时缓存写入。来源:[Claude 价格表](https://platform.claude.com/docs/en/about-claude/pricing)、[发布记录](https://platform.claude.com/docs/en/release-notes/overview)。
|
|
186
|
+
- Sonnet 5 的 $2 / $10 输入 / 输出价格已转为长期标准价,原定 2026-09-01 涨价取消;Sonnet 4.6 自 2026-03-13 起取消长上下文加价,此前事件保留历史计价。来源:[Claude 发布记录](https://platform.claude.com/docs/en/release-notes/overview)。
|
|
187
|
+
- `gpt-5.4-mini` 自 2026-03-17 起,每百万 token 输入 / 缓存读取 / 输出为 $0.75 / $0.075 / $4.50,不设长上下文加价。来源:[OpenAI 模型定价](https://developers.openai.com/api/docs/models/gpt-5.4-mini)。
|
|
183
188
|
- `gpt-5.3-codex-spark` 自 2026-02-12 起按 `gpt-5.3-codex` 价格估算:每百万 token 输入 $1.75、输出 $14、缓存读取 $0.175。这是本项目采用的估算单价,并非 Spark 官方公开 API 定价。
|
|
184
189
|
- 默认文件名会带 git email 的帐号名前缀和起止日期,例如:`alice_export_2026-05-26_to_2026-06-01.json.gz`
|
|
185
190
|
- `userMessageCount` 来自 `~/.claude/projects/**/*.jsonl` 的非 meta `type:user` 事件
|
|
@@ -85,15 +85,15 @@ function normalizeClaudeModel(model) {
|
|
|
85
85
|
.replaceAll("_", "-")
|
|
86
86
|
.replace(/\[1m\]$/, "")
|
|
87
87
|
.replace(/-thinking(?=-\d{8}$|$)/, "");
|
|
88
|
-
const canonicalMinor = /^claude-(opus|sonnet|haiku|fable)-(\d+)\.(\d+)(?:-\d{8})?$/.exec(value);
|
|
88
|
+
const canonicalMinor = /^claude-(opus|sonnet|haiku|fable|mythos)-(\d+)\.(\d+)(?:-\d{8})?$/.exec(value);
|
|
89
89
|
if (canonicalMinor) {
|
|
90
90
|
return `claude-${canonicalMinor[1]}-${canonicalMinor[2]}.${canonicalMinor[3]}`;
|
|
91
91
|
}
|
|
92
|
-
const modern = /^claude-(opus|sonnet|haiku|fable)-(\d+)-(\d+)(?:-\d{8})?$/.exec(value);
|
|
92
|
+
const modern = /^claude-(opus|sonnet|haiku|fable|mythos)-(\d+)-(\d+)(?:-\d{8})?$/.exec(value);
|
|
93
93
|
if (modern) {
|
|
94
94
|
return `claude-${modern[1]}-${modern[2]}.${modern[3]}`;
|
|
95
95
|
}
|
|
96
|
-
const modernMajor = /^claude-(opus|sonnet|haiku|fable)-(\d+)(?:-\d{8})?$/.exec(value);
|
|
96
|
+
const modernMajor = /^claude-(opus|sonnet|haiku|fable|mythos)-(\d+)(?:-\d{8})?$/.exec(value);
|
|
97
97
|
if (modernMajor) {
|
|
98
98
|
return `claude-${modernMajor[1]}-${modernMajor[2]}`;
|
|
99
99
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"catalogVersion": "2026-
|
|
2
|
+
"catalogVersion": "2026-10-08",
|
|
3
3
|
"currency": "USD",
|
|
4
4
|
"basis": "event-time-standard-api",
|
|
5
5
|
"entries": [
|
|
@@ -99,13 +99,20 @@
|
|
|
99
99
|
"provider": "claude",
|
|
100
100
|
"model": "claude-sonnet-4.6",
|
|
101
101
|
"effectiveFrom": "2026-02-17T00:00:00.000Z",
|
|
102
|
-
"effectiveTo":
|
|
102
|
+
"effectiveTo": "2026-03-13T00:00:00.000Z",
|
|
103
103
|
"prices": { "inputUsdPerMillion": 3, "outputUsdPerMillion": 15, "cacheReadInputUsdPerMillion": 0.3, "cacheWrite5mInputUsdPerMillion": 3.75, "cacheWrite1hInputUsdPerMillion": 6 },
|
|
104
104
|
"longContext": {
|
|
105
105
|
"thresholdInputTokens": 200000,
|
|
106
106
|
"prices": { "inputUsdPerMillion": 6, "outputUsdPerMillion": 22.5, "cacheReadInputUsdPerMillion": 0.6, "cacheWrite5mInputUsdPerMillion": 7.5, "cacheWrite1hInputUsdPerMillion": 12 }
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
|
+
{
|
|
110
|
+
"provider": "claude",
|
|
111
|
+
"model": "claude-sonnet-4.6",
|
|
112
|
+
"effectiveFrom": "2026-03-13T00:00:00.000Z",
|
|
113
|
+
"effectiveTo": null,
|
|
114
|
+
"prices": { "inputUsdPerMillion": 3, "outputUsdPerMillion": 15, "cacheReadInputUsdPerMillion": 0.3, "cacheWrite5mInputUsdPerMillion": 3.75, "cacheWrite1hInputUsdPerMillion": 6 }
|
|
115
|
+
},
|
|
109
116
|
{
|
|
110
117
|
"provider": "claude",
|
|
111
118
|
"model": "claude-opus-4.7",
|
|
@@ -131,15 +138,29 @@
|
|
|
131
138
|
"provider": "claude",
|
|
132
139
|
"model": "claude-sonnet-5",
|
|
133
140
|
"effectiveFrom": "2026-06-30T00:00:00.000Z",
|
|
134
|
-
"effectiveTo":
|
|
141
|
+
"effectiveTo": null,
|
|
135
142
|
"prices": { "inputUsdPerMillion": 2, "outputUsdPerMillion": 10, "cacheReadInputUsdPerMillion": 0.2, "cacheWrite5mInputUsdPerMillion": 2.5, "cacheWrite1hInputUsdPerMillion": 4 }
|
|
136
143
|
},
|
|
137
144
|
{
|
|
138
145
|
"provider": "claude",
|
|
139
|
-
"model": "claude-
|
|
146
|
+
"model": "claude-fable-5.1",
|
|
140
147
|
"effectiveFrom": "2026-09-01T00:00:00.000Z",
|
|
141
148
|
"effectiveTo": null,
|
|
142
|
-
"prices": { "inputUsdPerMillion":
|
|
149
|
+
"prices": { "inputUsdPerMillion": 10, "outputUsdPerMillion": 50, "cacheReadInputUsdPerMillion": 0.25, "cacheWrite5mInputUsdPerMillion": 12.5, "cacheWrite1hInputUsdPerMillion": 20 }
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"provider": "claude",
|
|
153
|
+
"model": "claude-mythos-5",
|
|
154
|
+
"effectiveFrom": "2026-06-09T00:00:00.000Z",
|
|
155
|
+
"effectiveTo": null,
|
|
156
|
+
"prices": { "inputUsdPerMillion": 10, "outputUsdPerMillion": 50, "cacheReadInputUsdPerMillion": 1, "cacheWrite5mInputUsdPerMillion": 12.5, "cacheWrite1hInputUsdPerMillion": 20 }
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"provider": "claude",
|
|
160
|
+
"model": "claude-mythos-5.1",
|
|
161
|
+
"effectiveFrom": "2026-09-01T00:00:00.000Z",
|
|
162
|
+
"effectiveTo": null,
|
|
163
|
+
"prices": { "inputUsdPerMillion": 10, "outputUsdPerMillion": 50, "cacheReadInputUsdPerMillion": 0.25, "cacheWrite5mInputUsdPerMillion": 12.5, "cacheWrite1hInputUsdPerMillion": 20 }
|
|
143
164
|
},
|
|
144
165
|
{
|
|
145
166
|
"provider": "claude",
|
|
@@ -155,6 +176,31 @@
|
|
|
155
176
|
"effectiveTo": null,
|
|
156
177
|
"prices": { "inputUsdPerMillion": 4, "outputUsdPerMillion": 20, "cacheReadInputUsdPerMillion": 0.2, "cacheWrite5mInputUsdPerMillion": 5, "cacheWrite1hInputUsdPerMillion": 8 }
|
|
157
178
|
},
|
|
179
|
+
{
|
|
180
|
+
"provider": "claude",
|
|
181
|
+
"model": "claude-sonnet-5.5",
|
|
182
|
+
"effectiveFrom": "2026-09-28T00:00:00.000Z",
|
|
183
|
+
"effectiveTo": "2026-10-07T00:00:00.000Z",
|
|
184
|
+
"prices": { "inputUsdPerMillion": 2, "outputUsdPerMillion": 10, "cacheReadInputUsdPerMillion": 0.2, "cacheWrite5mInputUsdPerMillion": 2.5, "cacheWrite1hInputUsdPerMillion": 4 }
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"provider": "claude",
|
|
188
|
+
"model": "claude-sonnet-5.5",
|
|
189
|
+
"effectiveFrom": "2026-10-07T00:00:00.000Z",
|
|
190
|
+
"effectiveTo": null,
|
|
191
|
+
"prices": { "inputUsdPerMillion": 2, "outputUsdPerMillion": 10, "cacheReadInputUsdPerMillion": 0.1, "cacheWrite5mInputUsdPerMillion": 2.5, "cacheWrite1hInputUsdPerMillion": 4 }
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"provider": "claude",
|
|
195
|
+
"model": "claude-haiku-5.5",
|
|
196
|
+
"effectiveFrom": "2026-10-07T00:00:00.000Z",
|
|
197
|
+
"effectiveTo": null,
|
|
198
|
+
"prices": { "inputUsdPerMillion": 0.1, "outputUsdPerMillion": 0.5, "cacheReadInputUsdPerMillion": 0.01, "cacheWrite5mInputUsdPerMillion": 0.125, "cacheWrite1hInputUsdPerMillion": 0.2 },
|
|
199
|
+
"longContext": {
|
|
200
|
+
"thresholdInputTokens": 100000,
|
|
201
|
+
"prices": { "inputUsdPerMillion": 0.5, "outputUsdPerMillion": 2.5, "cacheReadInputUsdPerMillion": 0.05, "cacheWrite5mInputUsdPerMillion": 0.625, "cacheWrite1hInputUsdPerMillion": 1 }
|
|
202
|
+
}
|
|
203
|
+
},
|
|
158
204
|
{
|
|
159
205
|
"provider": "codex",
|
|
160
206
|
"model": "gpt-5",
|
|
@@ -236,6 +282,13 @@
|
|
|
236
282
|
"prices": { "inputUsdPerMillion": 5, "outputUsdPerMillion": 22.5, "cacheReadInputUsdPerMillion": 0.5 }
|
|
237
283
|
}
|
|
238
284
|
},
|
|
285
|
+
{
|
|
286
|
+
"provider": "codex",
|
|
287
|
+
"model": "gpt-5.4-mini",
|
|
288
|
+
"effectiveFrom": "2026-03-17T00:00:00.000Z",
|
|
289
|
+
"effectiveTo": null,
|
|
290
|
+
"prices": { "inputUsdPerMillion": 0.75, "outputUsdPerMillion": 4.5, "cacheReadInputUsdPerMillion": 0.075 }
|
|
291
|
+
},
|
|
239
292
|
{
|
|
240
293
|
"provider": "codex",
|
|
241
294
|
"model": "gpt-5.5",
|
|
@@ -302,6 +355,17 @@
|
|
|
302
355
|
"prices": { "inputUsdPerMillion": 4, "outputUsdPerMillion": 15, "cacheReadInputUsdPerMillion": 0.4 }
|
|
303
356
|
}
|
|
304
357
|
},
|
|
358
|
+
{
|
|
359
|
+
"provider": "codex",
|
|
360
|
+
"model": "gpt-6.1-sol",
|
|
361
|
+
"effectiveFrom": "2026-09-29T00:00:00.000Z",
|
|
362
|
+
"effectiveTo": null,
|
|
363
|
+
"prices": { "inputUsdPerMillion": 2, "outputUsdPerMillion": 10, "cacheReadInputUsdPerMillion": 0.1 },
|
|
364
|
+
"longContext": {
|
|
365
|
+
"thresholdInputTokens": 272000,
|
|
366
|
+
"prices": { "inputUsdPerMillion": 4, "outputUsdPerMillion": 15, "cacheReadInputUsdPerMillion": 0.2 }
|
|
367
|
+
}
|
|
368
|
+
},
|
|
305
369
|
{
|
|
306
370
|
"provider": "codex",
|
|
307
371
|
"model": "gpt-6-luna",
|