@anthonyhan/token-pilot 0.0.0-stage → 0.2.4
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/README.md +146 -2
- package/bin/token-pilot.js +18 -0
- package/dist/adapters/claude-code.js +251 -0
- package/dist/adapters/codex.js +163 -0
- package/dist/adapters/dsh.js +163 -0
- package/dist/adapters/kimi-code.js +165 -0
- package/dist/adapters/opencode.js +126 -0
- package/dist/adapters/pi.js +119 -0
- package/dist/adapters/qoder.js +51 -0
- package/dist/adapters/types.js +7 -0
- package/dist/adapters/volc-ark.js +92 -0
- package/dist/adapters/workbuddy.js +144 -0
- package/dist/cli/index.js +278 -0
- package/dist/cli/serve.js +200 -0
- package/dist/core/aggregate.js +821 -0
- package/dist/core/alert.js +32 -0
- package/dist/core/autocompact.js +40 -0
- package/dist/core/budget.js +23 -0
- package/dist/core/collector.js +213 -0
- package/dist/core/compression.js +129 -0
- package/dist/core/config.js +41 -0
- package/dist/core/contract.js +4 -0
- package/dist/core/metrics.js +53 -0
- package/dist/core/price-fetch.js +128 -0
- package/dist/core/pricing.js +156 -0
- package/dist/core/registry.js +144 -0
- package/dist/core/retry-detector.js +41 -0
- package/dist/core/rtk.js +58 -0
- package/dist/core/savings.js +43 -0
- package/dist/core/schema.js +3 -0
- package/dist/core/unknown-models.js +50 -0
- package/package.json +30 -3
- package/pricing/models.json +311 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "每 1M token 定价。currency: USD=美元(官方美元目录价)/ CNY=人民币(官方人民币目录价,加载时按汇率折算)。DeepSeek 为分时定价:peak=北京时间工作日 9-12/14-18(不含法定节假日),offpeak=其余。来源见 _sources。欢迎 PR 修正。",
|
|
3
|
+
"_updated": "2026-10-22",
|
|
4
|
+
"_sources": {
|
|
5
|
+
"deepseek": "https://api-docs.deepseek.com/zh-cn/quick_start/pricing/",
|
|
6
|
+
"minimax": "https://platform.minimax.cn/docs/pricing/overview",
|
|
7
|
+
"glm": "https://docs.bigmodel.cn/cn/guide/start/pricing",
|
|
8
|
+
"kimi": "https://platform.kimi.com/docs/pricing/chat",
|
|
9
|
+
"claude": "https://claude.com/pricing#api",
|
|
10
|
+
"openai": "https://developers.openai.com/api/docs/pricing",
|
|
11
|
+
"gemini": "https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing",
|
|
12
|
+
"grok": "https://grok.cadn.net.cn/docs_cn/models.html",
|
|
13
|
+
"mimo": "https://mimo.mi.com/docs/zh-CN/price/pay-as-you-go",
|
|
14
|
+
"longcat": "https://longcat.chat/platform/docs/zh/api-pay-as-you-go"
|
|
15
|
+
},
|
|
16
|
+
"models": {
|
|
17
|
+
"claude-fable-5-1": {
|
|
18
|
+
"provider": "anthropic",
|
|
19
|
+
"input": 10.0,
|
|
20
|
+
"output": 50.0,
|
|
21
|
+
"cacheRead": 0.25,
|
|
22
|
+
"cacheCreation": 12.5
|
|
23
|
+
},
|
|
24
|
+
"claude-opus-5-5": {
|
|
25
|
+
"provider": "anthropic",
|
|
26
|
+
"input": 4.0,
|
|
27
|
+
"output": 20.0,
|
|
28
|
+
"cacheRead": 0.2,
|
|
29
|
+
"cacheCreation": 5.0
|
|
30
|
+
},
|
|
31
|
+
"claude-sonnet-5-5": {
|
|
32
|
+
"provider": "anthropic",
|
|
33
|
+
"input": 2.0,
|
|
34
|
+
"output": 10.0,
|
|
35
|
+
"cacheRead": 0.1,
|
|
36
|
+
"cacheCreation": 2.5
|
|
37
|
+
},
|
|
38
|
+
"claude-haiku-5-5": {
|
|
39
|
+
"provider": "anthropic",
|
|
40
|
+
"input": 0.1,
|
|
41
|
+
"output": 0.5,
|
|
42
|
+
"cacheRead": 0.01,
|
|
43
|
+
"cacheCreation": 0.125
|
|
44
|
+
},
|
|
45
|
+
"claude-sonnet-4-6": {
|
|
46
|
+
"provider": "anthropic",
|
|
47
|
+
"input": 3.0,
|
|
48
|
+
"output": 15.0,
|
|
49
|
+
"cacheRead": 0.3,
|
|
50
|
+
"cacheCreation": 3.75
|
|
51
|
+
},
|
|
52
|
+
"claude-opus-4-5": {
|
|
53
|
+
"provider": "anthropic",
|
|
54
|
+
"input": 15.0,
|
|
55
|
+
"output": 75.0,
|
|
56
|
+
"cacheRead": 1.5,
|
|
57
|
+
"cacheCreation": 18.75
|
|
58
|
+
},
|
|
59
|
+
"gpt-5.6-sol": {
|
|
60
|
+
"provider": "openai",
|
|
61
|
+
"input": 4.0,
|
|
62
|
+
"output": 20.0,
|
|
63
|
+
"cacheRead": 0.4
|
|
64
|
+
},
|
|
65
|
+
"gpt-5.6-cyber": {
|
|
66
|
+
"provider": "openai",
|
|
67
|
+
"input": 12.5,
|
|
68
|
+
"output": 75.0,
|
|
69
|
+
"cacheRead": 1.25
|
|
70
|
+
},
|
|
71
|
+
"gpt-5": {
|
|
72
|
+
"provider": "openai",
|
|
73
|
+
"input": 2.5,
|
|
74
|
+
"output": 15.0,
|
|
75
|
+
"cacheRead": 0.25
|
|
76
|
+
},
|
|
77
|
+
"gpt-5.4": {
|
|
78
|
+
"provider": "openai",
|
|
79
|
+
"input": 2.5,
|
|
80
|
+
"output": 15.0,
|
|
81
|
+
"cacheRead": 0.25
|
|
82
|
+
},
|
|
83
|
+
"gpt-5-mini": {
|
|
84
|
+
"provider": "openai",
|
|
85
|
+
"input": 0.5,
|
|
86
|
+
"output": 2.0,
|
|
87
|
+
"cacheRead": 0.05
|
|
88
|
+
},
|
|
89
|
+
"codex": {
|
|
90
|
+
"provider": "openai",
|
|
91
|
+
"input": 2.5,
|
|
92
|
+
"output": 15.0,
|
|
93
|
+
"cacheRead": 0.25
|
|
94
|
+
},
|
|
95
|
+
"gemini-3-flash": {
|
|
96
|
+
"provider": "gemini",
|
|
97
|
+
"input": 0.75,
|
|
98
|
+
"output": 3.75,
|
|
99
|
+
"cacheRead": 0.075,
|
|
100
|
+
"_note": "2026-12-31 前体验价;之后 1.5/7.5"
|
|
101
|
+
},
|
|
102
|
+
"gemini-3-pro": {
|
|
103
|
+
"provider": "gemini",
|
|
104
|
+
"input": 2.0,
|
|
105
|
+
"output": 10.0,
|
|
106
|
+
"cacheRead": 0.1
|
|
107
|
+
},
|
|
108
|
+
"google/gemini-3-flash-preview": {
|
|
109
|
+
"provider": "gemini",
|
|
110
|
+
"input": 0.75,
|
|
111
|
+
"output": 3.75,
|
|
112
|
+
"cacheRead": 0.075
|
|
113
|
+
},
|
|
114
|
+
"grok-2": {
|
|
115
|
+
"provider": "grok",
|
|
116
|
+
"input": 2.0,
|
|
117
|
+
"output": 10.0
|
|
118
|
+
},
|
|
119
|
+
"grok-2-vision": {
|
|
120
|
+
"provider": "grok",
|
|
121
|
+
"input": 2.0,
|
|
122
|
+
"output": 10.0
|
|
123
|
+
},
|
|
124
|
+
"deepseek-flash": {
|
|
125
|
+
"provider": "deepseek",
|
|
126
|
+
"currency": "CNY",
|
|
127
|
+
"peak": {
|
|
128
|
+
"input": 2.0,
|
|
129
|
+
"output": 8.0,
|
|
130
|
+
"cacheRead": 0.04
|
|
131
|
+
},
|
|
132
|
+
"offpeak": {
|
|
133
|
+
"input": 1.0,
|
|
134
|
+
"output": 4.0,
|
|
135
|
+
"cacheRead": 0.02
|
|
136
|
+
},
|
|
137
|
+
"_note": "V4.1-Flash;高峰=北京时间工作日 9-12/14-18(不含法定节假日)"
|
|
138
|
+
},
|
|
139
|
+
"deepseek-v4.1-flash": {
|
|
140
|
+
"_alias": "deepseek-flash"
|
|
141
|
+
},
|
|
142
|
+
"deepseek-v4-1-flash": {
|
|
143
|
+
"_alias": "deepseek-flash"
|
|
144
|
+
},
|
|
145
|
+
"deepseek-v4-pro": {
|
|
146
|
+
"provider": "deepseek",
|
|
147
|
+
"currency": "CNY",
|
|
148
|
+
"peak": {
|
|
149
|
+
"input": 9.0,
|
|
150
|
+
"output": 27.0,
|
|
151
|
+
"cacheRead": 0.3
|
|
152
|
+
},
|
|
153
|
+
"offpeak": {
|
|
154
|
+
"input": 4.5,
|
|
155
|
+
"output": 13.5,
|
|
156
|
+
"cacheRead": 0.15
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"glm-5.3": {
|
|
160
|
+
"provider": "glm",
|
|
161
|
+
"currency": "CNY",
|
|
162
|
+
"input": 8.0,
|
|
163
|
+
"output": 28.0,
|
|
164
|
+
"cacheRead": 2.0
|
|
165
|
+
},
|
|
166
|
+
"glm-5.3-flash": {
|
|
167
|
+
"provider": "glm",
|
|
168
|
+
"currency": "CNY",
|
|
169
|
+
"input": 0.8,
|
|
170
|
+
"output": 2.8,
|
|
171
|
+
"cacheRead": 0.23
|
|
172
|
+
},
|
|
173
|
+
"glm-5.3-flashx": {
|
|
174
|
+
"provider": "glm",
|
|
175
|
+
"currency": "CNY",
|
|
176
|
+
"input": 2.0,
|
|
177
|
+
"output": 7.0,
|
|
178
|
+
"cacheRead": 0.57
|
|
179
|
+
},
|
|
180
|
+
"glm-5": {
|
|
181
|
+
"provider": "glm",
|
|
182
|
+
"currency": "CNY",
|
|
183
|
+
"input": 4.0,
|
|
184
|
+
"output": 16.0,
|
|
185
|
+
"cacheRead": 1.0
|
|
186
|
+
},
|
|
187
|
+
"kimi-k3": {
|
|
188
|
+
"provider": "kimi",
|
|
189
|
+
"currency": "CNY",
|
|
190
|
+
"input": 20.0,
|
|
191
|
+
"output": 100.0,
|
|
192
|
+
"cacheRead": 2.0
|
|
193
|
+
},
|
|
194
|
+
"kimi-k2.7-code": {
|
|
195
|
+
"provider": "kimi",
|
|
196
|
+
"currency": "CNY",
|
|
197
|
+
"input": 6.5,
|
|
198
|
+
"output": 27.0,
|
|
199
|
+
"cacheRead": 1.3
|
|
200
|
+
},
|
|
201
|
+
"kimi-k2.6": {
|
|
202
|
+
"provider": "kimi",
|
|
203
|
+
"currency": "CNY",
|
|
204
|
+
"input": 6.5,
|
|
205
|
+
"output": 27.0,
|
|
206
|
+
"cacheRead": 1.1
|
|
207
|
+
},
|
|
208
|
+
"minimax-m3.1-flash": {
|
|
209
|
+
"provider": "minimax",
|
|
210
|
+
"currency": "CNY",
|
|
211
|
+
"input": 1.0,
|
|
212
|
+
"output": 4.0,
|
|
213
|
+
"cacheRead": 0.1
|
|
214
|
+
},
|
|
215
|
+
"minimax-m3": {
|
|
216
|
+
"provider": "minimax",
|
|
217
|
+
"currency": "CNY",
|
|
218
|
+
"input": 2.1,
|
|
219
|
+
"output": 8.4,
|
|
220
|
+
"cacheRead": 0.42
|
|
221
|
+
},
|
|
222
|
+
"qwen3-coder": {
|
|
223
|
+
"provider": "qwen",
|
|
224
|
+
"currency": "CNY",
|
|
225
|
+
"input": 2.0,
|
|
226
|
+
"output": 8.0
|
|
227
|
+
},
|
|
228
|
+
"qwen-max": {
|
|
229
|
+
"provider": "qwen",
|
|
230
|
+
"currency": "CNY",
|
|
231
|
+
"input": 2.4,
|
|
232
|
+
"output": 9.6
|
|
233
|
+
},
|
|
234
|
+
"doubao-seed-2-1-pro": {
|
|
235
|
+
"provider": "doubao",
|
|
236
|
+
"currency": "CNY",
|
|
237
|
+
"input": 0.8,
|
|
238
|
+
"output": 2.0
|
|
239
|
+
},
|
|
240
|
+
"doubao-seed-2-0-lite": {
|
|
241
|
+
"provider": "doubao",
|
|
242
|
+
"currency": "CNY",
|
|
243
|
+
"input": 0.3,
|
|
244
|
+
"output": 0.6
|
|
245
|
+
},
|
|
246
|
+
"hunyuan-large": {
|
|
247
|
+
"provider": "hunyuan",
|
|
248
|
+
"currency": "CNY",
|
|
249
|
+
"input": 4.0,
|
|
250
|
+
"output": 12.0
|
|
251
|
+
},
|
|
252
|
+
"hy3": {
|
|
253
|
+
"provider": "hunyuan",
|
|
254
|
+
"currency": "CNY",
|
|
255
|
+
"input": 4.0,
|
|
256
|
+
"output": 12.0
|
|
257
|
+
},
|
|
258
|
+
"step-5-preview": {
|
|
259
|
+
"provider": "stepfun",
|
|
260
|
+
"currency": "CNY",
|
|
261
|
+
"input": 4.0,
|
|
262
|
+
"output": 12.0
|
|
263
|
+
},
|
|
264
|
+
"mimo-v2.6-flash": {
|
|
265
|
+
"provider": "mimo",
|
|
266
|
+
"currency": "CNY",
|
|
267
|
+
"input": 1.0,
|
|
268
|
+
"output": 2.0,
|
|
269
|
+
"cacheRead": 0.02
|
|
270
|
+
},
|
|
271
|
+
"mimo-v2.6-pro": {
|
|
272
|
+
"provider": "mimo",
|
|
273
|
+
"currency": "CNY",
|
|
274
|
+
"input": 3.0,
|
|
275
|
+
"output": 6.0,
|
|
276
|
+
"cacheRead": 0.025
|
|
277
|
+
},
|
|
278
|
+
"mimo-v2.6-pro-ultraspeed": {
|
|
279
|
+
"provider": "mimo",
|
|
280
|
+
"currency": "CNY",
|
|
281
|
+
"input": 30.0,
|
|
282
|
+
"output": 60.0,
|
|
283
|
+
"cacheRead": 0.25
|
|
284
|
+
},
|
|
285
|
+
"longcat-2.5-preview": {
|
|
286
|
+
"provider": "longcat",
|
|
287
|
+
"currency": "CNY",
|
|
288
|
+
"input": 2.0,
|
|
289
|
+
"output": 8.0,
|
|
290
|
+
"cacheRead": 0.04
|
|
291
|
+
},
|
|
292
|
+
"longcat-2.0": {
|
|
293
|
+
"provider": "longcat",
|
|
294
|
+
"currency": "CNY",
|
|
295
|
+
"input": 2.0,
|
|
296
|
+
"output": 8.0,
|
|
297
|
+
"cacheRead": 0.04
|
|
298
|
+
},
|
|
299
|
+
"mimo-v2": {
|
|
300
|
+
"_alias": "mimo-v2.6-flash"
|
|
301
|
+
},
|
|
302
|
+
"longcat-flash": {
|
|
303
|
+
"_alias": "longcat-2.5-preview"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"fallback": {
|
|
307
|
+
"input": 1.0,
|
|
308
|
+
"output": 5.0,
|
|
309
|
+
"_note": "未知模型按此估算(USD)"
|
|
310
|
+
}
|
|
311
|
+
}
|