@chenlongapps/opencode-token-usage 0.3.3 → 0.3.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 CHANGED
@@ -4,6 +4,7 @@
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>
7
+ <a href="https://www.npmjs.com/package/@chenlongapps/opencode-token-usage" target="_blank" rel="noopener noreferrer"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@chenlongapps/opencode-token-usage" /></a>
7
8
  <a href="https://opencode.ai/" target="_blank" rel="noopener noreferrer"><img alt="OpenCode 2" src="https://img.shields.io/badge/OpenCode-2-5A67D8?style=flat-square" /></a>
8
9
  <a href="https://github.com/chenlongapps/opencode-token-usage/actions/workflows/ci.yml" target="_blank" rel="noopener noreferrer"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/chenlongapps/opencode-token-usage/ci.yml?style=flat-square&branch=main&label=ci" /></a>
9
10
  <a href="LICENSE" target="_blank" rel="noopener noreferrer"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-yellow?style=flat-square" /></a>
package/README.zh-CN.md CHANGED
@@ -4,6 +4,7 @@
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>
7
+ <a href="https://www.npmjs.com/package/@chenlongapps/opencode-token-usage" target="_blank" rel="noopener noreferrer"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@chenlongapps/opencode-token-usage" /></a>
7
8
  <a href="https://opencode.ai/" target="_blank" rel="noopener noreferrer"><img alt="OpenCode 2" src="https://img.shields.io/badge/OpenCode-2-5A67D8?style=flat-square" /></a>
8
9
  <a href="https://github.com/chenlongapps/opencode-token-usage/actions/workflows/ci.yml" target="_blank" rel="noopener noreferrer"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/chenlongapps/opencode-token-usage/ci.yml?style=flat-square&branch=main&label=ci" /></a>
9
10
  <a href="LICENSE" target="_blank" rel="noopener noreferrer"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-yellow?style=flat-square" /></a>
package/ROADMAP.md CHANGED
@@ -94,6 +94,7 @@ Steps 1,234
94
94
 
95
95
  * [ ] 添加 `/usage`
96
96
  * [ ] 显示当前会话及会话树统计
97
+ * [ ] 显示 context 各项占比
97
98
  * [ ] 显示 token 明细与上下文用量
98
99
  * [ ] 显示模型和价格信息
99
100
  * [ ] 显示估算费用明细
package/dist/pricing.d.ts CHANGED
@@ -6,7 +6,9 @@ export interface OfficialPriceEntry {
6
6
  released: string;
7
7
  /** Exact alternate IDs used by supported gateways or manufacturer aliases. */
8
8
  aliases?: readonly string[];
9
- /** Standard, synchronous API token rates in USD per million tokens. */
9
+ /** Provider IDs where this rate is available, when it is not a general model rate. */
10
+ providers?: readonly string[];
11
+ /** Published API token rates in USD per million tokens. */
10
12
  prices: readonly Price[];
11
13
  /** Manufacturer pricing page used to verify the rates. */
12
14
  source: string;
@@ -36,6 +38,29 @@ export declare const OFFICIAL_PRICE_SNAPSHOT: {
36
38
  read: number;
37
39
  };
38
40
  })[];
41
+ providers?: never;
42
+ aliases?: never;
43
+ } | {
44
+ id: string;
45
+ providers: string[];
46
+ released: string;
47
+ source: string;
48
+ prices: ({
49
+ input: number;
50
+ output: number;
51
+ cache: {
52
+ read: number;
53
+ };
54
+ tier?: never;
55
+ } | {
56
+ tier: {
57
+ type: "context";
58
+ size: number;
59
+ };
60
+ input?: never;
61
+ output?: never;
62
+ cache?: never;
63
+ })[];
39
64
  aliases?: never;
40
65
  } | {
41
66
  id: string;
@@ -53,9 +78,37 @@ export declare const OFFICIAL_PRICE_SNAPSHOT: {
53
78
  input: number;
54
79
  output: number;
55
80
  })[];
81
+ providers?: never;
82
+ aliases?: never;
83
+ } | {
84
+ id: string;
85
+ released: string;
86
+ source: string;
87
+ prices: ({
88
+ input: number;
89
+ output: number;
90
+ cache: {
91
+ read: number;
92
+ write: number;
93
+ };
94
+ tier?: never;
95
+ } | {
96
+ tier: {
97
+ type: "context";
98
+ size: number;
99
+ };
100
+ input: number;
101
+ output: number;
102
+ cache: {
103
+ read: number;
104
+ write: number;
105
+ };
106
+ })[];
107
+ providers?: never;
56
108
  aliases?: never;
57
109
  } | {
58
110
  id: string;
111
+ providers: string[];
59
112
  released: string;
60
113
  source: string;
61
114
  prices: ({
@@ -92,6 +145,7 @@ export declare const OFFICIAL_PRICE_SNAPSHOT: {
92
145
  write: number;
93
146
  };
94
147
  }[];
148
+ providers?: never;
95
149
  } | {
96
150
  id: string;
97
151
  aliases: string[];
@@ -109,6 +163,7 @@ export declare const OFFICIAL_PRICE_SNAPSHOT: {
109
163
  input: number;
110
164
  output: number;
111
165
  })[];
166
+ providers?: never;
112
167
  } | {
113
168
  id: string;
114
169
  aliases: string[];
@@ -132,6 +187,7 @@ export declare const OFFICIAL_PRICE_SNAPSHOT: {
132
187
  read: number;
133
188
  };
134
189
  })[];
190
+ providers?: never;
135
191
  })[];
136
192
  };
137
193
  /**
package/dist/pricing.js CHANGED
@@ -2,7 +2,7 @@ export const OFFICIAL_PRICE_SNAPSHOT = {
2
2
  verified: "2026-09-23",
3
3
  newModelCutoff: "2026-03-22",
4
4
  entries: [
5
- // OpenAI standard processing. Tier sizes are exclusive thresholds, so
5
+ // OpenAI API rates. Tier sizes are exclusive thresholds, so
6
6
  // 272,000 implements the official ">272K input tokens" boundary.
7
7
  {
8
8
  id: "gpt-5.5", released: "2026-04-23", source: "https://developers.openai.com/api/docs/pricing",
@@ -11,6 +11,14 @@ export const OFFICIAL_PRICE_SNAPSHOT = {
11
11
  { tier: { type: "context", size: 272_000 }, input: 10, output: 45, cache: { read: 1 } },
12
12
  ],
13
13
  },
14
+ {
15
+ id: "gpt-5.5-fast", providers: ["openai"], released: "2026-04-23", source: "https://developers.openai.com/api/docs/pricing",
16
+ prices: [
17
+ { input: 12.5, output: 75, cache: { read: 1.25 } },
18
+ // OpenAI publishes no Fast rate for GPT-5.5 above 272K input tokens.
19
+ { tier: { type: "context", size: 272_000 } },
20
+ ],
21
+ },
14
22
  {
15
23
  id: "gpt-5.5-pro", released: "2026-04-23", source: "https://developers.openai.com/api/docs/pricing",
16
24
  prices: [
@@ -60,6 +68,50 @@ export const OFFICIAL_PRICE_SNAPSHOT = {
60
68
  { tier: { type: "context", size: 272_000 }, input: 0.2, output: 0.75, cache: { read: 0.02, write: 0.25 } },
61
69
  ],
62
70
  },
71
+ {
72
+ // OpenAI Fast processing is a separate exact ID and restricted to the
73
+ // first-party provider so ordinary or gateway model IDs keep standard rates.
74
+ id: "gpt-6-luna-fast", providers: ["openai"], released: "2026-09-22", source: "https://developers.openai.com/api/docs/pricing",
75
+ prices: [
76
+ { input: 0.2, output: 1, cache: { read: 0.02, write: 0.25 } },
77
+ { tier: { type: "context", size: 272_000 }, input: 0.4, output: 1.5, cache: { read: 0.04, write: 0.5 } },
78
+ ],
79
+ },
80
+ {
81
+ id: "gpt-5.6-sol-fast", providers: ["openai"], released: "2026-07-09", source: "https://developers.openai.com/api/docs/pricing",
82
+ prices: [
83
+ { input: 8, output: 40, cache: { read: 0.8, write: 10 } },
84
+ { tier: { type: "context", size: 272_000 }, input: 16, output: 60, cache: { read: 1.6, write: 20 } },
85
+ ],
86
+ },
87
+ {
88
+ id: "gpt-5.6-terra-fast", providers: ["openai"], released: "2026-07-09", source: "https://developers.openai.com/api/docs/pricing",
89
+ prices: [
90
+ { input: 4, output: 24, cache: { read: 0.4, write: 5 } },
91
+ { tier: { type: "context", size: 272_000 }, input: 8, output: 36, cache: { read: 0.8, write: 10 } },
92
+ ],
93
+ },
94
+ {
95
+ id: "gpt-5.6-luna-fast", providers: ["openai"], released: "2026-07-09", source: "https://developers.openai.com/api/docs/pricing",
96
+ prices: [
97
+ { input: 0.4, output: 2.4, cache: { read: 0.04, write: 0.5 } },
98
+ { tier: { type: "context", size: 272_000 }, input: 0.8, output: 3.6, cache: { read: 0.08, write: 1 } },
99
+ ],
100
+ },
101
+ {
102
+ id: "gpt-6-astra-fast", providers: ["openai"], released: "2026-09-04", source: "https://developers.openai.com/api/docs/pricing",
103
+ prices: [
104
+ { input: 20, output: 100, cache: { read: 2, write: 25 } },
105
+ { tier: { type: "context", size: 272_000 }, input: 40, output: 150, cache: { read: 4, write: 50 } },
106
+ ],
107
+ },
108
+ {
109
+ id: "gpt-6-sol-fast", providers: ["openai"], released: "2026-09-22", source: "https://developers.openai.com/api/docs/pricing",
110
+ prices: [
111
+ { input: 4, output: 20, cache: { read: 0.4, write: 5 } },
112
+ { tier: { type: "context", size: 272_000 }, input: 8, output: 30, cache: { read: 0.8, write: 10 } },
113
+ ],
114
+ },
63
115
  // The official ChatGPT SKU `chat-latest`. OpenRouter serves it under the
64
116
  // slug `openai/gpt-chat-latest`, which is registered as an exact alias.
65
117
  {
@@ -89,6 +141,20 @@ export const OFFICIAL_PRICE_SNAPSHOT = {
89
141
  id: "claude-opus-5", released: "2026-07-24", source: "https://platform.claude.com/docs/en/about-claude/pricing",
90
142
  prices: [{ input: 5, output: 25, cache: { read: 0.5, write: 6.25 } }],
91
143
  },
144
+ {
145
+ // Fast mode is first-party Claude API only. Cache multipliers apply to
146
+ // the Fast input price; aggregate cache writes use the 5-minute rate.
147
+ id: "claude-opus-5-fast", providers: ["anthropic"], released: "2026-07-24", source: "https://platform.claude.com/docs/en/about-claude/pricing",
148
+ prices: [{ input: 10, output: 50, cache: { read: 1, write: 12.5 } }],
149
+ },
150
+ {
151
+ id: "claude-opus-4-8-fast", providers: ["anthropic"], released: "2026-05-28", source: "https://platform.claude.com/docs/en/about-claude/pricing",
152
+ prices: [{ input: 10, output: 50, cache: { read: 1, write: 12.5 } }],
153
+ },
154
+ {
155
+ id: "claude-opus-5-5-fast", providers: ["anthropic"], released: "2026-09-22", source: "https://platform.claude.com/docs/en/about-claude/pricing",
156
+ prices: [{ input: 8, output: 40, cache: { read: 0.4, write: 10 } }],
157
+ },
92
158
  {
93
159
  id: "claude-fable-5-1", aliases: ["claude-fable-5.1"], released: "2026-09-01",
94
160
  source: "https://platform.claude.com/docs/en/about-claude/pricing",
@@ -502,8 +568,14 @@ export function officialPrice(model) {
502
568
  const dot = id.lastIndexOf(".");
503
569
  if (dot >= 0)
504
570
  candidates.push(id.slice(dot + 1));
505
- for (const candidate of candidates) {
571
+ const available = (candidate) => {
506
572
  const entry = index.get(candidate);
573
+ return entry && (!entry.providers || entry.providers.some(provider => provider.toLowerCase() === model.providerID.toLowerCase()))
574
+ ? entry
575
+ : undefined;
576
+ };
577
+ for (const candidate of candidates) {
578
+ const entry = available(candidate);
507
579
  if (entry)
508
580
  return entry;
509
581
  }
@@ -511,7 +583,7 @@ export function officialPrice(model) {
511
583
  for (const suffix of ["-free", ":free"]) {
512
584
  if (!candidate.endsWith(suffix))
513
585
  continue;
514
- const entry = index.get(candidate.slice(0, -suffix.length));
586
+ const entry = available(candidate.slice(0, -suffix.length));
515
587
  if (entry)
516
588
  return entry;
517
589
  }
package/docs/pricing.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # 内置官方价格快照
2
2
 
3
- 插件自 v0.3.0 起,在 OpenCode 当前模型目录没有可用于某条消息的完整价格时,使用本页所列的公开 API 价格补全。若 OpenCode 给出完整零价,而快照能完整计价,则使用快照价格。快照核验于 **2026-09-23**,共收录 79 个模型,金额均为美元 / 100 万 token。
3
+ 插件自 v0.3.0 起,在 OpenCode 当前模型目录没有可用于某条消息的完整价格时,使用本页所列的公开 API 价格补全。若 OpenCode 给出完整零价,而快照能完整计价,则使用快照价格。快照核验于 **2026-09-23**,共收录 86 个模型,金额均为美元 / 100 万 token。
4
4
 
5
5
  ## 规则
6
6
 
7
7
  - 每条 assistant 与 compaction 消息按自身记录的 `providerID`、模型 ID 和 token 用量分别计算。
8
8
  - OpenCode 当前解析出的完整适用非零价格优先。若完整适用价格为零,则尝试使用内置价格;只有快照能完整覆盖该消息实际使用的 token 类别时才覆盖零价,否则保留 OpenCode 的零价。OpenCode 价格不完整时,整条消息回退到内置价格,不混用两套费率。
9
- - 网关模型只通过精确厂商 ID、精确别名及已知包装格式匹配,例如 `openai/gpt-5.6-luna`、`us.anthropic.claude-opus-5` 和 `claude-opus-5@default`。匹配这些现有形式后,也会尝试仅移除模型 ID 的末尾 `-free` 或 `:free` 再精确匹配基础 ID,例如 `mimo-v2.6-flash-free`、`meta/muse-spark-1.3:free` 和 `muse-spark-1.3-contributor-free`;`-pro`、`-fast`、`-free-preview` 等其他后缀不会剥离。不按相似名称猜测。
9
+ - 网关模型只通过精确厂商 ID、精确别名及已知包装格式匹配,例如 `openai/gpt-5.6-luna`、`us.anthropic.claude-opus-5` 和 `claude-opus-5@default`。匹配这些现有形式后,也会尝试仅移除模型 ID 的末尾 `-free` 或 `:free` 再精确匹配基础 ID,例如 `mimo-v2.6-flash-free`、`meta/muse-spark-1.3:free` 和 `muse-spark-1.3-contributor-free`;`-pro`、`-fast`、`-free-preview` 等其他后缀不会剥离。单独列出的 Fast 型号仅按完整 ID 和厂商支持的 provider 精确匹配,不会回退到标准费率。不按相似名称猜测。
10
10
  - 目录首版只新增 2026-03-22 至 2026-09-22 发布、具有明确 token 费率的模型。后续版本只限制新增窗口,已经收录的条目不会因超过半年而自动删除。
11
- - 采用标准同步 API 的公开价;Meta Contributor 条件价按单独标注的来源记录。不含 Batch、Flex、Fast/Priority、区域溢价、网关加价、企业折扣、工具费和税费,因此 Cost 仍是估算,不代表账单。
11
+ - 采用同步 API 的公开价;Meta Contributor 条件价按单独标注的来源记录。仅收录下表明确列出的 Fast 型号,不含 Batch、Flex、其他 Fast/Priority、区域溢价、网关加价、企业折扣、工具费和税费,因此 Cost 仍是估算,不代表账单。
12
12
  - 任一有用量消息仍无法定价时,已知小计标记 `partial`;全部无法定价时显示 `—`。明确零价才显示 `$0.00`。
13
13
  - 促销价按核验日官网显示的费率收录(如 `gpt-5.6-sol`、MiniMax-M3 的"长期 5 折"标价),不用划线原价。
14
14
 
@@ -19,16 +19,23 @@
19
19
  | 模型 | 发布日期 | Input | Output | Cache Read | Cache Write | 长上下文档位 |
20
20
  | --- | --- | ---: | ---: | ---: | ---: | --- |
21
21
  | `gpt-5.5` | 2026-04-23 | 5 | 30 | 0.5 | — | >272K:10 / 45 / 1 / — |
22
+ | `gpt-5.5-fast`(Fast) | 2026-04-23 | 12.5 | 75 | 1.25 | — | >272K:无官方 Fast 费率 |
22
23
  | `gpt-5.5-pro` | 2026-04-23 | 30 | 180 | — | — | >272K:60 / 270 / — / — |
23
24
  | `gpt-5.6-sol` | 2026-07-09 | 4 | 20 | 0.4 | 5 | >272K:8 / 30 / 0.8 / 10 |
25
+ | `gpt-5.6-sol-fast`(Fast) | 2026-07-09 | 8 | 40 | 0.8 | 10 | >272K:16 / 60 / 1.6 / 20 |
24
26
  | `gpt-5.6-terra` | 2026-07-09 | 2 | 12 | 0.2 | 2.5 | >272K:4 / 18 / 0.4 / 5 |
27
+ | `gpt-5.6-terra-fast`(Fast) | 2026-07-09 | 4 | 24 | 0.4 | 5 | >272K:8 / 36 / 0.8 / 10 |
25
28
  | `gpt-5.6-luna` | 2026-07-09 | 0.2 | 1.2 | 0.02 | 0.25 | >272K:0.4 / 1.8 / 0.04 / 0.5 |
29
+ | `gpt-5.6-luna-fast`(Fast) | 2026-07-09 | 0.4 | 2.4 | 0.04 | 0.5 | >272K:0.8 / 3.6 / 0.08 / 1 |
26
30
  | `gpt-6-astra` | 2026-09-04 | 10 | 50 | 1 | 12.5 | >272K:20 / 75 / 2 / 25 |
31
+ | `gpt-6-astra-fast`(Fast) | 2026-09-04 | 20 | 100 | 2 | 25 | >272K:40 / 150 / 4 / 50 |
27
32
  | `gpt-6-sol` | 2026-09-22 | 2 | 10 | 0.2 | 2.5 | >272K:4 / 15 / 0.4 / 5 |
33
+ | `gpt-6-sol-fast`(Fast) | 2026-09-22 | 4 | 20 | 0.4 | 5 | >272K:8 / 30 / 0.8 / 10 |
28
34
  | `gpt-6-luna` | 2026-09-22 | 0.1 | 0.5 | 0.01 | 0.125 | >272K:0.2 / 0.75 / 0.02 / 0.25 |
35
+ | `gpt-6-luna-fast`(Fast) | 2026-09-22 | 0.2 | 1 | 0.02 | 0.25 | >272K:0.4 / 1.5 / 0.04 / 0.5 |
29
36
  | `chat-latest`(别名 `gpt-chat-latest`) | 2026-05-05 | 5 | 30 | 0.5 | — | — |
30
37
 
31
- `gpt-6-sol` 和 `gpt-6-luna` 的发布日期见 [OpenAI API 更新日志](https://developers.openai.com/api/docs/changelog)。表内 OpenAI 长上下文价格在传入 token 超过 272,000 时对整条请求生效。`gpt-5.6-sol` 的当前标准价是限期促销价;快照采用核验日官网显示的费率。`chat-latest` 是官方 ChatGPT SKU,OpenRouter 上的 `gpt-chat-latest` 作为精确别名指向同一条目。
38
+ `gpt-6-sol` 和 `gpt-6-luna` 的发布日期见 [OpenAI API 更新日志](https://developers.openai.com/api/docs/changelog)。表内 OpenAI 长上下文价格在传入 token 超过 272,000 时对整条请求生效。Fast 条目对应官方 Fast processing 费率;API 通过基础模型配合 `service_tier: "fast"` 选择该档,因此只有以对应 `-fast` ID 记录的 OpenAI 消息使用 Fast 价格,其他 provider 不匹配这些条目。官方未公布 `gpt-5.5` Fast 长上下文费率,故超过 272,000 个传入 token 时标记为不可估价,不沿用短上下文价。`gpt-5.6-sol` 的当前标准价是限期促销价;快照采用核验日官网显示的费率。`chat-latest` 是官方 ChatGPT SKU,OpenRouter 上的 `gpt-chat-latest` 作为精确别名指向同一条目。
32
39
 
33
40
  ## Anthropic
34
41
 
@@ -38,16 +45,21 @@
38
45
  | --- | --- | ---: | ---: | ---: | ---: |
39
46
  | `claude-opus-4-7` | 2026-04-14 | 5 | 25 | 0.5 | 6.25 |
40
47
  | `claude-opus-4-8` | 2026-05-28 | 5 | 25 | 0.5 | 6.25 |
48
+ | `claude-opus-4-8-fast`(Fast) | 2026-05-28 | 10 | 50 | 1 | 12.5 |
41
49
  | `claude-fable-5` | 2026-06-07 | 10 | 50 | 1 | 12.5 |
42
50
  | `claude-sonnet-5` | 2026-06-29 | 2 | 10 | 0.2 | 2.5 |
43
51
  | `claude-opus-5` | 2026-07-24 | 5 | 25 | 0.5 | 6.25 |
52
+ | `claude-opus-5-fast`(Fast) | 2026-07-24 | 10 | 50 | 1 | 12.5 |
44
53
  | `claude-fable-5-1` | 2026-09-01 | 10 | 50 | 0.25 | 12.5 |
45
54
  | `claude-opus-5-5` | 2026-09-22 | 4 | 20 | 0.2 | 5 |
55
+ | `claude-opus-5-5-fast`(Fast) | 2026-09-22 | 8 | 40 | 0.4 | 10 |
46
56
 
47
57
  Cache Write 采用官方 5 分钟写入价。OpenCode 的聚合字段不区分 5 分钟与 1 小时 TTL,无法从历史消息可靠应用 1 小时写入价。OpenRouter 的 `claude-opus-4.7`、`claude-opus-4.8`、`claude-opus-5.5` 圆点写法注册为对应条目的精确别名。
48
58
 
49
59
  `claude-opus-5-5` 的 Cache Read 是官方 0.05 倍基础输入价的特殊乘率(多数 Claude 模型为 0.1 倍),按官方标价 $0.20 / M 收录。
50
60
 
61
+ 表中 Claude Fast 条目仅适用于 Claude API 一方。Fast mode 的 Cache Read 和 5 分钟 Cache Write 分别按 Fast 输入价乘以官方缓存倍率计算;OpenCode 聚合的 Cache Write 无法区分 TTL,因此按 5 分钟写入价估算。Opus 5.5 的 Cache Read 为 Fast 输入价的 0.05 倍,其余表列 Fast 型号为 0.1 倍。
62
+
51
63
  ## Google
52
64
 
53
65
  来源:[Gemini Developer API Pricing](https://ai.google.dev/gemini-api/docs/pricing)
@@ -284,7 +296,7 @@ Fugu Ultra 的编排 token 已包含在 API 返回的 input/output 用量中,
284
296
 
285
297
  - Realtime、音频、图片、视频、embedding、按页、按分钟和按工具调用收费的模型无法仅由当前五类 token 用量准确计算。
286
298
  - `grok-4.20`、`grok-4.20-multi-agent` 发布于 2026-03-09,早于目录收录窗口起点 2026-03-22。
287
- - Fast/Priority 等加速档(`claude-opus-*-fast`、`gpt-5.6-*-pro`、`gpt-6-astra-pro`、MiniMax priority 档)不是标准同步价。
299
+ - Fast/Priority 等其他未列出的加速档(例如 `claude-opus-4-7-fast`、`gpt-5.5-pro-fast`、`gpt-6-astra-pro` 和 MiniMax priority 档)不收录;上表列出当前快照中官方定价页明确支持的 GPT 与 Claude Fast 型号。
288
300
  - 其他免费模型(Gemma 系列、`cohere/north-mini-code` 等开源或网关零价款)不设价格条目。
289
301
  - 无法从厂商官方页面确认标准 token 价格的模型不猜价,包括 OpenRouter stealth/alpha 匿名模型、`z-ai/glm-5v-turbo`、`qwen3.6-plus-preview`、腾讯 `hy3-preview` 与 `hy-mt2-*`、`kwaipilot/kat-coder-pro-v2.5` 及其 Air 版本、除上表 OpenCode Zen SKU 外的 `inclusionai/ling-3.0-*`、`bytedance-seed/seed-2.0-code` 等。这些模型目前只能查到 OpenRouter、AtlasCloud、DeepInfra 等网关或第三方报价,不能据此推断厂商标准价。
290
302
  - 浮动别名(`-latest` 指针与 OpenRouter `~` 前缀条目)随底层模型漂移,不收录固定价。
@@ -1,5 +1,17 @@
1
1
  # 验证记录
2
2
 
3
+ ## v0.3.3(GPT 与 Claude Fast 价格)
4
+
5
+ 验证日期:2026-09-23。根据 [OpenAI API Pricing](https://developers.openai.com/api/docs/pricing) 与 [Claude Platform Pricing](https://platform.claude.com/docs/en/about-claude/pricing),为当前快照中官方支持 Fast mode 的 GPT-5.5、GPT-5.6 Sol/Terra/Luna、GPT-6 Astra/Sol/Luna,以及 Claude Opus 4.8/5/5.5 分别加入独立 Fast 条目。Fast 费率按官方长上下文档位与缓存倍率记录;GPT-5.5 Fast 未公布长上下文费率,超过 272,000 个传入 token 时显示不可估价。条目分别限制到官方支持 Fast mode 的 OpenAI 与 Anthropic provider;快照由 76 个模型增至 86 个。
6
+
7
+ | 检查 | 结果 |
8
+ | --- | --- |
9
+ | `npm run typecheck` | 通过 |
10
+ | `npm test` | 51 项通过,覆盖 Fast 费率、缓存倍率、长上下文边界及普通版价格隔离 |
11
+ | `npm run build` | 通过 |
12
+
13
+ 本轮只改动价格目录、对应测试及价格说明,未重跑打包集成 smoke 测试。
14
+
3
15
  ## v0.3.2(GPT-6 Sol / Luna 价格更新,SDK 2.0.11)
4
16
 
5
17
  验证日期:2026-09-23。根据 [OpenAI API 更新日志](https://developers.openai.com/api/docs/changelog),`gpt-6-sol` 和 `gpt-6-luna` 于 2026-09-22 发布;[官方定价页](https://developers.openai.com/api/docs/pricing)列出两者的 Standard 短、长上下文四类 token 费率。内置快照由 72 个模型增至 74 个。根据 [Sol](https://developers.openai.com/api/docs/models/gpt-6-sol) 与 [Luna](https://developers.openai.com/api/docs/models/gpt-6-luna) 模型说明,传入 token 超过 272,000 时才使用长上下文价格;同轮也将已有 OpenAI 条目的边界从 271,999 校正为 272,000。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chenlongapps/opencode-token-usage",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Session-tree token usage, live performance, context window and estimated cost for OpenCode 2",
5
5
  "keywords": [
6
6
  "opencode",