dsh-cost-meter 1.9.41 → 1.9.44

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 (40) hide show
  1. package/README.md +10 -8
  2. package/README.zh-CN.md +10 -8
  3. package/docs/baidu-token-plan.md +24 -0
  4. package/docs/billing-statistics.md +14 -2
  5. package/docs/billion-context-peer-discovery.md +20 -0
  6. package/docs/catalog-2026-10-28.md +60 -0
  7. package/docs/custom-balance-sources.md +6 -0
  8. package/docs/display-settings.md +9 -1
  9. package/docs/official-price-sync-safety.md +25 -0
  10. package/docs/plugin-compatibility-watch.md +34 -0
  11. package/docs/provider-pricing-2026-10.md +10 -6
  12. package/docs/provider-pricing.json +304 -13
  13. package/docs/subscription-catalog.json +82 -0
  14. package/docs/update-notes-1.9.42.md +21 -0
  15. package/docs/update-notes-1.9.43.md +21 -0
  16. package/docs/update-notes-1.9.44.md +21 -0
  17. package/lib/baidu-token-plan.js +82 -0
  18. package/lib/billion-context-billing.js +9 -8
  19. package/lib/billion-context-peer.js +164 -0
  20. package/lib/client.display.js +2 -2
  21. package/lib/client.js +6 -6
  22. package/lib/client.notices.js +1 -0
  23. package/lib/client.peak.js +3 -3
  24. package/lib/client.plan-settings.js +1 -1
  25. package/lib/client.pricing.js +3 -3
  26. package/lib/coding-plans.js +49 -31
  27. package/lib/index.js +79 -31
  28. package/lib/ledger-writer-worker.js +1 -1
  29. package/lib/official-price-sync.js +45 -0
  30. package/lib/plan-billing.js +10 -6
  31. package/lib/plan-provider-match.js +2 -2
  32. package/lib/pricing.js +11 -2
  33. package/lib/provider-prices-2026-10-28.js +364 -0
  34. package/lib/provider-prices.js +6 -0
  35. package/lib/query-accounts.js +39 -0
  36. package/lib/session-tree.js +26 -12
  37. package/lib/store.js +28 -2
  38. package/lib/subscription-catalog.js +34 -0
  39. package/lib/typert.host.js +5 -0
  40. package/package.json +12 -3
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-10-16",
2
+ "generatedAt": "2026-10-28",
3
3
  "note": "Auto-generated from lib/pricing.js DEFAULT_PROVIDER_PRICE_TABLE. USD per 1M tokens; unpriced entries have no verified official price.",
4
4
  "providers": {
5
5
  "openai": {
@@ -852,9 +852,16 @@
852
852
  "cachedInput": 0.3,
853
853
  "output": 15,
854
854
  "billingMode": "flat",
855
- "sourceUrl": "https://opencode.ai/docs/zen",
856
- "checkedAt": "2026-08-17",
857
- "notes": "官方人民币价 ¥20/¥100/缓存¥2 每百万;此处为 Go 网关美元价"
855
+ "sourceUrl": "https://platform.kimi.ai/docs/pricing/chat",
856
+ "checkedAt": "2026-10-28",
857
+ "cacheWrite": 3,
858
+ "cny": {
859
+ "cacheMiss": 20,
860
+ "cacheHit": 2,
861
+ "cacheWrite": 20,
862
+ "output": 100
863
+ },
864
+ "notes": "Default 5m cache writes. 1h cache write is USD 6 / CNY 40 per MTok. China quote: https://www.kimi.com/resources/kimi-k3-1-pro-pricing"
858
865
  },
859
866
  "kimi-k2.7-code": {
860
867
  "input": 0.95,
@@ -880,6 +887,107 @@
880
887
  "sourceUrl": "https://opencode.ai/docs/zen",
881
888
  "checkedAt": "2026-08-17",
882
889
  "notes": "2026-08-05 起弃用"
890
+ },
891
+ "kimi-k3.1-pro": {
892
+ "input": 2,
893
+ "cachedInput": 0.2,
894
+ "output": 10,
895
+ "billingMode": "flat",
896
+ "sourceUrl": "https://platform.kimi.ai/docs/pricing/chat",
897
+ "checkedAt": "2026-10-28",
898
+ "cacheWrite": 2,
899
+ "cny": {
900
+ "cacheMiss": 13,
901
+ "cacheHit": 1.3,
902
+ "cacheWrite": 13,
903
+ "output": 68
904
+ },
905
+ "notes": "Kimi API official USD quote and China CNY quote: https://www.kimi.com/resources/kimi-k3-1-pro-pricing. Default 5m cache writes; 1h cache write is USD 4 / CNY 26 per MTok. 1M context uses the same rate."
906
+ },
907
+ "kimi-k3.1-pro-highspeed": {
908
+ "input": 4,
909
+ "cachedInput": 0.2,
910
+ "output": 20,
911
+ "billingMode": "flat",
912
+ "sourceUrl": "https://platform.kimi.ai/docs/pricing/chat",
913
+ "checkedAt": "2026-10-28",
914
+ "cacheWrite": 4,
915
+ "cny": {
916
+ "cacheMiss": 26,
917
+ "cacheHit": 1.3,
918
+ "cacheWrite": 26,
919
+ "output": 136
920
+ },
921
+ "notes": "Kimi API Highspeed. Default 5m cache writes; 1h cache write is USD 8 / CNY 52 per MTok. China quote: https://www.kimi.com/resources/kimi-k3-1-pro-pricing"
922
+ },
923
+ "k3.1-pro": {
924
+ "input": 2,
925
+ "cachedInput": 0.2,
926
+ "output": 10,
927
+ "billingMode": "flat",
928
+ "sourceUrl": "https://www.kimi.com/code/docs/kimi-code/models.html",
929
+ "checkedAt": "2026-10-28",
930
+ "cacheWrite": 2,
931
+ "cny": {
932
+ "cacheMiss": 13,
933
+ "cacheHit": 1.3,
934
+ "cacheWrite": 13,
935
+ "output": 68
936
+ },
937
+ "notes": "Kimi Code model ID; direct Kimi API price is a token-equivalent reference. Subscription quota comes from the usage API. Kimi API official USD quote and China CNY quote: https://www.kimi.com/resources/kimi-k3-1-pro-pricing. Default 5m cache writes; 1h cache write is USD 4 / CNY 26 per MTok. 1M context uses the same rate."
938
+ },
939
+ "k3.1-pro-highspeed": {
940
+ "input": 4,
941
+ "cachedInput": 0.2,
942
+ "output": 20,
943
+ "billingMode": "flat",
944
+ "sourceUrl": "https://www.kimi.com/code/docs/kimi-code/models.html",
945
+ "checkedAt": "2026-10-28",
946
+ "cacheWrite": 4,
947
+ "cny": {
948
+ "cacheMiss": 26,
949
+ "cacheHit": 1.3,
950
+ "cacheWrite": 26,
951
+ "output": 136
952
+ },
953
+ "notes": "Kimi Code model ID; direct Kimi API price is a token-equivalent reference. Subscription quota comes from the usage API. Kimi API Highspeed. Default 5m cache writes; 1h cache write is USD 8 / CNY 52 per MTok. China quote: https://www.kimi.com/resources/kimi-k3-1-pro-pricing"
954
+ },
955
+ "k3": {
956
+ "input": 3,
957
+ "cachedInput": 0.3,
958
+ "output": 15,
959
+ "billingMode": "flat",
960
+ "sourceUrl": "https://www.kimi.com/code/docs/kimi-code/models.html",
961
+ "checkedAt": "2026-10-28",
962
+ "cacheWrite": 3,
963
+ "cny": {
964
+ "cacheMiss": 20,
965
+ "cacheHit": 2,
966
+ "cacheWrite": 20,
967
+ "output": 100
968
+ },
969
+ "notes": "Kimi Code model ID; direct Kimi API price is a token-equivalent reference. Subscription quota comes from the usage API. Default 5m cache writes. 1h cache write is USD 6 / CNY 40 per MTok. China quote: https://www.kimi.com/resources/kimi-k3-1-pro-pricing"
970
+ },
971
+ "k3-256k": {
972
+ "unpriced": true,
973
+ "billingMode": "flat",
974
+ "sourceUrl": "https://www.kimi.com/code/docs/kimi-code/models.html",
975
+ "checkedAt": "2026-10-28",
976
+ "notes": "Kimi Code 256K subscription model. No separate direct API token-equivalent quote."
977
+ },
978
+ "kimi-for-coding": {
979
+ "unpriced": true,
980
+ "billingMode": "flat",
981
+ "sourceUrl": "https://www.kimi.com/code/docs/kimi-code/models.html",
982
+ "checkedAt": "2026-10-28",
983
+ "notes": "Kimi Code currently routes this ID to K2.8 Preview. No published direct API quote."
984
+ },
985
+ "kimi-for-coding-highspeed": {
986
+ "unpriced": true,
987
+ "billingMode": "flat",
988
+ "sourceUrl": "https://www.kimi.com/code/docs/kimi-code/models.html",
989
+ "checkedAt": "2026-10-28",
990
+ "notes": "Kimi Code K2.7 Code Highspeed subscription ID. Quota usage is queried separately."
883
991
  }
884
992
  }
885
993
  },
@@ -1241,6 +1349,16 @@
1241
1349
  "output": 1.2,
1242
1350
  "billingMode": "flat",
1243
1351
  "sourceUrl": "https://www.alibabacloud.com/help/en/model-studio/model-pricing"
1352
+ },
1353
+ "qwen3.8-flash": {
1354
+ "input": 0.15,
1355
+ "cachedInput": 0.016,
1356
+ "output": 0.47,
1357
+ "cacheWrite": 0.2,
1358
+ "billingMode": "flat",
1359
+ "sourceUrl": "https://www.alibabacloud.com/help/en/model-studio/model-pricing",
1360
+ "checkedAt": "2026-10-28",
1361
+ "notes": "Singapore International USD quote, including explicit and implicit cache prices: https://www.alibabacloud.com/help/en/model-studio/qwen3-8-flash . Mainland and global deployment rates differ."
1244
1362
  }
1245
1363
  }
1246
1364
  },
@@ -1270,6 +1388,34 @@
1270
1388
  "sourceUrl": "https://opencode.ai/docs/zen",
1271
1389
  "checkedAt": "2026-08-17",
1272
1390
  "notes": "2026-08-05 起弃用"
1391
+ },
1392
+ "minimax-m3.1-flash": {
1393
+ "input": 0.15,
1394
+ "cachedInput": 0.015,
1395
+ "output": 0.6,
1396
+ "billingMode": "flat",
1397
+ "sourceUrl": "https://platform.minimax.io/docs/pricing/overview",
1398
+ "checkedAt": "2026-10-28",
1399
+ "cny": {
1400
+ "cacheMiss": 1,
1401
+ "cacheHit": 0.1,
1402
+ "output": 4
1403
+ },
1404
+ "notes": "MiniMax M3.1 Flash Standard API. China CNY quote: https://platform.minimax.cn/docs/pricing/overview . M3.1 Flash Preview is retired and requests are served by M3.1 Flash."
1405
+ },
1406
+ "minimax-m3.1-flash-preview": {
1407
+ "input": 0.15,
1408
+ "cachedInput": 0.015,
1409
+ "output": 0.6,
1410
+ "billingMode": "flat",
1411
+ "sourceUrl": "https://platform.minimax.io/docs/pricing/overview",
1412
+ "checkedAt": "2026-10-28",
1413
+ "cny": {
1414
+ "cacheMiss": 1,
1415
+ "cacheHit": 0.1,
1416
+ "output": 4
1417
+ },
1418
+ "notes": "MiniMax M3.1 Flash Standard API. China CNY quote: https://platform.minimax.cn/docs/pricing/overview . M3.1 Flash Preview is retired and requests are served by M3.1 Flash."
1273
1419
  }
1274
1420
  }
1275
1421
  },
@@ -1289,6 +1435,15 @@
1289
1435
  "sourceUrl": "https://opencode.ai/docs/go",
1290
1436
  "checkedAt": "2026-08-17",
1291
1437
  "notes": "OpenCode Go 目录价;厂商归属未官宣"
1438
+ },
1439
+ "hy4-preview": {
1440
+ "input": 0.834,
1441
+ "cachedInput": 0.042,
1442
+ "output": 2.501,
1443
+ "billingMode": "flat",
1444
+ "sourceUrl": "https://intl.cloud.tencent.com/document/product/1300/78937",
1445
+ "checkedAt": "2026-10-28",
1446
+ "notes": "TokenHub Singapore published USD rate. Regional rates and Token Plan credits are separate."
1292
1447
  }
1293
1448
  }
1294
1449
  },
@@ -1640,11 +1795,12 @@
1640
1795
  },
1641
1796
  "kimi-k3": {
1642
1797
  "billingMode": "flat",
1643
- "sourceUrl": "https://opencode.ai/docs/go",
1644
- "checkedAt": "2026-10-03",
1798
+ "sourceUrl": "https://opencode.ai/v2/docs/console/go/",
1799
+ "checkedAt": "2026-10-28",
1645
1800
  "input": 3,
1646
1801
  "output": 15,
1647
- "cachedInput": 0.3
1802
+ "cachedInput": 0.3,
1803
+ "cacheWrite": 3
1648
1804
  },
1649
1805
  "kimi-k2.7-code": {
1650
1806
  "billingMode": "flat",
@@ -1985,6 +2141,56 @@
1985
2141
  "sourceUrl": "https://opencode.ai/v2/docs/console/go/",
1986
2142
  "checkedAt": "2026-10-15",
1987
2143
  "notes": "Current published promotional rate; gateway pricing is independent of the direct API."
2144
+ },
2145
+ "kimi-k3.1-pro": {
2146
+ "billingMode": "flat",
2147
+ "input": 2,
2148
+ "output": 10,
2149
+ "cachedInput": 0.2,
2150
+ "cacheWrite": 2,
2151
+ "sourceUrl": "https://opencode.ai/v2/docs/console/go/",
2152
+ "checkedAt": "2026-10-28"
2153
+ },
2154
+ "step-5-preview": {
2155
+ "billingMode": "flat",
2156
+ "input": 1,
2157
+ "output": 2.7,
2158
+ "cachedInput": 0.1,
2159
+ "sourceUrl": "https://opencode.ai/v2/docs/console/go/",
2160
+ "checkedAt": "2026-10-28"
2161
+ },
2162
+ "beam-free": {
2163
+ "billingMode": "flat",
2164
+ "input": 0,
2165
+ "output": 0,
2166
+ "cachedInput": 0,
2167
+ "sourceUrl": "https://opencode.ai/v2/docs/console/go/",
2168
+ "checkedAt": "2026-10-28"
2169
+ },
2170
+ "iceman-contributor-free": {
2171
+ "billingMode": "flat",
2172
+ "input": 0,
2173
+ "output": 0,
2174
+ "cachedInput": 0,
2175
+ "sourceUrl": "https://opencode.ai/v2/docs/console/go/",
2176
+ "checkedAt": "2026-10-28"
2177
+ },
2178
+ "minimax-m3.1-flash": {
2179
+ "billingMode": "flat",
2180
+ "input": 0.15,
2181
+ "output": 0.6,
2182
+ "cachedInput": 0.015,
2183
+ "sourceUrl": "https://opencode.ai/v2/docs/console/go/",
2184
+ "checkedAt": "2026-10-28"
2185
+ },
2186
+ "gemini-4-argon": {
2187
+ "billingMode": "flat",
2188
+ "input": 2,
2189
+ "output": 10,
2190
+ "cachedInput": 0.1,
2191
+ "sourceUrl": "https://opencode.ai/v2/docs/console/go/",
2192
+ "checkedAt": "2026-10-28",
2193
+ "notes": "OpenCode Go promotional price through 2026-11-30. USD 2/10/0.1 per MTok; independent of the direct API."
1988
2194
  }
1989
2195
  }
1990
2196
  },
@@ -2023,6 +2229,50 @@
2023
2229
  "billingMode": "flat",
2024
2230
  "sourceUrl": "https://openrouter.ai/api/v1/models",
2025
2231
  "checkedAt": "2026-09-17"
2232
+ },
2233
+ "moonshotai/kimi-k3.1-pro": {
2234
+ "input": 2,
2235
+ "output": 10,
2236
+ "billingMode": "flat",
2237
+ "sourceUrl": "https://openrouter.ai/api/v1/models",
2238
+ "checkedAt": "2026-10-28",
2239
+ "cachedInput": 0.2,
2240
+ "notes": "OpenRouter public model-list token quote checked 2026-10-28. Endpoint-specific tool fees are separate."
2241
+ },
2242
+ "minimax/minimax-m3.1-flash": {
2243
+ "input": 0.15,
2244
+ "output": 0.6,
2245
+ "billingMode": "flat",
2246
+ "sourceUrl": "https://openrouter.ai/api/v1/models",
2247
+ "checkedAt": "2026-10-28",
2248
+ "cachedInput": 0.015,
2249
+ "notes": "OpenRouter public model-list token quote checked 2026-10-28. Endpoint-specific tool fees are separate."
2250
+ },
2251
+ "nvidia/nemotron-3.5-super-vl": {
2252
+ "input": 0.15,
2253
+ "output": 0.5,
2254
+ "billingMode": "flat",
2255
+ "sourceUrl": "https://openrouter.ai/api/v1/models",
2256
+ "checkedAt": "2026-10-28",
2257
+ "cachedInput": 0.02,
2258
+ "notes": "OpenRouter public model-list token quote checked 2026-10-28. Endpoint-specific tool fees are separate."
2259
+ },
2260
+ "nvidia/nemotron-3.5-super-vl:free": {
2261
+ "input": 0,
2262
+ "output": 0,
2263
+ "billingMode": "flat",
2264
+ "sourceUrl": "https://openrouter.ai/api/v1/models",
2265
+ "checkedAt": "2026-10-28",
2266
+ "notes": "OpenRouter public model-list token quote checked 2026-10-28. Endpoint-specific tool fees are separate."
2267
+ },
2268
+ "meta/muse-wonder": {
2269
+ "input": 4,
2270
+ "output": 20,
2271
+ "billingMode": "flat",
2272
+ "sourceUrl": "https://openrouter.ai/api/v1/models",
2273
+ "checkedAt": "2026-10-28",
2274
+ "cachedInput": 0.2,
2275
+ "notes": "OpenRouter public model-list token quote checked 2026-10-28. Endpoint-specific tool fees are separate."
2026
2276
  }
2027
2277
  }
2028
2278
  },
@@ -2553,11 +2803,12 @@
2553
2803
  },
2554
2804
  "kimi-k3": {
2555
2805
  "billingMode": "flat",
2556
- "sourceUrl": "https://opencode.ai/docs/zen",
2557
- "checkedAt": "2026-10-03",
2806
+ "sourceUrl": "https://opencode.ai/v2/docs/console/models/",
2807
+ "checkedAt": "2026-10-28",
2558
2808
  "input": 3,
2559
2809
  "output": 15,
2560
- "cachedInput": 0.3
2810
+ "cachedInput": 0.3,
2811
+ "cacheWrite": 3
2561
2812
  },
2562
2813
  "kimi-k2.6": {
2563
2814
  "billingMode": "flat",
@@ -2939,18 +3190,18 @@
2939
3190
  "gpt-6.1-sol": {
2940
3191
  "input": 2,
2941
3192
  "output": 10,
2942
- "cachedInput": 0.2,
3193
+ "cachedInput": 0.1,
2943
3194
  "cacheWrite": 2.5,
2944
3195
  "longContext": {
2945
3196
  "aboveInputTokens": 272000,
2946
3197
  "cacheMiss": 4,
2947
- "cacheHit": 0.4,
3198
+ "cacheHit": 0.2,
2948
3199
  "output": 15,
2949
3200
  "cacheWrite": 5
2950
3201
  },
2951
3202
  "billingMode": "flat",
2952
3203
  "sourceUrl": "https://opencode.ai/v2/docs/console/models/",
2953
- "checkedAt": "2026-10-15"
3204
+ "checkedAt": "2026-10-28"
2954
3205
  },
2955
3206
  "gpt-6-luna": {
2956
3207
  "billingMode": "flat",
@@ -3238,6 +3489,46 @@
3238
3489
  "sourceUrl": "https://opencode.ai/v2/docs/console/models/",
3239
3490
  "checkedAt": "2026-10-15",
3240
3491
  "notes": "Current published promotional rate; gateway pricing is independent of the direct API."
3492
+ },
3493
+ "glm-5.3-flash-free": {
3494
+ "billingMode": "flat",
3495
+ "input": 0,
3496
+ "output": 0,
3497
+ "cachedInput": 0,
3498
+ "sourceUrl": "https://opencode.ai/v2/docs/console/models/",
3499
+ "checkedAt": "2026-10-28"
3500
+ },
3501
+ "beam-free": {
3502
+ "billingMode": "flat",
3503
+ "input": 0,
3504
+ "output": 0,
3505
+ "cachedInput": 0,
3506
+ "sourceUrl": "https://opencode.ai/v2/docs/console/models/",
3507
+ "checkedAt": "2026-10-28"
3508
+ },
3509
+ "flint-40b-free": {
3510
+ "billingMode": "flat",
3511
+ "input": 0,
3512
+ "output": 0,
3513
+ "cachedInput": 0,
3514
+ "sourceUrl": "https://opencode.ai/v2/docs/console/models/",
3515
+ "checkedAt": "2026-10-28"
3516
+ },
3517
+ "nemotron-3.5-super-vl-free": {
3518
+ "billingMode": "flat",
3519
+ "input": 0,
3520
+ "output": 0,
3521
+ "cachedInput": 0,
3522
+ "sourceUrl": "https://opencode.ai/v2/docs/console/models/",
3523
+ "checkedAt": "2026-10-28"
3524
+ },
3525
+ "muse-wonder-1.0": {
3526
+ "billingMode": "flat",
3527
+ "input": 4,
3528
+ "output": 20,
3529
+ "cachedInput": 0.2,
3530
+ "sourceUrl": "https://opencode.ai/v2/docs/console/models/",
3531
+ "checkedAt": "2026-10-28"
3241
3532
  }
3242
3533
  }
3243
3534
  },
@@ -0,0 +1,82 @@
1
+ {
2
+ "kimi": {
3
+ "checkedAt": "2026-10-28",
4
+ "sourceUrl": "https://www.kimi.com/code/docs/kimi-code/membership.html",
5
+ "tiers": [
6
+ "Go",
7
+ "Plus",
8
+ "Pro",
9
+ "Max",
10
+ "Ultra"
11
+ ],
12
+ "legacyTiers": [
13
+ "Andante",
14
+ "Moderato",
15
+ "Allegretto",
16
+ "Vivace"
17
+ ],
18
+ "models": [
19
+ "k3.1-pro",
20
+ "k3.1-pro-highspeed",
21
+ "k3",
22
+ "k3-256k",
23
+ "kimi-for-coding",
24
+ "kimi-for-coding-highspeed"
25
+ ],
26
+ "zh": "新套餐:Go、Plus、Pro、Max、Ultra。Plus 起提供 Kimi Code,Pro 起提供高速版和 1M 上下文。新套餐使用 5 小时窗口及月总额度;老套餐保留周窗口。",
27
+ "en": "Current tiers: Go, Plus, Pro, Max and Ultra. Kimi Code starts at Plus; Pro adds Highspeed and 1M context. New plans use a 5-hour window and monthly total; legacy plans retain weekly limits."
28
+ },
29
+ "minimax": {
30
+ "checkedAt": "2026-10-28",
31
+ "sourceUrl": "https://platform.minimax.io/docs/m-plan/intro",
32
+ "tiers": [
33
+ "Go",
34
+ "Explore",
35
+ "Build"
36
+ ],
37
+ "legacyTiers": [
38
+ "Plus",
39
+ "Max",
40
+ "Ultra"
41
+ ],
42
+ "models": [
43
+ "MiniMax-M3.1-Flash"
44
+ ],
45
+ "zh": "M Plan:Go、Explore、Build,均包含 M3.1 Flash;Explore、Build 另含 H3 视频。原 Token Plan 的 Plus、Max、Ultra 保留。使用现有 MiniMax 查询凭据。",
46
+ "en": "M Plan: Go, Explore and Build, all including M3.1 Flash. Explore and Build also include H3 video. Legacy Token Plan Plus, Max and Ultra remain. Uses the existing MiniMax quota credential."
47
+ },
48
+ "go": {
49
+ "checkedAt": "2026-10-28",
50
+ "sourceUrl": "https://opencode.ai/v2/docs/console/go/",
51
+ "tiers": [
52
+ "Go",
53
+ "Go Plus"
54
+ ],
55
+ "models": [
56
+ "kimi-k3.1-pro",
57
+ "minimax-m3.1-flash",
58
+ "step-5-preview",
59
+ "gemini-4-argon",
60
+ "beam-free",
61
+ "iceman-contributor-free"
62
+ ],
63
+ "zh": "Go 为 $10/月,Go Plus 为 $40/月。新增 Kimi K3.1 Pro、MiniMax M3.1 Flash 等模型,各模型使用独立的月度额度标准。",
64
+ "en": "Go costs $10/month; Go Plus costs $40/month. Includes Kimi K3.1 Pro, MiniMax M3.1 Flash and other additions, with model-specific monthly allowances."
65
+ },
66
+ "tencent-token": {
67
+ "checkedAt": "2026-10-28",
68
+ "sourceUrl": "https://cloud.tencent.com/document/product/1823/130060",
69
+ "tiers": [
70
+ "Lite",
71
+ "Standard",
72
+ "Pro",
73
+ "Max"
74
+ ],
75
+ "products": [
76
+ "Token Plan",
77
+ "Hy Token Plan"
78
+ ],
79
+ "zh": "腾讯通用 Token Plan 与 Hy Token Plan 共用 API Key 和请求地址,按模型从对应套餐扣减积分。当前支持套餐归属统计。",
80
+ "en": "Tencent Token Plan and Hy Token Plan share an API key and endpoints; credits are deducted from the applicable plan for each model. Plan classification is supported."
81
+ }
82
+ }
@@ -0,0 +1,21 @@
1
+ # v1.9.42:提醒交互、计价币种保护与纯文本侧栏
2
+
3
+ ## 中文
4
+
5
+ - **提醒可正常关闭**:“新增:余额图框点击刷新”使用现有顶层浮卡,避免侧栏裁剪、窗口拖动区域及浮动插件拦截按钮。点击“知道了”、关闭按钮或按 Escape 后立即消失;设置服务失败不会重新弹出,同页重复挂载一起关闭。正常本地存储可跨刷新保留已读;本地存储和服务同时不可用时,仅能保证当前页面与组件重挂不再显示。
6
+ - **纯文本侧栏**:在“费用 → 显示 → 侧栏”开启“隐藏进度条,仅显示紧凑文本”。隐藏余额、预算、套餐额度和峰谷时间的图形条,保留数值、时间、悬停与刷新操作。原布局和进度条偏好不被删除,关闭开关即可恢复。
7
+ - **官方同步币种保护**:从一种币种切换到另一种币种时,如果官方页面只返回部分模型,拒绝整个同步,而不是把遗漏模型的旧价格误标为新币种。历史费用不自动重算;请先按[安全核对说明](official-price-sync-safety.md)确认价格与范围。
8
+
9
+ 本版还包含 `master` 已有的多账号额度查询、Go 订阅计费分类、自定义余额跳转链接、Agent Teams 统计范围、百度千帆 Token Plan、官方余额渠道过滤以及发布包兼容性更新。原始问题与贡献署名完整保留于 [CHANGELOG](../CHANGELOG.md#1942---2026-10-28),本次修复未替代或重署这些贡献。
10
+
11
+ 升级后完全重启 DSH,使服务端价格保护生效,再刷新 Web 页面。用户提交的账本与截图未放入仓库或安装包。
12
+
13
+ ## English
14
+
15
+ The balance-refresh announcement now uses the existing protected top-layer card. Dismissal is immediate and does not reopen after a failed settings request. Duplicate mounts close together; local storage preserves dismissal across reloads. If both storage and the service are unavailable, dismissal can only survive remounts in the current page.
16
+
17
+ Enable **Cost → Display → Sidebar → Hide progress bars, show compact text** to retain values, timing, tooltips and refresh actions without graphical bars. Disabling it restores the saved layout and bar preferences.
18
+
19
+ Official price synchronization now rejects incomplete cross-currency updates rather than relabeling retained numbers. Historical amounts are never automatically rewritten; follow the [verification and repair guidance](official-price-sync-safety.md).
20
+
21
+ This release also includes the existing unreleased main-branch features listed with original contributor credits in the changelog. Fully restart DSH and refresh the Web UI after updating. Private reports and screenshots are not included in the repository or package.
@@ -0,0 +1,21 @@
1
+ # v1.9.43:空闲扫描修复、统一显示引导与订阅兼容验证
2
+
3
+ ## 中文
4
+
5
+ - **空闲时不再扫描全部插件**:billion-context 识别改为读取正在运行的原生插件实例,并异步读取少量目标元数据。空闲轮询使用缓存,不再调用宿主 `listBundles()`。停用、加载失败、卸载与重新加载会重新判断;仅修改磁盘包或重新启用同一个缓存模块,不会被误认为新版本已经运行。计费日志导入、完成回执和宿主补记机制不变。
6
+ - **五个显示介绍合为一个可关闭提示**:首次安装只显示一个可选介绍,指向「设置 → 费用 → 显示」。关闭、Escape 或“知道了”不改变布局、查询、价格或计费设置。已有任一介绍的已读标记会抑制新提示;本地存储或设置保存失败时仍保留当前页面的关闭状态。兼容旧宿主、重复挂载、后台页面及已有对话框。条件性的第三方集成授权与必要警告不被关闭。
7
+ - **实际发布包验证**:在原有 3.1.2、3.1.4、3.1.6、3.1.7 的基础上,补测 `dsh-codex-subscription` 3.1.8、3.1.9、3.2.0。真实额度读取、传输注册、RPC、断连、账户切换和异常路径通过后,才把监控基线更新到 3.2.0。监控新增用量读取函数指纹,不仅匹配入口字符串。
8
+
9
+ 感谢 [@ZiYuan258](https://github.com/ZiYuan258) 在 [#432](https://github.com/Han-1413141/dsh-cost-meter/issues/432) 提供 Windows 复现、I/O 测量、根因定位与目标读取建议;感谢 [@L33Z22L11](https://github.com/L33Z22L11) 在 [#429](https://github.com/Han-1413141/dsh-cost-meter/issues/429) 报告介绍叠加并建议统一设置入口。[#430](https://github.com/Han-1413141/dsh-cost-meter/issues/430) 来自 `github-actions[bot]` 的兼容性监控告警。
10
+
11
+ 验证细节见[目标识别与性能回归](billion-context-peer-discovery.md)和[兼容性监控记录](plugin-compatibility-watch.md)。本地 Linux 回归不能证明报告者的 Windows 环境已经恢复;需更新并完全重启 DSH 后复测。升级不迁移账本格式,不自动重算历史费用,保留 1.9.42 的币种保护与紧凑侧栏。
12
+
13
+ ## English
14
+
15
+ The billion-context discovery path no longer calls the host's full bundle inventory. It uses active native-loader state, bounded asynchronous metadata reads and a loaded-module cache. Disabled, failed and unloaded peers are not reported as active; disk-only upgrades and remounts of the same cached module do not pretend to have loaded newer code. Billing receipts, journal ingestion and host fallback are unchanged.
16
+
17
+ Five automatic display introductions become one optional, dismissible guide pointing to **Settings → Cost → Display**. Existing acknowledgements are respected; dismissal does not alter display, quota or billing preferences. Integration consent and necessary warnings remain independent.
18
+
19
+ Published Codex subscription packages 3.1.8, 3.1.9 and 3.2.0 join the existing regression matrix. The baseline moves to 3.2.0 only after real package lifecycle tests; monitoring now fingerprints the usage reader as well.
20
+
21
+ Credits and original reports are linked above. Linux regression timings are not evidence of recovery on the reporter's Windows machine. Fully restart DSH and refresh the Web UI after updating. Ledger format, historical charges and the 1.9.42 currency protections are retained.
@@ -0,0 +1,21 @@
1
+ # v1.9.44:峰谷游标与模型、套餐目录更新
2
+
3
+ ## 中文
4
+
5
+ - **峰谷游标随时间移动**:修复紧凑、经典及两种侧栏收起样式中固定在各段中间的游标;峰谷切换和页面恢复可见时刷新,周末、节假日按连续谷价时段显示。感谢 [@shutongX](https://github.com/shutongX) 在 [#434](https://github.com/Han-1413141/dsh-cost-meter/issues/434) 报告问题并提供截图。
6
+ - **更新 32 条模型目录记录**:补入 Kimi K3.1 Pro / Highspeed、Kimi Code 模型 ID、MiniMax M3.1 Flash、Qwen3.8 Flash、Hy4 preview,以及 OpenCode Go / Zen、OpenRouter 的新条目;补齐 Kimi K3 缓存写入,修正 Zen GPT-6.1 Sol 缓存读取。
7
+ - **更新套餐说明和额度解析**:显示 Kimi 的 Go / Plus / Pro / Max / Ultra 和 MiniMax M Plan 的 Go / Explore / Build。Kimi 支持当前 5 小时 / 月度窗口、嵌套响应及旧套餐周窗计数,保留旧订阅插件的计费识别。
8
+ - **保留已有设置和金额**:一次性迁移补入新 ID,保留手动价格、主动取消挂载和历史费用。没有公开独立 API 报价的三个 Kimi Code ID 保持未核价。
9
+
10
+ 本版还包含主分支已合入的空闲扫描修复、统一显示引导和 Codex 订阅兼容验证,详见 [1.9.43 说明](update-notes-1.9.43.md)。完整价格、套餐和官方来源见 [10 月 28 日目录](catalog-2026-10-28.md)。
11
+
12
+ 更新后完全重启 DSH,再刷新网页,使服务端价表和客户端一起生效。
13
+
14
+ ## English
15
+
16
+ - Peak/off-peak markers now advance with time in all four legacy sidebar layouts and refresh at period boundaries and when the page becomes visible. Thanks to [@shutongX](https://github.com/shutongX) for the report and screenshot in [#434](https://github.com/Han-1413141/dsh-cost-meter/issues/434).
17
+ - Adds or corrects 32 provider-scoped records, including Kimi K3.1 Pro / Highspeed, MiniMax M3.1 Flash, Qwen3.8 Flash, Hy4 preview, and current OpenCode Go / Zen and OpenRouter additions.
18
+ - Updates Kimi memberships and MiniMax M Plan descriptions, with current and legacy Kimi usage-response support.
19
+ - Migration preserves custom rates, deliberate unmounts and recorded charges. Unverified Kimi Code API-equivalent rates remain unpriced.
20
+
21
+ This release also includes the idle-scan, unified-onboarding and Codex subscription compatibility changes documented under [1.9.43](update-notes-1.9.43.md). See the [catalog and official sources](catalog-2026-10-28.md) for details. Fully restart DSH and refresh the Web UI after updating.
@@ -0,0 +1,82 @@
1
+ import { fetchWithRetry, readJsonBounded } from './net.js'
2
+
3
+ // Official console contract and evidence: docs/baidu-token-plan.md.
4
+ // The model API key is not a console credential. Never return the resource's apiKey.
5
+ export const BAIDU_TOKEN_PLAN_URL = 'https://console.bce.baidu.com/api/qianfan/charge/tokenPlanPersonal/resource'
6
+
7
+ export function normalizeBaiduCookie(value) {
8
+ if (typeof value !== 'string' || /[\r\n\x00-\x1f\x7f]/.test(value) || value.length > 16384) return null
9
+ const cookie = value.trim().replace(/^cookie:\s*/i, '')
10
+ const parts = cookie.split(';').filter(part => part.trim())
11
+ return parts.length && parts.some(part => /=\s*\S/.test(part))
12
+ && parts.every(part => /^\s*[^=\s;]+=[^;]*$/.test(part)) ? cookie : null
13
+ }
14
+
15
+ const number = value => (typeof value === 'number' || (typeof value === 'string' && value.trim()))
16
+ && Number.isFinite(Number(value)) && Number(value) >= 0 ? Number(value) : null
17
+ const expiryOf = value => {
18
+ if (typeof value !== 'string' || !value.trim()) return null
19
+ // BCE console wall-clock timestamps are in China Standard Time, independent of host timezone.
20
+ const date = new Date(/^\d{4}-\d\d-\d\d[ T]\d\d:\d\d:\d\d(?:\.\d+)?$/.test(value)
21
+ ? value.replace(' ', 'T') + '+08:00' : value)
22
+ return Number.isFinite(date.getTime()) ? date : null
23
+ }
24
+
25
+ export function parseBaiduTokenPlan(data, locale = 'zh', now = Date.now()) {
26
+ if (data?.success !== true || !Array.isArray(data.result?.items)) return null
27
+ const item = data.result.items.find(row => row && typeof row === 'object'
28
+ && row.resourceStatus !== 'Released' && (expiryOf(row.expiresAt)?.getTime() ?? Infinity) > now)
29
+ if (!item || !['credit', 'token', undefined].includes(item.billingMode)) return null
30
+ const credit = item.billingMode === 'credit'
31
+ const used = number(credit ? item.usedCredits : item.usedTokens)
32
+ const total = number(credit ? item.totalCredits : item.totalTokens)
33
+ if (used === null || total === null || total <= 0) return null
34
+ const unit = credit ? locale === 'en' ? 'credits' : '积分' : 'Tokens'
35
+ const format = value => value.toLocaleString(locale === 'en' ? 'en-US' : 'zh-CN', { maximumFractionDigits: 4 })
36
+ const expiry = expiryOf(item.expiresAt)
37
+ return {
38
+ windows: {
39
+ monthly: { percent: Math.min(100, Math.round(used / total * 1000) / 10), resetsAt: '' },
40
+ usage: { text: `${format(used)} / ${format(total)} ${unit}`, resetsAt: '' },
41
+ },
42
+ // Subscription expiry is not the monthly quota reset time.
43
+ message: expiry ? (locale === 'en' ? 'Expires: ' : '套餐到期:')
44
+ + expiry.toLocaleString(locale === 'en' ? 'en-GB' : 'zh-CN', { timeZone: 'Asia/Shanghai', hour12: false }) + ' (UTC+8)' : '',
45
+ }
46
+ }
47
+
48
+ export async function queryBaiduTokenPlan(key, locale, { signal } = {}) {
49
+ const text = (zh, en) => locale === 'en' ? en : zh
50
+ const fail = (kind, soft = false) => {
51
+ const messages = {
52
+ cookie: text('请填写百度智能云控制台的完整 Cookie,或配置 BAIDU_QIANFAN_COOKIE;推理 API Key 不用于额度查询。', 'Enter the full Baidu Cloud console Cookie or set BAIDU_QIANFAN_COOKIE; inference API keys cannot query quotas.'),
53
+ login: text('百度智能云登录已过期,请登录 console.bce.baidu.com 并重新复制 Cookie。', 'Baidu Cloud login expired. Sign in at console.bce.baidu.com and copy a fresh Cookie.'),
54
+ usage: text('未读取到有效的千帆 Token Plan 个人版额度,请在控制台确认套餐状态。', 'No active Qianfan Token Plan Personal quota found. Check the subscription in the console.'),
55
+ network: text('千帆额度查询失败,请稍后重试。', 'Qianfan quota request failed. Please retry later.'),
56
+ }
57
+ const error = new Error(messages[kind]); error.soft = soft; return error
58
+ }
59
+ signal?.throwIfAborted()
60
+ const cookie = normalizeBaiduCookie(key)
61
+ if (!cookie) throw fail('cookie', true)
62
+ let response
63
+ try {
64
+ response = await fetchWithRetry(BAIDU_TOKEN_PLAN_URL, {
65
+ method: 'GET', headers: { cookie, accept: 'application/json', 'X-Requested-With': 'XMLHttpRequest' },
66
+ redirect: 'manual', signal,
67
+ }, { timeoutMs: 15000, attempts: 2 })
68
+ } catch { signal?.throwIfAborted(); throw fail('network') }
69
+ if (!response.ok) {
70
+ try { await response.body?.cancel?.() } catch {}
71
+ if ([401, 403].includes(response.status) || (response.status >= 300 && response.status < 400)) throw fail('login', true)
72
+ throw fail('network')
73
+ }
74
+ let data
75
+ try { data = await readJsonBounded(response, 262144, { signal }) }
76
+ catch { signal?.throwIfAborted(); throw fail('usage') }
77
+ signal?.throwIfAborted()
78
+ if (data?.message?.redirect || [401, 403, '401', '403'].includes(data?.code)) throw fail('login', true)
79
+ const result = parseBaiduTokenPlan(data, locale)
80
+ if (!result) throw fail('usage', true)
81
+ return { ...result, endpoint: BAIDU_TOKEN_PLAN_URL }
82
+ }