@kenz1117/dsh-ui-usage-billing 0.9.5 → 0.9.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/lib/index.js CHANGED
@@ -965,6 +965,7 @@ function emptyUsage() {
965
965
  cacheHit: 0,
966
966
  cacheMiss: 0,
967
967
  cost: 0,
968
+ reasoning: 0,
968
969
  officialCalls: 0,
969
970
  officialCost: 0
970
971
  };
@@ -986,6 +987,7 @@ function foldUsage(acc, usage, key, subscription, timeMs, official = false) {
986
987
  acc.calls += 1;
987
988
  acc.input += usage.inputTokens + cacheHit + (usage.cacheWriteTokens ?? 0);
988
989
  acc.output += usage.outputTokens;
990
+ acc.reasoning += usage.reasoningTokens ?? 0;
989
991
  acc.cacheHit += cacheHit;
990
992
  acc.cacheMiss += cacheMiss;
991
993
  if (official) acc.officialCalls += 1;
@@ -1248,6 +1250,7 @@ function mergeUsageInto(acc, cell) {
1248
1250
  acc.calls += cell.calls;
1249
1251
  acc.input += cell.input;
1250
1252
  acc.output += cell.output;
1253
+ acc.reasoning += cell.reasoning;
1251
1254
  acc.cacheHit += cell.cacheHit;
1252
1255
  acc.cacheMiss += cell.cacheMiss;
1253
1256
  acc.cost += cell.cost;
@@ -42,6 +42,8 @@ export interface ModelUsage {
42
42
  cacheHit: number;
43
43
  cacheMiss: number;
44
44
  cost: number;
45
+ /** 输出中的 reasoning(思考)token;已包含在 `output` 内,单列用于结构展示。 */
46
+ reasoning: number;
45
47
  /** 该模型本次统计的所有调用是否都走订阅通道(coding/token plan);混合通道不置位。 */
46
48
  plan?: boolean;
47
49
  /** 走官方渠道的调用数(DeepSeek 官方直连;其余为三方)。 */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kenz1117/dsh-ui-usage-billing",
3
3
  "description": "Usage billing dashboard for DeepSeek Harness: sidebar cost metrics plus a full dashboard modal, priced from a current multi-provider catalog with real usage aggregated from session logs.",
4
- "version": "0.9.5",
4
+ "version": "0.9.6",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },