@chenlongapps/opencode-token-usage 0.4.12 → 0.4.14
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/prices.generated.d.ts +136 -65
- package/dist/prices.generated.js +21 -23
- package/dist/pricing.d.ts +1 -1
- package/docs/verification.md +10 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
2
|
-
readonly verified: "2026-10-
|
|
2
|
+
readonly verified: "2026-10-21";
|
|
3
3
|
readonly source: "https://models.dev/api.json";
|
|
4
4
|
readonly entries: readonly [{
|
|
5
5
|
readonly providerID: "ai21";
|
|
@@ -8,7 +8,7 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
8
8
|
readonly input: 2;
|
|
9
9
|
readonly output: 8;
|
|
10
10
|
}];
|
|
11
|
-
readonly released: "2025-07-
|
|
11
|
+
readonly released: "2025-07-03";
|
|
12
12
|
}, {
|
|
13
13
|
readonly providerID: "ai21";
|
|
14
14
|
readonly id: "jamba-mini";
|
|
@@ -16,7 +16,7 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
16
16
|
readonly input: 0.2;
|
|
17
17
|
readonly output: 0.4;
|
|
18
18
|
}];
|
|
19
|
-
readonly released: "2026-01-
|
|
19
|
+
readonly released: "2026-01-08";
|
|
20
20
|
}, {
|
|
21
21
|
readonly providerID: "alibaba";
|
|
22
22
|
readonly id: "qvq-max";
|
|
@@ -31,6 +31,13 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
31
31
|
readonly prices: readonly [{
|
|
32
32
|
readonly input: 0.05;
|
|
33
33
|
readonly output: 0.4;
|
|
34
|
+
}, {
|
|
35
|
+
readonly input: 0.25;
|
|
36
|
+
readonly output: 2;
|
|
37
|
+
readonly tier: {
|
|
38
|
+
readonly type: "context";
|
|
39
|
+
readonly size: 256000;
|
|
40
|
+
};
|
|
34
41
|
}];
|
|
35
42
|
readonly released: "2025-07-28";
|
|
36
43
|
}, {
|
|
@@ -62,6 +69,14 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
62
69
|
readonly input: 0.4;
|
|
63
70
|
readonly output: 1.2;
|
|
64
71
|
readonly reasoning: 4;
|
|
72
|
+
}, {
|
|
73
|
+
readonly input: 1.2;
|
|
74
|
+
readonly output: 3.6;
|
|
75
|
+
readonly reasoning: 12;
|
|
76
|
+
readonly tier: {
|
|
77
|
+
readonly type: "context";
|
|
78
|
+
readonly size: 256000;
|
|
79
|
+
};
|
|
65
80
|
}];
|
|
66
81
|
readonly released: "2024-01-25";
|
|
67
82
|
}, {
|
|
@@ -233,6 +248,27 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
233
248
|
readonly prices: readonly [{
|
|
234
249
|
readonly input: 0.3;
|
|
235
250
|
readonly output: 1.5;
|
|
251
|
+
}, {
|
|
252
|
+
readonly input: 0.5;
|
|
253
|
+
readonly output: 2.5;
|
|
254
|
+
readonly tier: {
|
|
255
|
+
readonly type: "context";
|
|
256
|
+
readonly size: 32000;
|
|
257
|
+
};
|
|
258
|
+
}, {
|
|
259
|
+
readonly input: 0.8;
|
|
260
|
+
readonly output: 4;
|
|
261
|
+
readonly tier: {
|
|
262
|
+
readonly type: "context";
|
|
263
|
+
readonly size: 128000;
|
|
264
|
+
};
|
|
265
|
+
}, {
|
|
266
|
+
readonly input: 1.6;
|
|
267
|
+
readonly output: 9.6;
|
|
268
|
+
readonly tier: {
|
|
269
|
+
readonly type: "context";
|
|
270
|
+
readonly size: 256000;
|
|
271
|
+
};
|
|
236
272
|
}];
|
|
237
273
|
readonly released: "2025-07-28";
|
|
238
274
|
}, {
|
|
@@ -287,7 +323,20 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
287
323
|
readonly prices: readonly [{
|
|
288
324
|
readonly input: 0.2;
|
|
289
325
|
readonly output: 1.6;
|
|
290
|
-
|
|
326
|
+
}, {
|
|
327
|
+
readonly input: 0.3;
|
|
328
|
+
readonly output: 2.4;
|
|
329
|
+
readonly tier: {
|
|
330
|
+
readonly type: "context";
|
|
331
|
+
readonly size: 32000;
|
|
332
|
+
};
|
|
333
|
+
}, {
|
|
334
|
+
readonly input: 0.6;
|
|
335
|
+
readonly output: 4.8;
|
|
336
|
+
readonly tier: {
|
|
337
|
+
readonly type: "context";
|
|
338
|
+
readonly size: 128000;
|
|
339
|
+
};
|
|
291
340
|
}];
|
|
292
341
|
readonly released: "2025-09-23";
|
|
293
342
|
}, {
|
|
@@ -339,6 +388,13 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
339
388
|
readonly prices: readonly [{
|
|
340
389
|
readonly input: 0.4;
|
|
341
390
|
readonly output: 2.4;
|
|
391
|
+
}, {
|
|
392
|
+
readonly input: 0.5;
|
|
393
|
+
readonly output: 3;
|
|
394
|
+
readonly tier: {
|
|
395
|
+
readonly type: "context";
|
|
396
|
+
readonly size: 256000;
|
|
397
|
+
};
|
|
342
398
|
}];
|
|
343
399
|
readonly released: "2026-02-16";
|
|
344
400
|
}, {
|
|
@@ -353,17 +409,29 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
353
409
|
readonly providerID: "alibaba";
|
|
354
410
|
readonly id: "qwen3.6-35b-a3b";
|
|
355
411
|
readonly prices: readonly [{
|
|
356
|
-
readonly input: 0.
|
|
357
|
-
readonly output:
|
|
412
|
+
readonly input: 0.375;
|
|
413
|
+
readonly output: 2.25;
|
|
358
414
|
}];
|
|
359
415
|
readonly released: "2026-04-17";
|
|
360
416
|
}, {
|
|
361
417
|
readonly providerID: "alibaba";
|
|
362
418
|
readonly id: "qwen3.6-flash";
|
|
363
419
|
readonly prices: readonly [{
|
|
364
|
-
readonly input: 0.
|
|
365
|
-
readonly output: 1.
|
|
366
|
-
readonly cache: {
|
|
420
|
+
readonly input: 0.25;
|
|
421
|
+
readonly output: 1.5;
|
|
422
|
+
readonly cache: {
|
|
423
|
+
readonly read: 0.025;
|
|
424
|
+
};
|
|
425
|
+
}, {
|
|
426
|
+
readonly input: 1;
|
|
427
|
+
readonly output: 4;
|
|
428
|
+
readonly cache: {
|
|
429
|
+
readonly read: 0.1;
|
|
430
|
+
};
|
|
431
|
+
readonly tier: {
|
|
432
|
+
readonly type: "context";
|
|
433
|
+
readonly size: 256000;
|
|
434
|
+
};
|
|
367
435
|
}];
|
|
368
436
|
readonly released: "2026-04-27";
|
|
369
437
|
}, {
|
|
@@ -830,7 +898,7 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
830
898
|
readonly input: 0.0375;
|
|
831
899
|
readonly output: 0.15;
|
|
832
900
|
}];
|
|
833
|
-
readonly released: "2024-12-
|
|
901
|
+
readonly released: "2024-12-13";
|
|
834
902
|
}, {
|
|
835
903
|
readonly providerID: "cohere";
|
|
836
904
|
readonly id: "command-r7b-arabic-02-2025";
|
|
@@ -898,7 +966,7 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
898
966
|
readonly read: 0.022;
|
|
899
967
|
};
|
|
900
968
|
}];
|
|
901
|
-
readonly released: "2026-08-
|
|
969
|
+
readonly released: "2026-08-13";
|
|
902
970
|
}, {
|
|
903
971
|
readonly providerID: "google";
|
|
904
972
|
readonly id: "deep-research-max-preview-04-2026";
|
|
@@ -1162,6 +1230,27 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1162
1230
|
};
|
|
1163
1231
|
}];
|
|
1164
1232
|
readonly released: "2026-07-21";
|
|
1233
|
+
}, {
|
|
1234
|
+
readonly providerID: "google";
|
|
1235
|
+
readonly id: "gemini-pro-latest";
|
|
1236
|
+
readonly prices: readonly [{
|
|
1237
|
+
readonly input: 2;
|
|
1238
|
+
readonly output: 12;
|
|
1239
|
+
readonly cache: {
|
|
1240
|
+
readonly read: 0.2;
|
|
1241
|
+
};
|
|
1242
|
+
}, {
|
|
1243
|
+
readonly input: 4;
|
|
1244
|
+
readonly output: 18;
|
|
1245
|
+
readonly cache: {
|
|
1246
|
+
readonly read: 0.4;
|
|
1247
|
+
};
|
|
1248
|
+
readonly tier: {
|
|
1249
|
+
readonly type: "context";
|
|
1250
|
+
readonly size: 200000;
|
|
1251
|
+
};
|
|
1252
|
+
}];
|
|
1253
|
+
readonly released: "2026-02-19";
|
|
1165
1254
|
}, {
|
|
1166
1255
|
readonly providerID: "inception";
|
|
1167
1256
|
readonly id: "mercury-2";
|
|
@@ -1184,6 +1273,17 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1184
1273
|
};
|
|
1185
1274
|
}];
|
|
1186
1275
|
readonly released: "2026-09-08";
|
|
1276
|
+
}, {
|
|
1277
|
+
readonly providerID: "inception";
|
|
1278
|
+
readonly id: "mercury-3";
|
|
1279
|
+
readonly prices: readonly [{
|
|
1280
|
+
readonly input: 0.1;
|
|
1281
|
+
readonly output: 0.35;
|
|
1282
|
+
readonly cache: {
|
|
1283
|
+
readonly read: 0.01;
|
|
1284
|
+
};
|
|
1285
|
+
}];
|
|
1286
|
+
readonly released: "2026-10-16";
|
|
1187
1287
|
}, {
|
|
1188
1288
|
readonly providerID: "inception";
|
|
1189
1289
|
readonly id: "mercury-edit-2";
|
|
@@ -1361,6 +1461,17 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1361
1461
|
};
|
|
1362
1462
|
}];
|
|
1363
1463
|
readonly released: "2026-06-01";
|
|
1464
|
+
}, {
|
|
1465
|
+
readonly providerID: "minimax";
|
|
1466
|
+
readonly id: "minimax-m3.1-flash";
|
|
1467
|
+
readonly prices: readonly [{
|
|
1468
|
+
readonly input: 0.15;
|
|
1469
|
+
readonly output: 0.6;
|
|
1470
|
+
readonly cache: {
|
|
1471
|
+
readonly read: 0.015;
|
|
1472
|
+
};
|
|
1473
|
+
}];
|
|
1474
|
+
readonly released: "2026-10-19";
|
|
1364
1475
|
}, {
|
|
1365
1476
|
readonly providerID: "mistral";
|
|
1366
1477
|
readonly id: "codestral-2508";
|
|
@@ -1473,8 +1584,11 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1473
1584
|
readonly providerID: "mistral";
|
|
1474
1585
|
readonly id: "ministral-3b-latest";
|
|
1475
1586
|
readonly prices: readonly [{
|
|
1476
|
-
readonly input: 0.
|
|
1477
|
-
readonly output: 0.
|
|
1587
|
+
readonly input: 0.1;
|
|
1588
|
+
readonly output: 0.1;
|
|
1589
|
+
readonly cache: {
|
|
1590
|
+
readonly read: 0.01;
|
|
1591
|
+
};
|
|
1478
1592
|
}];
|
|
1479
1593
|
readonly released: "2024-10-01";
|
|
1480
1594
|
}, {
|
|
@@ -1492,8 +1606,11 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1492
1606
|
readonly providerID: "mistral";
|
|
1493
1607
|
readonly id: "ministral-8b-latest";
|
|
1494
1608
|
readonly prices: readonly [{
|
|
1495
|
-
readonly input: 0.
|
|
1496
|
-
readonly output: 0.
|
|
1609
|
+
readonly input: 0.15;
|
|
1610
|
+
readonly output: 0.15;
|
|
1611
|
+
readonly cache: {
|
|
1612
|
+
readonly read: 0.015;
|
|
1613
|
+
};
|
|
1497
1614
|
}];
|
|
1498
1615
|
readonly released: "2024-10-01";
|
|
1499
1616
|
}, {
|
|
@@ -1613,14 +1730,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1613
1730
|
};
|
|
1614
1731
|
}];
|
|
1615
1732
|
readonly released: "2026-03-16";
|
|
1616
|
-
}, {
|
|
1617
|
-
readonly providerID: "mistral";
|
|
1618
|
-
readonly id: "open-mistral-7b";
|
|
1619
|
-
readonly prices: readonly [{
|
|
1620
|
-
readonly input: 0.25;
|
|
1621
|
-
readonly output: 0.25;
|
|
1622
|
-
}];
|
|
1623
|
-
readonly released: "2023-09-27";
|
|
1624
1733
|
}, {
|
|
1625
1734
|
readonly providerID: "mistral";
|
|
1626
1735
|
readonly id: "open-mistral-nemo";
|
|
@@ -1629,22 +1738,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1629
1738
|
readonly output: 0.15;
|
|
1630
1739
|
}];
|
|
1631
1740
|
readonly released: "2024-07-01";
|
|
1632
|
-
}, {
|
|
1633
|
-
readonly providerID: "mistral";
|
|
1634
|
-
readonly id: "open-mixtral-8x22b";
|
|
1635
|
-
readonly prices: readonly [{
|
|
1636
|
-
readonly input: 2;
|
|
1637
|
-
readonly output: 6;
|
|
1638
|
-
}];
|
|
1639
|
-
readonly released: "2024-04-17";
|
|
1640
|
-
}, {
|
|
1641
|
-
readonly providerID: "mistral";
|
|
1642
|
-
readonly id: "open-mixtral-8x7b";
|
|
1643
|
-
readonly prices: readonly [{
|
|
1644
|
-
readonly input: 0.7;
|
|
1645
|
-
readonly output: 0.7;
|
|
1646
|
-
}];
|
|
1647
|
-
readonly released: "2023-12-11";
|
|
1648
1741
|
}, {
|
|
1649
1742
|
readonly providerID: "mistral";
|
|
1650
1743
|
readonly id: "pixtral-12b";
|
|
@@ -1674,7 +1767,7 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1674
1767
|
readonly id: "voxtral-small-latest";
|
|
1675
1768
|
readonly prices: readonly [{
|
|
1676
1769
|
readonly input: 0.1;
|
|
1677
|
-
readonly output: 0.
|
|
1770
|
+
readonly output: 0.4;
|
|
1678
1771
|
}];
|
|
1679
1772
|
readonly released: "2025-07-15";
|
|
1680
1773
|
}, {
|
|
@@ -1687,7 +1780,7 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1687
1780
|
readonly read: 0.16;
|
|
1688
1781
|
};
|
|
1689
1782
|
}];
|
|
1690
|
-
readonly released: "2026-04-
|
|
1783
|
+
readonly released: "2026-04-20";
|
|
1691
1784
|
}, {
|
|
1692
1785
|
readonly providerID: "moonshotai";
|
|
1693
1786
|
readonly id: "kimi-k2.7-code";
|
|
@@ -1769,7 +1862,7 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1769
1862
|
readonly input: 0;
|
|
1770
1863
|
readonly output: 0;
|
|
1771
1864
|
}];
|
|
1772
|
-
readonly released: "2025-
|
|
1865
|
+
readonly released: "2025-03-18";
|
|
1773
1866
|
}, {
|
|
1774
1867
|
readonly providerID: "nvidia";
|
|
1775
1868
|
readonly id: "nvidia/llama-3.3-nemotron-super-49b-v1.5";
|
|
@@ -1819,7 +1912,7 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1819
1912
|
readonly input: 0;
|
|
1820
1913
|
readonly output: 0;
|
|
1821
1914
|
}];
|
|
1822
|
-
readonly released: "2026-06-
|
|
1915
|
+
readonly released: "2026-06-02";
|
|
1823
1916
|
}, {
|
|
1824
1917
|
readonly providerID: "nvidia";
|
|
1825
1918
|
readonly id: "nvidia/nemotron-3.5-lightning-30b-a3b";
|
|
@@ -2148,17 +2241,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
2148
2241
|
};
|
|
2149
2242
|
}];
|
|
2150
2243
|
readonly released: "2025-12-11";
|
|
2151
|
-
}, {
|
|
2152
|
-
readonly providerID: "openai";
|
|
2153
|
-
readonly id: "gpt-5.2-chat-latest";
|
|
2154
|
-
readonly prices: readonly [{
|
|
2155
|
-
readonly input: 1.75;
|
|
2156
|
-
readonly output: 14;
|
|
2157
|
-
readonly cache: {
|
|
2158
|
-
readonly read: 0.175;
|
|
2159
|
-
};
|
|
2160
|
-
}];
|
|
2161
|
-
readonly released: "2025-12-11";
|
|
2162
2244
|
}, {
|
|
2163
2245
|
readonly providerID: "openai";
|
|
2164
2246
|
readonly id: "gpt-5.2-fast";
|
|
@@ -2179,17 +2261,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
2179
2261
|
readonly output: 168;
|
|
2180
2262
|
}];
|
|
2181
2263
|
readonly released: "2025-12-11";
|
|
2182
|
-
}, {
|
|
2183
|
-
readonly providerID: "openai";
|
|
2184
|
-
readonly id: "gpt-5.3-chat-latest";
|
|
2185
|
-
readonly prices: readonly [{
|
|
2186
|
-
readonly input: 1.75;
|
|
2187
|
-
readonly output: 14;
|
|
2188
|
-
readonly cache: {
|
|
2189
|
-
readonly read: 0.175;
|
|
2190
|
-
};
|
|
2191
|
-
}];
|
|
2192
|
-
readonly released: "2026-03-03";
|
|
2193
2264
|
}, {
|
|
2194
2265
|
readonly providerID: "openai";
|
|
2195
2266
|
readonly id: "gpt-5.3-codex";
|
package/dist/prices.generated.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export const GENERATED_PRICE_SNAPSHOT = {
|
|
2
|
-
verified: "2026-10-
|
|
2
|
+
verified: "2026-10-21",
|
|
3
3
|
source: "https://models.dev/api.json",
|
|
4
4
|
entries: [
|
|
5
|
-
{ "providerID": "ai21", "id": "jamba-large", "prices": [{ "input": 2, "output": 8 }], "released": "2025-07-
|
|
6
|
-
{ "providerID": "ai21", "id": "jamba-mini", "prices": [{ "input": 0.2, "output": 0.4 }], "released": "2026-01-
|
|
5
|
+
{ "providerID": "ai21", "id": "jamba-large", "prices": [{ "input": 2, "output": 8 }], "released": "2025-07-03" },
|
|
6
|
+
{ "providerID": "ai21", "id": "jamba-mini", "prices": [{ "input": 0.2, "output": 0.4 }], "released": "2026-01-08" },
|
|
7
7
|
{ "providerID": "alibaba", "id": "qvq-max", "prices": [{ "input": 1.2, "output": 4.8 }], "released": "2025-03-25" },
|
|
8
|
-
{ "providerID": "alibaba", "id": "qwen-flash", "prices": [{ "input": 0.05, "output": 0.4 }], "released": "2025-07-28" },
|
|
8
|
+
{ "providerID": "alibaba", "id": "qwen-flash", "prices": [{ "input": 0.05, "output": 0.4 }, { "input": 0.25, "output": 2, "tier": { "type": "context", "size": 256000 } }], "released": "2025-07-28" },
|
|
9
9
|
{ "providerID": "alibaba", "id": "qwen-max", "prices": [{ "input": 1.6, "output": 6.4 }], "released": "2024-04-03" },
|
|
10
10
|
{ "providerID": "alibaba", "id": "qwen-mt-plus", "prices": [{ "input": 2.46, "output": 7.37 }] },
|
|
11
11
|
{ "providerID": "alibaba", "id": "qwen-mt-turbo", "prices": [{ "input": 0.16, "output": 0.49 }] },
|
|
12
|
-
{ "providerID": "alibaba", "id": "qwen-plus", "prices": [{ "input": 0.4, "output": 1.2, "reasoning": 4 }], "released": "2024-01-25" },
|
|
12
|
+
{ "providerID": "alibaba", "id": "qwen-plus", "prices": [{ "input": 0.4, "output": 1.2, "reasoning": 4 }, { "input": 1.2, "output": 3.6, "reasoning": 12, "tier": { "type": "context", "size": 256000 } }], "released": "2024-01-25" },
|
|
13
13
|
{ "providerID": "alibaba", "id": "qwen-plus-character-ja", "prices": [{ "input": 0.5, "output": 1.4 }] },
|
|
14
14
|
{ "providerID": "alibaba", "id": "qwen-turbo", "prices": [{ "input": 0.05, "output": 0.2, "reasoning": 0.5 }], "released": "2024-11-01" },
|
|
15
15
|
{ "providerID": "alibaba", "id": "qwen-vl-max", "prices": [{ "input": 0.8, "output": 3.2 }], "released": "2024-04-08" },
|
|
@@ -28,23 +28,23 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
28
28
|
{ "providerID": "alibaba", "id": "qwen3-8b", "prices": [{ "input": 0.18, "output": 0.7, "reasoning": 2.1 }] },
|
|
29
29
|
{ "providerID": "alibaba", "id": "qwen3-coder-30b-a3b-instruct", "prices": [{ "input": 0.45, "output": 2.25 }, { "input": 0.75, "output": 3.75, "tier": { "type": "context", "size": 32000 } }, { "input": 1.2, "output": 6, "tier": { "type": "context", "size": 128000 } }] },
|
|
30
30
|
{ "providerID": "alibaba", "id": "qwen3-coder-480b-a35b-instruct", "prices": [{ "input": 1.5, "output": 7.5 }, { "input": 2.7, "output": 13.5, "tier": { "type": "context", "size": 32000 } }, { "input": 4.5, "output": 22.5, "tier": { "type": "context", "size": 128000 } }] },
|
|
31
|
-
{ "providerID": "alibaba", "id": "qwen3-coder-flash", "prices": [{ "input": 0.3, "output": 1.5 }], "released": "2025-07-28" },
|
|
31
|
+
{ "providerID": "alibaba", "id": "qwen3-coder-flash", "prices": [{ "input": 0.3, "output": 1.5 }, { "input": 0.5, "output": 2.5, "tier": { "type": "context", "size": 32000 } }, { "input": 0.8, "output": 4, "tier": { "type": "context", "size": 128000 } }, { "input": 1.6, "output": 9.6, "tier": { "type": "context", "size": 256000 } }], "released": "2025-07-28" },
|
|
32
32
|
{ "providerID": "alibaba", "id": "qwen3-coder-plus", "prices": [{ "input": 1, "output": 5 }], "released": "2025-07-23" },
|
|
33
33
|
{ "providerID": "alibaba", "id": "qwen3-max", "prices": [{ "input": 1.2, "output": 6 }], "released": "2025-09-23" },
|
|
34
34
|
{ "providerID": "alibaba", "id": "qwen3-next-80b-a3b-instruct", "prices": [{ "input": 0.5, "output": 2 }] },
|
|
35
35
|
{ "providerID": "alibaba", "id": "qwen3-next-80b-a3b-thinking", "prices": [{ "input": 0.5, "output": 6 }] },
|
|
36
36
|
{ "providerID": "alibaba", "id": "qwen3-vl-235b-a22b", "prices": [{ "input": 0.7, "output": 2.8, "reasoning": 8.4 }] },
|
|
37
37
|
{ "providerID": "alibaba", "id": "qwen3-vl-30b-a3b", "prices": [{ "input": 0.2, "output": 0.8, "reasoning": 2.4 }] },
|
|
38
|
-
{ "providerID": "alibaba", "id": "qwen3-vl-plus", "prices": [{ "input": 0.2, "output": 1.6, "
|
|
38
|
+
{ "providerID": "alibaba", "id": "qwen3-vl-plus", "prices": [{ "input": 0.2, "output": 1.6 }, { "input": 0.3, "output": 2.4, "tier": { "type": "context", "size": 32000 } }, { "input": 0.6, "output": 4.8, "tier": { "type": "context", "size": 128000 } }], "released": "2025-09-23" },
|
|
39
39
|
{ "providerID": "alibaba", "id": "qwen3.5-122b-a10b", "prices": [{ "input": 0.4, "output": 3.2 }], "released": "2026-02-23" },
|
|
40
40
|
{ "providerID": "alibaba", "id": "qwen3.5-27b", "prices": [{ "input": 0.3, "output": 2.4 }], "released": "2026-02-23" },
|
|
41
41
|
{ "providerID": "alibaba", "id": "qwen3.5-35b-a3b", "prices": [{ "input": 0.25, "output": 2 }], "released": "2026-02-23" },
|
|
42
42
|
{ "providerID": "alibaba", "id": "qwen3.5-397b-a17b", "prices": [{ "input": 0.6, "output": 3.6 }], "released": "2026-02-15" },
|
|
43
43
|
{ "providerID": "alibaba", "id": "qwen3.5-flash", "prices": [{ "input": 0.1, "output": 0.4, "cache": { "read": 0.01 } }], "released": "2026-02-23" },
|
|
44
|
-
{ "providerID": "alibaba", "id": "qwen3.5-plus", "prices": [{ "input": 0.4, "output": 2.4 }], "released": "2026-02-16" },
|
|
44
|
+
{ "providerID": "alibaba", "id": "qwen3.5-plus", "prices": [{ "input": 0.4, "output": 2.4 }, { "input": 0.5, "output": 3, "tier": { "type": "context", "size": 256000 } }], "released": "2026-02-16" },
|
|
45
45
|
{ "providerID": "alibaba", "id": "qwen3.6-27b", "prices": [{ "input": 0.6, "output": 3.6 }], "released": "2026-04-22" },
|
|
46
|
-
{ "providerID": "alibaba", "id": "qwen3.6-35b-a3b", "prices": [{ "input": 0.
|
|
47
|
-
{ "providerID": "alibaba", "id": "qwen3.6-flash", "prices": [{ "input": 0.
|
|
46
|
+
{ "providerID": "alibaba", "id": "qwen3.6-35b-a3b", "prices": [{ "input": 0.375, "output": 2.25 }], "released": "2026-04-17" },
|
|
47
|
+
{ "providerID": "alibaba", "id": "qwen3.6-flash", "prices": [{ "input": 0.25, "output": 1.5, "cache": { "read": 0.025 } }, { "input": 1, "output": 4, "cache": { "read": 0.1 }, "tier": { "type": "context", "size": 256000 } }], "released": "2026-04-27" },
|
|
48
48
|
{ "providerID": "alibaba", "id": "qwen3.6-max-preview", "prices": [{ "input": 1.3, "output": 7.8, "cache": { "read": 0.13 } }], "released": "2026-04-20" },
|
|
49
49
|
{ "providerID": "alibaba", "id": "qwen3.6-plus", "prices": [{ "input": 0.5, "output": 3, "cache": { "read": 0.05 } }, { "input": 2, "output": 6, "cache": { "read": 0.2 }, "tier": { "type": "context", "size": 256000 } }], "released": "2026-04-02" },
|
|
50
50
|
{ "providerID": "alibaba", "id": "qwen3.7-flash", "prices": [{ "input": 0.03, "output": 0.13, "cache": { "read": 0.003 } }, { "input": 0.1, "output": 0.4, "cache": { "read": 0.01 }, "tier": { "type": "context", "size": 32000 } }, { "input": 0.2, "output": 0.8, "cache": { "read": 0.02 }, "tier": { "type": "context", "size": 256000 } }], "released": "2026-07-15" },
|
|
@@ -82,14 +82,14 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
82
82
|
{ "providerID": "cohere", "id": "command-a-vision-07-2025", "prices": [{ "input": 2.5, "output": 10 }], "released": "2025-07-31" },
|
|
83
83
|
{ "providerID": "cohere", "id": "command-r-08-2024", "prices": [{ "input": 0.15, "output": 0.6 }], "released": "2024-08-30" },
|
|
84
84
|
{ "providerID": "cohere", "id": "command-r-plus-08-2024", "prices": [{ "input": 2.5, "output": 10 }], "released": "2024-08-30" },
|
|
85
|
-
{ "providerID": "cohere", "id": "command-r7b-12-2024", "prices": [{ "input": 0.0375, "output": 0.15 }], "released": "2024-12-
|
|
85
|
+
{ "providerID": "cohere", "id": "command-r7b-12-2024", "prices": [{ "input": 0.0375, "output": 0.15 }], "released": "2024-12-13" },
|
|
86
86
|
{ "providerID": "cohere", "id": "command-r7b-arabic-02-2025", "prices": [{ "input": 0.0375, "output": 0.15 }], "released": "2025-02-27" },
|
|
87
87
|
{ "providerID": "cohere", "id": "north-mini-code-1-0", "prices": [{ "input": 0, "output": 0 }], "released": "2026-06-09" },
|
|
88
88
|
{ "providerID": "cohere", "id": "north-small-translate-09-2026", "prices": [{ "input": 0, "output": 0 }], "released": "2026-09-09" },
|
|
89
89
|
{ "providerID": "deepseek", "id": "deepseek-flash", "prices": [{ "input": 0.15, "output": 0.6, "cache": { "read": 0.003 } }], "released": "2026-10-17" },
|
|
90
90
|
{ "providerID": "deepseek", "id": "deepseek-v4-flash", "prices": [{ "input": 0.15, "output": 0.6, "cache": { "read": 0.003 } }], "released": "2026-10-17" },
|
|
91
91
|
{ "providerID": "deepseek", "id": "deepseek-v4-flash-vision-exp", "prices": [{ "input": 0.15, "output": 0.6, "cache": { "read": 0.003 } }], "released": "2026-10-17" },
|
|
92
|
-
{ "providerID": "deepseek", "id": "deepseek-v4-pro", "prices": [{ "input": 0.66, "output": 1.98, "cache": { "read": 0.022 } }], "released": "2026-08-
|
|
92
|
+
{ "providerID": "deepseek", "id": "deepseek-v4-pro", "prices": [{ "input": 0.66, "output": 1.98, "cache": { "read": 0.022 } }], "released": "2026-08-13" },
|
|
93
93
|
{ "providerID": "google", "id": "deep-research-max-preview-04-2026", "prices": [{ "input": 2, "output": 12, "cache": { "read": 0.2 } }, { "input": 4, "output": 18, "cache": { "read": 0.4 }, "tier": { "type": "context", "size": 200000 } }], "released": "2026-04-21" },
|
|
94
94
|
{ "providerID": "google", "id": "deep-research-preview-04-2026", "prices": [{ "input": 2, "output": 12, "cache": { "read": 0.2 } }, { "input": 4, "output": 18, "cache": { "read": 0.4 }, "tier": { "type": "context", "size": 200000 } }], "released": "2026-04-21" },
|
|
95
95
|
{ "providerID": "google", "id": "gemini-2.5-computer-use-preview-10-2025", "prices": [{ "input": 1.25, "output": 10 }, { "input": 2.5, "output": 15, "tier": { "type": "context", "size": 200000 } }], "released": "2025-10-07" },
|
|
@@ -109,8 +109,10 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
109
109
|
{ "providerID": "google", "id": "gemini-4-argon", "prices": [{ "input": 2, "output": 10, "cache": { "read": 0.1 } }], "released": "2026-10-13" },
|
|
110
110
|
{ "providerID": "google", "id": "gemini-flash-latest", "prices": [{ "input": 0.75, "output": 3.75, "cache": { "read": 0.075 } }], "released": "2026-08-13" },
|
|
111
111
|
{ "providerID": "google", "id": "gemini-flash-lite-latest", "prices": [{ "input": 0.3, "output": 2.5, "cache": { "read": 0.03 } }], "released": "2026-07-21" },
|
|
112
|
+
{ "providerID": "google", "id": "gemini-pro-latest", "prices": [{ "input": 2, "output": 12, "cache": { "read": 0.2 } }, { "input": 4, "output": 18, "cache": { "read": 0.4 }, "tier": { "type": "context", "size": 200000 } }], "released": "2026-02-19" },
|
|
112
113
|
{ "providerID": "inception", "id": "mercury-2", "prices": [{ "input": 0.25, "output": 0.75, "cache": { "read": 0.025 } }], "released": "2026-02-24" },
|
|
113
114
|
{ "providerID": "inception", "id": "mercury-2.5", "prices": [{ "input": 0.04, "output": 0.15, "cache": { "read": 0.004 } }], "released": "2026-09-08" },
|
|
115
|
+
{ "providerID": "inception", "id": "mercury-3", "prices": [{ "input": 0.1, "output": 0.35, "cache": { "read": 0.01 } }], "released": "2026-10-16" },
|
|
114
116
|
{ "providerID": "inception", "id": "mercury-edit-2", "prices": [{ "input": 0.25, "output": 0.75, "cache": { "read": 0.025 } }], "released": "2026-03-30" },
|
|
115
117
|
{ "providerID": "longcat", "id": "longcat-2.0", "prices": [{ "input": 0.75, "output": 2.95, "cache": { "read": 0.015 } }], "released": "2026-06-30" },
|
|
116
118
|
{ "providerID": "meta", "id": "muse-spark-1.1", "prices": [{ "input": 1.25, "output": 4.25, "cache": { "read": 0.15 } }], "released": "2026-04-08" },
|
|
@@ -126,6 +128,7 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
126
128
|
{ "providerID": "minimax", "id": "minimax-m2.7", "prices": [{ "input": 0.3, "output": 1.2, "cache": { "read": 0.06, "write": 0.375 } }], "released": "2026-03-18" },
|
|
127
129
|
{ "providerID": "minimax", "id": "minimax-m2.7-highspeed", "prices": [{ "input": 0.6, "output": 2.4, "cache": { "read": 0.06, "write": 0.375 } }], "released": "2026-03-18" },
|
|
128
130
|
{ "providerID": "minimax", "id": "minimax-m3", "prices": [{ "input": 0.3, "output": 1.2, "cache": { "read": 0.06 } }, { "input": 0.6, "output": 2.4, "cache": { "read": 0.12 }, "tier": { "type": "context", "size": 512000 } }], "released": "2026-06-01" },
|
|
131
|
+
{ "providerID": "minimax", "id": "minimax-m3.1-flash", "prices": [{ "input": 0.15, "output": 0.6, "cache": { "read": 0.015 } }], "released": "2026-10-19" },
|
|
129
132
|
{ "providerID": "mistral", "id": "codestral-2508", "prices": [{ "input": 0.3, "output": 0.9, "cache": { "read": 0.03 } }], "released": "2025-07-30" },
|
|
130
133
|
{ "providerID": "mistral", "id": "codestral-latest", "prices": [{ "input": 0.3, "output": 0.9, "cache": { "read": 0.03 } }], "released": "2024-05-29" },
|
|
131
134
|
{ "providerID": "mistral", "id": "devstral-2512", "prices": [{ "input": 0.4, "output": 2 }], "released": "2025-12-09" },
|
|
@@ -138,9 +141,9 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
138
141
|
{ "providerID": "mistral", "id": "magistral-medium-latest", "prices": [{ "input": 2, "output": 5 }], "released": "2025-03-17" },
|
|
139
142
|
{ "providerID": "mistral", "id": "ministral-14b-2512", "prices": [{ "input": 0.2, "output": 0.2, "cache": { "read": 0.02 } }], "released": "2025-12-02" },
|
|
140
143
|
{ "providerID": "mistral", "id": "ministral-3b-2512", "prices": [{ "input": 0.1, "output": 0.1, "cache": { "read": 0.01 } }], "released": "2025-12-02" },
|
|
141
|
-
{ "providerID": "mistral", "id": "ministral-3b-latest", "prices": [{ "input": 0.
|
|
144
|
+
{ "providerID": "mistral", "id": "ministral-3b-latest", "prices": [{ "input": 0.1, "output": 0.1, "cache": { "read": 0.01 } }], "released": "2024-10-01" },
|
|
142
145
|
{ "providerID": "mistral", "id": "ministral-8b-2512", "prices": [{ "input": 0.15, "output": 0.15, "cache": { "read": 0.015 } }], "released": "2025-12-02" },
|
|
143
|
-
{ "providerID": "mistral", "id": "ministral-8b-latest", "prices": [{ "input": 0.
|
|
146
|
+
{ "providerID": "mistral", "id": "ministral-8b-latest", "prices": [{ "input": 0.15, "output": 0.15, "cache": { "read": 0.015 } }], "released": "2024-10-01" },
|
|
144
147
|
{ "providerID": "mistral", "id": "mistral-large-2411", "prices": [{ "input": 2, "output": 6 }], "released": "2024-11-18" },
|
|
145
148
|
{ "providerID": "mistral", "id": "mistral-large-2512", "prices": [{ "input": 0.5, "output": 1.5, "cache": { "read": 0.05 } }], "released": "2024-11-01" },
|
|
146
149
|
{ "providerID": "mistral", "id": "mistral-large-4", "prices": [{ "input": 0.68, "output": 2.09, "cache": { "read": 0.07 } }], "released": "2026-10-06" },
|
|
@@ -153,15 +156,12 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
153
156
|
{ "providerID": "mistral", "id": "mistral-small-2506", "prices": [{ "input": 0.1, "output": 0.3 }], "released": "2025-06-20" },
|
|
154
157
|
{ "providerID": "mistral", "id": "mistral-small-2603", "prices": [{ "input": 0.15, "output": 0.6, "cache": { "read": 0.015 } }], "released": "2026-03-16" },
|
|
155
158
|
{ "providerID": "mistral", "id": "mistral-small-latest", "prices": [{ "input": 0.15, "output": 0.6, "cache": { "read": 0.015 } }], "released": "2026-03-16" },
|
|
156
|
-
{ "providerID": "mistral", "id": "open-mistral-7b", "prices": [{ "input": 0.25, "output": 0.25 }], "released": "2023-09-27" },
|
|
157
159
|
{ "providerID": "mistral", "id": "open-mistral-nemo", "prices": [{ "input": 0.15, "output": 0.15 }], "released": "2024-07-01" },
|
|
158
|
-
{ "providerID": "mistral", "id": "open-mixtral-8x22b", "prices": [{ "input": 2, "output": 6 }], "released": "2024-04-17" },
|
|
159
|
-
{ "providerID": "mistral", "id": "open-mixtral-8x7b", "prices": [{ "input": 0.7, "output": 0.7 }], "released": "2023-12-11" },
|
|
160
160
|
{ "providerID": "mistral", "id": "pixtral-12b", "prices": [{ "input": 0.15, "output": 0.15 }], "released": "2024-09-01" },
|
|
161
161
|
{ "providerID": "mistral", "id": "pixtral-large-latest", "prices": [{ "input": 2, "output": 6 }], "released": "2024-11-01" },
|
|
162
162
|
{ "providerID": "mistral", "id": "voxtral-small-2507", "prices": [{ "input": 0.1, "output": 0.4 }], "released": "2025-07-15" },
|
|
163
|
-
{ "providerID": "mistral", "id": "voxtral-small-latest", "prices": [{ "input": 0.1, "output": 0.
|
|
164
|
-
{ "providerID": "moonshotai", "id": "kimi-k2.6", "prices": [{ "input": 0.95, "output": 4, "cache": { "read": 0.16 } }], "released": "2026-04-
|
|
163
|
+
{ "providerID": "mistral", "id": "voxtral-small-latest", "prices": [{ "input": 0.1, "output": 0.4 }], "released": "2025-07-15" },
|
|
164
|
+
{ "providerID": "moonshotai", "id": "kimi-k2.6", "prices": [{ "input": 0.95, "output": 4, "cache": { "read": 0.16 } }], "released": "2026-04-20" },
|
|
165
165
|
{ "providerID": "moonshotai", "id": "kimi-k2.7-code", "prices": [{ "input": 0.95, "output": 4, "cache": { "read": 0.19 } }], "released": "2026-06-12" },
|
|
166
166
|
{ "providerID": "moonshotai", "id": "kimi-k2.7-code-highspeed", "prices": [{ "input": 1.9, "output": 8, "cache": { "read": 0.38 } }], "released": "2026-06-12" },
|
|
167
167
|
{ "providerID": "moonshotai", "id": "kimi-k3", "prices": [{ "input": 3, "output": 15, "cache": { "read": 0.3, "write": 3 } }], "released": "2026-07-16" },
|
|
@@ -170,13 +170,13 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
170
170
|
{ "providerID": "nvidia", "id": "nvidia/llama-3.1-nemotron-nano-vl-8b-v1", "prices": [{ "input": 0, "output": 0 }], "released": "2025-04-10" },
|
|
171
171
|
{ "providerID": "nvidia", "id": "nvidia/llama-3.1-nemotron-safety-guard-8b-v3", "prices": [{ "input": 0, "output": 0 }], "released": "2025-10-28" },
|
|
172
172
|
{ "providerID": "nvidia", "id": "nvidia/llama-3.1-nemotron-ultra-253b-v1", "prices": [{ "input": 0, "output": 0 }], "released": "2025-04-07" },
|
|
173
|
-
{ "providerID": "nvidia", "id": "nvidia/llama-3.3-nemotron-super-49b-v1", "prices": [{ "input": 0, "output": 0 }], "released": "2025-
|
|
173
|
+
{ "providerID": "nvidia", "id": "nvidia/llama-3.3-nemotron-super-49b-v1", "prices": [{ "input": 0, "output": 0 }], "released": "2025-03-18" },
|
|
174
174
|
{ "providerID": "nvidia", "id": "nvidia/llama-3.3-nemotron-super-49b-v1.5", "prices": [{ "input": 0, "output": 0 }], "released": "2025-07-25" },
|
|
175
175
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-3-content-safety", "prices": [{ "input": 0, "output": 0 }], "released": "2026-04-16" },
|
|
176
176
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-3-nano-30b-a3b", "prices": [{ "input": 0, "output": 0 }] },
|
|
177
177
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning", "prices": [{ "input": 0, "output": 0 }], "released": "2026-04-28" },
|
|
178
178
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-3-ultra-550b-a55b", "prices": [{ "input": 0.5, "output": 2.5, "cache": { "read": 0.15 } }], "released": "2026-06-04" },
|
|
179
|
-
{ "providerID": "nvidia", "id": "nvidia/nemotron-3.5-content-safety", "prices": [{ "input": 0, "output": 0 }], "released": "2026-06-
|
|
179
|
+
{ "providerID": "nvidia", "id": "nvidia/nemotron-3.5-content-safety", "prices": [{ "input": 0, "output": 0 }], "released": "2026-06-02" },
|
|
180
180
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-3.5-lightning-30b-a3b", "prices": [{ "input": 0, "output": 0 }], "released": "2026-08-11" },
|
|
181
181
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-3.5-super-vl-120b-a12b", "prices": [{ "input": 0, "output": 0 }], "released": "2026-10-15" },
|
|
182
182
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-content-safety-reasoning-4b", "prices": [{ "input": 0, "output": 0 }], "released": "2026-01-22" },
|
|
@@ -209,10 +209,8 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
209
209
|
{ "providerID": "openai", "id": "gpt-5.1", "prices": [{ "input": 1.25, "output": 10, "cache": { "read": 0.125 } }], "released": "2025-11-13" },
|
|
210
210
|
{ "providerID": "openai", "id": "gpt-5.1-fast", "providers": ["openai"], "prices": [{ "input": 2.5, "output": 20, "cache": { "read": 0.25 } }], "released": "2025-11-13" },
|
|
211
211
|
{ "providerID": "openai", "id": "gpt-5.2", "prices": [{ "input": 1.75, "output": 14, "cache": { "read": 0.175 } }], "released": "2025-12-11" },
|
|
212
|
-
{ "providerID": "openai", "id": "gpt-5.2-chat-latest", "prices": [{ "input": 1.75, "output": 14, "cache": { "read": 0.175 } }], "released": "2025-12-11" },
|
|
213
212
|
{ "providerID": "openai", "id": "gpt-5.2-fast", "providers": ["openai"], "prices": [{ "input": 3.5, "output": 28, "cache": { "read": 0.35 } }], "released": "2025-12-11" },
|
|
214
213
|
{ "providerID": "openai", "id": "gpt-5.2-pro", "prices": [{ "input": 21, "output": 168 }], "released": "2025-12-11" },
|
|
215
|
-
{ "providerID": "openai", "id": "gpt-5.3-chat-latest", "prices": [{ "input": 1.75, "output": 14, "cache": { "read": 0.175 } }], "released": "2026-03-03" },
|
|
216
214
|
{ "providerID": "openai", "id": "gpt-5.3-codex", "prices": [{ "input": 1.75, "output": 14, "cache": { "read": 0.175 } }], "released": "2026-02-05" },
|
|
217
215
|
{ "providerID": "openai", "id": "gpt-5.3-codex-fast", "providers": ["openai"], "prices": [{ "input": 3.5, "output": 28, "cache": { "read": 0.35 } }], "released": "2026-02-05" },
|
|
218
216
|
{ "providerID": "openai", "id": "gpt-5.3-codex-spark", "prices": [{ "input": 1.75, "output": 14, "cache": { "read": 0.175 } }], "released": "2026-02-05" },
|
package/dist/pricing.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface OfficialPriceEntry {
|
|
|
14
14
|
/** Checked-in data: updating prices is explicit, not a network request at
|
|
15
15
|
* startup, during a refresh, or during an npm build. */
|
|
16
16
|
export declare const OFFICIAL_PRICE_SNAPSHOT: {
|
|
17
|
-
verified: "2026-10-
|
|
17
|
+
verified: "2026-10-21";
|
|
18
18
|
source: "https://models.dev/api.json";
|
|
19
19
|
entries: OfficialPriceEntry[];
|
|
20
20
|
};
|
package/docs/verification.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# 验证记录
|
|
2
2
|
|
|
3
|
+
## 2026-10-21 · 自动价格更新的分档测试修复(未发布)
|
|
4
|
+
|
|
5
|
+
[价格工作流 39519970473](https://github.com/chenlongapps/opencode-token-usage/actions/runs/39519970473) 在 `npm test` 阶段失败,尚未升级版本或发布。models.dev 为 `alibaba/qwen-plus` 新增超过 256,000 incoming tokens 的分档;测试请求的 1,000,000 input tokens 正确选中推理费率 12,但旧断言固定读取 `prices[0]` 的基础费率 4,导致普通测试及其嵌套重定价测试同时失败。生产定价算法无需修改。
|
|
6
|
+
|
|
7
|
+
`test/usage.test.ts` 改为按请求选择最高适用分档,再检查推理费率;新增固定夹具覆盖严格阈值、乱序多档、缓存读取参与阈值及缺失独立推理费率时使用当前档 output 价格。`test/price-update.test.mjs` 在隔离快照中主动加入乱序多档,不再只修改标量费率;修改断言之前,该夹具已复现相同类型的失败。
|
|
8
|
+
|
|
9
|
+
环境:macOS、Node.js v22.23.2、插件包 0.4.13。当前仓库的类型检查、248 项测试及构建通过。另在隔离副本实际运行 `npm run prices:update`,获得 313 条原厂价格(新增 2、移除 3、变化 17),随后类型检查、248 项测试、构建及 `npm pack --dry-run` 全部通过。隔离构建首次因副本漏拷 `tsconfig.build.json` 失败,补齐配置后通过,不是仓库构建故障。
|
|
10
|
+
|
|
11
|
+
隔离验证目录:`/private/var/folders/rw/bmx6c8hd737brl55m0_ff_b80000gn/T/opencode/token-usage-price-fix-9ZczT3`。本次只修复测试并记录验证,未修改生产算法或工作流,未提交、推送、重跑 GitHub Actions 或发布 npm。
|
|
12
|
+
|
|
3
13
|
## 2026-10-14 · 首轮 Run Time 起点重置与重连归零(未发布)
|
|
4
14
|
|
|
5
15
|
无 idle 消息并不一定是旧历史:新会话的第一轮在执行结束前也没有该标记。此前每次 synthetic/steer 输入都被当成 legacy 轮次边界,工具延续时丢失首轮之前已经过去的时间;重新读取历史或重建视图可以重新暴露该少算。匿名固定夹具复现原先 `~1m 56s` 与正确 `~18m 57s` 的差异,不依赖屏幕操作。
|