@chenlongapps/opencode-token-usage 0.4.15 → 0.4.17
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 +38 -6
- package/README.zh-CN.md +38 -6
- package/ROADMAP.md +1 -1
- package/dist/prices.generated.d.ts +62 -222
- package/dist/prices.generated.js +10 -34
- package/dist/pricing.d.ts +1 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<h1 align="center">opencode-token-usage</h1>
|
|
2
2
|
|
|
3
|
-
<p align="center">
|
|
3
|
+
<p align="center">Token usage, context window, estimated cost and live performance for OpenCode 2.</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
<a href="https://www.npmjs.com/package/@chenlongapps/opencode-token-usage" target="_blank" rel="noopener noreferrer"><img alt="npm" src="https://img.shields.io/npm/v/%40chenlongapps%2Fopencode-token-usage?style=flat-square&logo=npm" /></a>
|
|
@@ -15,30 +15,61 @@
|
|
|
15
15
|
<a href="https://github.com/chenlongapps/opencode-token-usage/blob/main/README.zh-CN.md">简体中文</a>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
|
+
### Overview
|
|
19
|
+
|
|
20
|
+
**opencode-token-usage** is a community plugin that brings token usage, context window occupancy, estimated cost and performance metrics into OpenCode 2's terminal interface.
|
|
21
|
+
|
|
22
|
+
Use it to see how many tokens a session and its subagents consume, how full the current context window is, and how estimated costs are distributed across models—without leaving your conversation.
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
- **Session-tree totals:** Track input, output, reasoning and cache tokens across the session tree, including unopened subagents, without double-counting inherited fork history.
|
|
27
|
+
- **Context visibility:** See the viewed session's context usage, latest reported request and estimated prompt composition.
|
|
28
|
+
- **Estimated cost by model:** Price recorded calls using their actual models, with a built-in first-party price snapshot as a fallback. Estimates are not provider bills.
|
|
29
|
+
- **Performance at a glance:** Monitor tokens per second (TPS), time to first token (TTFT) and the viewed session's own elapsed response time. Live TPS and elapsed-time estimates are marked with `~`.
|
|
30
|
+
- **Native terminal UI:** Keep a sidebar panel in the main session and a single-line summary in subagent views; open details only when needed.
|
|
31
|
+
- **On-demand details:** Use `/usage` for compact or detailed statistics, including per-model usage and rates, without sending a prompt to the model.
|
|
32
|
+
|
|
18
33
|
[](https://www.npmjs.com/package/@chenlongapps/opencode-token-usage)
|
|
19
34
|
|
|
20
35
|
---
|
|
21
36
|
|
|
22
37
|
### Installation
|
|
23
38
|
|
|
39
|
+
Requires **OpenCode 2** and **Node.js 22+**. See [Compatibility](#compatibility) for verified host versions and the OpenTUI engine caveat.
|
|
40
|
+
|
|
24
41
|
```bash
|
|
25
42
|
opencode plugin add @chenlongapps/opencode-token-usage
|
|
26
43
|
```
|
|
27
44
|
|
|
28
|
-
|
|
45
|
+
Restart OpenCode after installation.
|
|
46
|
+
|
|
47
|
+
### Quick start
|
|
48
|
+
|
|
49
|
+
1. **View usage:** Open a session. The **Token Usage** panel appears in the native sidebar when `session.sidebar` is set to `auto` and the terminal is wide enough.
|
|
50
|
+
2. **Explore details:** Enter `/usage` or left-click the panel's **Token Usage** title. Press `d` to toggle compact/detailed mode and Escape to close. Opening details does not send a prompt to the model.
|
|
51
|
+
3. **Inspect subagents:** In subagent views, click the live summary above the composer to open the full panel. Closing it does not interrupt the subagent.
|
|
52
|
+
|
|
53
|
+
For exact definitions and edge cases, see [Detailed usage](#detailed-usage), [Metrics](#metrics) and [price sources and limitations](docs/pricing.md).
|
|
54
|
+
|
|
55
|
+
Questions about setup, costs, subagents, reasoning speed or privacy? See the [FAQ](docs/faq.md).
|
|
56
|
+
|
|
57
|
+
### Other installation options
|
|
58
|
+
|
|
59
|
+
Instead of the command above, add the package to your project's `opencode.json` or `opencode.jsonc`:
|
|
29
60
|
|
|
30
61
|
```json
|
|
31
62
|
{
|
|
63
|
+
"$schema": "https://opencode.ai/config.json",
|
|
32
64
|
"plugins": ["@chenlongapps/opencode-token-usage"]
|
|
33
65
|
}
|
|
34
66
|
```
|
|
35
67
|
|
|
36
|
-
|
|
37
|
-
> Requires Node.js 22+ (see the OpenTUI engine note under [Development](#development)). OpenCode 2.0.9 and 2.0.10 have been verified in earlier releases. SDK 2.0.24 integration checks have passed on OpenCode 2.0.11, 2.0.22, 2.0.24, 2.0.26, and 2.0.28. Native turn durations and sidebar title clicks were integration-tested on 2.0.26 and 2.0.28; the other listed host checks predate these additions.
|
|
68
|
+
For remote sessions, add the package name to `plugins` in your local `~/.config/opencode/cli.json` to load only the terminal entry point. The configuration path follows `XDG_CONFIG_HOME`.
|
|
38
69
|
|
|
39
|
-
|
|
70
|
+
### Compatibility
|
|
40
71
|
|
|
41
|
-
|
|
72
|
+
Requires Node.js 22+ (see the OpenTUI engine note under [Development](#development)). OpenCode 2.0.9 and 2.0.10 have been verified in earlier releases. SDK 2.0.24 integration checks have passed on OpenCode 2.0.11, 2.0.22, 2.0.24, 2.0.26, and 2.0.28. Native turn durations and sidebar title clicks were integration-tested on 2.0.26 and 2.0.28; the other listed host checks predate these additions. See the [verification record](docs/verification.md) for tested combinations.
|
|
42
73
|
|
|
43
74
|
### Detailed usage
|
|
44
75
|
|
|
@@ -136,6 +167,7 @@ To load the plugin from source, build the project and add the repository's absol
|
|
|
136
167
|
|
|
137
168
|
### Documentation
|
|
138
169
|
|
|
170
|
+
- [FAQ](docs/faq.md) · [简体中文](docs/faq.zh-CN.md)
|
|
139
171
|
- [Roadmap](ROADMAP.md)
|
|
140
172
|
- [Verification record](docs/verification.md)
|
|
141
173
|
- [Release guide](docs/releasing.md)
|
package/README.zh-CN.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<h1 align="center">opencode-token-usage</h1>
|
|
2
2
|
|
|
3
|
-
<p align="center"
|
|
3
|
+
<p align="center">在 OpenCode 2 中查看 token 用量、上下文窗口、估算费用与实时性能。</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
<a href="https://www.npmjs.com/package/@chenlongapps/opencode-token-usage" target="_blank" rel="noopener noreferrer"><img alt="npm" src="https://img.shields.io/npm/v/%40chenlongapps%2Fopencode-token-usage?style=flat-square&logo=npm" /></a>
|
|
@@ -15,30 +15,61 @@
|
|
|
15
15
|
<strong>简体中文</strong>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
|
+
### 项目简介
|
|
19
|
+
|
|
20
|
+
**opencode-token-usage** 是一个面向 OpenCode 2 的社区插件,在终端界面中展示 token 用量、上下文窗口占用、估算费用和性能指标。
|
|
21
|
+
|
|
22
|
+
无需离开当前对话,就能了解:当前会话及其子代理消耗了多少 token、上下文窗口还剩多少空间,以及各模型的估算费用分布。
|
|
23
|
+
|
|
24
|
+
### 主要特点
|
|
25
|
+
|
|
26
|
+
- **会话树用量汇总:** 统计整棵会话树的输入、输出、推理和缓存 token,包含未打开的子代理,避免重复计算分叉继承历史。
|
|
27
|
+
- **上下文可见:** 查看当前会话的上下文占用、最近一次已上报请求及提示词构成估算。
|
|
28
|
+
- **按模型估算费用:** 按每次调用实际使用的模型计价,以内置原厂价格快照作为回退。估算费用不等于提供商账单。
|
|
29
|
+
- **性能一目了然:** 查看每秒 token 数(TPS)、首 token 时间(TTFT)及当前会话自身的对话耗时。实时 TPS 与已耗时估算以 `~` 标记。
|
|
30
|
+
- **原生终端界面:** 主会话使用侧边栏,子代理视图保留单行摘要,按需打开完整面板。
|
|
31
|
+
- **按需查看详情:** 通过 `/usage` 切换紧凑/详细统计,查看各模型的用量与费率,不向模型发送提示词。
|
|
32
|
+
|
|
18
33
|
[](https://www.npmjs.com/package/@chenlongapps/opencode-token-usage)
|
|
19
34
|
|
|
20
35
|
---
|
|
21
36
|
|
|
22
37
|
### 安装
|
|
23
38
|
|
|
39
|
+
需要 **OpenCode 2** 和 **Node.js 22+**。已验证宿主版本及 OpenTUI 引擎限制见[兼容性](#兼容性)。
|
|
40
|
+
|
|
24
41
|
```bash
|
|
25
42
|
opencode plugin add @chenlongapps/opencode-token-usage
|
|
26
43
|
```
|
|
27
44
|
|
|
28
|
-
|
|
45
|
+
安装后重启 OpenCode。
|
|
46
|
+
|
|
47
|
+
### 快速上手
|
|
48
|
+
|
|
49
|
+
1. **查看用量:** 打开会话。终端足够宽且 `session.sidebar` 设为 `auto` 时,原生侧边栏会显示 **Token Usage** 面板。
|
|
50
|
+
2. **展开详情:** 输入 `/usage`,或左键点击面板的 **Token Usage** 标题。按 `d` 切换紧凑/详细模式,按 Escape 关闭;打开详情不会向模型发送提示词。
|
|
51
|
+
3. **查看子代理:** 在子代理视图中,点击输入区上方的实时摘要可打开完整面板,关闭面板不会中断子代理。
|
|
52
|
+
|
|
53
|
+
精确统计口径及边界情况见[详细用量](#详细用量)、[指标](#指标)和[价格来源与限制](docs/pricing.md)。
|
|
54
|
+
|
|
55
|
+
关于安装、费用、子代理、推理速度及隐私的常见问题,见 [FAQ](docs/faq.zh-CN.md)。
|
|
56
|
+
|
|
57
|
+
### 其他安装方式
|
|
58
|
+
|
|
59
|
+
除了上述命令,也可以在项目的 `opencode.json` 或 `opencode.jsonc` 中配置:
|
|
29
60
|
|
|
30
61
|
```json
|
|
31
62
|
{
|
|
63
|
+
"$schema": "https://opencode.ai/config.json",
|
|
32
64
|
"plugins": ["@chenlongapps/opencode-token-usage"]
|
|
33
65
|
}
|
|
34
66
|
```
|
|
35
67
|
|
|
36
|
-
|
|
37
|
-
> 需要 Node.js 22+(见[开发](#开发)中的 OpenTUI 引擎说明)。此前发布已验证 OpenCode 2.0.9 和 2.0.10;SDK 2.0.24 集成检查已在 OpenCode 2.0.11、2.0.22、2.0.24、2.0.26 和 2.0.28 上通过。原生对话耗时与侧边栏标题点击的集成验证使用 2.0.26 和 2.0.28,其余列出的宿主检查早于这些功能加入。
|
|
68
|
+
连接远程服务器时,可将包名加入本机 `~/.config/opencode/cli.json` 的 `plugins`,仅加载终端入口;配置路径遵循 `XDG_CONFIG_HOME`。
|
|
38
69
|
|
|
39
|
-
|
|
70
|
+
### 兼容性
|
|
40
71
|
|
|
41
|
-
|
|
72
|
+
需要 Node.js 22+(见[开发](#开发)中的 OpenTUI 引擎说明)。此前发布已验证 OpenCode 2.0.9 和 2.0.10;SDK 2.0.24 集成检查已在 OpenCode 2.0.11、2.0.22、2.0.24、2.0.26 和 2.0.28 上通过。原生对话耗时与侧边栏标题点击的集成验证使用 2.0.26 和 2.0.28,其余列出的宿主检查早于这些功能加入。已测试组合见[验证记录](docs/verification.md)。
|
|
42
73
|
|
|
43
74
|
### 详细用量
|
|
44
75
|
|
|
@@ -136,6 +167,7 @@ OPENCODE_BIN=/absolute/path/to/opencode-2.0.11 npm run test:smoke
|
|
|
136
167
|
|
|
137
168
|
### 文档
|
|
138
169
|
|
|
170
|
+
- [常见问题 FAQ](docs/faq.zh-CN.md)
|
|
139
171
|
- [路线图](ROADMAP.md)
|
|
140
172
|
- [验证记录](docs/verification.md)
|
|
141
173
|
- [发布说明](docs/releasing.md)
|
package/ROADMAP.md
CHANGED
|
@@ -116,7 +116,7 @@ Steps 1,234
|
|
|
116
116
|
* [x] 时间缺失显示不可用,读取失败保留旧值并标注未更新;分叉副本不继承耗时,已提交回退随删除历史扣除
|
|
117
117
|
* [x] 移除动画后通过类型检查、205 项测试、构建及真实 OpenCode 2.0.26 完整打包集成复验
|
|
118
118
|
* [x] 首轮尚无 idle 消息时依据原生会话时间保持起点,synthetic/steer 不误重置;重连校时期间保留同一开放轮次的可信显示,247 项测试及真实 OpenCode 2.0.28 完整打包验证通过
|
|
119
|
-
* [
|
|
119
|
+
* [x] macOS 物理多屏切换导致耗时倒退的实机复验(终端焦点事件、视图重建与模拟重连已覆盖,不代表已验证物理切屏、App Nap 或睡眠/唤醒)
|
|
120
120
|
|
|
121
121
|
## 后续评估
|
|
122
122
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
2
|
-
readonly verified: "2026-10-
|
|
2
|
+
readonly verified: "2026-10-24";
|
|
3
3
|
readonly source: "https://models.dev/api.json";
|
|
4
4
|
readonly entries: readonly [{
|
|
5
5
|
readonly providerID: "ai21";
|
|
@@ -31,9 +31,15 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
31
31
|
readonly prices: readonly [{
|
|
32
32
|
readonly input: 0.05;
|
|
33
33
|
readonly output: 0.4;
|
|
34
|
+
readonly cache: {
|
|
35
|
+
readonly read: 0.01;
|
|
36
|
+
};
|
|
34
37
|
}, {
|
|
35
38
|
readonly input: 0.25;
|
|
36
39
|
readonly output: 2;
|
|
40
|
+
readonly cache: {
|
|
41
|
+
readonly read: 0.05;
|
|
42
|
+
};
|
|
37
43
|
readonly tier: {
|
|
38
44
|
readonly type: "context";
|
|
39
45
|
readonly size: 256000;
|
|
@@ -69,10 +75,16 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
69
75
|
readonly input: 0.4;
|
|
70
76
|
readonly output: 1.2;
|
|
71
77
|
readonly reasoning: 4;
|
|
78
|
+
readonly cache: {
|
|
79
|
+
readonly read: 0.08;
|
|
80
|
+
};
|
|
72
81
|
}, {
|
|
73
82
|
readonly input: 1.2;
|
|
74
83
|
readonly output: 3.6;
|
|
75
84
|
readonly reasoning: 12;
|
|
85
|
+
readonly cache: {
|
|
86
|
+
readonly read: 0.24;
|
|
87
|
+
};
|
|
76
88
|
readonly tier: {
|
|
77
89
|
readonly type: "context";
|
|
78
90
|
readonly size: 256000;
|
|
@@ -119,34 +131,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
119
131
|
readonly output: 0.63;
|
|
120
132
|
}];
|
|
121
133
|
readonly released: "2024-01-25";
|
|
122
|
-
}, {
|
|
123
|
-
readonly providerID: "alibaba";
|
|
124
|
-
readonly id: "qwen2-5-14b-instruct";
|
|
125
|
-
readonly prices: readonly [{
|
|
126
|
-
readonly input: 0.35;
|
|
127
|
-
readonly output: 1.4;
|
|
128
|
-
}];
|
|
129
|
-
}, {
|
|
130
|
-
readonly providerID: "alibaba";
|
|
131
|
-
readonly id: "qwen2-5-32b-instruct";
|
|
132
|
-
readonly prices: readonly [{
|
|
133
|
-
readonly input: 0.7;
|
|
134
|
-
readonly output: 2.8;
|
|
135
|
-
}];
|
|
136
|
-
}, {
|
|
137
|
-
readonly providerID: "alibaba";
|
|
138
|
-
readonly id: "qwen2-5-72b-instruct";
|
|
139
|
-
readonly prices: readonly [{
|
|
140
|
-
readonly input: 1.4;
|
|
141
|
-
readonly output: 5.6;
|
|
142
|
-
}];
|
|
143
|
-
}, {
|
|
144
|
-
readonly providerID: "alibaba";
|
|
145
|
-
readonly id: "qwen2-5-7b-instruct";
|
|
146
|
-
readonly prices: readonly [{
|
|
147
|
-
readonly input: 0.175;
|
|
148
|
-
readonly output: 0.7;
|
|
149
|
-
}];
|
|
150
134
|
}, {
|
|
151
135
|
readonly providerID: "alibaba";
|
|
152
136
|
readonly id: "qwen2-5-omni-7b";
|
|
@@ -154,20 +138,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
154
138
|
readonly input: 0.1;
|
|
155
139
|
readonly output: 0.4;
|
|
156
140
|
}];
|
|
157
|
-
}, {
|
|
158
|
-
readonly providerID: "alibaba";
|
|
159
|
-
readonly id: "qwen2-5-vl-72b-instruct";
|
|
160
|
-
readonly prices: readonly [{
|
|
161
|
-
readonly input: 2.8;
|
|
162
|
-
readonly output: 8.4;
|
|
163
|
-
}];
|
|
164
|
-
}, {
|
|
165
|
-
readonly providerID: "alibaba";
|
|
166
|
-
readonly id: "qwen2-5-vl-7b-instruct";
|
|
167
|
-
readonly prices: readonly [{
|
|
168
|
-
readonly input: 0.35;
|
|
169
|
-
readonly output: 1.05;
|
|
170
|
-
}];
|
|
171
141
|
}, {
|
|
172
142
|
readonly providerID: "alibaba";
|
|
173
143
|
readonly id: "qwen3-14b";
|
|
@@ -248,9 +218,15 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
248
218
|
readonly prices: readonly [{
|
|
249
219
|
readonly input: 0.3;
|
|
250
220
|
readonly output: 1.5;
|
|
221
|
+
readonly cache: {
|
|
222
|
+
readonly read: 0.06;
|
|
223
|
+
};
|
|
251
224
|
}, {
|
|
252
225
|
readonly input: 0.5;
|
|
253
226
|
readonly output: 2.5;
|
|
227
|
+
readonly cache: {
|
|
228
|
+
readonly read: 0.1;
|
|
229
|
+
};
|
|
254
230
|
readonly tier: {
|
|
255
231
|
readonly type: "context";
|
|
256
232
|
readonly size: 32000;
|
|
@@ -258,6 +234,9 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
258
234
|
}, {
|
|
259
235
|
readonly input: 0.8;
|
|
260
236
|
readonly output: 4;
|
|
237
|
+
readonly cache: {
|
|
238
|
+
readonly read: 0.16;
|
|
239
|
+
};
|
|
261
240
|
readonly tier: {
|
|
262
241
|
readonly type: "context";
|
|
263
242
|
readonly size: 128000;
|
|
@@ -265,6 +244,9 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
265
244
|
}, {
|
|
266
245
|
readonly input: 1.6;
|
|
267
246
|
readonly output: 9.6;
|
|
247
|
+
readonly cache: {
|
|
248
|
+
readonly read: 0.32;
|
|
249
|
+
};
|
|
268
250
|
readonly tier: {
|
|
269
251
|
readonly type: "context";
|
|
270
252
|
readonly size: 256000;
|
|
@@ -323,9 +305,15 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
323
305
|
readonly prices: readonly [{
|
|
324
306
|
readonly input: 0.2;
|
|
325
307
|
readonly output: 1.6;
|
|
308
|
+
readonly cache: {
|
|
309
|
+
readonly read: 0.04;
|
|
310
|
+
};
|
|
326
311
|
}, {
|
|
327
312
|
readonly input: 0.3;
|
|
328
313
|
readonly output: 2.4;
|
|
314
|
+
readonly cache: {
|
|
315
|
+
readonly read: 0.06;
|
|
316
|
+
};
|
|
329
317
|
readonly tier: {
|
|
330
318
|
readonly type: "context";
|
|
331
319
|
readonly size: 32000;
|
|
@@ -333,6 +321,9 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
333
321
|
}, {
|
|
334
322
|
readonly input: 0.6;
|
|
335
323
|
readonly output: 4.8;
|
|
324
|
+
readonly cache: {
|
|
325
|
+
readonly read: 0.12;
|
|
326
|
+
};
|
|
336
327
|
readonly tier: {
|
|
337
328
|
readonly type: "context";
|
|
338
329
|
readonly size: 128000;
|
|
@@ -473,13 +464,13 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
473
464
|
readonly input: 0.03;
|
|
474
465
|
readonly output: 0.13;
|
|
475
466
|
readonly cache: {
|
|
476
|
-
readonly read: 0.
|
|
467
|
+
readonly read: 0.006;
|
|
477
468
|
};
|
|
478
469
|
}, {
|
|
479
470
|
readonly input: 0.1;
|
|
480
471
|
readonly output: 0.4;
|
|
481
472
|
readonly cache: {
|
|
482
|
-
readonly read: 0.
|
|
473
|
+
readonly read: 0.02;
|
|
483
474
|
};
|
|
484
475
|
readonly tier: {
|
|
485
476
|
readonly type: "context";
|
|
@@ -489,7 +480,7 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
489
480
|
readonly input: 0.2;
|
|
490
481
|
readonly output: 0.8;
|
|
491
482
|
readonly cache: {
|
|
492
|
-
readonly read: 0.
|
|
483
|
+
readonly read: 0.04;
|
|
493
484
|
};
|
|
494
485
|
readonly tier: {
|
|
495
486
|
readonly type: "context";
|
|
@@ -515,13 +506,13 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
515
506
|
readonly input: 0.4;
|
|
516
507
|
readonly output: 1.6;
|
|
517
508
|
readonly cache: {
|
|
518
|
-
readonly read: 0.
|
|
509
|
+
readonly read: 0.08;
|
|
519
510
|
};
|
|
520
511
|
}, {
|
|
521
512
|
readonly input: 1.2;
|
|
522
513
|
readonly output: 4.8;
|
|
523
514
|
readonly cache: {
|
|
524
|
-
readonly read: 0.
|
|
515
|
+
readonly read: 0.24;
|
|
525
516
|
};
|
|
526
517
|
readonly tier: {
|
|
527
518
|
readonly type: "context";
|
|
@@ -1521,14 +1512,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1521
1512
|
readonly output: 2;
|
|
1522
1513
|
}];
|
|
1523
1514
|
readonly released: "2025-12-09";
|
|
1524
|
-
}, {
|
|
1525
|
-
readonly providerID: "mistral";
|
|
1526
|
-
readonly id: "devstral-medium-2507";
|
|
1527
|
-
readonly prices: readonly [{
|
|
1528
|
-
readonly input: 0.4;
|
|
1529
|
-
readonly output: 2;
|
|
1530
|
-
}];
|
|
1531
|
-
readonly released: "2025-07-10";
|
|
1532
1515
|
}, {
|
|
1533
1516
|
readonly providerID: "mistral";
|
|
1534
1517
|
readonly id: "devstral-medium-latest";
|
|
@@ -1537,22 +1520,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1537
1520
|
readonly output: 2;
|
|
1538
1521
|
}];
|
|
1539
1522
|
readonly released: "2025-12-02";
|
|
1540
|
-
}, {
|
|
1541
|
-
readonly providerID: "mistral";
|
|
1542
|
-
readonly id: "devstral-small-2505";
|
|
1543
|
-
readonly prices: readonly [{
|
|
1544
|
-
readonly input: 0.1;
|
|
1545
|
-
readonly output: 0.3;
|
|
1546
|
-
}];
|
|
1547
|
-
readonly released: "2025-05-07";
|
|
1548
|
-
}, {
|
|
1549
|
-
readonly providerID: "mistral";
|
|
1550
|
-
readonly id: "devstral-small-2507";
|
|
1551
|
-
readonly prices: readonly [{
|
|
1552
|
-
readonly input: 0.1;
|
|
1553
|
-
readonly output: 0.3;
|
|
1554
|
-
}];
|
|
1555
|
-
readonly released: "2025-07-10";
|
|
1556
1523
|
}, {
|
|
1557
1524
|
readonly providerID: "mistral";
|
|
1558
1525
|
readonly id: "labs-devstral-small-2512";
|
|
@@ -1624,14 +1591,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1624
1591
|
};
|
|
1625
1592
|
}];
|
|
1626
1593
|
readonly released: "2024-10-01";
|
|
1627
|
-
}, {
|
|
1628
|
-
readonly providerID: "mistral";
|
|
1629
|
-
readonly id: "mistral-large-2411";
|
|
1630
|
-
readonly prices: readonly [{
|
|
1631
|
-
readonly input: 2;
|
|
1632
|
-
readonly output: 6;
|
|
1633
|
-
}];
|
|
1634
|
-
readonly released: "2024-11-18";
|
|
1635
1594
|
}, {
|
|
1636
1595
|
readonly providerID: "mistral";
|
|
1637
1596
|
readonly id: "mistral-large-2512";
|
|
@@ -1647,10 +1606,10 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1647
1606
|
readonly providerID: "mistral";
|
|
1648
1607
|
readonly id: "mistral-large-4";
|
|
1649
1608
|
readonly prices: readonly [{
|
|
1650
|
-
readonly input:
|
|
1651
|
-
readonly output:
|
|
1609
|
+
readonly input: 1.36;
|
|
1610
|
+
readonly output: 4.18;
|
|
1652
1611
|
readonly cache: {
|
|
1653
|
-
readonly read: 0.
|
|
1612
|
+
readonly read: 0.14;
|
|
1654
1613
|
};
|
|
1655
1614
|
}];
|
|
1656
1615
|
readonly released: "2026-10-06";
|
|
@@ -1703,14 +1662,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1703
1662
|
};
|
|
1704
1663
|
}];
|
|
1705
1664
|
readonly released: "2026-04-29";
|
|
1706
|
-
}, {
|
|
1707
|
-
readonly providerID: "mistral";
|
|
1708
|
-
readonly id: "mistral-nemo";
|
|
1709
|
-
readonly prices: readonly [{
|
|
1710
|
-
readonly input: 0.15;
|
|
1711
|
-
readonly output: 0.15;
|
|
1712
|
-
}];
|
|
1713
|
-
readonly released: "2024-07-01";
|
|
1714
1665
|
}, {
|
|
1715
1666
|
readonly providerID: "mistral";
|
|
1716
1667
|
readonly id: "mistral-small-2506";
|
|
@@ -1757,14 +1708,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1757
1708
|
readonly output: 0.15;
|
|
1758
1709
|
}];
|
|
1759
1710
|
readonly released: "2024-09-01";
|
|
1760
|
-
}, {
|
|
1761
|
-
readonly providerID: "mistral";
|
|
1762
|
-
readonly id: "pixtral-large-latest";
|
|
1763
|
-
readonly prices: readonly [{
|
|
1764
|
-
readonly input: 2;
|
|
1765
|
-
readonly output: 6;
|
|
1766
|
-
}];
|
|
1767
|
-
readonly released: "2024-11-01";
|
|
1768
1711
|
}, {
|
|
1769
1712
|
readonly providerID: "mistral";
|
|
1770
1713
|
readonly id: "voxtral-small-2507";
|
|
@@ -1827,29 +1770,37 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1827
1770
|
}];
|
|
1828
1771
|
readonly released: "2026-07-16";
|
|
1829
1772
|
}, {
|
|
1830
|
-
readonly providerID: "
|
|
1831
|
-
readonly id: "
|
|
1773
|
+
readonly providerID: "moonshotai";
|
|
1774
|
+
readonly id: "kimi-k3.1-pro";
|
|
1832
1775
|
readonly prices: readonly [{
|
|
1833
|
-
readonly input:
|
|
1834
|
-
readonly output:
|
|
1776
|
+
readonly input: 2;
|
|
1777
|
+
readonly output: 10;
|
|
1778
|
+
readonly cache: {
|
|
1779
|
+
readonly read: 0.2;
|
|
1780
|
+
readonly write: 2;
|
|
1781
|
+
};
|
|
1835
1782
|
}];
|
|
1836
|
-
readonly released: "
|
|
1783
|
+
readonly released: "2026-10-23";
|
|
1837
1784
|
}, {
|
|
1838
|
-
readonly providerID: "
|
|
1839
|
-
readonly id: "
|
|
1785
|
+
readonly providerID: "moonshotai";
|
|
1786
|
+
readonly id: "kimi-k3.1-pro-highspeed";
|
|
1840
1787
|
readonly prices: readonly [{
|
|
1841
|
-
readonly input:
|
|
1842
|
-
readonly output:
|
|
1788
|
+
readonly input: 4;
|
|
1789
|
+
readonly output: 20;
|
|
1790
|
+
readonly cache: {
|
|
1791
|
+
readonly read: 0.2;
|
|
1792
|
+
readonly write: 4;
|
|
1793
|
+
};
|
|
1843
1794
|
}];
|
|
1844
|
-
readonly released: "
|
|
1795
|
+
readonly released: "2026-10-23";
|
|
1845
1796
|
}, {
|
|
1846
1797
|
readonly providerID: "nvidia";
|
|
1847
|
-
readonly id: "nvidia/llama-3.1-nemotron-
|
|
1798
|
+
readonly id: "nvidia/llama-3.1-nemotron-70b-instruct";
|
|
1848
1799
|
readonly prices: readonly [{
|
|
1849
1800
|
readonly input: 0;
|
|
1850
1801
|
readonly output: 0;
|
|
1851
1802
|
}];
|
|
1852
|
-
readonly released: "2025-04-
|
|
1803
|
+
readonly released: "2025-04-15";
|
|
1853
1804
|
}, {
|
|
1854
1805
|
readonly providerID: "nvidia";
|
|
1855
1806
|
readonly id: "nvidia/llama-3.1-nemotron-safety-guard-8b-v3";
|
|
@@ -1866,38 +1817,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1866
1817
|
readonly output: 0;
|
|
1867
1818
|
}];
|
|
1868
1819
|
readonly released: "2025-04-07";
|
|
1869
|
-
}, {
|
|
1870
|
-
readonly providerID: "nvidia";
|
|
1871
|
-
readonly id: "nvidia/llama-3.3-nemotron-super-49b-v1";
|
|
1872
|
-
readonly prices: readonly [{
|
|
1873
|
-
readonly input: 0;
|
|
1874
|
-
readonly output: 0;
|
|
1875
|
-
}];
|
|
1876
|
-
readonly released: "2025-03-18";
|
|
1877
|
-
}, {
|
|
1878
|
-
readonly providerID: "nvidia";
|
|
1879
|
-
readonly id: "nvidia/llama-3.3-nemotron-super-49b-v1.5";
|
|
1880
|
-
readonly prices: readonly [{
|
|
1881
|
-
readonly input: 0;
|
|
1882
|
-
readonly output: 0;
|
|
1883
|
-
}];
|
|
1884
|
-
readonly released: "2025-07-25";
|
|
1885
|
-
}, {
|
|
1886
|
-
readonly providerID: "nvidia";
|
|
1887
|
-
readonly id: "nvidia/nemotron-3-content-safety";
|
|
1888
|
-
readonly prices: readonly [{
|
|
1889
|
-
readonly input: 0;
|
|
1890
|
-
readonly output: 0;
|
|
1891
|
-
}];
|
|
1892
|
-
readonly released: "2026-03-16";
|
|
1893
|
-
}, {
|
|
1894
|
-
readonly providerID: "nvidia";
|
|
1895
|
-
readonly id: "nvidia/nemotron-3-nano-30b-a3b";
|
|
1896
|
-
readonly prices: readonly [{
|
|
1897
|
-
readonly input: 0;
|
|
1898
|
-
readonly output: 0;
|
|
1899
|
-
}];
|
|
1900
|
-
readonly released: "2025-12-15";
|
|
1901
1820
|
}, {
|
|
1902
1821
|
readonly providerID: "nvidia";
|
|
1903
1822
|
readonly id: "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning";
|
|
@@ -1938,30 +1857,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
1938
1857
|
readonly output: 0;
|
|
1939
1858
|
}];
|
|
1940
1859
|
readonly released: "2026-10-15";
|
|
1941
|
-
}, {
|
|
1942
|
-
readonly providerID: "nvidia";
|
|
1943
|
-
readonly id: "nvidia/nemotron-content-safety-reasoning-4b";
|
|
1944
|
-
readonly prices: readonly [{
|
|
1945
|
-
readonly input: 0;
|
|
1946
|
-
readonly output: 0;
|
|
1947
|
-
}];
|
|
1948
|
-
readonly released: "2026-01-22";
|
|
1949
|
-
}, {
|
|
1950
|
-
readonly providerID: "nvidia";
|
|
1951
|
-
readonly id: "nvidia/nemotron-mini-4b-instruct";
|
|
1952
|
-
readonly prices: readonly [{
|
|
1953
|
-
readonly input: 0;
|
|
1954
|
-
readonly output: 0;
|
|
1955
|
-
}];
|
|
1956
|
-
readonly released: "2024-08-21";
|
|
1957
|
-
}, {
|
|
1958
|
-
readonly providerID: "nvidia";
|
|
1959
|
-
readonly id: "nvidia/nemotron-nano-12b-v2-vl";
|
|
1960
|
-
readonly prices: readonly [{
|
|
1961
|
-
readonly input: 0;
|
|
1962
|
-
readonly output: 0;
|
|
1963
|
-
}];
|
|
1964
|
-
readonly released: "2025-10-28";
|
|
1965
1860
|
}, {
|
|
1966
1861
|
readonly providerID: "nvidia";
|
|
1967
1862
|
readonly id: "nvidia/nemotron-voicechat";
|
|
@@ -2977,28 +2872,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
2977
2872
|
};
|
|
2978
2873
|
}];
|
|
2979
2874
|
readonly released: "2026-08-03";
|
|
2980
|
-
}, {
|
|
2981
|
-
readonly providerID: "stepfun-ai";
|
|
2982
|
-
readonly id: "step-1-32k";
|
|
2983
|
-
readonly prices: readonly [{
|
|
2984
|
-
readonly input: 2.05;
|
|
2985
|
-
readonly output: 9.59;
|
|
2986
|
-
readonly cache: {
|
|
2987
|
-
readonly read: 0.41;
|
|
2988
|
-
};
|
|
2989
|
-
}];
|
|
2990
|
-
readonly released: "2025-01-01";
|
|
2991
|
-
}, {
|
|
2992
|
-
readonly providerID: "stepfun-ai";
|
|
2993
|
-
readonly id: "step-2-16k";
|
|
2994
|
-
readonly prices: readonly [{
|
|
2995
|
-
readonly input: 5.21;
|
|
2996
|
-
readonly output: 16.44;
|
|
2997
|
-
readonly cache: {
|
|
2998
|
-
readonly read: 1.04;
|
|
2999
|
-
};
|
|
3000
|
-
}];
|
|
3001
|
-
readonly released: "2025-01-01";
|
|
3002
2875
|
}, {
|
|
3003
2876
|
readonly providerID: "stepfun-ai";
|
|
3004
2877
|
readonly id: "step-3.5-flash";
|
|
@@ -3570,39 +3443,6 @@ export declare const GENERATED_PRICE_SNAPSHOT: {
|
|
|
3570
3443
|
};
|
|
3571
3444
|
}];
|
|
3572
3445
|
readonly released: "2026-04-16";
|
|
3573
|
-
}, {
|
|
3574
|
-
readonly providerID: "xiaomi";
|
|
3575
|
-
readonly id: "mimo-v2-flash";
|
|
3576
|
-
readonly prices: readonly [{
|
|
3577
|
-
readonly input: 0.14;
|
|
3578
|
-
readonly output: 0.28;
|
|
3579
|
-
readonly cache: {
|
|
3580
|
-
readonly read: 0.0028;
|
|
3581
|
-
};
|
|
3582
|
-
}];
|
|
3583
|
-
readonly released: "2025-12-16";
|
|
3584
|
-
}, {
|
|
3585
|
-
readonly providerID: "xiaomi";
|
|
3586
|
-
readonly id: "mimo-v2-omni";
|
|
3587
|
-
readonly prices: readonly [{
|
|
3588
|
-
readonly input: 0.14;
|
|
3589
|
-
readonly output: 0.28;
|
|
3590
|
-
readonly cache: {
|
|
3591
|
-
readonly read: 0.0028;
|
|
3592
|
-
};
|
|
3593
|
-
}];
|
|
3594
|
-
readonly released: "2026-03-18";
|
|
3595
|
-
}, {
|
|
3596
|
-
readonly providerID: "xiaomi";
|
|
3597
|
-
readonly id: "mimo-v2-pro";
|
|
3598
|
-
readonly prices: readonly [{
|
|
3599
|
-
readonly input: 0.435;
|
|
3600
|
-
readonly output: 0.87;
|
|
3601
|
-
readonly cache: {
|
|
3602
|
-
readonly read: 0.0036;
|
|
3603
|
-
};
|
|
3604
|
-
}];
|
|
3605
|
-
readonly released: "2026-03-18";
|
|
3606
3446
|
}, {
|
|
3607
3447
|
readonly providerID: "xiaomi";
|
|
3608
3448
|
readonly id: "mimo-v2.5";
|
package/dist/prices.generated.js
CHANGED
|
@@ -1,41 +1,35 @@
|
|
|
1
1
|
export const GENERATED_PRICE_SNAPSHOT = {
|
|
2
|
-
verified: "2026-10-
|
|
2
|
+
verified: "2026-10-24",
|
|
3
3
|
source: "https://models.dev/api.json",
|
|
4
4
|
entries: [
|
|
5
5
|
{ "providerID": "ai21", "id": "jamba-large", "prices": [{ "input": 2, "output": 8 }], "released": "2025-07-03" },
|
|
6
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 }, { "input": 0.25, "output": 2, "tier": { "type": "context", "size": 256000 } }], "released": "2025-07-28" },
|
|
8
|
+
{ "providerID": "alibaba", "id": "qwen-flash", "prices": [{ "input": 0.05, "output": 0.4, "cache": { "read": 0.01 } }, { "input": 0.25, "output": 2, "cache": { "read": 0.05 }, "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 }, { "input": 1.2, "output": 3.6, "reasoning": 12, "tier": { "type": "context", "size": 256000 } }], "released": "2024-01-25" },
|
|
12
|
+
{ "providerID": "alibaba", "id": "qwen-plus", "prices": [{ "input": 0.4, "output": 1.2, "reasoning": 4, "cache": { "read": 0.08 } }, { "input": 1.2, "output": 3.6, "reasoning": 12, "cache": { "read": 0.24 }, "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" },
|
|
16
16
|
{ "providerID": "alibaba", "id": "qwen-vl-ocr", "prices": [{ "input": 0.07, "output": 0.16 }], "released": "2024-10-28" },
|
|
17
17
|
{ "providerID": "alibaba", "id": "qwen-vl-plus", "prices": [{ "input": 0.21, "output": 0.63 }], "released": "2024-01-25" },
|
|
18
|
-
{ "providerID": "alibaba", "id": "qwen2-5-14b-instruct", "prices": [{ "input": 0.35, "output": 1.4 }] },
|
|
19
|
-
{ "providerID": "alibaba", "id": "qwen2-5-32b-instruct", "prices": [{ "input": 0.7, "output": 2.8 }] },
|
|
20
|
-
{ "providerID": "alibaba", "id": "qwen2-5-72b-instruct", "prices": [{ "input": 1.4, "output": 5.6 }] },
|
|
21
|
-
{ "providerID": "alibaba", "id": "qwen2-5-7b-instruct", "prices": [{ "input": 0.175, "output": 0.7 }] },
|
|
22
18
|
{ "providerID": "alibaba", "id": "qwen2-5-omni-7b", "prices": [{ "input": 0.1, "output": 0.4 }] },
|
|
23
|
-
{ "providerID": "alibaba", "id": "qwen2-5-vl-72b-instruct", "prices": [{ "input": 2.8, "output": 8.4 }] },
|
|
24
|
-
{ "providerID": "alibaba", "id": "qwen2-5-vl-7b-instruct", "prices": [{ "input": 0.35, "output": 1.05 }] },
|
|
25
19
|
{ "providerID": "alibaba", "id": "qwen3-14b", "prices": [{ "input": 0.35, "output": 1.4, "reasoning": 4.2 }] },
|
|
26
20
|
{ "providerID": "alibaba", "id": "qwen3-235b-a22b", "prices": [{ "input": 0.7, "output": 2.8, "reasoning": 8.4 }] },
|
|
27
21
|
{ "providerID": "alibaba", "id": "qwen3-32b", "prices": [{ "input": 0.7, "output": 2.8, "reasoning": 8.4 }] },
|
|
28
22
|
{ "providerID": "alibaba", "id": "qwen3-8b", "prices": [{ "input": 0.18, "output": 0.7, "reasoning": 2.1 }] },
|
|
29
23
|
{ "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
24
|
{ "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 }, { "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" },
|
|
25
|
+
{ "providerID": "alibaba", "id": "qwen3-coder-flash", "prices": [{ "input": 0.3, "output": 1.5, "cache": { "read": 0.06 } }, { "input": 0.5, "output": 2.5, "cache": { "read": 0.1 }, "tier": { "type": "context", "size": 32000 } }, { "input": 0.8, "output": 4, "cache": { "read": 0.16 }, "tier": { "type": "context", "size": 128000 } }, { "input": 1.6, "output": 9.6, "cache": { "read": 0.32 }, "tier": { "type": "context", "size": 256000 } }], "released": "2025-07-28" },
|
|
32
26
|
{ "providerID": "alibaba", "id": "qwen3-coder-plus", "prices": [{ "input": 1, "output": 5 }], "released": "2025-07-23" },
|
|
33
27
|
{ "providerID": "alibaba", "id": "qwen3-max", "prices": [{ "input": 1.2, "output": 6 }], "released": "2025-09-23" },
|
|
34
28
|
{ "providerID": "alibaba", "id": "qwen3-next-80b-a3b-instruct", "prices": [{ "input": 0.5, "output": 2 }] },
|
|
35
29
|
{ "providerID": "alibaba", "id": "qwen3-next-80b-a3b-thinking", "prices": [{ "input": 0.5, "output": 6 }] },
|
|
36
30
|
{ "providerID": "alibaba", "id": "qwen3-vl-235b-a22b", "prices": [{ "input": 0.7, "output": 2.8, "reasoning": 8.4 }] },
|
|
37
31
|
{ "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 }, { "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" },
|
|
32
|
+
{ "providerID": "alibaba", "id": "qwen3-vl-plus", "prices": [{ "input": 0.2, "output": 1.6, "cache": { "read": 0.04 } }, { "input": 0.3, "output": 2.4, "cache": { "read": 0.06 }, "tier": { "type": "context", "size": 32000 } }, { "input": 0.6, "output": 4.8, "cache": { "read": 0.12 }, "tier": { "type": "context", "size": 128000 } }], "released": "2025-09-23" },
|
|
39
33
|
{ "providerID": "alibaba", "id": "qwen3.5-122b-a10b", "prices": [{ "input": 0.4, "output": 3.2 }], "released": "2026-02-23" },
|
|
40
34
|
{ "providerID": "alibaba", "id": "qwen3.5-27b", "prices": [{ "input": 0.3, "output": 2.4 }], "released": "2026-02-23" },
|
|
41
35
|
{ "providerID": "alibaba", "id": "qwen3.5-35b-a3b", "prices": [{ "input": 0.25, "output": 2 }], "released": "2026-02-23" },
|
|
@@ -47,9 +41,9 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
47
41
|
{ "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
42
|
{ "providerID": "alibaba", "id": "qwen3.6-max-preview", "prices": [{ "input": 1.3, "output": 7.8, "cache": { "read": 0.13 } }], "released": "2026-04-20" },
|
|
49
43
|
{ "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
|
-
{ "providerID": "alibaba", "id": "qwen3.7-flash", "prices": [{ "input": 0.03, "output": 0.13, "cache": { "read": 0.
|
|
44
|
+
{ "providerID": "alibaba", "id": "qwen3.7-flash", "prices": [{ "input": 0.03, "output": 0.13, "cache": { "read": 0.006 } }, { "input": 0.1, "output": 0.4, "cache": { "read": 0.02 }, "tier": { "type": "context", "size": 32000 } }, { "input": 0.2, "output": 0.8, "cache": { "read": 0.04 }, "tier": { "type": "context", "size": 256000 } }], "released": "2026-07-15" },
|
|
51
45
|
{ "providerID": "alibaba", "id": "qwen3.7-max", "prices": [{ "input": 2.5, "output": 7.5, "cache": { "read": 0.5 } }], "released": "2026-05-21" },
|
|
52
|
-
{ "providerID": "alibaba", "id": "qwen3.7-plus", "prices": [{ "input": 0.4, "output": 1.6, "cache": { "read": 0.
|
|
46
|
+
{ "providerID": "alibaba", "id": "qwen3.7-plus", "prices": [{ "input": 0.4, "output": 1.6, "cache": { "read": 0.08 } }, { "input": 1.2, "output": 4.8, "cache": { "read": 0.24 }, "tier": { "type": "context", "size": 256000 } }], "released": "2026-06-02" },
|
|
53
47
|
{ "providerID": "alibaba", "id": "qwen3.8-flash", "prices": [{ "input": 0.15, "output": 0.47, "cache": { "read": 0.016 } }], "released": "2026-08-26" },
|
|
54
48
|
{ "providerID": "alibaba", "id": "qwen3.8-max", "prices": [{ "input": 2, "output": 6, "cache": { "read": 0.25 } }], "released": "2026-08-03" },
|
|
55
49
|
{ "providerID": "alibaba", "id": "qwen3.8-omni-flash", "prices": [{ "input": 0.15, "output": 0.47, "cache": { "read": 0.016 } }], "released": "2026-09-17" },
|
|
@@ -134,10 +128,7 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
134
128
|
{ "providerID": "mistral", "id": "codestral-latest", "prices": [{ "input": 0.3, "output": 0.9, "cache": { "read": 0.03 } }], "released": "2024-05-29" },
|
|
135
129
|
{ "providerID": "mistral", "id": "devstral-2512", "prices": [{ "input": 0.4, "output": 2 }], "released": "2025-12-09" },
|
|
136
130
|
{ "providerID": "mistral", "id": "devstral-latest", "prices": [{ "input": 0.4, "output": 2 }], "released": "2025-12-09" },
|
|
137
|
-
{ "providerID": "mistral", "id": "devstral-medium-2507", "prices": [{ "input": 0.4, "output": 2 }], "released": "2025-07-10" },
|
|
138
131
|
{ "providerID": "mistral", "id": "devstral-medium-latest", "prices": [{ "input": 0.4, "output": 2 }], "released": "2025-12-02" },
|
|
139
|
-
{ "providerID": "mistral", "id": "devstral-small-2505", "prices": [{ "input": 0.1, "output": 0.3 }], "released": "2025-05-07" },
|
|
140
|
-
{ "providerID": "mistral", "id": "devstral-small-2507", "prices": [{ "input": 0.1, "output": 0.3 }], "released": "2025-07-10" },
|
|
141
132
|
{ "providerID": "mistral", "id": "labs-devstral-small-2512", "prices": [{ "input": 0, "output": 0 }], "released": "2025-12-09" },
|
|
142
133
|
{ "providerID": "mistral", "id": "magistral-medium-latest", "prices": [{ "input": 2, "output": 5 }], "released": "2025-03-17" },
|
|
143
134
|
{ "providerID": "mistral", "id": "ministral-14b-2512", "prices": [{ "input": 0.2, "output": 0.2, "cache": { "read": 0.02 } }], "released": "2025-12-02" },
|
|
@@ -145,44 +136,34 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
145
136
|
{ "providerID": "mistral", "id": "ministral-3b-latest", "prices": [{ "input": 0.1, "output": 0.1, "cache": { "read": 0.01 } }], "released": "2024-10-01" },
|
|
146
137
|
{ "providerID": "mistral", "id": "ministral-8b-2512", "prices": [{ "input": 0.15, "output": 0.15, "cache": { "read": 0.015 } }], "released": "2025-12-02" },
|
|
147
138
|
{ "providerID": "mistral", "id": "ministral-8b-latest", "prices": [{ "input": 0.15, "output": 0.15, "cache": { "read": 0.015 } }], "released": "2024-10-01" },
|
|
148
|
-
{ "providerID": "mistral", "id": "mistral-large-2411", "prices": [{ "input": 2, "output": 6 }], "released": "2024-11-18" },
|
|
149
139
|
{ "providerID": "mistral", "id": "mistral-large-2512", "prices": [{ "input": 0.5, "output": 1.5, "cache": { "read": 0.05 } }], "released": "2024-11-01" },
|
|
150
|
-
{ "providerID": "mistral", "id": "mistral-large-4", "prices": [{ "input":
|
|
140
|
+
{ "providerID": "mistral", "id": "mistral-large-4", "prices": [{ "input": 1.36, "output": 4.18, "cache": { "read": 0.14 } }], "released": "2026-10-06" },
|
|
151
141
|
{ "providerID": "mistral", "id": "mistral-large-latest", "prices": [{ "input": 0.5, "output": 1.5, "cache": { "read": 0.05 } }], "released": "2024-11-01" },
|
|
152
142
|
{ "providerID": "mistral", "id": "mistral-medium-2505", "prices": [{ "input": 0.4, "output": 2 }], "released": "2025-05-07" },
|
|
153
143
|
{ "providerID": "mistral", "id": "mistral-medium-2508", "prices": [{ "input": 0.4, "output": 2 }], "released": "2025-08-12" },
|
|
154
144
|
{ "providerID": "mistral", "id": "mistral-medium-2604", "prices": [{ "input": 1.5, "output": 7.5, "cache": { "read": 0.15 } }], "released": "2026-04-29" },
|
|
155
145
|
{ "providerID": "mistral", "id": "mistral-medium-latest", "prices": [{ "input": 1.5, "output": 7.5, "cache": { "read": 0.15 } }], "released": "2026-04-29" },
|
|
156
|
-
{ "providerID": "mistral", "id": "mistral-nemo", "prices": [{ "input": 0.15, "output": 0.15 }], "released": "2024-07-01" },
|
|
157
146
|
{ "providerID": "mistral", "id": "mistral-small-2506", "prices": [{ "input": 0.1, "output": 0.3 }], "released": "2025-06-20" },
|
|
158
147
|
{ "providerID": "mistral", "id": "mistral-small-2603", "prices": [{ "input": 0.15, "output": 0.6, "cache": { "read": 0.015 } }], "released": "2026-03-16" },
|
|
159
148
|
{ "providerID": "mistral", "id": "mistral-small-latest", "prices": [{ "input": 0.15, "output": 0.6, "cache": { "read": 0.015 } }], "released": "2026-03-16" },
|
|
160
149
|
{ "providerID": "mistral", "id": "open-mistral-nemo", "prices": [{ "input": 0.15, "output": 0.15 }], "released": "2024-07-01" },
|
|
161
150
|
{ "providerID": "mistral", "id": "pixtral-12b", "prices": [{ "input": 0.15, "output": 0.15 }], "released": "2024-09-01" },
|
|
162
|
-
{ "providerID": "mistral", "id": "pixtral-large-latest", "prices": [{ "input": 2, "output": 6 }], "released": "2024-11-01" },
|
|
163
151
|
{ "providerID": "mistral", "id": "voxtral-small-2507", "prices": [{ "input": 0.1, "output": 0.4 }], "released": "2025-07-15" },
|
|
164
152
|
{ "providerID": "mistral", "id": "voxtral-small-latest", "prices": [{ "input": 0.1, "output": 0.4 }], "released": "2025-07-15" },
|
|
165
153
|
{ "providerID": "moonshotai", "id": "kimi-k2.6", "prices": [{ "input": 0.95, "output": 4, "cache": { "read": 0.16 } }], "released": "2026-04-20" },
|
|
166
154
|
{ "providerID": "moonshotai", "id": "kimi-k2.7-code", "prices": [{ "input": 0.95, "output": 4, "cache": { "read": 0.19 } }], "released": "2026-06-12" },
|
|
167
155
|
{ "providerID": "moonshotai", "id": "kimi-k2.7-code-highspeed", "prices": [{ "input": 1.9, "output": 8, "cache": { "read": 0.38 } }], "released": "2026-06-12" },
|
|
168
156
|
{ "providerID": "moonshotai", "id": "kimi-k3", "prices": [{ "input": 3, "output": 15, "cache": { "read": 0.3, "write": 3 } }], "released": "2026-07-16" },
|
|
157
|
+
{ "providerID": "moonshotai", "id": "kimi-k3.1-pro", "prices": [{ "input": 2, "output": 10, "cache": { "read": 0.2, "write": 2 } }], "released": "2026-10-23" },
|
|
158
|
+
{ "providerID": "moonshotai", "id": "kimi-k3.1-pro-highspeed", "prices": [{ "input": 4, "output": 20, "cache": { "read": 0.2, "write": 4 } }], "released": "2026-10-23" },
|
|
169
159
|
{ "providerID": "nvidia", "id": "nvidia/llama-3.1-nemotron-70b-instruct", "prices": [{ "input": 0, "output": 0 }], "released": "2025-04-15" },
|
|
170
|
-
{ "providerID": "nvidia", "id": "nvidia/llama-3.1-nemotron-nano-8b-v1", "prices": [{ "input": 0, "output": 0 }], "released": "2025-03-18" },
|
|
171
|
-
{ "providerID": "nvidia", "id": "nvidia/llama-3.1-nemotron-nano-vl-8b-v1", "prices": [{ "input": 0, "output": 0 }], "released": "2025-04-10" },
|
|
172
160
|
{ "providerID": "nvidia", "id": "nvidia/llama-3.1-nemotron-safety-guard-8b-v3", "prices": [{ "input": 0, "output": 0 }], "released": "2025-10-28" },
|
|
173
161
|
{ "providerID": "nvidia", "id": "nvidia/llama-3.1-nemotron-ultra-253b-v1", "prices": [{ "input": 0, "output": 0 }], "released": "2025-04-07" },
|
|
174
|
-
{ "providerID": "nvidia", "id": "nvidia/llama-3.3-nemotron-super-49b-v1", "prices": [{ "input": 0, "output": 0 }], "released": "2025-03-18" },
|
|
175
|
-
{ "providerID": "nvidia", "id": "nvidia/llama-3.3-nemotron-super-49b-v1.5", "prices": [{ "input": 0, "output": 0 }], "released": "2025-07-25" },
|
|
176
|
-
{ "providerID": "nvidia", "id": "nvidia/nemotron-3-content-safety", "prices": [{ "input": 0, "output": 0 }], "released": "2026-03-16" },
|
|
177
|
-
{ "providerID": "nvidia", "id": "nvidia/nemotron-3-nano-30b-a3b", "prices": [{ "input": 0, "output": 0 }], "released": "2025-12-15" },
|
|
178
162
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning", "prices": [{ "input": 0, "output": 0 }], "released": "2026-04-28" },
|
|
179
163
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-3-ultra-550b-a55b", "prices": [{ "input": 0, "output": 0 }], "released": "2026-06-04" },
|
|
180
164
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-3.5-content-safety", "prices": [{ "input": 0, "output": 0 }], "released": "2026-06-02" },
|
|
181
165
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-3.5-lightning-30b-a3b", "prices": [{ "input": 0, "output": 0 }], "released": "2026-08-11" },
|
|
182
166
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-3.5-super-vl-120b-a12b", "prices": [{ "input": 0, "output": 0 }], "released": "2026-10-15" },
|
|
183
|
-
{ "providerID": "nvidia", "id": "nvidia/nemotron-content-safety-reasoning-4b", "prices": [{ "input": 0, "output": 0 }], "released": "2026-01-22" },
|
|
184
|
-
{ "providerID": "nvidia", "id": "nvidia/nemotron-mini-4b-instruct", "prices": [{ "input": 0, "output": 0 }], "released": "2024-08-21" },
|
|
185
|
-
{ "providerID": "nvidia", "id": "nvidia/nemotron-nano-12b-v2-vl", "prices": [{ "input": 0, "output": 0 }], "released": "2025-10-28" },
|
|
186
167
|
{ "providerID": "nvidia", "id": "nvidia/nemotron-voicechat", "prices": [{ "input": 0, "output": 0 }], "released": "2026-03-16" },
|
|
187
168
|
{ "providerID": "openai", "id": "gpt-3.5-turbo", "prices": [{ "input": 0.5, "output": 1.5, "cache": { "read": 0 } }], "released": "2023-03-01" },
|
|
188
169
|
{ "providerID": "openai", "id": "gpt-4", "prices": [{ "input": 30, "output": 60 }], "released": "2023-11-06" },
|
|
@@ -257,8 +238,6 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
257
238
|
{ "providerID": "sakana", "id": "fugu-ultra", "prices": [{ "input": 5, "output": 30, "cache": { "read": 0.5 } }, { "input": 10, "output": 45, "cache": { "read": 1 }, "tier": { "type": "context", "size": 272000 } }], "released": "2026-06-15" },
|
|
258
239
|
{ "providerID": "sakana", "id": "fugu-ultra-20260615", "prices": [{ "input": 5, "output": 30, "cache": { "read": 0.5 } }, { "input": 10, "output": 45, "cache": { "read": 1 }, "tier": { "type": "context", "size": 272000 } }], "released": "2026-06-15" },
|
|
259
240
|
{ "providerID": "sakana", "id": "sakana-namazu", "prices": [{ "input": 0.95, "output": 4, "cache": { "read": 0.15 } }], "released": "2026-08-03" },
|
|
260
|
-
{ "providerID": "stepfun-ai", "id": "step-1-32k", "prices": [{ "input": 2.05, "output": 9.59, "cache": { "read": 0.41 } }], "released": "2025-01-01" },
|
|
261
|
-
{ "providerID": "stepfun-ai", "id": "step-2-16k", "prices": [{ "input": 5.21, "output": 16.44, "cache": { "read": 1.04 } }], "released": "2025-01-01" },
|
|
262
241
|
{ "providerID": "stepfun-ai", "id": "step-3.5-flash", "prices": [{ "input": 0.1, "output": 0.3, "cache": { "read": 0.02 } }], "released": "2026-01-29" },
|
|
263
242
|
{ "providerID": "stepfun-ai", "id": "step-3.5-flash-2603", "prices": [{ "input": 0.1, "output": 0.3, "cache": { "read": 0.02 } }], "released": "2026-04-02" },
|
|
264
243
|
{ "providerID": "stepfun-ai", "id": "step-3.7-flash", "prices": [{ "input": 0.2, "output": 1.15, "cache": { "read": 0.04 } }], "released": "2026-05-29" },
|
|
@@ -289,9 +268,6 @@ export const GENERATED_PRICE_SNAPSHOT = {
|
|
|
289
268
|
{ "providerID": "xai", "id": "grok-4.6", "prices": [{ "input": 2, "output": 6, "cache": { "read": 0.5 } }, { "input": 4, "output": 12, "cache": { "read": 1 }, "tier": { "type": "context", "size": 199999 } }], "released": "2026-08-12" },
|
|
290
269
|
{ "providerID": "xai", "id": "grok-4.7", "prices": [{ "input": 2, "output": 6, "cache": { "read": 0.5 } }, { "input": 4, "output": 12, "cache": { "read": 1 }, "tier": { "type": "context", "size": 199999 } }], "released": "2026-09-21" },
|
|
291
270
|
{ "providerID": "xai", "id": "grok-build-0.1", "prices": [{ "input": 1, "output": 2, "cache": { "read": 0.2 } }, { "input": 2, "output": 4, "cache": { "read": 0.4 }, "tier": { "type": "context", "size": 199999 } }], "released": "2026-04-16" },
|
|
292
|
-
{ "providerID": "xiaomi", "id": "mimo-v2-flash", "prices": [{ "input": 0.14, "output": 0.28, "cache": { "read": 0.0028 } }], "released": "2025-12-16" },
|
|
293
|
-
{ "providerID": "xiaomi", "id": "mimo-v2-omni", "prices": [{ "input": 0.14, "output": 0.28, "cache": { "read": 0.0028 } }], "released": "2026-03-18" },
|
|
294
|
-
{ "providerID": "xiaomi", "id": "mimo-v2-pro", "prices": [{ "input": 0.435, "output": 0.87, "cache": { "read": 0.0036 } }], "released": "2026-03-18" },
|
|
295
271
|
{ "providerID": "xiaomi", "id": "mimo-v2.5", "prices": [{ "input": 0.14, "output": 0.28, "cache": { "read": 0.0028 } }], "released": "2026-04-22" },
|
|
296
272
|
{ "providerID": "xiaomi", "id": "mimo-v2.5-pro", "prices": [{ "input": 0.435, "output": 0.87, "cache": { "read": 0.0036 } }], "released": "2026-04-22" },
|
|
297
273
|
{ "providerID": "xiaomi", "id": "mimo-v2.5-pro-ultraspeed", "prices": [{ "input": 1.305, "output": 2.61, "cache": { "read": 0.0108 } }], "released": "2026-06-08" },
|
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-24";
|
|
18
18
|
source: "https://models.dev/api.json";
|
|
19
19
|
entries: OfficialPriceEntry[];
|
|
20
20
|
};
|
package/package.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chenlongapps/opencode-token-usage",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.17",
|
|
4
|
+
"description": "OpenCode 2 plugin for session-tree token usage, context window monitoring, estimated costs, and performance metrics (TPS, TTFT, run time).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"opencode",
|
|
7
7
|
"opencode-plugin",
|
|
8
8
|
"token-usage",
|
|
9
9
|
"context-window",
|
|
10
|
+
"cost-tracking",
|
|
10
11
|
"tps",
|
|
11
12
|
"ttft",
|
|
12
|
-
"
|
|
13
|
+
"subagents",
|
|
14
|
+
"terminal-ui",
|
|
15
|
+
"llm"
|
|
13
16
|
],
|
|
14
17
|
"homepage": "https://github.com/chenlongapps/opencode-token-usage#readme",
|
|
15
18
|
"bugs": {
|