@kenz1117/dsh-ui-usage-billing 1.4.12 → 1.4.13

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/lib/index.js +185 -35
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -690,15 +690,13 @@ function formatTokens(value) {
690
690
  //#endregion
691
691
  //#region lib/types/builtin-catalog.js
692
692
  /**
693
- * Built-in catalog of current mainstream models as of 2026-08-16, priced from
693
+ * Built-in catalog of current mainstream models as of 2026-09-29, priced from
694
694
  * each provider's official price page. Domestic providers are OpenAI-API
695
695
  * compatible and publish RMB prices directly; overseas providers publish USD
696
696
  * and convert through the exchange rate at estimate time. Retired models
697
697
  * (GPT-4o family, Gemini 2.x, GLM-4.x-lite, older Qwen) are deliberately
698
- * absent, as are Anthropic Claude models (their native API is not
699
- * OpenAI-compatible, so the harness cannot drive them directly). DeepSeek
700
- * keys match the harness stats file so real usage prices from the catalog;
701
- * unknown keys fall back to `other`.
698
+ * absent. DeepSeek keys match the harness stats file so real usage prices
699
+ * from the catalog; unknown keys fall back to `other`.
702
700
  *
703
701
  * Time-of-day billing (peak/off-peak) is now real: DeepSeek V4 officially
704
702
  * splits peak (09:00-12:00 / 14:00-18:00 Beijing) at 2x the off-peak rate
@@ -873,7 +871,7 @@ const BUILTIN_MODEL_CATALOG = [
873
871
  price: {
874
872
  currency: "CNY",
875
873
  input: 6,
876
- cacheHit: 1.2,
874
+ cacheHit: 1.3,
877
875
  output: 24
878
876
  }
879
877
  },
@@ -930,32 +928,29 @@ const BUILTIN_MODEL_CATALOG = [
930
928
  colorVar: "dsw-static-blue-400",
931
929
  price: {
932
930
  currency: "CNY",
933
- input: 1,
931
+ input: .8,
934
932
  cacheHit: .1,
935
- output: 3
933
+ output: 2.7
936
934
  },
937
- extraRows: [
938
- {
939
- label: "显式缓存创建",
940
- input: 1.25
941
- },
942
- {
943
- label: "显式缓存命中",
944
- input: .1
945
- },
946
- {
947
- label: "Batch File",
948
- input: .5,
949
- output: 1.5,
950
- note: "长期半价"
951
- },
952
- {
953
- label: "Batch Chat",
954
- input: 1,
955
- output: 3,
956
- note: "与标准价一致"
957
- }
958
- ]
935
+ extraRows: [{
936
+ label: "显式缓存创建",
937
+ input: 1.25
938
+ }, {
939
+ label: "显式缓存命中",
940
+ input: .1
941
+ }]
942
+ },
943
+ {
944
+ key: "qwen-3.8-27b",
945
+ name: "Qwen3.8 27B",
946
+ provider: "阿里通义",
947
+ colorVar: "dsw-static-blue-300",
948
+ price: {
949
+ currency: "CNY",
950
+ input: 3,
951
+ cacheHit: .6,
952
+ output: 12
953
+ }
959
954
  },
960
955
  {
961
956
  key: "qwen-max",
@@ -1068,7 +1063,7 @@ const BUILTIN_MODEL_CATALOG = [
1068
1063
  price: {
1069
1064
  currency: "CNY",
1070
1065
  input: .2,
1071
- cacheHit: .02,
1066
+ cacheHit: .04,
1072
1067
  output: 2
1073
1068
  }
1074
1069
  },
@@ -1120,6 +1115,18 @@ const BUILTIN_MODEL_CATALOG = [
1120
1115
  output: 15
1121
1116
  }
1122
1117
  },
1118
+ {
1119
+ key: "doubao-seed-2.1-lite",
1120
+ name: "Doubao Seed-2.1 Lite",
1121
+ provider: "字节豆包",
1122
+ colorVar: "dsw-static-red-300",
1123
+ price: {
1124
+ currency: "CNY",
1125
+ input: .8,
1126
+ cacheHit: .16,
1127
+ output: 2.7
1128
+ }
1129
+ },
1123
1130
  {
1124
1131
  key: "kimi",
1125
1132
  name: "Kimi K2.7 Code",
@@ -1386,6 +1393,30 @@ const BUILTIN_MODEL_CATALOG = [
1386
1393
  output: 50
1387
1394
  }
1388
1395
  },
1396
+ {
1397
+ key: "gpt-6-sol",
1398
+ name: "GPT-6 Sol",
1399
+ provider: "OpenAI",
1400
+ colorVar: "ds-green",
1401
+ price: {
1402
+ currency: "USD",
1403
+ input: 2,
1404
+ cacheHit: .2,
1405
+ output: 10
1406
+ }
1407
+ },
1408
+ {
1409
+ key: "gpt-6-luna",
1410
+ name: "GPT-6 Luna",
1411
+ provider: "OpenAI",
1412
+ colorVar: "dsw-static-green-400",
1413
+ price: {
1414
+ currency: "USD",
1415
+ input: .1,
1416
+ cacheHit: .01,
1417
+ output: .5
1418
+ }
1419
+ },
1389
1420
  {
1390
1421
  key: "gpt-5.6-sol",
1391
1422
  name: "GPT-5.6 Sol",
@@ -1447,6 +1478,54 @@ const BUILTIN_MODEL_CATALOG = [
1447
1478
  peakHours: GEMINI_PEAK_HOURS,
1448
1479
  tierSemantics: "latency"
1449
1480
  },
1481
+ {
1482
+ key: "gemini-3.8-flash",
1483
+ name: "Gemini 3.8 Flash",
1484
+ provider: "Google",
1485
+ colorVar: "ds-blue",
1486
+ price: {
1487
+ currency: "USD",
1488
+ input: 1.5,
1489
+ cacheHit: .15,
1490
+ output: 7.5,
1491
+ offPeak: {
1492
+ input: .75,
1493
+ cacheHit: .075,
1494
+ output: 3.75
1495
+ }
1496
+ },
1497
+ promo: {
1498
+ factor: .5,
1499
+ endsAtMs: Date.UTC(2026, 11, 31, 16, 0, 0),
1500
+ note: "introductory 促销至 2026-12-31"
1501
+ },
1502
+ peakHours: GEMINI_PEAK_HOURS,
1503
+ tierSemantics: "latency"
1504
+ },
1505
+ {
1506
+ key: "gemini-3.7-flash",
1507
+ name: "Gemini 3.7 Flash",
1508
+ provider: "Google",
1509
+ colorVar: "dsw-static-blue-300",
1510
+ price: {
1511
+ currency: "USD",
1512
+ input: 1.5,
1513
+ cacheHit: .15,
1514
+ output: 7.5,
1515
+ offPeak: {
1516
+ input: .75,
1517
+ cacheHit: .075,
1518
+ output: 3.75
1519
+ }
1520
+ },
1521
+ promo: {
1522
+ factor: .5,
1523
+ endsAtMs: Date.UTC(2026, 11, 31, 16, 0, 0),
1524
+ note: "introductory 促销至 2026-12-31"
1525
+ },
1526
+ peakHours: GEMINI_PEAK_HOURS,
1527
+ tierSemantics: "latency"
1528
+ },
1450
1529
  {
1451
1530
  key: "gemini-flash",
1452
1531
  name: "Gemini 3.6 Flash",
@@ -1463,6 +1542,11 @@ const BUILTIN_MODEL_CATALOG = [
1463
1542
  output: 3.75
1464
1543
  }
1465
1544
  },
1545
+ promo: {
1546
+ factor: .5,
1547
+ endsAtMs: Date.UTC(2026, 11, 31, 16, 0, 0),
1548
+ note: "introductory 促销至 2026-12-31"
1549
+ },
1466
1550
  peakHours: GEMINI_PEAK_HOURS,
1467
1551
  tierSemantics: "latency"
1468
1552
  },
@@ -1502,6 +1586,18 @@ const BUILTIN_MODEL_CATALOG = [
1502
1586
  output: 2.5
1503
1587
  }
1504
1588
  },
1589
+ {
1590
+ key: "grok-build-0.1",
1591
+ name: "Grok Build 0.1",
1592
+ provider: "xAI",
1593
+ colorVar: "dsw-static-neutral-bluish-500",
1594
+ price: {
1595
+ currency: "USD",
1596
+ input: 1,
1597
+ cacheHit: .2,
1598
+ output: 2
1599
+ }
1600
+ },
1505
1601
  {
1506
1602
  key: "llama",
1507
1603
  name: "Llama 4 Maverick",
@@ -1586,6 +1682,42 @@ const BUILTIN_MODEL_CATALOG = [
1586
1682
  output: 10
1587
1683
  }
1588
1684
  },
1685
+ {
1686
+ key: "claude-fable-5-1",
1687
+ name: "Claude Fable 5.1",
1688
+ provider: "Anthropic",
1689
+ colorVar: "ds-red",
1690
+ price: {
1691
+ currency: "USD",
1692
+ input: 10,
1693
+ cacheHit: .25,
1694
+ output: 50
1695
+ }
1696
+ },
1697
+ {
1698
+ key: "claude-opus-5-5",
1699
+ name: "Claude Opus 5.5",
1700
+ provider: "Anthropic",
1701
+ colorVar: "ds-red",
1702
+ price: {
1703
+ currency: "USD",
1704
+ input: 4,
1705
+ cacheHit: .2,
1706
+ output: 20
1707
+ }
1708
+ },
1709
+ {
1710
+ key: "claude-sonnet-5-5",
1711
+ name: "Claude Sonnet 5.5",
1712
+ provider: "Anthropic",
1713
+ colorVar: "dsw-static-red-400",
1714
+ price: {
1715
+ currency: "USD",
1716
+ input: 2,
1717
+ cacheHit: .2,
1718
+ output: 10
1719
+ }
1720
+ },
1589
1721
  {
1590
1722
  key: "mistral-large-2512",
1591
1723
  name: "Mistral Large 3",
@@ -1876,10 +2008,9 @@ const BUILTIN_MODEL_CATALOG = [
1876
2008
  price: {
1877
2009
  currency: "CNY",
1878
2010
  input: 6.5,
1879
- cacheHit: 1.3,
2011
+ cacheHit: 1.7,
1880
2012
  output: 27
1881
- },
1882
- estimated: true
2013
+ }
1883
2014
  },
1884
2015
  {
1885
2016
  key: "kimi-k2.6-fast",
@@ -1989,6 +2120,13 @@ const BUILTIN_MODEL_KEY_ALIASES = {
1989
2120
  "claude-haiku-4.5": "claude-haiku-4-5",
1990
2121
  "claude-opus-5": "claude-opus-5",
1991
2122
  "claude-sonnet-5": "claude-sonnet-5",
2123
+ "claude-fable-5-1": "claude-fable-5-1",
2124
+ "claude-fable-5.1": "claude-fable-5-1",
2125
+ "claude-fable": "claude-fable-5-1",
2126
+ "claude-opus-5-5": "claude-opus-5-5",
2127
+ "claude-opus-5.5": "claude-opus-5-5",
2128
+ "claude-sonnet-5-5": "claude-sonnet-5-5",
2129
+ "claude-sonnet-5.5": "claude-sonnet-5-5",
1992
2130
  "mistral-large-2512": "mistral-large-2512",
1993
2131
  "mistral-large-3": "mistral-large-2512",
1994
2132
  "mistral-small-2603": "mistral-small-2603",
@@ -2020,8 +2158,12 @@ const BUILTIN_MODEL_KEY_ALIASES = {
2020
2158
  "doubao-seed-2.1-pro-290000": "doubao-seed-2.1-pro",
2021
2159
  "doubao-seed-2.1-turbo": "doubao-seed-2.1-turbo",
2022
2160
  "doubao-seed-2-1-turbo": "doubao-seed-2.1-turbo",
2161
+ "doubao-seed-2.1-lite": "doubao-seed-2.1-lite",
2162
+ "doubao-seed-2-1-lite": "doubao-seed-2.1-lite",
2023
2163
  "qwen3.8-max": "qwen-3.8-max",
2024
2164
  "qwen3.8-flash": "qwen-3.8-flash",
2165
+ "qwen3.8-27b": "qwen-3.8-27b",
2166
+ "qwen-3.8-27b": "qwen-3.8-27b",
2025
2167
  "qwen3.7-max": "qwen-max",
2026
2168
  "qwen3.6-max": "qwen3.6-max",
2027
2169
  "qwen3.6-max-preview": "qwen3.6-max",
@@ -2066,7 +2208,15 @@ const BUILTIN_MODEL_KEY_ALIASES = {
2066
2208
  "minimax-m2-7-highspeed": "minimax-m2.7-highspeed",
2067
2209
  "minimax-m2-7-high-speed": "minimax-m2.7-highspeed",
2068
2210
  "gpt-6": "gpt-6-astra",
2069
- "gpt-6-astra": "gpt-6-astra"
2211
+ "gpt-6-astra": "gpt-6-astra",
2212
+ "gpt-6-sol": "gpt-6-sol",
2213
+ "gpt-6-luna": "gpt-6-luna",
2214
+ "gemini-3.8-flash": "gemini-3.8-flash",
2215
+ "gemini-3-8-flash": "gemini-3.8-flash",
2216
+ "gemini-3.7-flash": "gemini-3.7-flash",
2217
+ "gemini-3-7-flash": "gemini-3.7-flash",
2218
+ "grok-build-0.1": "grok-build-0.1",
2219
+ "grok-build": "grok-build-0.1"
2070
2220
  };
2071
2221
  //#endregion
2072
2222
  //#region lib/types/aggregate.js
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": "1.4.12",
4
+ "version": "1.4.13",
5
5
  "keywords": [
6
6
  "deepseek-harness",
7
7
  "deepseek",