@ccusage/codex 17.2.0 → 18.0.1
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/dist/index.js +77 -2
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -895,7 +895,7 @@ async function executeCommand(cmd, ctx, name$1) {
|
|
|
895
895
|
await resolved.run(ctx);
|
|
896
896
|
}
|
|
897
897
|
var name = "@ccusage/codex";
|
|
898
|
-
var version = "
|
|
898
|
+
var version = "18.0.1";
|
|
899
899
|
var description = "Usage analysis tool for OpenAI Codex sessions";
|
|
900
900
|
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
901
901
|
let messages = [];
|
|
@@ -2681,8 +2681,14 @@ function formatCurrency(amount) {
|
|
|
2681
2681
|
return `$${amount.toFixed(2)}`;
|
|
2682
2682
|
}
|
|
2683
2683
|
function formatModelName(modelName) {
|
|
2684
|
-
const
|
|
2684
|
+
const piMatch = modelName.match(/^\[pi\] (.+)$/);
|
|
2685
|
+
if (piMatch?.[1] != null) return `[pi] ${formatModelName(piMatch[1])}`;
|
|
2686
|
+
const anthropicMatch = modelName.match(/^anthropic\/claude-(\w+)-([\d.]+)$/);
|
|
2687
|
+
if (anthropicMatch != null) return `${anthropicMatch[1]}-${anthropicMatch[2]}`;
|
|
2688
|
+
const match = modelName.match(/^claude-(\w+)-([\d-]+)-(\d{8})$/);
|
|
2685
2689
|
if (match != null) return `${match[1]}-${match[2]}`;
|
|
2690
|
+
const noDateMatch = modelName.match(/^claude-(\w+)-([\d-]+)$/);
|
|
2691
|
+
if (noDateMatch != null) return `${noDateMatch[1]}-${noDateMatch[2]}`;
|
|
2686
2692
|
return modelName;
|
|
2687
2693
|
}
|
|
2688
2694
|
function formatModelsDisplayMultiline(models) {
|
|
@@ -7094,6 +7100,52 @@ const PREFETCHED_CODEX_PRICING = {
|
|
|
7094
7100
|
"max_input_tokens": 272e3,
|
|
7095
7101
|
"max_output_tokens": 128e3
|
|
7096
7102
|
},
|
|
7103
|
+
"azure/gpt-5.2": {
|
|
7104
|
+
"input_cost_per_token": 175e-8,
|
|
7105
|
+
"output_cost_per_token": 14e-6,
|
|
7106
|
+
"cache_read_input_token_cost": 175e-9,
|
|
7107
|
+
"max_tokens": 128e3,
|
|
7108
|
+
"max_input_tokens": 4e5,
|
|
7109
|
+
"max_output_tokens": 128e3
|
|
7110
|
+
},
|
|
7111
|
+
"azure/gpt-5.2-2025-12-11": {
|
|
7112
|
+
"input_cost_per_token": 175e-8,
|
|
7113
|
+
"output_cost_per_token": 14e-6,
|
|
7114
|
+
"cache_read_input_token_cost": 175e-9,
|
|
7115
|
+
"max_tokens": 128e3,
|
|
7116
|
+
"max_input_tokens": 4e5,
|
|
7117
|
+
"max_output_tokens": 128e3
|
|
7118
|
+
},
|
|
7119
|
+
"azure/gpt-5.2-chat": {
|
|
7120
|
+
"input_cost_per_token": 175e-8,
|
|
7121
|
+
"output_cost_per_token": 14e-6,
|
|
7122
|
+
"cache_read_input_token_cost": 175e-9,
|
|
7123
|
+
"max_tokens": 16384,
|
|
7124
|
+
"max_input_tokens": 128e3,
|
|
7125
|
+
"max_output_tokens": 16384
|
|
7126
|
+
},
|
|
7127
|
+
"azure/gpt-5.2-chat-2025-12-11": {
|
|
7128
|
+
"input_cost_per_token": 175e-8,
|
|
7129
|
+
"output_cost_per_token": 14e-6,
|
|
7130
|
+
"cache_read_input_token_cost": 175e-9,
|
|
7131
|
+
"max_tokens": 16384,
|
|
7132
|
+
"max_input_tokens": 128e3,
|
|
7133
|
+
"max_output_tokens": 16384
|
|
7134
|
+
},
|
|
7135
|
+
"azure/gpt-5.2-pro": {
|
|
7136
|
+
"input_cost_per_token": 21e-6,
|
|
7137
|
+
"output_cost_per_token": 168e-6,
|
|
7138
|
+
"max_tokens": 128e3,
|
|
7139
|
+
"max_input_tokens": 4e5,
|
|
7140
|
+
"max_output_tokens": 128e3
|
|
7141
|
+
},
|
|
7142
|
+
"azure/gpt-5.2-pro-2025-12-11": {
|
|
7143
|
+
"input_cost_per_token": 21e-6,
|
|
7144
|
+
"output_cost_per_token": 168e-6,
|
|
7145
|
+
"max_tokens": 128e3,
|
|
7146
|
+
"max_input_tokens": 4e5,
|
|
7147
|
+
"max_output_tokens": 128e3
|
|
7148
|
+
},
|
|
7097
7149
|
"gpt-5": {
|
|
7098
7150
|
"input_cost_per_token": 125e-8,
|
|
7099
7151
|
"output_cost_per_token": 1e-5,
|
|
@@ -7305,6 +7357,29 @@ const PREFETCHED_CODEX_PRICING = {
|
|
|
7305
7357
|
"max_tokens": 128e3,
|
|
7306
7358
|
"max_input_tokens": 272e3,
|
|
7307
7359
|
"max_output_tokens": 128e3
|
|
7360
|
+
},
|
|
7361
|
+
"openrouter/openai/gpt-5.2": {
|
|
7362
|
+
"input_cost_per_token": 175e-8,
|
|
7363
|
+
"output_cost_per_token": 14e-6,
|
|
7364
|
+
"cache_read_input_token_cost": 175e-9,
|
|
7365
|
+
"max_tokens": 4e5,
|
|
7366
|
+
"max_input_tokens": 4e5,
|
|
7367
|
+
"max_output_tokens": 128e3
|
|
7368
|
+
},
|
|
7369
|
+
"openrouter/openai/gpt-5.2-chat": {
|
|
7370
|
+
"input_cost_per_token": 175e-8,
|
|
7371
|
+
"output_cost_per_token": 14e-6,
|
|
7372
|
+
"cache_read_input_token_cost": 175e-9,
|
|
7373
|
+
"max_tokens": 128e3,
|
|
7374
|
+
"max_input_tokens": 128e3,
|
|
7375
|
+
"max_output_tokens": 16384
|
|
7376
|
+
},
|
|
7377
|
+
"openrouter/openai/gpt-5.2-pro": {
|
|
7378
|
+
"input_cost_per_token": 21e-6,
|
|
7379
|
+
"output_cost_per_token": 168e-6,
|
|
7380
|
+
"max_tokens": 4e5,
|
|
7381
|
+
"max_input_tokens": 4e5,
|
|
7382
|
+
"max_output_tokens": 128e3
|
|
7308
7383
|
}
|
|
7309
7384
|
};
|
|
7310
7385
|
var CodexPricingSource = class {
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccusage/codex",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "18.0.1",
|
|
4
5
|
"description": "Usage analysis tool for OpenAI Codex sessions",
|
|
6
|
+
"author": "ryoppippi",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"funding": "https://github.com/ryoppippi/ccusage?sponsor=1",
|
|
5
9
|
"homepage": "https://github.com/ryoppippi/ccusage#readme",
|
|
6
|
-
"bugs": {
|
|
7
|
-
"url": "https://github.com/ryoppippi/ccusage/issues"
|
|
8
|
-
},
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
11
12
|
"url": "git+https://github.com/ryoppippi/ccusage.git"
|
|
12
13
|
},
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"type": "module",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/ryoppippi/ccusage/issues"
|
|
16
|
+
},
|
|
17
17
|
"main": "./dist/index.js",
|
|
18
18
|
"module": "./dist/index.js",
|
|
19
19
|
"bin": {
|