@ccusage/codex 17.1.0 → 17.1.2

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -897,7 +897,7 @@ async function executeCommand(cmd, ctx, name$1) {
897
897
  await resolved.run(ctx);
898
898
  }
899
899
  var name = "@ccusage/codex";
900
- var version = "17.1.0";
900
+ var version = "17.1.2";
901
901
  var description = "Usage analysis tool for OpenAI Codex sessions";
902
902
  var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
903
903
  let messages = [];
@@ -2686,7 +2686,7 @@ function formatCurrency(amount) {
2686
2686
  return `$${amount.toFixed(2)}`;
2687
2687
  }
2688
2688
  function formatModelName(modelName) {
2689
- const match = modelName.match(/claude-(\w+)-(\d+)-\d+/);
2689
+ const match = modelName.match(/claude-(\w+)-([\d-]+)-(\d{8})/);
2690
2690
  if (match != null) return `${match[1]}-${match[2]}`;
2691
2691
  return modelName;
2692
2692
  }
@@ -2900,8 +2900,7 @@ function isWithinRange(dateKey, since, until) {
2900
2900
  if (untilValue != null && value > untilValue) return false;
2901
2901
  return true;
2902
2902
  }
2903
- function formatDisplayDate(dateKey, locale, timezone) {
2904
- const tz = safeTimeZone(timezone);
2903
+ function formatDisplayDate(dateKey, locale, _timezone) {
2905
2904
  const [yearStr = "0", monthStr = "1", dayStr = "1"] = dateKey.split("-");
2906
2905
  const year = Number.parseInt(yearStr, 10);
2907
2906
  const month = Number.parseInt(monthStr, 10);
@@ -2911,7 +2910,7 @@ function formatDisplayDate(dateKey, locale, timezone) {
2911
2910
  year: "numeric",
2912
2911
  month: "short",
2913
2912
  day: "2-digit",
2914
- timeZone: tz
2913
+ timeZone: "UTC"
2915
2914
  }).format(date);
2916
2915
  }
2917
2916
  function toMonthKey(timestamp, timezone) {
@@ -2924,8 +2923,7 @@ function toMonthKey(timestamp, timezone) {
2924
2923
  }).format(date).split("-");
2925
2924
  return `${year}-${month}`;
2926
2925
  }
2927
- function formatDisplayMonth(monthKey, locale, timezone) {
2928
- const tz = safeTimeZone(timezone);
2926
+ function formatDisplayMonth(monthKey, locale, _timezone) {
2929
2927
  const [yearStr = "0", monthStr = "1"] = monthKey.split("-");
2930
2928
  const year = Number.parseInt(yearStr, 10);
2931
2929
  const month = Number.parseInt(monthStr, 10);
@@ -2933,7 +2931,7 @@ function formatDisplayMonth(monthKey, locale, timezone) {
2933
2931
  return new Intl.DateTimeFormat(locale ?? "en-US", {
2934
2932
  year: "numeric",
2935
2933
  month: "short",
2936
- timeZone: tz
2934
+ timeZone: "UTC"
2937
2935
  }).format(date);
2938
2936
  }
2939
2937
  function formatDisplayDateTime(timestamp, locale, timezone) {
@@ -6995,9 +6993,9 @@ const PREFETCHED_CODEX_PRICING = {
6995
6993
  "input_cost_per_token": 125e-8,
6996
6994
  "output_cost_per_token": 1e-5,
6997
6995
  "cache_read_input_token_cost": 125e-9,
6998
- "max_tokens": 128e3,
6999
- "max_input_tokens": 272e3,
7000
- "max_output_tokens": 128e3
6996
+ "max_tokens": 16384,
6997
+ "max_input_tokens": 128e3,
6998
+ "max_output_tokens": 16384
7001
6999
  },
7002
7000
  "azure/gpt-5-codex": {
7003
7001
  "input_cost_per_token": 125e-8,
@@ -7047,7 +7045,7 @@ const PREFETCHED_CODEX_PRICING = {
7047
7045
  "max_input_tokens": 272e3,
7048
7046
  "max_output_tokens": 128e3
7049
7047
  },
7050
- "gpt-5-2025-08-07": {
7048
+ "gpt-5-codex": {
7051
7049
  "input_cost_per_token": 125e-8,
7052
7050
  "output_cost_per_token": 1e-5,
7053
7051
  "cache_read_input_token_cost": 125e-9,
@@ -7055,7 +7053,7 @@ const PREFETCHED_CODEX_PRICING = {
7055
7053
  "max_input_tokens": 272e3,
7056
7054
  "max_output_tokens": 128e3
7057
7055
  },
7058
- "gpt-5-chat": {
7056
+ "gpt-5-2025-08-07": {
7059
7057
  "input_cost_per_token": 125e-8,
7060
7058
  "output_cost_per_token": 1e-5,
7061
7059
  "cache_read_input_token_cost": 125e-9,
@@ -7063,7 +7061,7 @@ const PREFETCHED_CODEX_PRICING = {
7063
7061
  "max_input_tokens": 272e3,
7064
7062
  "max_output_tokens": 128e3
7065
7063
  },
7066
- "gpt-5-chat-latest": {
7064
+ "gpt-5-chat": {
7067
7065
  "input_cost_per_token": 125e-8,
7068
7066
  "output_cost_per_token": 1e-5,
7069
7067
  "cache_read_input_token_cost": 125e-9,
@@ -7071,13 +7069,13 @@ const PREFETCHED_CODEX_PRICING = {
7071
7069
  "max_input_tokens": 272e3,
7072
7070
  "max_output_tokens": 128e3
7073
7071
  },
7074
- "gpt-5-codex": {
7072
+ "gpt-5-chat-latest": {
7075
7073
  "input_cost_per_token": 125e-8,
7076
7074
  "output_cost_per_token": 1e-5,
7077
7075
  "cache_read_input_token_cost": 125e-9,
7078
- "max_tokens": 128e3,
7079
- "max_input_tokens": 272e3,
7080
- "max_output_tokens": 128e3
7076
+ "max_tokens": 16384,
7077
+ "max_input_tokens": 128e3,
7078
+ "max_output_tokens": 16384
7081
7079
  },
7082
7080
  "gpt-5-mini": {
7083
7081
  "input_cost_per_token": 25e-8,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccusage/codex",
3
- "version": "17.1.0",
3
+ "version": "17.1.2",
4
4
  "description": "Usage analysis tool for OpenAI Codex sessions",
5
5
  "homepage": "https://github.com/ryoppippi/ccusage#readme",
6
6
  "bugs": {