pi-opencode-go-provider 1.0.11 → 1.0.13

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
@@ -73,9 +73,9 @@ pi
73
73
  | GLM-5.1 | Completions | Text | 203K | 33K | $1.40 | $4.40 |
74
74
  | GLM-5.2 | Completions | Text | 1.0M | 131K | $1.40 | $4.40 |
75
75
  | GLM-5.3 | Completions | Text | 1.0M | 131K | $1.40 | $4.40 |
76
- | GPT-5.6 Luna (2x usage) | Responses | Text + Image | 1.1M | 128K | $0.10 | $0.60 |
76
+ | GPT-5.6 Luna | Responses | Text + Image | 1.1M | 128K | $0.20 | $1.20 |
77
77
  | Grok 4.5 | Responses | Text + Image | 500K | 500K | $2.00 | $6.00 |
78
- | Hy3 | Completions | Text | 256K | 64K | $0.14 | $0.58 |
78
+ | Hy3 (8x usage) | Completions | Text | 256K | 64K | $0.02 | $0.07 |
79
79
  | Kimi K2.6 | Completions | Text + Image | 262K | 66K | $0.95 | $4.00 |
80
80
  | Kimi K2.7 Code | Completions | Text + Image | 262K | 262K | $0.95 | $4.00 |
81
81
  | Kimi K3 (2x usage) | Completions | Text + Image | 1.0M | 131K | $3.00 | $15.00 |
@@ -83,6 +83,8 @@ pi
83
83
  | MiMo V2.5 Pro | Completions | Text | 1.0M | 128K | $0.43 | $0.87 |
84
84
  | MiniMax-M2.7 | Completions | Text | 205K | 131K | $0.30 | $1.20 |
85
85
  | MiniMax-M3 | Anthropic | Text + Image | 1.0M | 131K | $0.30 | $1.20 |
86
+ | Muse Spark 1.2 Contributor | Completions | Text + Image | 1.0M | 131K | $0.10 | $0.20 |
87
+ | Ox Alpha Free (Unlimited) | Completions | Text + Image | 1.0M | 131K | — | — |
86
88
  | Qwen3.6 Plus | Completions | Text + Image | 1.0M | 66K | $0.50 | $3.00 |
87
89
  | Qwen3.7 Max | Completions | Text | 1.0M | 66K | $2.50 | $7.50 |
88
90
  | Qwen3.7 Plus | Completions | Text + Image | 1.0M | 66K | $0.40 | $1.60 |
package/models.json CHANGED
@@ -131,7 +131,7 @@
131
131
  },
132
132
  {
133
133
  "id": "gpt-5.6-luna",
134
- "name": "GPT-5.6 Luna (2x usage)",
134
+ "name": "GPT-5.6 Luna",
135
135
  "api": "openai-completions",
136
136
  "baseUrl": "https://opencode.ai/zen/go/v1",
137
137
  "reasoning": true,
@@ -140,10 +140,10 @@
140
140
  "image"
141
141
  ],
142
142
  "cost": {
143
- "input": 0.1,
144
- "output": 0.6,
145
- "cacheRead": 0.01,
146
- "cacheWrite": 0.125
143
+ "input": 0.2,
144
+ "output": 1.2,
145
+ "cacheRead": 0.02,
146
+ "cacheWrite": 0.25
147
147
  },
148
148
  "contextWindow": 1050000,
149
149
  "maxTokens": 128000
@@ -223,6 +223,34 @@
223
223
  "contextWindow": 1000000,
224
224
  "maxTokens": 65536
225
225
  },
226
+ {
227
+ "id": "ox-alpha-free",
228
+ "name": "Ox Alpha Free (Unlimited)",
229
+ "api": "openai-completions",
230
+ "baseUrl": "https://opencode.ai/zen/go/v1",
231
+ "reasoning": true,
232
+ "thinkingLevelMap": {
233
+ "off": null,
234
+ "minimal": null,
235
+ "low": "low",
236
+ "medium": null,
237
+ "high": "high",
238
+ "xhigh": null,
239
+ "max": "max"
240
+ },
241
+ "input": [
242
+ "text",
243
+ "image"
244
+ ],
245
+ "cost": {
246
+ "input": 0,
247
+ "output": 0,
248
+ "cacheRead": 0,
249
+ "cacheWrite": 0
250
+ },
251
+ "contextWindow": 1000000,
252
+ "maxTokens": 131072
253
+ },
226
254
  {
227
255
  "id": "glm-5.3",
228
256
  "name": "GLM-5.3",
@@ -316,7 +344,7 @@
316
344
  },
317
345
  {
318
346
  "id": "hy3",
319
- "name": "Hy3",
347
+ "name": "Hy3 (8x usage)",
320
348
  "api": "openai-completions",
321
349
  "baseUrl": "https://opencode.ai/zen/go/v1",
322
350
  "reasoning": true,
@@ -324,14 +352,33 @@
324
352
  "text"
325
353
  ],
326
354
  "cost": {
327
- "input": 0.14,
328
- "output": 0.58,
329
- "cacheRead": 0.035,
355
+ "input": 0.0175,
356
+ "output": 0.0725,
357
+ "cacheRead": 0.004375,
330
358
  "cacheWrite": 0
331
359
  },
332
360
  "contextWindow": 256000,
333
361
  "maxTokens": 64000
334
362
  },
363
+ {
364
+ "id": "muse-spark-1.2-contributor",
365
+ "name": "Muse Spark 1.2 Contributor",
366
+ "api": "openai-completions",
367
+ "baseUrl": "https://opencode.ai/zen/go/v1",
368
+ "reasoning": true,
369
+ "input": [
370
+ "text",
371
+ "image"
372
+ ],
373
+ "cost": {
374
+ "input": 0.1,
375
+ "output": 0.2,
376
+ "cacheRead": 0.002,
377
+ "cacheWrite": 0
378
+ },
379
+ "contextWindow": 1048576,
380
+ "maxTokens": 131072
381
+ },
335
382
  {
336
383
  "id": "kimi-k2.6",
337
384
  "name": "Kimi K2.6",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-opencode-go-provider",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Opencode Go provider extension for pi - Fast, efficient GLM, Kimi, and MiniMax models through the opencode.ai API",
5
5
  "type": "module",
6
6
  "main": "index.ts",
package/patch.json CHANGED
@@ -1,4 +1,23 @@
1
1
  {
2
+ "ox-alpha-free": {
3
+ "thinkingLevelMap": {
4
+ "off": null,
5
+ "minimal": null,
6
+ "low": "low",
7
+ "medium": null,
8
+ "high": "high",
9
+ "xhigh": null,
10
+ "max": "max"
11
+ },
12
+ "compat": {
13
+ "supportsStore": false,
14
+ "supportsDeveloperRole": false,
15
+ "maxTokensField": "max_tokens",
16
+ "requiresReasoningContentOnAssistantMessages": true,
17
+ "thinkingFormat": "deepseek",
18
+ "supportsReasoningEffort": true
19
+ }
20
+ },
2
21
  "glm-5.1": {
3
22
  "compat": {
4
23
  "supportsStore": false,
@@ -64,6 +64,28 @@ function getInputTypes(modalities) {
64
64
  if (!filtered.includes('text')) filtered.unshift('text');
65
65
  return filtered;
66
66
  }
67
+ // Canonical pi thinking levels, in picker order. A null entry excludes a level
68
+ // from the picker; a string maps the pi level to the API effort value (identity
69
+ // here, since models.dev reasoning_options values are the raw effort strings).
70
+ const PI_THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
71
+
72
+ // Derive a thinking-level map from models.dev reasoning_options so models that
73
+ // declare effort values (e.g. ox-alpha: low/high/max) get real picker levels
74
+ // without a hand-written patch.json entry. Unadvertised levels and "off" (models
75
+ // that cannot disable thinking, like ox-alpha) map to null.
76
+ function getThinkingLevelMap(model) {
77
+ if (!model.reasoning) return undefined;
78
+ const effort = (model.reasoning_options || []).find((o) => o && o.type === "effort");
79
+ const values = effort && Array.isArray(effort.values) ? effort.values.filter((v) => typeof v === "string") : [];
80
+ if (values.length === 0) return undefined;
81
+ const supported = new Set(values);
82
+ const map = {};
83
+ for (const level of PI_THINKING_LEVELS) {
84
+ map[level] = supported.has(level) ? level : null;
85
+ }
86
+ return map;
87
+ }
88
+
67
89
 
68
90
  // Get API label for display
69
91
  function getApiLabel(api) {
@@ -90,6 +112,9 @@ function convertModel(model) {
90
112
  api,
91
113
  baseUrl,
92
114
  reasoning: model.reasoning || false,
115
+ // JSON.stringify drops undefined-valued keys, so models without effort
116
+ // metadata simply emit no thinkingLevelMap field.
117
+ thinkingLevelMap: getThinkingLevelMap(model),
93
118
  input: inputTypes,
94
119
  cost: {
95
120
  input: cost.input || 0,