pi-opencode-go-provider 1.0.12 → 1.0.14

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
@@ -69,25 +69,29 @@ pi
69
69
  | Model | API | Type | Context | Max Tokens | Input Cost | Output Cost |
70
70
  |-------|-----|------|---------|------------|------------|-------------|
71
71
  | DeepSeek V4 Flash | Completions | Text | 1.0M | 384K | $0.22 | $0.66 |
72
+ | DeepSeek V4 Flash Vision Exp | Completions | Text + Image | 1.0M | 384K | $0.22 | $0.66 |
72
73
  | DeepSeek V4 Pro (New) | Completions | Text | 1.0M | 384K | $0.66 | $1.98 |
73
74
  | GLM-5.1 | Completions | Text | 203K | 33K | $1.40 | $4.40 |
74
75
  | GLM-5.2 | Completions | Text | 1.0M | 131K | $1.40 | $4.40 |
75
76
  | GLM-5.3 | Completions | Text | 1.0M | 131K | $1.40 | $4.40 |
77
+ | GLM-5.3-Flash (2x usage) | Completions | Text + Image | 1.0M | 131K | $0.07 | $0.25 |
76
78
  | GPT-5.6 Luna | Responses | Text + Image | 1.1M | 128K | $0.20 | $1.20 |
77
- | Grok 4.5 | Responses | Text + Image | 500K | 500K | $2.00 | $6.00 |
79
+ | Grok 4.6 | Completions | Text + Image | 500K | 500K | $2.00 | $6.00 |
78
80
  | Hy3 (8x usage) | Completions | Text | 256K | 64K | $0.02 | $0.07 |
81
+ | Hy4 preview | Completions | Text | 1.0M | 64K | $0.83 | $2.50 |
79
82
  | Kimi K2.6 | Completions | Text + Image | 262K | 66K | $0.95 | $4.00 |
80
83
  | Kimi K2.7 Code | Completions | Text + Image | 262K | 262K | $0.95 | $4.00 |
81
84
  | Kimi K3 (2x usage) | Completions | Text + Image | 1.0M | 131K | $3.00 | $15.00 |
85
+ | LongCat-2.0 | Completions | Text | 1.0M | 131K | $0.30 | $1.20 |
82
86
  | MiMo V2.5 | Completions | Text + Image | 1.0M | 128K | $0.14 | $0.28 |
83
87
  | MiMo V2.5 Pro | Completions | Text | 1.0M | 128K | $0.43 | $0.87 |
84
88
  | MiniMax-M2.7 | Completions | Text | 205K | 131K | $0.30 | $1.20 |
85
89
  | MiniMax-M3 | Anthropic | Text + Image | 1.0M | 131K | $0.30 | $1.20 |
86
90
  | 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 | — | — |
88
91
  | Qwen3.6 Plus | Completions | Text + Image | 1.0M | 66K | $0.50 | $3.00 |
89
92
  | Qwen3.7 Max | Completions | Text | 1.0M | 66K | $2.50 | $7.50 |
90
93
  | Qwen3.7 Plus | Completions | Text + Image | 1.0M | 66K | $0.40 | $1.60 |
94
+ | Qwen3.8 Flash | Anthropic | Text + Image | 1.0M | 131K | $0.15 | $0.47 |
91
95
  | Qwen3.8 Max | Completions | Text + Image | 1.0M | 131K | $2.00 | $6.00 |
92
96
  *Costs are per million tokens. Prices subject to change - check [opencode.ai](https://opencode.ai) for current pricing.*
93
97
 
@@ -1 +1,60 @@
1
- {}
1
+ {
2
+ "grok-4.5": {
3
+ "id": "grok-4.5",
4
+ "name": "Grok 4.5",
5
+ "api": "openai-completions",
6
+ "baseUrl": "https://opencode.ai/zen/go/v1",
7
+ "reasoning": true,
8
+ "thinkingLevelMap": {
9
+ "off": null,
10
+ "minimal": null,
11
+ "low": "low",
12
+ "medium": "medium",
13
+ "high": "high",
14
+ "xhigh": null,
15
+ "max": null
16
+ },
17
+ "input": [
18
+ "text",
19
+ "image"
20
+ ],
21
+ "cost": {
22
+ "input": 2,
23
+ "output": 6,
24
+ "cacheRead": 0.5,
25
+ "cacheWrite": 0
26
+ },
27
+ "contextWindow": 500000,
28
+ "maxTokens": 500000,
29
+ "deprecatedAt": "2026-08-26T02:00:24.732Z"
30
+ },
31
+ "ox-alpha-free": {
32
+ "id": "ox-alpha-free",
33
+ "name": "Ox Alpha Free (Unlimited)",
34
+ "api": "openai-completions",
35
+ "baseUrl": "https://opencode.ai/zen/go/v1",
36
+ "reasoning": true,
37
+ "thinkingLevelMap": {
38
+ "off": null,
39
+ "minimal": null,
40
+ "low": "low",
41
+ "medium": null,
42
+ "high": "high",
43
+ "xhigh": null,
44
+ "max": "max"
45
+ },
46
+ "input": [
47
+ "text",
48
+ "image"
49
+ ],
50
+ "cost": {
51
+ "input": 0,
52
+ "output": 0,
53
+ "cacheRead": 0,
54
+ "cacheWrite": 0
55
+ },
56
+ "contextWindow": 1000000,
57
+ "maxTokens": 131072,
58
+ "deprecatedAt": "2026-08-27T02:00:22.662Z"
59
+ }
60
+ }
package/models.json CHANGED
@@ -42,6 +42,15 @@
42
42
  "api": "openai-completions",
43
43
  "baseUrl": "https://opencode.ai/zen/go/v1",
44
44
  "reasoning": true,
45
+ "thinkingLevelMap": {
46
+ "off": null,
47
+ "minimal": null,
48
+ "low": null,
49
+ "medium": null,
50
+ "high": null,
51
+ "xhigh": null,
52
+ "max": "max"
53
+ },
45
54
  "input": [
46
55
  "text",
47
56
  "image"
@@ -61,6 +70,15 @@
61
70
  "api": "openai-completions",
62
71
  "baseUrl": "https://opencode.ai/zen/go/v1",
63
72
  "reasoning": true,
73
+ "thinkingLevelMap": {
74
+ "off": null,
75
+ "minimal": null,
76
+ "low": "low",
77
+ "medium": null,
78
+ "high": "high",
79
+ "xhigh": null,
80
+ "max": "max"
81
+ },
64
82
  "input": [
65
83
  "text"
66
84
  ],
@@ -93,11 +111,20 @@
93
111
  "maxTokens": 128000
94
112
  },
95
113
  {
96
- "id": "grok-4.5",
97
- "name": "Grok 4.5",
114
+ "id": "grok-4.6",
115
+ "name": "Grok 4.6",
98
116
  "api": "openai-completions",
99
117
  "baseUrl": "https://opencode.ai/zen/go/v1",
100
118
  "reasoning": true,
119
+ "thinkingLevelMap": {
120
+ "off": null,
121
+ "minimal": null,
122
+ "low": "low",
123
+ "medium": "medium",
124
+ "high": "high",
125
+ "xhigh": "xhigh",
126
+ "max": null
127
+ },
101
128
  "input": [
102
129
  "text",
103
130
  "image"
@@ -117,6 +144,15 @@
117
144
  "api": "openai-completions",
118
145
  "baseUrl": "https://opencode.ai/zen/go/v1",
119
146
  "reasoning": true,
147
+ "thinkingLevelMap": {
148
+ "off": null,
149
+ "minimal": null,
150
+ "low": null,
151
+ "medium": null,
152
+ "high": "high",
153
+ "xhigh": null,
154
+ "max": "max"
155
+ },
120
156
  "input": [
121
157
  "text"
122
158
  ],
@@ -135,6 +171,15 @@
135
171
  "api": "openai-completions",
136
172
  "baseUrl": "https://opencode.ai/zen/go/v1",
137
173
  "reasoning": true,
174
+ "thinkingLevelMap": {
175
+ "off": null,
176
+ "minimal": null,
177
+ "low": "low",
178
+ "medium": "medium",
179
+ "high": "high",
180
+ "xhigh": "xhigh",
181
+ "max": "max"
182
+ },
138
183
  "input": [
139
184
  "text",
140
185
  "image"
@@ -191,6 +236,15 @@
191
236
  "api": "openai-completions",
192
237
  "baseUrl": "https://opencode.ai/zen/go/v1",
193
238
  "reasoning": true,
239
+ "thinkingLevelMap": {
240
+ "off": null,
241
+ "minimal": null,
242
+ "low": "low",
243
+ "medium": "medium",
244
+ "high": null,
245
+ "xhigh": "xhigh",
246
+ "max": null
247
+ },
194
248
  "input": [
195
249
  "text",
196
250
  "image"
@@ -224,20 +278,29 @@
224
278
  "maxTokens": 65536
225
279
  },
226
280
  {
227
- "id": "ox-alpha-free",
228
- "name": "Ox Alpha Free (Unlimited)",
229
- "api": "openai-completions",
230
- "baseUrl": "https://opencode.ai/zen/go/v1",
281
+ "id": "qwen3.8-flash",
282
+ "name": "Qwen3.8 Flash",
283
+ "api": "anthropic-messages",
284
+ "baseUrl": "https://opencode.ai/zen/go",
231
285
  "reasoning": true,
286
+ "thinkingLevelMap": {
287
+ "off": null,
288
+ "minimal": null,
289
+ "low": "low",
290
+ "medium": "medium",
291
+ "high": null,
292
+ "xhigh": "xhigh",
293
+ "max": null
294
+ },
232
295
  "input": [
233
296
  "text",
234
297
  "image"
235
298
  ],
236
299
  "cost": {
237
- "input": 0,
238
- "output": 0,
239
- "cacheRead": 0,
240
- "cacheWrite": 0
300
+ "input": 0.15,
301
+ "output": 0.47,
302
+ "cacheRead": 0.016,
303
+ "cacheWrite": 0.2
241
304
  },
242
305
  "contextWindow": 1000000,
243
306
  "maxTokens": 131072
@@ -248,6 +311,15 @@
248
311
  "api": "openai-completions",
249
312
  "baseUrl": "https://opencode.ai/zen/go/v1",
250
313
  "reasoning": true,
314
+ "thinkingLevelMap": {
315
+ "off": null,
316
+ "minimal": null,
317
+ "low": "low",
318
+ "medium": null,
319
+ "high": "high",
320
+ "xhigh": null,
321
+ "max": "max"
322
+ },
251
323
  "input": [
252
324
  "text"
253
325
  ],
@@ -266,6 +338,15 @@
266
338
  "api": "openai-completions",
267
339
  "baseUrl": "https://opencode.ai/zen/go/v1",
268
340
  "reasoning": true,
341
+ "thinkingLevelMap": {
342
+ "off": null,
343
+ "minimal": null,
344
+ "low": null,
345
+ "medium": null,
346
+ "high": "high",
347
+ "xhigh": null,
348
+ "max": "max"
349
+ },
269
350
  "input": [
270
351
  "text"
271
352
  ],
@@ -278,6 +359,24 @@
278
359
  "contextWindow": 1000000,
279
360
  "maxTokens": 131072
280
361
  },
362
+ {
363
+ "id": "longcat-2.0",
364
+ "name": "LongCat-2.0",
365
+ "api": "openai-completions",
366
+ "baseUrl": "https://opencode.ai/zen/go/v1",
367
+ "reasoning": true,
368
+ "input": [
369
+ "text"
370
+ ],
371
+ "cost": {
372
+ "input": 0.3,
373
+ "output": 1.2,
374
+ "cacheRead": 0.006,
375
+ "cacheWrite": 0
376
+ },
377
+ "contextWindow": 1000000,
378
+ "maxTokens": 131072
379
+ },
281
380
  {
282
381
  "id": "qwen3.6-plus",
283
382
  "name": "Qwen3.6 Plus",
@@ -297,6 +396,33 @@
297
396
  "contextWindow": 1000000,
298
397
  "maxTokens": 65536
299
398
  },
399
+ {
400
+ "id": "hy4-preview",
401
+ "name": "Hy4 preview",
402
+ "api": "openai-completions",
403
+ "baseUrl": "https://opencode.ai/zen/go/v1",
404
+ "reasoning": true,
405
+ "thinkingLevelMap": {
406
+ "off": null,
407
+ "minimal": null,
408
+ "low": null,
409
+ "medium": null,
410
+ "high": "high",
411
+ "xhigh": null,
412
+ "max": null
413
+ },
414
+ "input": [
415
+ "text"
416
+ ],
417
+ "cost": {
418
+ "input": 0.834,
419
+ "output": 2.501,
420
+ "cacheRead": 0.042,
421
+ "cacheWrite": 0
422
+ },
423
+ "contextWindow": 1024000,
424
+ "maxTokens": 64000
425
+ },
300
426
  {
301
427
  "id": "glm-5.1",
302
428
  "name": "GLM-5.1",
@@ -339,6 +465,15 @@
339
465
  "api": "openai-completions",
340
466
  "baseUrl": "https://opencode.ai/zen/go/v1",
341
467
  "reasoning": true,
468
+ "thinkingLevelMap": {
469
+ "off": null,
470
+ "minimal": null,
471
+ "low": "low",
472
+ "medium": null,
473
+ "high": "high",
474
+ "xhigh": null,
475
+ "max": null
476
+ },
342
477
  "input": [
343
478
  "text"
344
479
  ],
@@ -357,6 +492,15 @@
357
492
  "api": "openai-completions",
358
493
  "baseUrl": "https://opencode.ai/zen/go/v1",
359
494
  "reasoning": true,
495
+ "thinkingLevelMap": {
496
+ "off": null,
497
+ "minimal": "minimal",
498
+ "low": "low",
499
+ "medium": "medium",
500
+ "high": "high",
501
+ "xhigh": "xhigh",
502
+ "max": null
503
+ },
360
504
  "input": [
361
505
  "text",
362
506
  "image"
@@ -388,5 +532,61 @@
388
532
  },
389
533
  "contextWindow": 262144,
390
534
  "maxTokens": 65536
535
+ },
536
+ {
537
+ "id": "deepseek-v4-flash-vision-exp",
538
+ "name": "DeepSeek V4 Flash Vision Exp",
539
+ "api": "openai-completions",
540
+ "baseUrl": "https://opencode.ai/zen/go/v1",
541
+ "reasoning": true,
542
+ "thinkingLevelMap": {
543
+ "off": null,
544
+ "minimal": null,
545
+ "low": "low",
546
+ "medium": null,
547
+ "high": "high",
548
+ "xhigh": null,
549
+ "max": "max"
550
+ },
551
+ "input": [
552
+ "text",
553
+ "image"
554
+ ],
555
+ "cost": {
556
+ "input": 0.22,
557
+ "output": 0.66,
558
+ "cacheRead": 0.007,
559
+ "cacheWrite": 0
560
+ },
561
+ "contextWindow": 1000000,
562
+ "maxTokens": 384000
563
+ },
564
+ {
565
+ "id": "glm-5.3-flash",
566
+ "name": "GLM-5.3-Flash (2x usage)",
567
+ "api": "openai-completions",
568
+ "baseUrl": "https://opencode.ai/zen/go/v1",
569
+ "reasoning": true,
570
+ "thinkingLevelMap": {
571
+ "off": null,
572
+ "minimal": null,
573
+ "low": "low",
574
+ "medium": null,
575
+ "high": "high",
576
+ "xhigh": null,
577
+ "max": "max"
578
+ },
579
+ "input": [
580
+ "text",
581
+ "image"
582
+ ],
583
+ "cost": {
584
+ "input": 0.075,
585
+ "output": 0.25,
586
+ "cacheRead": 0.015,
587
+ "cacheWrite": 0
588
+ },
589
+ "contextWindow": 1000000,
590
+ "maxTokens": 131072
391
591
  }
392
592
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-opencode-go-provider",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
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,