pi-io-provider 1.1.3 → 1.1.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 +24 -25
- package/deprecated-models.json +25 -1
- package/models.json +70 -92
- package/package.json +1 -1
- package/scripts/update-models.js +107 -3
package/README.md
CHANGED
|
@@ -16,36 +16,35 @@ A [pi](https://github.com/badlogic/pi-mono) extension that adds [IO Intelligence
|
|
|
16
16
|
|
|
17
17
|
| Model | ID | Context | Max Output | Vision | Reasoning | Cache | Input $/M | Output $/M |
|
|
18
18
|
|-------|----|---------|------------|--------|-----------|-------|-----------|------------|
|
|
19
|
-
| Kimi K2.5 | `moonshotai/Kimi-K2.5` | 262K | 262K | ✅ | ✅ | ✅ | $0.56 | $2.
|
|
20
|
-
| Kimi K2.6 | `moonshotai/Kimi-K2.6` | 262K | 262K | ✅ | ✅ | ✅ | $0.
|
|
21
|
-
| Kimi K2.7 Code | `moonshotai/Kimi-K2.7-Code` | 262K | 262K | ✅ | ✅ | ✅ | $1.
|
|
22
|
-
| Kimi K3 | `moonshotai/Kimi-K3` | 1.0M | 1.0M | ✅ | ✅ | ✅ | $3.
|
|
23
|
-
| Qwen3.6 27B | `Qwen/Qwen3.6-27B` | 33K | 33K | ✅ | ✅ | ✅ | $0.37 | $3.
|
|
24
|
-
| Qwen3.6 35B A3B | `Qwen/Qwen3.6-35B-A3B` | 262K | 262K | ✅ | ✅ | ✅ | $0.
|
|
19
|
+
| Kimi K2.5 | `moonshotai/Kimi-K2.5` | 262K | 262K | ✅ | ✅ | ✅ | $0.56 | $2.94 |
|
|
20
|
+
| Kimi K2.6 | `moonshotai/Kimi-K2.6` | 262K | 262K | ✅ | ✅ | ✅ | $0.86 | $3.64 |
|
|
21
|
+
| Kimi K2.7 Code | `moonshotai/Kimi-K2.7-Code` | 262K | 262K | ✅ | ✅ | ✅ | $1.01 | $4.53 |
|
|
22
|
+
| Kimi K3 | `moonshotai/Kimi-K3` | 1.0M | 1.0M | ✅ | ✅ | ✅ | $3.90 | $18.00 |
|
|
23
|
+
| Qwen3.6 27B | `Qwen/Qwen3.6-27B` | 33K | 33K | ✅ | ✅ | ✅ | $0.37 | $3.03 |
|
|
24
|
+
| Qwen3.6 35B A3B | `Qwen/Qwen3.6-35B-A3B` | 262K | 262K | ✅ | ✅ | ✅ | $0.18 | $1.12 |
|
|
25
25
|
| DeepSeek R1 0528 | `deepseek-ai/DeepSeek-R1-0528` | 128K | 128K | ❌ | ✅ | ✅ | $0.57 | $2.28 |
|
|
26
|
-
| DeepSeek V3.2 | `deepseek-ai/DeepSeek-V3.2` | 164K | 164K | ❌ | ✅ | ✅ | $0.
|
|
27
|
-
| DeepSeek V4 Flash | `deepseek-ai/DeepSeek-V4-Flash` | 33K | 33K | ❌ | ✅ | ✅ | $0.
|
|
28
|
-
| DeepSeek V4 Flash 0731 | `deepseek-ai/DeepSeek-V4-Flash-0731` | 262K | 66K | ❌ | ✅ | ✅ | $0.
|
|
29
|
-
| DeepSeek V4 Pro | `deepseek-ai/DeepSeek-V4-Pro` | 1.0M | 600K | ❌ | ✅ | ✅ | $1.
|
|
30
|
-
| Gemma 4 26B A4B | `google/gemma-4-26b-a4b-it` | 262K | 262K | ❌ | ✅ | ✅ | $0.
|
|
31
|
-
| MiniMax M2.5 | `MiniMaxAI/MiniMax-M2.5` | 197K | 197K | ❌ | ✅ | ✅ | $0.
|
|
32
|
-
| MiniMax M2.7 | `MiniMaxAI/MiniMax-M2.7` | 262K | 66K | ❌ | ✅ | ✅ | $0.
|
|
26
|
+
| DeepSeek V3.2 | `deepseek-ai/DeepSeek-V3.2` | 164K | 164K | ❌ | ✅ | ✅ | $0.39 | $1.09 |
|
|
27
|
+
| DeepSeek V4 Flash | `deepseek-ai/DeepSeek-V4-Flash` | 33K | 33K | ❌ | ✅ | ✅ | $0.14 | $0.28 |
|
|
28
|
+
| DeepSeek V4 Flash 0731 | `deepseek-ai/DeepSeek-V4-Flash-0731` | 262K | 66K | ❌ | ✅ | ✅ | $0.16 | $0.33 |
|
|
29
|
+
| DeepSeek V4 Pro | `deepseek-ai/DeepSeek-V4-Pro` | 1.0M | 600K | ❌ | ✅ | ✅ | $1.51 | $3.05 |
|
|
30
|
+
| Gemma 4 26B A4B | `google/gemma-4-26b-a4b-it` | 262K | 262K | ❌ | ✅ | ✅ | $0.12 | $0.42 |
|
|
31
|
+
| MiniMax M2.5 | `MiniMaxAI/MiniMax-M2.5` | 197K | 197K | ❌ | ✅ | ✅ | $0.27 | $1.07 |
|
|
32
|
+
| MiniMax M2.7 | `MiniMaxAI/MiniMax-M2.7` | 262K | 66K | ❌ | ✅ | ✅ | $0.43 | $1.62 |
|
|
33
33
|
| Kimi K2 Thinking | `moonshotai/Kimi-K2-Thinking` | 262K | 262K | ❌ | ✅ | ✅ | $0.60 | $2.50 |
|
|
34
|
-
| gpt-oss-120b | `openai/gpt-oss-120b` | 131K | 131K | ❌ | ✅ | ✅ | $0.
|
|
35
|
-
| gpt-oss-20b | `openai/gpt-oss-20b` | 64K | 64K | ❌ | ✅ | ✅ | $0.
|
|
34
|
+
| gpt-oss-120b | `openai/gpt-oss-120b` | 131K | 131K | ❌ | ✅ | ✅ | $0.18 | $0.71 |
|
|
35
|
+
| gpt-oss-20b | `openai/gpt-oss-20b` | 64K | 64K | ❌ | ✅ | ✅ | $0.06 | $0.22 |
|
|
36
36
|
| MiMo-V2.5 | `XiaomiMiMo/MiMo-V2.5` | 262K | 262K | ❌ | ✅ | ✅ | $0.20 | $0.64 |
|
|
37
37
|
| GLM-4.5-Air | `zai-org/GLM-4.5-Air` | 131K | 131K | ❌ | ✅ | ✅ | $0.16 | $0.94 |
|
|
38
38
|
| GLM 4.6 | `zai-org/GLM-4.6` | 131K | 131K | ❌ | ✅ | ✅ | $0.54 | $2.07 |
|
|
39
|
-
| GLM 4.7 | `zai-org/GLM-4.7` | 203K | 203K | ❌ | ✅ | ✅ | $0.
|
|
40
|
-
| GLM 4.7 Flash | `zai-org/GLM-4.7-Flash` | 200K | 200K | ❌ | ✅ | ✅ | $0.
|
|
41
|
-
| GLM 5 | `zai-org/GLM-5` | 203K | 203K | ❌ | ✅ | ✅ | $0.
|
|
42
|
-
| GLM 5.1 | `zai-org/GLM-5.1` | 203K | 33K | ❌ | ✅ | ✅ | $1.
|
|
43
|
-
| GLM 5.2 | `zai-org/GLM-5.2` | 262K | 66K | ❌ | ✅ | ✅ | $1.
|
|
44
|
-
| Llama
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
| Mistral Nemo Instruct 2407 | `mistralai/Mistral-Nemo-Instruct-2407` | 128K | 128K | ❌ | ❌ | ✅ | $0.07 | $0.12 |
|
|
39
|
+
| GLM 4.7 | `zai-org/GLM-4.7` | 203K | 203K | ❌ | ✅ | ✅ | $0.88 | $2.37 |
|
|
40
|
+
| GLM 4.7 Flash | `zai-org/GLM-4.7-Flash` | 200K | 200K | ❌ | ✅ | ✅ | $0.06 | $0.40 |
|
|
41
|
+
| GLM 5 | `zai-org/GLM-5` | 203K | 203K | ❌ | ✅ | ✅ | $0.76 | $2.36 |
|
|
42
|
+
| GLM 5.1 | `zai-org/GLM-5.1` | 203K | 33K | ❌ | ✅ | ✅ | $1.21 | $3.98 |
|
|
43
|
+
| GLM 5.2 | `zai-org/GLM-5.2` | 262K | 66K | ❌ | ✅ | ✅ | $1.28 | $4.14 |
|
|
44
|
+
| Llama 4 Maverick 17B 128E Instruct FP8 | `meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8` | 430K | 430K | ✅ | ❌ | ✅ | $0.27 | $0.90 |
|
|
45
|
+
| Qwen3 Coder 480B A35B Instruct INT4 Mixed AR | `Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar` | 106K | 106K | ❌ | ❌ | ✅ | $0.45 | $2.15 |
|
|
46
|
+
| Llama 3.3 70B Instruct | `meta-llama/Llama-3.3-70B-Instruct` | 128K | 128K | ❌ | ❌ | ✅ | $0.61 | $0.84 |
|
|
47
|
+
| Mistral Nemo Instruct 2407 | `mistralai/Mistral-Nemo-Instruct-2407` | 128K | 128K | ❌ | ❌ | ✅ | $0.03 | $0.08 |
|
|
49
48
|
| Kimi K2 Instruct 0905 | `moonshotai/Kimi-K2-Instruct-0905` | 262K | 262K | ❌ | ❌ | ✅ | $0.57 | $2.30 |
|
|
50
49
|
| Qwen3 Next 80B A3B Instruct | `Qwen/Qwen3-Next-80B-A3B-Instruct` | 262K | 262K | ❌ | ❌ | ✅ | $0.12 | $1.14 |
|
|
51
50
|
|
package/deprecated-models.json
CHANGED
|
@@ -1 +1,25 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"meta-llama/Llama-3.2-90B-Vision-Instruct": {
|
|
3
|
+
"id": "meta-llama/Llama-3.2-90B-Vision-Instruct",
|
|
4
|
+
"name": "Llama 3.2 90B Vision Instruct",
|
|
5
|
+
"reasoning": false,
|
|
6
|
+
"input": [
|
|
7
|
+
"text",
|
|
8
|
+
"image"
|
|
9
|
+
],
|
|
10
|
+
"cost": {
|
|
11
|
+
"input": 0.345,
|
|
12
|
+
"output": 0.345,
|
|
13
|
+
"cacheRead": 0.1725,
|
|
14
|
+
"cacheWrite": 0.7
|
|
15
|
+
},
|
|
16
|
+
"contextWindow": 16000,
|
|
17
|
+
"maxTokens": 16000,
|
|
18
|
+
"compat": {
|
|
19
|
+
"supportsStore": false,
|
|
20
|
+
"supportsDeveloperRole": false,
|
|
21
|
+
"maxTokensField": "max_tokens"
|
|
22
|
+
},
|
|
23
|
+
"deprecatedAt": "2026-08-11T02:00:10.112Z"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/models.json
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
"text"
|
|
8
8
|
],
|
|
9
9
|
"cost": {
|
|
10
|
-
"input": 0.
|
|
11
|
-
"output": 0.
|
|
12
|
-
"cacheRead": 0.
|
|
10
|
+
"input": 0.164,
|
|
11
|
+
"output": 0.332,
|
|
12
|
+
"cacheRead": 0.082,
|
|
13
13
|
"cacheWrite": 0
|
|
14
14
|
},
|
|
15
15
|
"contextWindow": 262100,
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"image"
|
|
31
31
|
],
|
|
32
32
|
"cost": {
|
|
33
|
-
"input": 3.
|
|
33
|
+
"input": 3.9,
|
|
34
34
|
"output": 18,
|
|
35
|
-
"cacheRead": 1.
|
|
35
|
+
"cacheRead": 1.95,
|
|
36
36
|
"cacheWrite": 0
|
|
37
37
|
},
|
|
38
38
|
"contextWindow": 1048576,
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
"text"
|
|
75
75
|
],
|
|
76
76
|
"cost": {
|
|
77
|
-
"input": 1.
|
|
78
|
-
"output":
|
|
79
|
-
"cacheRead": 0.
|
|
77
|
+
"input": 1.282,
|
|
78
|
+
"output": 4.144,
|
|
79
|
+
"cacheRead": 0.641,
|
|
80
80
|
"cacheWrite": 0
|
|
81
81
|
},
|
|
82
82
|
"contextWindow": 262144,
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
"image"
|
|
98
98
|
],
|
|
99
99
|
"cost": {
|
|
100
|
-
"input": 1.
|
|
101
|
-
"output": 4.
|
|
102
|
-
"cacheRead": 0.
|
|
100
|
+
"input": 1.014,
|
|
101
|
+
"output": 4.528,
|
|
102
|
+
"cacheRead": 0.507,
|
|
103
103
|
"cacheWrite": 0
|
|
104
104
|
},
|
|
105
105
|
"contextWindow": 262144,
|
|
@@ -120,9 +120,9 @@
|
|
|
120
120
|
"image"
|
|
121
121
|
],
|
|
122
122
|
"cost": {
|
|
123
|
-
"input": 0.
|
|
123
|
+
"input": 0.1768,
|
|
124
124
|
"output": 1.11675,
|
|
125
|
-
"cacheRead": 0.
|
|
125
|
+
"cacheRead": 0.0884,
|
|
126
126
|
"cacheWrite": 0
|
|
127
127
|
},
|
|
128
128
|
"contextWindow": 262140,
|
|
@@ -143,9 +143,9 @@
|
|
|
143
143
|
"image"
|
|
144
144
|
],
|
|
145
145
|
"cost": {
|
|
146
|
-
"input": 0.
|
|
147
|
-
"output": 3.
|
|
148
|
-
"cacheRead": 0.
|
|
146
|
+
"input": 0.3708,
|
|
147
|
+
"output": 3.03,
|
|
148
|
+
"cacheRead": 0.1854,
|
|
149
149
|
"cacheWrite": 0
|
|
150
150
|
},
|
|
151
151
|
"contextWindow": 32768,
|
|
@@ -165,9 +165,9 @@
|
|
|
165
165
|
"text"
|
|
166
166
|
],
|
|
167
167
|
"cost": {
|
|
168
|
-
"input": 0.
|
|
169
|
-
"output": 1.
|
|
170
|
-
"cacheRead": 0.
|
|
168
|
+
"input": 0.426,
|
|
169
|
+
"output": 1.62,
|
|
170
|
+
"cacheRead": 0.213,
|
|
171
171
|
"cacheWrite": 0
|
|
172
172
|
},
|
|
173
173
|
"contextWindow": 262100,
|
|
@@ -187,9 +187,9 @@
|
|
|
187
187
|
"text"
|
|
188
188
|
],
|
|
189
189
|
"cost": {
|
|
190
|
-
"input": 0.
|
|
191
|
-
"output": 0.
|
|
192
|
-
"cacheRead": 0.
|
|
190
|
+
"input": 0.1388,
|
|
191
|
+
"output": 0.2776,
|
|
192
|
+
"cacheRead": 0.0694,
|
|
193
193
|
"cacheWrite": 0
|
|
194
194
|
},
|
|
195
195
|
"contextWindow": 32768,
|
|
@@ -209,9 +209,9 @@
|
|
|
209
209
|
"text"
|
|
210
210
|
],
|
|
211
211
|
"cost": {
|
|
212
|
-
"input": 1.
|
|
213
|
-
"output": 3.
|
|
214
|
-
"cacheRead": 0.
|
|
212
|
+
"input": 1.513124,
|
|
213
|
+
"output": 3.0526,
|
|
214
|
+
"cacheRead": 0.756562,
|
|
215
215
|
"cacheWrite": 0
|
|
216
216
|
},
|
|
217
217
|
"contextWindow": 1048576,
|
|
@@ -232,9 +232,9 @@
|
|
|
232
232
|
"image"
|
|
233
233
|
],
|
|
234
234
|
"cost": {
|
|
235
|
-
"input": 0.
|
|
236
|
-
"output": 3.
|
|
237
|
-
"cacheRead": 0.
|
|
235
|
+
"input": 0.85986,
|
|
236
|
+
"output": 3.64456,
|
|
237
|
+
"cacheRead": 0.42993,
|
|
238
238
|
"cacheWrite": 0
|
|
239
239
|
},
|
|
240
240
|
"contextWindow": 262142,
|
|
@@ -254,9 +254,9 @@
|
|
|
254
254
|
"text"
|
|
255
255
|
],
|
|
256
256
|
"cost": {
|
|
257
|
-
"input": 1.
|
|
258
|
-
"output":
|
|
259
|
-
"cacheRead": 0.
|
|
257
|
+
"input": 1.21,
|
|
258
|
+
"output": 3.98,
|
|
259
|
+
"cacheRead": 0.605,
|
|
260
260
|
"cacheWrite": 0
|
|
261
261
|
},
|
|
262
262
|
"contextWindow": 202750,
|
|
@@ -276,9 +276,9 @@
|
|
|
276
276
|
"text"
|
|
277
277
|
],
|
|
278
278
|
"cost": {
|
|
279
|
-
"input": 0.
|
|
280
|
-
"output": 1.
|
|
281
|
-
"cacheRead": 0.
|
|
279
|
+
"input": 0.273,
|
|
280
|
+
"output": 1.066,
|
|
281
|
+
"cacheRead": 0.1365,
|
|
282
282
|
"cacheWrite": 0
|
|
283
283
|
},
|
|
284
284
|
"contextWindow": 196600,
|
|
@@ -299,9 +299,9 @@
|
|
|
299
299
|
"image"
|
|
300
300
|
],
|
|
301
301
|
"cost": {
|
|
302
|
-
"input": 0.
|
|
303
|
-
"output": 2.
|
|
304
|
-
"cacheRead": 0.
|
|
302
|
+
"input": 0.558,
|
|
303
|
+
"output": 2.94,
|
|
304
|
+
"cacheRead": 0.279,
|
|
305
305
|
"cacheWrite": 1.1
|
|
306
306
|
},
|
|
307
307
|
"contextWindow": 262144,
|
|
@@ -321,9 +321,9 @@
|
|
|
321
321
|
"text"
|
|
322
322
|
],
|
|
323
323
|
"cost": {
|
|
324
|
-
"input": 0.
|
|
325
|
-
"output": 2.
|
|
326
|
-
"cacheRead": 0.
|
|
324
|
+
"input": 0.76,
|
|
325
|
+
"output": 2.356,
|
|
326
|
+
"cacheRead": 0.38,
|
|
327
327
|
"cacheWrite": 0
|
|
328
328
|
},
|
|
329
329
|
"contextWindow": 202752,
|
|
@@ -343,9 +343,9 @@
|
|
|
343
343
|
"text"
|
|
344
344
|
],
|
|
345
345
|
"cost": {
|
|
346
|
-
"input": 0.
|
|
347
|
-
"output": 1.
|
|
348
|
-
"cacheRead": 0.
|
|
346
|
+
"input": 0.3881,
|
|
347
|
+
"output": 1.0943,
|
|
348
|
+
"cacheRead": 0.19405,
|
|
349
349
|
"cacheWrite": 0.5
|
|
350
350
|
},
|
|
351
351
|
"contextWindow": 163840,
|
|
@@ -409,9 +409,9 @@
|
|
|
409
409
|
"text"
|
|
410
410
|
],
|
|
411
411
|
"cost": {
|
|
412
|
-
"input": 0.
|
|
413
|
-
"output": 0.
|
|
414
|
-
"cacheRead": 0.
|
|
412
|
+
"input": 0.124,
|
|
413
|
+
"output": 0.42,
|
|
414
|
+
"cacheRead": 0.062,
|
|
415
415
|
"cacheWrite": 0
|
|
416
416
|
},
|
|
417
417
|
"contextWindow": 262142,
|
|
@@ -431,9 +431,9 @@
|
|
|
431
431
|
"text"
|
|
432
432
|
],
|
|
433
433
|
"cost": {
|
|
434
|
-
"input": 0.
|
|
435
|
-
"output": 0.
|
|
436
|
-
"cacheRead": 0.
|
|
434
|
+
"input": 0.062625,
|
|
435
|
+
"output": 0.4,
|
|
436
|
+
"cacheRead": 0.031313,
|
|
437
437
|
"cacheWrite": 0.14
|
|
438
438
|
},
|
|
439
439
|
"contextWindow": 200000,
|
|
@@ -453,9 +453,9 @@
|
|
|
453
453
|
"text"
|
|
454
454
|
],
|
|
455
455
|
"cost": {
|
|
456
|
-
"input": 0.
|
|
457
|
-
"output": 2.
|
|
458
|
-
"cacheRead": 0.
|
|
456
|
+
"input": 0.88,
|
|
457
|
+
"output": 2.37,
|
|
458
|
+
"cacheRead": 0.44,
|
|
459
459
|
"cacheWrite": 0.6
|
|
460
460
|
},
|
|
461
461
|
"contextWindow": 202752,
|
|
@@ -488,28 +488,6 @@
|
|
|
488
488
|
"maxTokensField": "max_tokens"
|
|
489
489
|
}
|
|
490
490
|
},
|
|
491
|
-
{
|
|
492
|
-
"id": "meta-llama/Llama-3.2-90B-Vision-Instruct",
|
|
493
|
-
"name": "Llama 3.2 90B Vision Instruct",
|
|
494
|
-
"reasoning": false,
|
|
495
|
-
"input": [
|
|
496
|
-
"text",
|
|
497
|
-
"image"
|
|
498
|
-
],
|
|
499
|
-
"cost": {
|
|
500
|
-
"input": 0.345,
|
|
501
|
-
"output": 0.345,
|
|
502
|
-
"cacheRead": 0.1725,
|
|
503
|
-
"cacheWrite": 0.7
|
|
504
|
-
},
|
|
505
|
-
"contextWindow": 16000,
|
|
506
|
-
"maxTokens": 16000,
|
|
507
|
-
"compat": {
|
|
508
|
-
"supportsStore": false,
|
|
509
|
-
"supportsDeveloperRole": false,
|
|
510
|
-
"maxTokensField": "max_tokens"
|
|
511
|
-
}
|
|
512
|
-
},
|
|
513
491
|
{
|
|
514
492
|
"id": "openai/gpt-oss-120b",
|
|
515
493
|
"name": "gpt-oss-120b",
|
|
@@ -518,9 +496,9 @@
|
|
|
518
496
|
"text"
|
|
519
497
|
],
|
|
520
498
|
"cost": {
|
|
521
|
-
"input": 0.
|
|
522
|
-
"output": 0.
|
|
523
|
-
"cacheRead": 0.
|
|
499
|
+
"input": 0.178,
|
|
500
|
+
"output": 0.71,
|
|
501
|
+
"cacheRead": 0.089,
|
|
524
502
|
"cacheWrite": 0.04
|
|
525
503
|
},
|
|
526
504
|
"contextWindow": 131072,
|
|
@@ -605,9 +583,9 @@
|
|
|
605
583
|
"text"
|
|
606
584
|
],
|
|
607
585
|
"cost": {
|
|
608
|
-
"input": 0.
|
|
609
|
-
"output": 2.
|
|
610
|
-
"cacheRead": 0.
|
|
586
|
+
"input": 0.445,
|
|
587
|
+
"output": 2.145,
|
|
588
|
+
"cacheRead": 0.2225,
|
|
611
589
|
"cacheWrite": 0.44
|
|
612
590
|
},
|
|
613
591
|
"contextWindow": 106000,
|
|
@@ -627,9 +605,9 @@
|
|
|
627
605
|
"image"
|
|
628
606
|
],
|
|
629
607
|
"cost": {
|
|
630
|
-
"input": 0.
|
|
631
|
-
"output": 0.
|
|
632
|
-
"cacheRead": 0.
|
|
608
|
+
"input": 0.274,
|
|
609
|
+
"output": 0.8992,
|
|
610
|
+
"cacheRead": 0.137,
|
|
633
611
|
"cacheWrite": 0.3
|
|
634
612
|
},
|
|
635
613
|
"contextWindow": 430000,
|
|
@@ -648,9 +626,9 @@
|
|
|
648
626
|
"text"
|
|
649
627
|
],
|
|
650
628
|
"cost": {
|
|
651
|
-
"input": 0.
|
|
652
|
-
"output": 0.
|
|
653
|
-
"cacheRead": 0.
|
|
629
|
+
"input": 0.029667,
|
|
630
|
+
"output": 0.076667,
|
|
631
|
+
"cacheRead": 0.014834,
|
|
654
632
|
"cacheWrite": 0.04
|
|
655
633
|
},
|
|
656
634
|
"contextWindow": 128000,
|
|
@@ -669,9 +647,9 @@
|
|
|
669
647
|
"text"
|
|
670
648
|
],
|
|
671
649
|
"cost": {
|
|
672
|
-
"input": 0.
|
|
673
|
-
"output": 0.
|
|
674
|
-
"cacheRead": 0.
|
|
650
|
+
"input": 0.059,
|
|
651
|
+
"output": 0.218,
|
|
652
|
+
"cacheRead": 0.0295,
|
|
675
653
|
"cacheWrite": 0.03
|
|
676
654
|
},
|
|
677
655
|
"contextWindow": 64000,
|
|
@@ -691,9 +669,9 @@
|
|
|
691
669
|
"text"
|
|
692
670
|
],
|
|
693
671
|
"cost": {
|
|
694
|
-
"input": 0.
|
|
695
|
-
"output":
|
|
696
|
-
"cacheRead": 0.
|
|
672
|
+
"input": 0.608,
|
|
673
|
+
"output": 0.838,
|
|
674
|
+
"cacheRead": 0.304,
|
|
697
675
|
"cacheWrite": 0.2
|
|
698
676
|
},
|
|
699
677
|
"contextWindow": 128000,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-io-provider",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "IO Intelligence provider extension for pi - Access DeepSeek, Kimi, GLM, Llama, Qwen, Mistral, and more through the IO Intelligence API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
package/scripts/update-models.js
CHANGED
|
@@ -6,18 +6,122 @@
|
|
|
6
6
|
* Fetches the model list from https://api.intelligence.io.solutions/api/v1/models
|
|
7
7
|
* and regenerates models.json and the README model table.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* API key: the stored `io-intelligence` credential in ~/.pi/agent/auth.json wins, then
|
|
10
|
+
* the IOINTELLIGENCE_API_KEY environment variable. The script refuses to run without one.
|
|
10
11
|
* Usage: IOINTELLIGENCE_API_KEY=your-key node scripts/update-models.js
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
import https from 'https';
|
|
14
15
|
import fs from 'fs';
|
|
16
|
+
import os from 'os';
|
|
17
|
+
import { execSync } from 'child_process';
|
|
15
18
|
import path from 'path';
|
|
16
19
|
import { fileURLToPath } from 'url';
|
|
17
20
|
|
|
18
21
|
const __filename = fileURLToPath(import.meta.url);
|
|
19
22
|
const __dirname = path.dirname(__filename);
|
|
20
23
|
|
|
24
|
+
// pi's agent directory: PI_CODING_AGENT_DIR (with ~ expansion) or ~/.pi/agent.
|
|
25
|
+
function piAgentDir() {
|
|
26
|
+
const envDir = process.env.PI_CODING_AGENT_DIR;
|
|
27
|
+
if (envDir) {
|
|
28
|
+
return envDir.startsWith('~/') || envDir === '~'
|
|
29
|
+
? path.join(os.homedir(), envDir.slice(1))
|
|
30
|
+
: envDir;
|
|
31
|
+
}
|
|
32
|
+
return path.join(os.homedir(), '.pi', 'agent');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const AUTH_JSON_PATH = path.join(piAgentDir(), 'auth.json');
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Resolve a configured value using pi's semantics (resolve-config-value.ts in
|
|
39
|
+
* pi-mono): "!command" runs via the shell (10s timeout) and uses trimmed
|
|
40
|
+
* stdout; "$VAR" / "${VAR}" interpolate environment variables ("$$" escapes a
|
|
41
|
+
* literal "$", "$!" a literal "!"); anything else is a literal. Returns
|
|
42
|
+
* undefined when a referenced env var is unset or a command fails.
|
|
43
|
+
*/
|
|
44
|
+
function resolveConfigValue(config, env) {
|
|
45
|
+
if (typeof config !== 'string' || config.length === 0) return undefined;
|
|
46
|
+
if (config.startsWith('!')) {
|
|
47
|
+
try {
|
|
48
|
+
const out = execSync(config.slice(1), {
|
|
49
|
+
encoding: 'utf8',
|
|
50
|
+
timeout: 10000,
|
|
51
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
52
|
+
});
|
|
53
|
+
return out.trim() || undefined;
|
|
54
|
+
} catch {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const ENV_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
59
|
+
let resolved = '';
|
|
60
|
+
let index = 0;
|
|
61
|
+
while (index < config.length) {
|
|
62
|
+
const dollar = config.indexOf('$', index);
|
|
63
|
+
if (dollar < 0) {
|
|
64
|
+
resolved += config.slice(index);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
resolved += config.slice(index, dollar);
|
|
68
|
+
const next = config[dollar + 1];
|
|
69
|
+
let name;
|
|
70
|
+
if (next === '$' || next === '!') {
|
|
71
|
+
resolved += next;
|
|
72
|
+
index = dollar + 2;
|
|
73
|
+
continue;
|
|
74
|
+
} else if (next === '{') {
|
|
75
|
+
const end = config.indexOf('}', dollar + 2);
|
|
76
|
+
if (end < 0) {
|
|
77
|
+
resolved += '$';
|
|
78
|
+
index = dollar + 1;
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
const inner = config.slice(dollar + 2, end);
|
|
82
|
+
if (!ENV_NAME_RE.test(inner)) {
|
|
83
|
+
resolved += config.slice(dollar, end + 1);
|
|
84
|
+
index = end + 1;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
name = inner;
|
|
88
|
+
index = end + 1;
|
|
89
|
+
} else {
|
|
90
|
+
const match = config.slice(dollar + 1).match(/^[A-Za-z_][A-Za-z0-9_]*/);
|
|
91
|
+
if (!match) {
|
|
92
|
+
resolved += '$';
|
|
93
|
+
index = dollar + 1;
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
name = match[0];
|
|
97
|
+
index = dollar + 1 + name.length;
|
|
98
|
+
}
|
|
99
|
+
const value = (env && env[name]) || process.env[name] || undefined;
|
|
100
|
+
if (value === undefined) return undefined;
|
|
101
|
+
resolved += value;
|
|
102
|
+
}
|
|
103
|
+
return resolved;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The API key, resolved the way pi itself resolves it for this provider: the
|
|
108
|
+
* stored `io-intelligence` credential in ~/.pi/agent/auth.json wins, then
|
|
109
|
+
* the IOINTELLIGENCE_API_KEY environment variable.
|
|
110
|
+
*/
|
|
111
|
+
function resolveApiKey() {
|
|
112
|
+
try {
|
|
113
|
+
const auth = JSON.parse(fs.readFileSync(AUTH_JSON_PATH, 'utf8'));
|
|
114
|
+
const credential = auth?.['io-intelligence'];
|
|
115
|
+
if (credential && credential.type === 'api_key' && typeof credential.key === 'string') {
|
|
116
|
+
const key = resolveConfigValue(credential.key, credential.env);
|
|
117
|
+
if (key) return key;
|
|
118
|
+
}
|
|
119
|
+
} catch {
|
|
120
|
+
// Missing or unparseable auth.json: fall through to the env var.
|
|
121
|
+
}
|
|
122
|
+
return process.env.IOINTELLIGENCE_API_KEY || undefined;
|
|
123
|
+
}
|
|
124
|
+
|
|
21
125
|
const API_BASE = 'https://api.intelligence.io.solutions/api/v1';
|
|
22
126
|
const MODELS_PATH = path.join(process.cwd(), 'models.json');
|
|
23
127
|
const PATCH_PATH = path.join(process.cwd(), 'patch.json');
|
|
@@ -410,9 +514,9 @@ function updateDeprecatedModels(modelsJsonPath, newModels) {
|
|
|
410
514
|
}
|
|
411
515
|
|
|
412
516
|
async function main() {
|
|
413
|
-
const apiKey =
|
|
517
|
+
const apiKey = resolveApiKey();
|
|
414
518
|
if (!apiKey) {
|
|
415
|
-
console.error('Error:
|
|
519
|
+
console.error('Error: No API key found: no `io-intelligence` credential resolved from ' + AUTH_JSON_PATH + ' and IOINTELLIGENCE_API_KEY is not set');
|
|
416
520
|
console.error('Usage: IOINTELLIGENCE_API_KEY=your-key node scripts/update-models.js');
|
|
417
521
|
process.exit(1);
|
|
418
522
|
}
|