opencode-magpie-plugin 0.1.7 → 0.1.9

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
@@ -93,7 +93,7 @@ Routing group(例如 `group/auto`)会跨多个服务路由,因此不按 `o
93
93
 
94
94
  支持 Fast 的模型会额外显示一个 `-fast` 模型,例如 `composer-2.5` / `composer-2.5-fast`,显示名为 `Composer 2.5` / `Composer 2.5 Fast`。选择 Fast 后仍向 Magpie 发送原模型 ID,同时附带 `service_tier: "priority"`,并保留原有思考档位。检测依据是 `/v1/models` 的 `service_tiers` 包含 `priority`;旧网关漏报时,补读本机 Magpie 配置目录的 `plugin-providers.json` 中 Cursor 的 `fast: true` 或插件的 `serviceTiers`。仅扩展网关当前列出的模型,已有同名 `-fast` 模型优先,刷新时同步增删。
95
95
 
96
- Fast 模型暂沿用原模型的参考单价,不代表 Fast 实际费率;实际加价以 Magpie 或服务账单为准。缺少原模型报价时仍按未知价格处理。
96
+ Fast 模型优先采用内置表中明确登记的 Fast 费率及上下文档位;没有独立 Fast 费率时仍沿用原模型参考价,不代表 Fast 实际费率。缺少原模型报价时仍按未知价格处理。
97
97
 
98
98
  根据 `native_endpoints` 选择 OpenCode 内置 runtime:
99
99
 
@@ -142,10 +142,22 @@ MAGPIE_ADDR=127.0.0.1:3426 opencode --standalone
142
142
 
143
143
  1. 内置价格表,优先应用已识别 provider 的专属覆盖。
144
144
  2. 内置表未覆盖时,使用 Magpie 返回的 `magpie_price`。
145
- 3. 普通模型仍缺价时,查询 models.dev 本地缓存:优先同 provider 的精确 ID,再查已识别厂商(OpenAI、Anthropic、DeepSeek、Google、xAI)的精确 ID 或 `canonical_model_id`。不跨版本猜价、不采用其他转售商报价、不使用订阅 plan 目录的零价。
146
- 4. 所有来源均没有价格时,不启用该模型,避免把未知价格显示为免费。**路由组例外**:Magpie 只在组内全部成员同价时才给组报价,而路由组每一轮的成员由路由决定,成本本来就是一个区间而不是单一数字。这类组保持可选用、保留自己的名字,只是费用读数不精确。路由分组仍只用 Magpie 报价,不根据 `auto-*` 名称推断成员价格。
145
+ 3. 普通模型仍缺价时,查询 models.dev 本地缓存:优先同 provider 的精确 ID,再查已识别厂商(OpenAI、Anthropic、DeepSeek、Google、xAI、Meta)的精确 ID 或 `canonical_model_id`。不跨版本猜价、不采用其他转售商报价、不使用订阅 plan 目录的零价。
146
+ 4. 所有来源均没有价格时,模型仍然列出、仍然可选,只是不填 `cost`。空费用不是 0 元,OpenCode 不会把它当成免费;实际费用以 Magpie 或服务账单为准。**路由组**同样如此:Magpie 只在组内全部成员同价时才给组报价,而路由组每一轮的成员由路由决定,成本本来就是一个区间而不是单一数字。路由分组仍只用 Magpie 报价,不根据 `auto-*` 名称推断成员价格。
147
147
 
148
- models.dev 缓存写入 `$XDG_CACHE_HOME/opencode-magpie-plugin/models.json`(默认 `~/.cache/opencode-magpie-plugin/models.json`)。首次可只读复用 Magpie、OpenCode 的 `models.json`;下载只写插件自己的目录。每次模型刷新检查缓存,超过 24 小时后台更新,缺价时可提前到 6 小时;同进程下载去重且失败后至少间隔 6 小时重试。首次下载和更新不阻塞模型发现,成功后下一次 30 秒刷新采用新目录;离线保留旧缓存。下载源为 `https://models.dev/api.json`,仍然零运行时依赖,目前只采用基础价,未接入阶梯价。
148
+ models.dev 缓存写入 `$XDG_CACHE_HOME/opencode-magpie-plugin/models.json`(默认 `~/.cache/opencode-magpie-plugin/models.json`)。首次可只读复用 Magpie、OpenCode 的 `models.json`;下载只写插件自己的目录。每次模型刷新检查缓存,超过 24 小时后台更新,缺价时可提前到 6 小时;同进程下载去重且失败后至少间隔 6 小时重试。首次下载和更新不阻塞模型发现,成功后下一次 30 秒刷新采用新目录;离线保留旧缓存。下载源为 `https://models.dev/api.json`,仍然零运行时依赖,基础价和 context 阶梯价一并传给 OpenCode。
149
+
150
+ ### 0.1.9
151
+
152
+ - 缺价模型不再从选择器里拿掉:仍然列出、仍然可选,只是不填 `cost`。空费用不是 0 元,也不代表实际免费。
153
+ - `muse-*` 在 Magpie 未报价时,回退到 models.dev 的 Meta 官方价,不采用转售商报价。Muse Wonder 1.0 为输入/输出/缓存读 `$4/$20/$0.20`,Muse Spark 1.3 为 `$1.25/$4.25/$0.15`。单位为美元/百万 token。这是 Meta 标价,不是 Cursor 账单价。
154
+
155
+ ### 0.1.8
156
+
157
+ - 修复上下文阶梯价丢失:保留内置表、models.dev 的 `tier.type=context` 与 Magpie 的 `above` 分档,交给 OpenCode 根据单次输入(含缓存)选择整单费率。
158
+ - GPT-6 Astra 标准价为输入/输出/缓存读/缓存写 `$10/$50/$1/$12.5`,超过 272K 输入后为 `$20/$75/$2/$25`;Fast 两档均为标准价的两倍。单位为美元/百万 token。
159
+ - 同步补齐 GPT-6 Sol、GPT-6 Luna、GPT-6.1 Sol 的 Standard/Fast 长上下文分档;GPT-6.1 Sol 独立使用 `$0.10` 缓存读取价,不再回退到旧 Sol 的 `$0.20`。依据 [OpenAI 官方价格表](https://developers.openai.com/api/docs/pricing)(2026-10-18)。
160
+ - 自动派生 Fast 模型优先使用已登记的独立 Fast 价格;保留 provider 覆盖、未知价格及路由组原有策略。
149
161
 
150
162
  ### 0.1.7
151
163
 
@@ -168,7 +180,7 @@ Cursor 使用 `cursor` 覆盖,WorkBuddy 使用 `codebuddy` 覆盖;其他已
168
180
  所有价格单位都是 **美元 / 百万 token**。OpenCode 用这些单价计算请求费用。普通计费的概念公式为:
169
181
 
170
182
  ```text
171
- 费用 = (非缓存输入 × input + 输出 × output
183
+ 费用 = (非缓存输入 × input + (可见输出 + 推理) × output
172
184
  + 缓存读取 × cache.read + 缓存写入 × cache.write) / 1,000,000
173
185
  ```
174
186
 
@@ -180,7 +192,7 @@ Cursor 使用 `cursor` 覆盖,WorkBuddy 使用 `codebuddy` 覆盖;其他已
180
192
  - Magpie 用户自定义价格不会覆盖已命中的内置价格表。
181
193
  - Routing group 可能动态切换成员,目录价格不保证等于实际被选成员的价格。
182
194
  - Cursor 等服务的 `usage.magpie_deferred` 是迟到用量,Magpie 会补记到账本;OpenCode 原生 runtime 不会因此修改历史费用。
183
- - 当前价格映射不支持 Magpie 的上下文阶梯价和独立的一小时缓存写入价。
195
+ - 当前价格映射仍不支持 Magpie 独立的一小时缓存写入价。
184
196
 
185
197
  因此,OpenCode 费用适合观察 token 成本,**不能承诺与 Magpie 或订阅服务最终账单完全一致**。
186
198
 
package/dist/index.d.mts CHANGED
@@ -41,6 +41,10 @@ type ModelInfo2 = {
41
41
  read: number;
42
42
  write: number;
43
43
  };
44
+ tier?: {
45
+ type: 'context';
46
+ size: number;
47
+ };
44
48
  }[];
45
49
  package?: string;
46
50
  settings?: Record<string, unknown>;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as getModelPricing } from "./model-pricing--x7wwPba.mjs";
1
+ import { i as resolveModelPricingKey, n as getModelPricing } from "./model-pricing-BbteicIQ.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { access, mkdir, readFile, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
4
4
  import { homedir } from "node:os";
@@ -7,6 +7,93 @@ import { spawn } from "node:child_process";
7
7
  import { constants } from "node:fs";
8
8
  import { setTimeout } from "node:timers/promises";
9
9
 
10
+ //#region src/opencode.ts
11
+ const createTrackedSetup = () => {
12
+ const registrations = [];
13
+ return {
14
+ track: async (registration) => {
15
+ registrations.push(await registration);
16
+ },
17
+ cleanup: async () => {
18
+ await registrations.splice(0).reverse().reduce(async (previous, registration) => {
19
+ await previous;
20
+ await registration.dispose().catch(() => {});
21
+ }, Promise.resolve());
22
+ }
23
+ };
24
+ };
25
+ const reloadProviderCatalog = async (ctx) => {
26
+ await ctx.provider?.reload();
27
+ };
28
+ /** USD per million tokens. Missing cache rates retain the original registry's zero fallback. */
29
+ const normalizeModelCosts = (cost) => {
30
+ if (!cost || typeof cost !== "object") return [];
31
+ const value = cost;
32
+ if (typeof value.input !== "number" || !Number.isFinite(value.input) || typeof value.output !== "number" || !Number.isFinite(value.output)) return [];
33
+ const base = {
34
+ input: value.input,
35
+ output: value.output,
36
+ cache: {
37
+ read: value.cache?.read ?? value.cache_read ?? 0,
38
+ write: value.cache?.write ?? value.cache_write ?? 0
39
+ }
40
+ };
41
+ const valid = (rate) => typeof rate === "number" && Number.isFinite(rate) && rate >= 0;
42
+ if (![
43
+ base.input,
44
+ base.output,
45
+ base.cache.read,
46
+ base.cache.write
47
+ ].every(valid)) return [];
48
+ const result = [base];
49
+ for (const raw of Array.isArray(value.tiers) ? value.tiers : []) {
50
+ if (!raw || typeof raw !== "object") continue;
51
+ const entry = raw;
52
+ const size = entry.tier ? entry.tier.type === "context" ? entry.tier.size : void 0 : entry.above;
53
+ if (!valid(size) || !Number.isInteger(size)) continue;
54
+ const rates = {
55
+ input: entry.input ?? base.input,
56
+ output: entry.output ?? base.output,
57
+ cache: {
58
+ read: entry.cache?.read ?? entry.cache_read ?? base.cache.read,
59
+ write: entry.cache?.write ?? entry.cache_write ?? base.cache.write
60
+ }
61
+ };
62
+ if (![
63
+ rates.input,
64
+ rates.output,
65
+ rates.cache.read,
66
+ rates.cache.write
67
+ ].every(valid)) continue;
68
+ result.push({
69
+ ...rates,
70
+ tier: {
71
+ type: "context",
72
+ size
73
+ }
74
+ });
75
+ }
76
+ return result;
77
+ };
78
+ const toClassicModelInfo = (providerID, catalogID, entry) => ({
79
+ id: catalogID,
80
+ modelID: entry.id,
81
+ providerID,
82
+ name: entry.name,
83
+ capabilities: {
84
+ tools: entry.tool_call !== false,
85
+ input: entry.modalities?.input?.length ? entry.modalities.input : ["text"],
86
+ output: entry.modalities?.output?.length ? entry.modalities.output : ["text"]
87
+ },
88
+ limit: { ...entry.limit },
89
+ variants: [],
90
+ status: "active",
91
+ enabled: true,
92
+ time: { released: 0 },
93
+ cost: normalizeModelCosts(entry.cost)
94
+ });
95
+
96
+ //#endregion
10
97
  //#region src/catalog-cache.ts
11
98
  /**
12
99
  * models.dev catalog, read the way Magpie reads it.
@@ -133,13 +220,10 @@ const catalogPrice = (cost) => {
133
220
  cost.cache_read ?? 0,
134
221
  cost.cache_write ?? 0
135
222
  ].some((n) => typeof n !== "number" || !Number.isFinite(n) || n < 0)) return void 0;
223
+ const [base, ...tiers] = normalizeModelCosts(cost);
136
224
  return {
137
- input: cost.input,
138
- output: cost.output,
139
- cache: {
140
- read: cost.cache_read ?? 0,
141
- write: cost.cache_write ?? 0
142
- }
225
+ ...base,
226
+ ...tiers.length ? { tiers } : {}
143
227
  };
144
228
  };
145
229
  /**
@@ -159,7 +243,7 @@ const lookupCatalogPrice = (catalog, maker, modelID) => {
159
243
  const id = modelID.replace(/@\d+(?:k|m)$/i, "").toLowerCase();
160
244
  const own = priceInProvider(catalog, maker, id);
161
245
  if (own) return own;
162
- const vendor = /^(?:gpt-|o[134](?:-|$))/.test(id) ? "openai" : id.startsWith("claude-") ? "anthropic" : id.startsWith("deepseek-") ? "deepseek" : id.startsWith("gemini-") ? "google" : id.startsWith("grok-") ? "xai" : void 0;
246
+ const vendor = /^(?:gpt-|o[134](?:-|$))/.test(id) ? "openai" : id.startsWith("claude-") ? "anthropic" : id.startsWith("deepseek-") ? "deepseek" : id.startsWith("gemini-") ? "google" : id.startsWith("grok-") ? "xai" : id.startsWith("muse-") ? "meta" : void 0;
163
247
  return vendor && vendor !== maker ? priceInProvider(catalog, vendor, id) : void 0;
164
248
  };
165
249
  const priceInProvider = (catalog, maker, id) => {
@@ -177,57 +261,6 @@ const priceInProvider = (catalog, maker, id) => {
177
261
  return prices.length && prices.every((price$1) => JSON.stringify(price$1) === JSON.stringify(prices[0])) ? prices[0] : void 0;
178
262
  };
179
263
 
180
- //#endregion
181
- //#region src/opencode.ts
182
- const createTrackedSetup = () => {
183
- const registrations = [];
184
- return {
185
- track: async (registration) => {
186
- registrations.push(await registration);
187
- },
188
- cleanup: async () => {
189
- await registrations.splice(0).reverse().reduce(async (previous, registration) => {
190
- await previous;
191
- await registration.dispose().catch(() => {});
192
- }, Promise.resolve());
193
- }
194
- };
195
- };
196
- const reloadProviderCatalog = async (ctx) => {
197
- await ctx.provider?.reload();
198
- };
199
- /** USD per million tokens. Missing cache rates retain the original registry's zero fallback. */
200
- const normalizeModelCosts = (cost) => {
201
- if (!cost || typeof cost !== "object") return [];
202
- const value = cost;
203
- if (typeof value.input !== "number" || !Number.isFinite(value.input) || typeof value.output !== "number" || !Number.isFinite(value.output)) return [];
204
- return [{
205
- input: value.input,
206
- output: value.output,
207
- cache: {
208
- read: value.cache?.read ?? value.cache_read ?? 0,
209
- write: value.cache?.write ?? value.cache_write ?? 0
210
- }
211
- }];
212
- };
213
- const toClassicModelInfo = (providerID, catalogID, entry) => ({
214
- id: catalogID,
215
- modelID: entry.id,
216
- providerID,
217
- name: entry.name,
218
- capabilities: {
219
- tools: entry.tool_call !== false,
220
- input: entry.modalities?.input?.length ? entry.modalities.input : ["text"],
221
- output: entry.modalities?.output?.length ? entry.modalities.output : ["text"]
222
- },
223
- limit: { ...entry.limit },
224
- variants: [],
225
- status: "active",
226
- enabled: true,
227
- time: { released: 0 },
228
- cost: normalizeModelCosts(entry.cost)
229
- });
230
-
231
264
  //#endregion
232
265
  //#region src/catalog.ts
233
266
  /** Whether any model Magpie lists has no price in any source, which asks for a fresher catalog. */
@@ -307,8 +340,6 @@ const buildInventory = (rows, baseURL, options = {}) => {
307
340
  modalities: row.modalities,
308
341
  tool_call: true
309
342
  });
310
- if (!cost && !group) model.name += " (价格未知)";
311
- model.enabled = !!cost || group;
312
343
  const anthropic = row.native_endpoints?.includes("/v1/messages");
313
344
  const responses = !anthropic && row.native_endpoints?.includes("/v1/responses");
314
345
  model.package = anthropic ? "@opencode/ai/providers/anthropic-compatible" : responses ? "@opencode/ai/providers/openai-compatible/responses" : "@opencode/ai/providers/openai-compatible";
@@ -345,10 +376,14 @@ const buildInventory = (rows, baseURL, options = {}) => {
345
376
  ...entry,
346
377
  models: entry.models.flatMap((model) => {
347
378
  if (!fastModelIDs.has(model.modelID) || /-fast(?:@\d+[km])?$/i.test(model.id) || ids.has(`${model.id}-fast`)) return [model];
379
+ const row = rows.find((row$1) => row$1.id === model.modelID);
380
+ const fastKey = `${model.id.replace(/@\d+(?:k|m)$/i, "")}-fast`;
381
+ const fastPrice = row && !row.id.startsWith("group/") && resolveModelPricingKey(fastKey)?.endsWith("-fast") ? getModelPricing(fastKey, pricingProvider(row.owned_by)) : void 0;
348
382
  return [model, {
349
383
  ...model,
350
384
  id: `${model.id}-fast`,
351
- name: `${model.name.replace(/ \(价格未知\)$/, "")} Fast${model.enabled ? "" : " (价格未知)"}`,
385
+ cost: fastPrice ? normalizeModelCosts(fastPrice) : model.cost,
386
+ name: `${model.name} Fast`,
352
387
  body: {
353
388
  ...model.body,
354
389
  service_tier: "priority"
@@ -47,6 +47,7 @@ const MODEL_PRICING_ALIASES = {
47
47
  "gpt-5-6-sol": "gpt-5.6-sol",
48
48
  "gpt-5-6-terra": "gpt-5.6-terra",
49
49
  "gpt-5-6-luna": "gpt-5.6-luna",
50
+ "gpt-6-1-sol": "gpt-6.1-sol",
50
51
  "hy3-ioa": "hy-3",
51
52
  hy3: "hy-3",
52
53
  "hy-4-preview": "hy4-preview",
@@ -591,7 +592,19 @@ const MODEL_PRICINGS = {
591
592
  cache: {
592
593
  read: 1,
593
594
  write: 12.5
594
- }
595
+ },
596
+ tiers: [{
597
+ input: 20,
598
+ output: 75,
599
+ cache: {
600
+ read: 2,
601
+ write: 25
602
+ },
603
+ tier: {
604
+ type: "context",
605
+ size: 272e3
606
+ }
607
+ }]
595
608
  } },
596
609
  "gpt-6-astra-fast": { default: {
597
610
  input: 20,
@@ -599,7 +612,19 @@ const MODEL_PRICINGS = {
599
612
  cache: {
600
613
  read: 2,
601
614
  write: 25
602
- }
615
+ },
616
+ tiers: [{
617
+ input: 40,
618
+ output: 150,
619
+ cache: {
620
+ read: 4,
621
+ write: 50
622
+ },
623
+ tier: {
624
+ type: "context",
625
+ size: 272e3
626
+ }
627
+ }]
603
628
  } },
604
629
  "gpt-6-sol": { default: {
605
630
  input: 2,
@@ -607,7 +632,39 @@ const MODEL_PRICINGS = {
607
632
  cache: {
608
633
  read: .2,
609
634
  write: 2.5
610
- }
635
+ },
636
+ tiers: [{
637
+ input: 4,
638
+ output: 15,
639
+ cache: {
640
+ read: .4,
641
+ write: 5
642
+ },
643
+ tier: {
644
+ type: "context",
645
+ size: 272e3
646
+ }
647
+ }]
648
+ } },
649
+ "gpt-6-sol-fast": { default: {
650
+ input: 4,
651
+ output: 20,
652
+ cache: {
653
+ read: .4,
654
+ write: 5
655
+ },
656
+ tiers: [{
657
+ input: 8,
658
+ output: 30,
659
+ cache: {
660
+ read: .8,
661
+ write: 10
662
+ },
663
+ tier: {
664
+ type: "context",
665
+ size: 272e3
666
+ }
667
+ }]
611
668
  } },
612
669
  "gpt-6-luna": { default: {
613
670
  input: .1,
@@ -615,7 +672,79 @@ const MODEL_PRICINGS = {
615
672
  cache: {
616
673
  read: .01,
617
674
  write: .125
618
- }
675
+ },
676
+ tiers: [{
677
+ input: .2,
678
+ output: .75,
679
+ cache: {
680
+ read: .02,
681
+ write: .25
682
+ },
683
+ tier: {
684
+ type: "context",
685
+ size: 272e3
686
+ }
687
+ }]
688
+ } },
689
+ "gpt-6-luna-fast": { default: {
690
+ input: .2,
691
+ output: 1,
692
+ cache: {
693
+ read: .02,
694
+ write: .25
695
+ },
696
+ tiers: [{
697
+ input: .4,
698
+ output: 1.5,
699
+ cache: {
700
+ read: .04,
701
+ write: .5
702
+ },
703
+ tier: {
704
+ type: "context",
705
+ size: 272e3
706
+ }
707
+ }]
708
+ } },
709
+ "gpt-6.1-sol": { default: {
710
+ input: 2,
711
+ output: 10,
712
+ cache: {
713
+ read: .1,
714
+ write: 2.5
715
+ },
716
+ tiers: [{
717
+ input: 4,
718
+ output: 15,
719
+ cache: {
720
+ read: .2,
721
+ write: 5
722
+ },
723
+ tier: {
724
+ type: "context",
725
+ size: 272e3
726
+ }
727
+ }]
728
+ } },
729
+ "gpt-6.1-sol-fast": { default: {
730
+ input: 4,
731
+ output: 20,
732
+ cache: {
733
+ read: .2,
734
+ write: 5
735
+ },
736
+ tiers: [{
737
+ input: 8,
738
+ output: 30,
739
+ cache: {
740
+ read: .4,
741
+ write: 10
742
+ },
743
+ tier: {
744
+ type: "context",
745
+ size: 272e3
746
+ }
747
+ }]
619
748
  } },
620
749
  "gpt-5.5": {
621
750
  default: {
@@ -767,7 +896,11 @@ const MODEL_PRICINGS = {
767
896
  const clonePricing = (pricing) => ({
768
897
  input: pricing.input,
769
898
  output: pricing.output,
770
- ...pricing.cache ? { cache: { ...pricing.cache } } : {}
899
+ ...pricing.cache ? { cache: { ...pricing.cache } } : {},
900
+ ...pricing.tiers ? { tiers: pricing.tiers.map((entry) => ({
901
+ ...clonePricing(entry),
902
+ tier: { ...entry.tier }
903
+ })) } : {}
771
904
  });
772
905
  const stripProviderSuffixes = (key) => {
773
906
  const suffix = PROVIDER_MODEL_SUFFIXES.find((candidate) => key.endsWith(candidate));
@@ -12,6 +12,12 @@ interface ModelPricing {
12
12
  read?: number;
13
13
  write?: number;
14
14
  };
15
+ tiers?: (Omit<ModelPricing, 'tiers'> & {
16
+ tier: {
17
+ type: 'context';
18
+ size: number;
19
+ };
20
+ })[];
15
21
  }
16
22
  type ModelPricingProvider = 'astra' | 'boxai' | 'codebuddy' | 'cursor' | 'imate' | 'kalm';
17
23
  /**
@@ -1,3 +1,3 @@
1
- import { i as resolveModelPricingKey, n as getModelPricing, r as getRequiredModelPricing, t as getAllModelPricings } from "./model-pricing--x7wwPba.mjs";
1
+ import { i as resolveModelPricingKey, n as getModelPricing, r as getRequiredModelPricing, t as getAllModelPricings } from "./model-pricing-BbteicIQ.mjs";
2
2
 
3
3
  export { getAllModelPricings, getModelPricing, getRequiredModelPricing, resolveModelPricingKey };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-magpie-plugin",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Discover Magpie providers and models in OpenCode V2 with built-in pricing and automatic local gateway startup",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",