pi-io-provider 1.1.3 → 1.1.5
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 -24
- package/package.json +5 -1
- package/.github/FUNDING.yml +0 -4
- package/AGENTS.md +0 -57
- package/custom-models.json +0 -1
- package/deprecated-models.json +0 -1
- package/models.json +0 -707
- package/patch.json +0 -16
- package/scripts/update-models.js +0 -476
package/README.md
CHANGED
|
@@ -16,36 +16,36 @@ 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.
|
|
20
|
-
| Kimi K2.6 | `moonshotai/Kimi-K2.6` | 262K | 262K | ✅ | ✅ | ✅ | $0.
|
|
21
|
-
| Kimi K2.7 Code | `moonshotai/Kimi-K2.7-Code` | 262K | 262K | ✅ | ✅ | ✅ | $
|
|
22
|
-
| Kimi K3 | `moonshotai/Kimi-K3` | 1.0M | 1.0M | ✅ | ✅ | ✅ | $
|
|
23
|
-
| Qwen3.6 27B | `Qwen/Qwen3.6-27B` | 33K | 33K | ✅ | ✅ | ✅ | $0.
|
|
19
|
+
| Kimi K2.5 | `moonshotai/Kimi-K2.5` | 262K | 262K | ✅ | ✅ | ✅ | $0.57 | $3.00 |
|
|
20
|
+
| Kimi K2.6 | `moonshotai/Kimi-K2.6` | 262K | 262K | ✅ | ✅ | ✅ | $0.85 | $3.78 |
|
|
21
|
+
| Kimi K2.7 Code | `moonshotai/Kimi-K2.7-Code` | 262K | 262K | ✅ | ✅ | ✅ | $0.82 | $3.73 |
|
|
22
|
+
| Kimi K3 | `moonshotai/Kimi-K3` | 1.0M | 1.0M | ✅ | ✅ | ✅ | $2.93 | $14.65 |
|
|
23
|
+
| Qwen3.6 27B | `Qwen/Qwen3.6-27B` | 33K | 33K | ✅ | ✅ | ✅ | $0.40 | $3.03 |
|
|
24
24
|
| Qwen3.6 35B A3B | `Qwen/Qwen3.6-35B-A3B` | 262K | 262K | ✅ | ✅ | ✅ | $0.17 | $1.12 |
|
|
25
|
+
| Qwen3.8 27B | `Qwen/Qwen3.8-27B` | 66K | 66K | ✅ | ✅ | ✅ | $0.45 | $3.25 |
|
|
25
26
|
| 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.
|
|
27
|
+
| DeepSeek V3.2 | `deepseek-ai/DeepSeek-V3.2` | 164K | 164K | ❌ | ✅ | ✅ | $0.81 | $1.33 |
|
|
28
|
+
| DeepSeek V4 Flash | `deepseek-ai/DeepSeek-V4-Flash` | 33K | 33K | ❌ | ✅ | ✅ | $0.15 | $0.35 |
|
|
29
|
+
| DeepSeek V4 Flash 0731 | `deepseek-ai/DeepSeek-V4-Flash-0731` | 262K | 66K | ❌ | ✅ | ✅ | $0.18 | $0.48 |
|
|
30
|
+
| DeepSeek V4 Pro | `deepseek-ai/DeepSeek-V4-Pro` | 1.0M | 600K | ❌ | ✅ | ✅ | $1.61 | $3.27 |
|
|
31
|
+
| Gemma 4 26B A4B | `google/gemma-4-26b-a4b-it` | 262K | 262K | ❌ | ✅ | ✅ | $0.12 | $0.42 |
|
|
32
|
+
| MiniMax M2.5 | `MiniMaxAI/MiniMax-M2.5` | 197K | 197K | ❌ | ✅ | ✅ | $0.28 | $1.14 |
|
|
33
|
+
| MiniMax M2.7 | `MiniMaxAI/MiniMax-M2.7` | 262K | 66K | ❌ | ✅ | ✅ | $0.47 | $1.76 |
|
|
33
34
|
| Kimi K2 Thinking | `moonshotai/Kimi-K2-Thinking` | 262K | 262K | ❌ | ✅ | ✅ | $0.60 | $2.50 |
|
|
34
35
|
| gpt-oss-120b | `openai/gpt-oss-120b` | 131K | 131K | ❌ | ✅ | ✅ | $0.19 | $0.70 |
|
|
35
|
-
| gpt-oss-20b | `openai/gpt-oss-20b` | 64K | 64K | ❌ | ✅ | ✅ | $0.
|
|
36
|
-
| MiMo-V2.5 | `XiaomiMiMo/MiMo-V2.5` | 262K | 262K | ❌ | ✅ | ✅ | $0.
|
|
36
|
+
| gpt-oss-20b | `openai/gpt-oss-20b` | 64K | 64K | ❌ | ✅ | ✅ | $0.06 | $0.22 |
|
|
37
|
+
| MiMo-V2.5 | `XiaomiMiMo/MiMo-V2.5` | 262K | 262K | ❌ | ✅ | ✅ | $0.19 | $0.63 |
|
|
37
38
|
| GLM-4.5-Air | `zai-org/GLM-4.5-Air` | 131K | 131K | ❌ | ✅ | ✅ | $0.16 | $0.94 |
|
|
38
39
|
| 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 |
|
|
40
|
+
| GLM 4.7 | `zai-org/GLM-4.7` | 203K | 203K | ❌ | ✅ | ✅ | $0.88 | $2.37 |
|
|
41
|
+
| GLM 4.7 Flash | `zai-org/GLM-4.7-Flash` | 200K | 200K | ❌ | ✅ | ✅ | $0.06 | $0.40 |
|
|
42
|
+
| GLM 5 | `zai-org/GLM-5` | 203K | 203K | ❌ | ✅ | ✅ | $0.84 | $2.61 |
|
|
43
|
+
| GLM 5.1 | `zai-org/GLM-5.1` | 203K | 33K | ❌ | ✅ | ✅ | $1.36 | $4.40 |
|
|
44
|
+
| GLM 5.2 | `zai-org/GLM-5.2` | 262K | 66K | ❌ | ✅ | ✅ | $1.55 | $4.98 |
|
|
45
|
+
| Llama 4 Maverick 17B 128E Instruct FP8 | `meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8` | 430K | 430K | ✅ | ❌ | ✅ | $0.27 | $0.90 |
|
|
46
|
+
| Qwen3 Coder 480B A35B Instruct INT4 Mixed AR | `Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar` | 106K | 106K | ❌ | ❌ | ✅ | $0.45 | $2.15 |
|
|
47
|
+
| Llama 3.3 70B Instruct | `meta-llama/Llama-3.3-70B-Instruct` | 128K | 128K | ❌ | ❌ | ✅ | $0.64 | $0.77 |
|
|
48
|
+
| Mistral Nemo Instruct 2407 | `mistralai/Mistral-Nemo-Instruct-2407` | 128K | 128K | ❌ | ❌ | ✅ | $0.03 | $0.08 |
|
|
49
49
|
| Kimi K2 Instruct 0905 | `moonshotai/Kimi-K2-Instruct-0905` | 262K | 262K | ❌ | ❌ | ✅ | $0.57 | $2.30 |
|
|
50
50
|
| Qwen3 Next 80B A3B Instruct | `Qwen/Qwen3-Next-80B-A3B-Instruct` | 262K | 262K | ❌ | ❌ | ✅ | $0.12 | $1.14 |
|
|
51
51
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-io-provider",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
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",
|
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
"./index.ts"
|
|
27
27
|
]
|
|
28
28
|
},
|
|
29
|
+
"files": [
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
29
33
|
"scripts": {
|
|
30
34
|
"clean": "echo 'nothing to clean'",
|
|
31
35
|
"build": "echo 'nothing to build'",
|
package/.github/FUNDING.yml
DELETED
package/AGENTS.md
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# AGENTS.md
|
|
2
|
-
|
|
3
|
-
## DO NOT EDIT — Auto-generated Files
|
|
4
|
-
|
|
5
|
-
The following files are **idempotent** and regenerated by `scripts/update-models.js`. Never edit them directly — your changes will be overwritten on the next model sync.
|
|
6
|
-
|
|
7
|
-
| File | Why it's auto-generated |
|
|
8
|
-
|------|------------------------|
|
|
9
|
-
| `models.json` | Built from the provider API. `update-models.js` fetches models, preserves curated data for known IDs, and writes this file. |
|
|
10
|
-
| `deprecated-models.json` | Graveyard for models the API delisted. update-models.js stamps them with deprecatedAt and pi keeps serving them for a 2-week grace period, then evicts them. Never edit by hand. |
|
|
11
|
-
| `README.md` (model table) | The table under `## Available Models` is replaced in-place by `update-models.js` after merging base models → patch → custom models. |
|
|
12
|
-
|
|
13
|
-
## Correct Files to Edit
|
|
14
|
-
|
|
15
|
-
When a model needs overrides, new properties, or corrections, edit the appropriate source file below. These are the **source of truth** that the update script reads but never writes.
|
|
16
|
-
|
|
17
|
-
| File | Purpose |
|
|
18
|
-
|------|---------|
|
|
19
|
-
| `patch.json` | Per-model overrides keyed by model ID. Add reasoning flags, compat settings, pricing corrections, thinking level maps, etc. Applied on top of `models.json` at runtime and for README generation. |
|
|
20
|
-
| `custom-models.json` | Models that don't exist in the provider API (hidden models, router endpoints, cross-provider aliases). Merged after patch. Format: array of full model objects (same schema as `models.json` entries). |
|
|
21
|
-
| `index.ts` | Provider extension code. |
|
|
22
|
-
| `scripts/update-models.js` | The sync script itself (edit only if changing how models are fetched/transformed). |
|
|
23
|
-
|
|
24
|
-
## Data Flow
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
Provider API ──fetch──► models.json ──apply──► patch.json ──merge──► custom-models.json
|
|
28
|
-
│ │ │
|
|
29
|
-
└────────────────────────────┴──────────────────────┘
|
|
30
|
-
│
|
|
31
|
-
README model table
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
1. `models.json` — base data from the provider API (auto-generated, DO NOT EDIT)
|
|
35
|
-
2. `patch.json` — overrides applied on top (EDIT THIS for corrections/enrichments)
|
|
36
|
-
3. `custom-models.json` — additional models not in the API (EDIT THIS for new models)
|
|
37
|
-
4. README table — rendered from the merged result of all three (auto-generated, DO NOT EDIT)
|
|
38
|
-
|
|
39
|
-
## Common Tasks
|
|
40
|
-
|
|
41
|
-
### Add a compat setting or override pricing for an existing model
|
|
42
|
-
→ Edit `patch.json`. Add an entry keyed by the model's `id`.
|
|
43
|
-
|
|
44
|
-
### Add a model not available in the provider API
|
|
45
|
-
→ Edit `custom-models.json`. Add a full model object to the array.
|
|
46
|
-
|
|
47
|
-
### Update models from the provider API
|
|
48
|
-
→ Run `node scripts/update-models.js` (may require an API key env var).
|
|
49
|
-
|
|
50
|
-
### Regenerate the README model table
|
|
51
|
-
→ Run `node scripts/update-models.js` — it updates both `models.json` and the README table.
|
|
52
|
-
|
|
53
|
-
## TL;DR
|
|
54
|
-
|
|
55
|
-
- **Never edit `models.json`** — edit `patch.json` instead.
|
|
56
|
-
- **Never edit the README model table** — run the update script instead.
|
|
57
|
-
- `patch.json` and `custom-models.json` are the source files you should modify.
|
package/custom-models.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[]
|
package/deprecated-models.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
package/models.json
DELETED
|
@@ -1,707 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"id": "deepseek-ai/DeepSeek-V4-Flash-0731",
|
|
4
|
-
"name": "DeepSeek V4 Flash 0731",
|
|
5
|
-
"reasoning": true,
|
|
6
|
-
"input": [
|
|
7
|
-
"text"
|
|
8
|
-
],
|
|
9
|
-
"cost": {
|
|
10
|
-
"input": 0.14,
|
|
11
|
-
"output": 0.28,
|
|
12
|
-
"cacheRead": 0.07,
|
|
13
|
-
"cacheWrite": 0
|
|
14
|
-
},
|
|
15
|
-
"contextWindow": 262100,
|
|
16
|
-
"maxTokens": 65536,
|
|
17
|
-
"compat": {
|
|
18
|
-
"supportsStore": false,
|
|
19
|
-
"supportsDeveloperRole": false,
|
|
20
|
-
"maxTokensField": "max_tokens",
|
|
21
|
-
"supportsReasoningEffort": true
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"id": "moonshotai/Kimi-K3",
|
|
26
|
-
"name": "Kimi K3",
|
|
27
|
-
"reasoning": true,
|
|
28
|
-
"input": [
|
|
29
|
-
"text",
|
|
30
|
-
"image"
|
|
31
|
-
],
|
|
32
|
-
"cost": {
|
|
33
|
-
"input": 3.6,
|
|
34
|
-
"output": 18,
|
|
35
|
-
"cacheRead": 1.8,
|
|
36
|
-
"cacheWrite": 0
|
|
37
|
-
},
|
|
38
|
-
"contextWindow": 1048576,
|
|
39
|
-
"maxTokens": 1048576,
|
|
40
|
-
"compat": {
|
|
41
|
-
"supportsStore": false,
|
|
42
|
-
"supportsDeveloperRole": false,
|
|
43
|
-
"maxTokensField": "max_tokens",
|
|
44
|
-
"supportsReasoningEffort": true
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"id": "XiaomiMiMo/MiMo-V2.5",
|
|
49
|
-
"name": "MiMo-V2.5",
|
|
50
|
-
"reasoning": true,
|
|
51
|
-
"input": [
|
|
52
|
-
"text"
|
|
53
|
-
],
|
|
54
|
-
"cost": {
|
|
55
|
-
"input": 0.1976,
|
|
56
|
-
"output": 0.6352,
|
|
57
|
-
"cacheRead": 0.0988,
|
|
58
|
-
"cacheWrite": 0
|
|
59
|
-
},
|
|
60
|
-
"contextWindow": 262144,
|
|
61
|
-
"maxTokens": 262144,
|
|
62
|
-
"compat": {
|
|
63
|
-
"supportsStore": false,
|
|
64
|
-
"supportsDeveloperRole": false,
|
|
65
|
-
"maxTokensField": "max_tokens",
|
|
66
|
-
"supportsReasoningEffort": true
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"id": "zai-org/GLM-5.2",
|
|
71
|
-
"name": "GLM 5.2",
|
|
72
|
-
"reasoning": true,
|
|
73
|
-
"input": [
|
|
74
|
-
"text"
|
|
75
|
-
],
|
|
76
|
-
"cost": {
|
|
77
|
-
"input": 1.96,
|
|
78
|
-
"output": 6.16,
|
|
79
|
-
"cacheRead": 0.98,
|
|
80
|
-
"cacheWrite": 0
|
|
81
|
-
},
|
|
82
|
-
"contextWindow": 262144,
|
|
83
|
-
"maxTokens": 65536,
|
|
84
|
-
"compat": {
|
|
85
|
-
"supportsStore": false,
|
|
86
|
-
"supportsDeveloperRole": false,
|
|
87
|
-
"maxTokensField": "max_tokens",
|
|
88
|
-
"supportsReasoningEffort": true
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"id": "moonshotai/Kimi-K2.7-Code",
|
|
93
|
-
"name": "Kimi K2.7 Code",
|
|
94
|
-
"reasoning": true,
|
|
95
|
-
"input": [
|
|
96
|
-
"text",
|
|
97
|
-
"image"
|
|
98
|
-
],
|
|
99
|
-
"cost": {
|
|
100
|
-
"input": 1.072,
|
|
101
|
-
"output": 4.65,
|
|
102
|
-
"cacheRead": 0.536,
|
|
103
|
-
"cacheWrite": 0
|
|
104
|
-
},
|
|
105
|
-
"contextWindow": 262144,
|
|
106
|
-
"maxTokens": 262144,
|
|
107
|
-
"compat": {
|
|
108
|
-
"supportsStore": false,
|
|
109
|
-
"supportsDeveloperRole": false,
|
|
110
|
-
"maxTokensField": "max_tokens",
|
|
111
|
-
"supportsReasoningEffort": true
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"id": "Qwen/Qwen3.6-35B-A3B",
|
|
116
|
-
"name": "Qwen3.6 35B A3B",
|
|
117
|
-
"reasoning": true,
|
|
118
|
-
"input": [
|
|
119
|
-
"text",
|
|
120
|
-
"image"
|
|
121
|
-
],
|
|
122
|
-
"cost": {
|
|
123
|
-
"input": 0.1672,
|
|
124
|
-
"output": 1.11675,
|
|
125
|
-
"cacheRead": 0.0836,
|
|
126
|
-
"cacheWrite": 0
|
|
127
|
-
},
|
|
128
|
-
"contextWindow": 262140,
|
|
129
|
-
"maxTokens": 262140,
|
|
130
|
-
"compat": {
|
|
131
|
-
"supportsStore": false,
|
|
132
|
-
"supportsDeveloperRole": false,
|
|
133
|
-
"maxTokensField": "max_tokens",
|
|
134
|
-
"supportsReasoningEffort": true
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"id": "Qwen/Qwen3.6-27B",
|
|
139
|
-
"name": "Qwen3.6 27B",
|
|
140
|
-
"reasoning": true,
|
|
141
|
-
"input": [
|
|
142
|
-
"text",
|
|
143
|
-
"image"
|
|
144
|
-
],
|
|
145
|
-
"cost": {
|
|
146
|
-
"input": 0.373,
|
|
147
|
-
"output": 3.19,
|
|
148
|
-
"cacheRead": 0.1865,
|
|
149
|
-
"cacheWrite": 0
|
|
150
|
-
},
|
|
151
|
-
"contextWindow": 32768,
|
|
152
|
-
"maxTokens": 32768,
|
|
153
|
-
"compat": {
|
|
154
|
-
"supportsStore": false,
|
|
155
|
-
"supportsDeveloperRole": false,
|
|
156
|
-
"maxTokensField": "max_tokens",
|
|
157
|
-
"supportsReasoningEffort": true
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"id": "MiniMaxAI/MiniMax-M2.7",
|
|
162
|
-
"name": "MiniMax M2.7",
|
|
163
|
-
"reasoning": true,
|
|
164
|
-
"input": [
|
|
165
|
-
"text"
|
|
166
|
-
],
|
|
167
|
-
"cost": {
|
|
168
|
-
"input": 0.436,
|
|
169
|
-
"output": 1.72,
|
|
170
|
-
"cacheRead": 0.218,
|
|
171
|
-
"cacheWrite": 0
|
|
172
|
-
},
|
|
173
|
-
"contextWindow": 262100,
|
|
174
|
-
"maxTokens": 65536,
|
|
175
|
-
"compat": {
|
|
176
|
-
"supportsStore": false,
|
|
177
|
-
"supportsDeveloperRole": false,
|
|
178
|
-
"maxTokensField": "max_tokens",
|
|
179
|
-
"supportsReasoningEffort": true
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"id": "deepseek-ai/DeepSeek-V4-Flash",
|
|
184
|
-
"name": "DeepSeek V4 Flash",
|
|
185
|
-
"reasoning": true,
|
|
186
|
-
"input": [
|
|
187
|
-
"text"
|
|
188
|
-
],
|
|
189
|
-
"cost": {
|
|
190
|
-
"input": 0.20346,
|
|
191
|
-
"output": 0.36692,
|
|
192
|
-
"cacheRead": 0.10173,
|
|
193
|
-
"cacheWrite": 0
|
|
194
|
-
},
|
|
195
|
-
"contextWindow": 32768,
|
|
196
|
-
"maxTokens": 32768,
|
|
197
|
-
"compat": {
|
|
198
|
-
"supportsStore": false,
|
|
199
|
-
"supportsDeveloperRole": false,
|
|
200
|
-
"maxTokensField": "max_tokens",
|
|
201
|
-
"supportsReasoningEffort": true
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"id": "deepseek-ai/DeepSeek-V4-Pro",
|
|
206
|
-
"name": "DeepSeek V4 Pro",
|
|
207
|
-
"reasoning": true,
|
|
208
|
-
"input": [
|
|
209
|
-
"text"
|
|
210
|
-
],
|
|
211
|
-
"cost": {
|
|
212
|
-
"input": 1.52044,
|
|
213
|
-
"output": 3.04088,
|
|
214
|
-
"cacheRead": 0.76022,
|
|
215
|
-
"cacheWrite": 0
|
|
216
|
-
},
|
|
217
|
-
"contextWindow": 1048576,
|
|
218
|
-
"maxTokens": 600000,
|
|
219
|
-
"compat": {
|
|
220
|
-
"supportsStore": false,
|
|
221
|
-
"supportsDeveloperRole": false,
|
|
222
|
-
"maxTokensField": "max_tokens",
|
|
223
|
-
"supportsReasoningEffort": true
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
"id": "moonshotai/Kimi-K2.6",
|
|
228
|
-
"name": "Kimi K2.6",
|
|
229
|
-
"reasoning": true,
|
|
230
|
-
"input": [
|
|
231
|
-
"text",
|
|
232
|
-
"image"
|
|
233
|
-
],
|
|
234
|
-
"cost": {
|
|
235
|
-
"input": 0.842,
|
|
236
|
-
"output": 3.762,
|
|
237
|
-
"cacheRead": 0.421,
|
|
238
|
-
"cacheWrite": 0
|
|
239
|
-
},
|
|
240
|
-
"contextWindow": 262142,
|
|
241
|
-
"maxTokens": 262142,
|
|
242
|
-
"compat": {
|
|
243
|
-
"supportsStore": false,
|
|
244
|
-
"supportsDeveloperRole": false,
|
|
245
|
-
"maxTokensField": "max_tokens",
|
|
246
|
-
"supportsReasoningEffort": true
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
"id": "zai-org/GLM-5.1",
|
|
251
|
-
"name": "GLM 5.1",
|
|
252
|
-
"reasoning": true,
|
|
253
|
-
"input": [
|
|
254
|
-
"text"
|
|
255
|
-
],
|
|
256
|
-
"cost": {
|
|
257
|
-
"input": 1.2732,
|
|
258
|
-
"output": 4.1272,
|
|
259
|
-
"cacheRead": 0.6366,
|
|
260
|
-
"cacheWrite": 0
|
|
261
|
-
},
|
|
262
|
-
"contextWindow": 202750,
|
|
263
|
-
"maxTokens": 32768,
|
|
264
|
-
"compat": {
|
|
265
|
-
"supportsStore": false,
|
|
266
|
-
"supportsDeveloperRole": false,
|
|
267
|
-
"maxTokensField": "max_tokens",
|
|
268
|
-
"supportsReasoningEffort": true
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
"id": "MiniMaxAI/MiniMax-M2.5",
|
|
273
|
-
"name": "MiniMax M2.5",
|
|
274
|
-
"reasoning": true,
|
|
275
|
-
"input": [
|
|
276
|
-
"text"
|
|
277
|
-
],
|
|
278
|
-
"cost": {
|
|
279
|
-
"input": 0.287,
|
|
280
|
-
"output": 1.152,
|
|
281
|
-
"cacheRead": 0.1435,
|
|
282
|
-
"cacheWrite": 0
|
|
283
|
-
},
|
|
284
|
-
"contextWindow": 196600,
|
|
285
|
-
"maxTokens": 196600,
|
|
286
|
-
"compat": {
|
|
287
|
-
"supportsStore": false,
|
|
288
|
-
"supportsDeveloperRole": false,
|
|
289
|
-
"maxTokensField": "max_tokens",
|
|
290
|
-
"supportsReasoningEffort": true
|
|
291
|
-
}
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
"id": "moonshotai/Kimi-K2.5",
|
|
295
|
-
"name": "Kimi K2.5",
|
|
296
|
-
"reasoning": true,
|
|
297
|
-
"input": [
|
|
298
|
-
"text",
|
|
299
|
-
"image"
|
|
300
|
-
],
|
|
301
|
-
"cost": {
|
|
302
|
-
"input": 0.564,
|
|
303
|
-
"output": 2.82,
|
|
304
|
-
"cacheRead": 0.282,
|
|
305
|
-
"cacheWrite": 1.1
|
|
306
|
-
},
|
|
307
|
-
"contextWindow": 262144,
|
|
308
|
-
"maxTokens": 262144,
|
|
309
|
-
"compat": {
|
|
310
|
-
"supportsStore": false,
|
|
311
|
-
"supportsDeveloperRole": false,
|
|
312
|
-
"maxTokensField": "max_tokens",
|
|
313
|
-
"supportsReasoningEffort": true
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
"id": "zai-org/GLM-5",
|
|
318
|
-
"name": "GLM 5",
|
|
319
|
-
"reasoning": true,
|
|
320
|
-
"input": [
|
|
321
|
-
"text"
|
|
322
|
-
],
|
|
323
|
-
"cost": {
|
|
324
|
-
"input": 0.85,
|
|
325
|
-
"output": 2.622,
|
|
326
|
-
"cacheRead": 0.425,
|
|
327
|
-
"cacheWrite": 0
|
|
328
|
-
},
|
|
329
|
-
"contextWindow": 202752,
|
|
330
|
-
"maxTokens": 202752,
|
|
331
|
-
"compat": {
|
|
332
|
-
"supportsStore": false,
|
|
333
|
-
"supportsDeveloperRole": false,
|
|
334
|
-
"maxTokensField": "max_tokens",
|
|
335
|
-
"supportsReasoningEffort": true
|
|
336
|
-
}
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
"id": "deepseek-ai/DeepSeek-V3.2",
|
|
340
|
-
"name": "DeepSeek V3.2",
|
|
341
|
-
"reasoning": true,
|
|
342
|
-
"input": [
|
|
343
|
-
"text"
|
|
344
|
-
],
|
|
345
|
-
"cost": {
|
|
346
|
-
"input": 0.90054,
|
|
347
|
-
"output": 1.75646,
|
|
348
|
-
"cacheRead": 0.45027,
|
|
349
|
-
"cacheWrite": 0.5
|
|
350
|
-
},
|
|
351
|
-
"contextWindow": 163840,
|
|
352
|
-
"maxTokens": 163840,
|
|
353
|
-
"compat": {
|
|
354
|
-
"supportsStore": false,
|
|
355
|
-
"supportsDeveloperRole": false,
|
|
356
|
-
"maxTokensField": "max_tokens",
|
|
357
|
-
"supportsReasoningEffort": true
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"id": "moonshotai/Kimi-K2-Thinking",
|
|
362
|
-
"name": "Kimi K2 Thinking",
|
|
363
|
-
"reasoning": true,
|
|
364
|
-
"input": [
|
|
365
|
-
"text"
|
|
366
|
-
],
|
|
367
|
-
"cost": {
|
|
368
|
-
"input": 0.6,
|
|
369
|
-
"output": 2.5,
|
|
370
|
-
"cacheRead": 0.3,
|
|
371
|
-
"cacheWrite": 0.64
|
|
372
|
-
},
|
|
373
|
-
"contextWindow": 262144,
|
|
374
|
-
"maxTokens": 262144,
|
|
375
|
-
"compat": {
|
|
376
|
-
"supportsStore": false,
|
|
377
|
-
"supportsDeveloperRole": false,
|
|
378
|
-
"maxTokensField": "max_tokens",
|
|
379
|
-
"supportsReasoningEffort": true
|
|
380
|
-
}
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
"id": "zai-org/GLM-4.5-Air",
|
|
384
|
-
"name": "GLM-4.5-Air",
|
|
385
|
-
"reasoning": true,
|
|
386
|
-
"input": [
|
|
387
|
-
"text"
|
|
388
|
-
],
|
|
389
|
-
"cost": {
|
|
390
|
-
"input": 0.156667,
|
|
391
|
-
"output": 0.936667,
|
|
392
|
-
"cacheRead": 0.078334,
|
|
393
|
-
"cacheWrite": 0
|
|
394
|
-
},
|
|
395
|
-
"contextWindow": 131070,
|
|
396
|
-
"maxTokens": 131070,
|
|
397
|
-
"compat": {
|
|
398
|
-
"supportsStore": false,
|
|
399
|
-
"supportsDeveloperRole": false,
|
|
400
|
-
"maxTokensField": "max_tokens",
|
|
401
|
-
"supportsReasoningEffort": true
|
|
402
|
-
}
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
"id": "google/gemma-4-26b-a4b-it",
|
|
406
|
-
"name": "Gemma 4 26B A4B",
|
|
407
|
-
"reasoning": true,
|
|
408
|
-
"input": [
|
|
409
|
-
"text"
|
|
410
|
-
],
|
|
411
|
-
"cost": {
|
|
412
|
-
"input": 0.13,
|
|
413
|
-
"output": 0.43,
|
|
414
|
-
"cacheRead": 0.065,
|
|
415
|
-
"cacheWrite": 0
|
|
416
|
-
},
|
|
417
|
-
"contextWindow": 262142,
|
|
418
|
-
"maxTokens": 262142,
|
|
419
|
-
"compat": {
|
|
420
|
-
"supportsStore": false,
|
|
421
|
-
"supportsDeveloperRole": false,
|
|
422
|
-
"maxTokensField": "max_tokens",
|
|
423
|
-
"supportsReasoningEffort": true
|
|
424
|
-
}
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
"id": "zai-org/GLM-4.7-Flash",
|
|
428
|
-
"name": "GLM 4.7 Flash",
|
|
429
|
-
"reasoning": true,
|
|
430
|
-
"input": [
|
|
431
|
-
"text"
|
|
432
|
-
],
|
|
433
|
-
"cost": {
|
|
434
|
-
"input": 0.078875,
|
|
435
|
-
"output": 0.425,
|
|
436
|
-
"cacheRead": 0.039438,
|
|
437
|
-
"cacheWrite": 0.14
|
|
438
|
-
},
|
|
439
|
-
"contextWindow": 200000,
|
|
440
|
-
"maxTokens": 200000,
|
|
441
|
-
"compat": {
|
|
442
|
-
"supportsStore": false,
|
|
443
|
-
"supportsDeveloperRole": false,
|
|
444
|
-
"maxTokensField": "max_tokens",
|
|
445
|
-
"supportsReasoningEffort": true
|
|
446
|
-
}
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
"id": "zai-org/GLM-4.7",
|
|
450
|
-
"name": "GLM 4.7",
|
|
451
|
-
"reasoning": true,
|
|
452
|
-
"input": [
|
|
453
|
-
"text"
|
|
454
|
-
],
|
|
455
|
-
"cost": {
|
|
456
|
-
"input": 0.864,
|
|
457
|
-
"output": 2.24,
|
|
458
|
-
"cacheRead": 0.432,
|
|
459
|
-
"cacheWrite": 0.6
|
|
460
|
-
},
|
|
461
|
-
"contextWindow": 202752,
|
|
462
|
-
"maxTokens": 202752,
|
|
463
|
-
"compat": {
|
|
464
|
-
"supportsStore": false,
|
|
465
|
-
"supportsDeveloperRole": false,
|
|
466
|
-
"maxTokensField": "max_tokens",
|
|
467
|
-
"supportsReasoningEffort": true
|
|
468
|
-
}
|
|
469
|
-
},
|
|
470
|
-
{
|
|
471
|
-
"id": "moonshotai/Kimi-K2-Instruct-0905",
|
|
472
|
-
"name": "Kimi K2 Instruct 0905",
|
|
473
|
-
"reasoning": false,
|
|
474
|
-
"input": [
|
|
475
|
-
"text"
|
|
476
|
-
],
|
|
477
|
-
"cost": {
|
|
478
|
-
"input": 0.57,
|
|
479
|
-
"output": 2.3,
|
|
480
|
-
"cacheRead": 0.285,
|
|
481
|
-
"cacheWrite": 0.78
|
|
482
|
-
},
|
|
483
|
-
"contextWindow": 262144,
|
|
484
|
-
"maxTokens": 262144,
|
|
485
|
-
"compat": {
|
|
486
|
-
"supportsStore": false,
|
|
487
|
-
"supportsDeveloperRole": false,
|
|
488
|
-
"maxTokensField": "max_tokens"
|
|
489
|
-
}
|
|
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
|
-
{
|
|
514
|
-
"id": "openai/gpt-oss-120b",
|
|
515
|
-
"name": "gpt-oss-120b",
|
|
516
|
-
"reasoning": true,
|
|
517
|
-
"input": [
|
|
518
|
-
"text"
|
|
519
|
-
],
|
|
520
|
-
"cost": {
|
|
521
|
-
"input": 0.188,
|
|
522
|
-
"output": 0.7,
|
|
523
|
-
"cacheRead": 0.094,
|
|
524
|
-
"cacheWrite": 0.04
|
|
525
|
-
},
|
|
526
|
-
"contextWindow": 131072,
|
|
527
|
-
"maxTokens": 131072,
|
|
528
|
-
"compat": {
|
|
529
|
-
"supportsStore": false,
|
|
530
|
-
"supportsDeveloperRole": false,
|
|
531
|
-
"maxTokensField": "max_tokens",
|
|
532
|
-
"supportsReasoningEffort": true
|
|
533
|
-
}
|
|
534
|
-
},
|
|
535
|
-
{
|
|
536
|
-
"id": "deepseek-ai/DeepSeek-R1-0528",
|
|
537
|
-
"name": "DeepSeek R1 0528",
|
|
538
|
-
"reasoning": true,
|
|
539
|
-
"input": [
|
|
540
|
-
"text"
|
|
541
|
-
],
|
|
542
|
-
"cost": {
|
|
543
|
-
"input": 0.56775,
|
|
544
|
-
"output": 2.279,
|
|
545
|
-
"cacheRead": 0.283875,
|
|
546
|
-
"cacheWrite": 0.8
|
|
547
|
-
},
|
|
548
|
-
"contextWindow": 128000,
|
|
549
|
-
"maxTokens": 128000,
|
|
550
|
-
"compat": {
|
|
551
|
-
"supportsStore": false,
|
|
552
|
-
"supportsDeveloperRole": false,
|
|
553
|
-
"maxTokensField": "max_tokens",
|
|
554
|
-
"supportsReasoningEffort": true
|
|
555
|
-
}
|
|
556
|
-
},
|
|
557
|
-
{
|
|
558
|
-
"id": "zai-org/GLM-4.6",
|
|
559
|
-
"name": "GLM 4.6",
|
|
560
|
-
"reasoning": true,
|
|
561
|
-
"input": [
|
|
562
|
-
"text"
|
|
563
|
-
],
|
|
564
|
-
"cost": {
|
|
565
|
-
"input": 0.536,
|
|
566
|
-
"output": 2.07,
|
|
567
|
-
"cacheRead": 0.268,
|
|
568
|
-
"cacheWrite": 0.7
|
|
569
|
-
},
|
|
570
|
-
"contextWindow": 131072,
|
|
571
|
-
"maxTokens": 131072,
|
|
572
|
-
"compat": {
|
|
573
|
-
"supportsStore": false,
|
|
574
|
-
"supportsDeveloperRole": false,
|
|
575
|
-
"maxTokensField": "max_tokens",
|
|
576
|
-
"supportsReasoningEffort": true
|
|
577
|
-
}
|
|
578
|
-
},
|
|
579
|
-
{
|
|
580
|
-
"id": "Qwen/Qwen3-Next-80B-A3B-Instruct",
|
|
581
|
-
"name": "Qwen3 Next 80B A3B Instruct",
|
|
582
|
-
"reasoning": false,
|
|
583
|
-
"input": [
|
|
584
|
-
"text"
|
|
585
|
-
],
|
|
586
|
-
"cost": {
|
|
587
|
-
"input": 0.1175,
|
|
588
|
-
"output": 1.136,
|
|
589
|
-
"cacheRead": 0.05875,
|
|
590
|
-
"cacheWrite": 0.12
|
|
591
|
-
},
|
|
592
|
-
"contextWindow": 262144,
|
|
593
|
-
"maxTokens": 262144,
|
|
594
|
-
"compat": {
|
|
595
|
-
"supportsStore": false,
|
|
596
|
-
"supportsDeveloperRole": false,
|
|
597
|
-
"maxTokensField": "max_tokens"
|
|
598
|
-
}
|
|
599
|
-
},
|
|
600
|
-
{
|
|
601
|
-
"id": "Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar",
|
|
602
|
-
"name": "Qwen3 Coder 480B A35B Instruct INT4 Mixed AR",
|
|
603
|
-
"reasoning": false,
|
|
604
|
-
"input": [
|
|
605
|
-
"text"
|
|
606
|
-
],
|
|
607
|
-
"cost": {
|
|
608
|
-
"input": 0.569,
|
|
609
|
-
"output": 2.135,
|
|
610
|
-
"cacheRead": 0.2845,
|
|
611
|
-
"cacheWrite": 0.44
|
|
612
|
-
},
|
|
613
|
-
"contextWindow": 106000,
|
|
614
|
-
"maxTokens": 106000,
|
|
615
|
-
"compat": {
|
|
616
|
-
"supportsStore": false,
|
|
617
|
-
"supportsDeveloperRole": false,
|
|
618
|
-
"maxTokensField": "max_tokens"
|
|
619
|
-
}
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
"id": "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
|
|
623
|
-
"name": "Llama 4 Maverick 17B 128E Instruct FP8",
|
|
624
|
-
"reasoning": false,
|
|
625
|
-
"input": [
|
|
626
|
-
"text",
|
|
627
|
-
"image"
|
|
628
|
-
],
|
|
629
|
-
"cost": {
|
|
630
|
-
"input": 0.284,
|
|
631
|
-
"output": 0.934,
|
|
632
|
-
"cacheRead": 0.142,
|
|
633
|
-
"cacheWrite": 0.3
|
|
634
|
-
},
|
|
635
|
-
"contextWindow": 430000,
|
|
636
|
-
"maxTokens": 430000,
|
|
637
|
-
"compat": {
|
|
638
|
-
"supportsStore": false,
|
|
639
|
-
"supportsDeveloperRole": false,
|
|
640
|
-
"maxTokensField": "max_tokens"
|
|
641
|
-
}
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
"id": "mistralai/Mistral-Nemo-Instruct-2407",
|
|
645
|
-
"name": "Mistral Nemo Instruct 2407",
|
|
646
|
-
"reasoning": false,
|
|
647
|
-
"input": [
|
|
648
|
-
"text"
|
|
649
|
-
],
|
|
650
|
-
"cost": {
|
|
651
|
-
"input": 0.069667,
|
|
652
|
-
"output": 0.116667,
|
|
653
|
-
"cacheRead": 0.034834,
|
|
654
|
-
"cacheWrite": 0.04
|
|
655
|
-
},
|
|
656
|
-
"contextWindow": 128000,
|
|
657
|
-
"maxTokens": 128000,
|
|
658
|
-
"compat": {
|
|
659
|
-
"supportsStore": false,
|
|
660
|
-
"supportsDeveloperRole": false,
|
|
661
|
-
"maxTokensField": "max_tokens"
|
|
662
|
-
}
|
|
663
|
-
},
|
|
664
|
-
{
|
|
665
|
-
"id": "openai/gpt-oss-20b",
|
|
666
|
-
"name": "gpt-oss-20b",
|
|
667
|
-
"reasoning": true,
|
|
668
|
-
"input": [
|
|
669
|
-
"text"
|
|
670
|
-
],
|
|
671
|
-
"cost": {
|
|
672
|
-
"input": 0.053,
|
|
673
|
-
"output": 0.216,
|
|
674
|
-
"cacheRead": 0.0265,
|
|
675
|
-
"cacheWrite": 0.03
|
|
676
|
-
},
|
|
677
|
-
"contextWindow": 64000,
|
|
678
|
-
"maxTokens": 64000,
|
|
679
|
-
"compat": {
|
|
680
|
-
"supportsStore": false,
|
|
681
|
-
"supportsDeveloperRole": false,
|
|
682
|
-
"maxTokensField": "max_tokens",
|
|
683
|
-
"supportsReasoningEffort": true
|
|
684
|
-
}
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
"id": "meta-llama/Llama-3.3-70B-Instruct",
|
|
688
|
-
"name": "Llama 3.3 70B Instruct",
|
|
689
|
-
"reasoning": false,
|
|
690
|
-
"input": [
|
|
691
|
-
"text"
|
|
692
|
-
],
|
|
693
|
-
"cost": {
|
|
694
|
-
"input": 0.5126,
|
|
695
|
-
"output": 1.0446,
|
|
696
|
-
"cacheRead": 0.2563,
|
|
697
|
-
"cacheWrite": 0.2
|
|
698
|
-
},
|
|
699
|
-
"contextWindow": 128000,
|
|
700
|
-
"maxTokens": 128000,
|
|
701
|
-
"compat": {
|
|
702
|
-
"supportsStore": false,
|
|
703
|
-
"supportsDeveloperRole": false,
|
|
704
|
-
"maxTokensField": "max_tokens"
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
]
|
package/patch.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"moonshotai/Kimi-K2-Thinking": {
|
|
3
|
-
"reasoning": true,
|
|
4
|
-
"name": "Kimi K2 Thinking",
|
|
5
|
-
"compat": {
|
|
6
|
-
"supportsReasoningEffort": true
|
|
7
|
-
}
|
|
8
|
-
},
|
|
9
|
-
"deepseek-ai/DeepSeek-R1-0528": {
|
|
10
|
-
"reasoning": true,
|
|
11
|
-
"name": "DeepSeek R1 0528",
|
|
12
|
-
"compat": {
|
|
13
|
-
"supportsReasoningEffort": true
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
package/scripts/update-models.js
DELETED
|
@@ -1,476 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Script to update IO Intelligence models from the API
|
|
5
|
-
*
|
|
6
|
-
* Fetches the model list from https://api.intelligence.io.solutions/api/v1/models
|
|
7
|
-
* and regenerates models.json and the README model table.
|
|
8
|
-
*
|
|
9
|
-
* Requires IOINTELLIGENCE_API_KEY environment variable.
|
|
10
|
-
* Usage: IOINTELLIGENCE_API_KEY=your-key node scripts/update-models.js
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import https from 'https';
|
|
14
|
-
import fs from 'fs';
|
|
15
|
-
import path from 'path';
|
|
16
|
-
import { fileURLToPath } from 'url';
|
|
17
|
-
|
|
18
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
19
|
-
const __dirname = path.dirname(__filename);
|
|
20
|
-
|
|
21
|
-
const API_BASE = 'https://api.intelligence.io.solutions/api/v1';
|
|
22
|
-
const MODELS_PATH = path.join(process.cwd(), 'models.json');
|
|
23
|
-
const PATCH_PATH = path.join(process.cwd(), 'patch.json');
|
|
24
|
-
const CUSTOM_MODELS_PATH = path.join(process.cwd(), 'custom-models.json');
|
|
25
|
-
|
|
26
|
-
// ─── HTTP helpers ───────────────────────────────────────────────────────────
|
|
27
|
-
|
|
28
|
-
function fetchJSON(url, headers = {}) {
|
|
29
|
-
return new Promise((resolve, reject) => {
|
|
30
|
-
const req = https.get(url, { headers }, (res) => {
|
|
31
|
-
let data = '';
|
|
32
|
-
res.on('data', (chunk) => (data += chunk));
|
|
33
|
-
res.on('end', () => {
|
|
34
|
-
try {
|
|
35
|
-
resolve(JSON.parse(data));
|
|
36
|
-
} catch (e) {
|
|
37
|
-
reject(new Error(`Failed to parse JSON from ${url}: ${e.message}`));
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
req.on('error', reject);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// ─── Model transformation ──────────────────────────────────────────────────
|
|
46
|
-
|
|
47
|
-
/** Clean up the display name from the API. */
|
|
48
|
-
function cleanName(apiName, apiId) {
|
|
49
|
-
// API returns names like "MoonshotAI: Kimi K2.6" or "MiniMaxAI/MiniMax-M2.5"
|
|
50
|
-
let name = apiName;
|
|
51
|
-
const colonIdx = name.indexOf(': ');
|
|
52
|
-
if (colonIdx > 0 && colonIdx < 25) {
|
|
53
|
-
name = name.substring(colonIdx + 2);
|
|
54
|
-
}
|
|
55
|
-
if (name.includes('/') && !name.includes(' ')) {
|
|
56
|
-
const parts = name.split('/');
|
|
57
|
-
name = parts[parts.length - 1].replace(/-/g, ' ');
|
|
58
|
-
}
|
|
59
|
-
if (name === 'R1 0528') name = 'DeepSeek R1 0528';
|
|
60
|
-
return name;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function convertModel(apiModel, existingModelsMap) {
|
|
64
|
-
const id = apiModel.id;
|
|
65
|
-
|
|
66
|
-
// Preserve existing curated data (reasoning, compat, etc.)
|
|
67
|
-
if (existingModelsMap[id]) {
|
|
68
|
-
const existing = { ...existingModelsMap[id] };
|
|
69
|
-
// Update mutable fields from API
|
|
70
|
-
const ctx = apiModel.context_window || 0;
|
|
71
|
-
const maxTok = apiModel.max_tokens || ctx;
|
|
72
|
-
const priceIn = (apiModel.input_token_price || 0) * 1_000_000;
|
|
73
|
-
const priceOut = (apiModel.output_token_price || 0) * 1_000_000;
|
|
74
|
-
const cacheRead = (apiModel.cache_read_token_price || 0) * 1_000_000;
|
|
75
|
-
const cacheWrite = (apiModel.cache_write_token_price || 0) * 1_000_000;
|
|
76
|
-
if (ctx > 0) existing.contextWindow = ctx;
|
|
77
|
-
if (maxTok > 0) existing.maxTokens = maxTok;
|
|
78
|
-
// Round to 6 decimals of $/M: normalizes float noise from the ×1e6 multiply
|
|
79
|
-
// and preserves sub-cent cache prices like 0.003 (cent rounding erased them).
|
|
80
|
-
if (priceIn > 0) existing.cost.input = Math.round(priceIn * 1e6) / 1e6;
|
|
81
|
-
if (priceOut > 0) existing.cost.output = Math.round(priceOut * 1e6) / 1e6;
|
|
82
|
-
if (cacheRead > 0) existing.cost.cacheRead = Math.round(cacheRead * 1e6) / 1e6;
|
|
83
|
-
if (cacheWrite > 0) existing.cost.cacheWrite = Math.round(cacheWrite * 1e6) / 1e6;
|
|
84
|
-
const hasVision = apiModel.supports_images_input === true || (apiModel.input_modalities || []).includes('image');
|
|
85
|
-
const hasReasoning = apiModel.capabilities?.reasoning === true || apiModel.supports_reasoning === true;
|
|
86
|
-
existing.input = hasVision ? ['text', 'image'] : ['text'];
|
|
87
|
-
existing.reasoning = hasReasoning;
|
|
88
|
-
existing.compat = {
|
|
89
|
-
...(existing.compat || {}),
|
|
90
|
-
supportsStore: false,
|
|
91
|
-
supportsDeveloperRole: false,
|
|
92
|
-
maxTokensField: 'max_tokens',
|
|
93
|
-
...(hasReasoning ? { supportsReasoningEffort: true } : {}),
|
|
94
|
-
};
|
|
95
|
-
return existing;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// New model — build from API data + sensible defaults
|
|
99
|
-
const ctx = apiModel.context_window || 0;
|
|
100
|
-
const maxTok = apiModel.max_tokens || ctx;
|
|
101
|
-
const input = ['text'];
|
|
102
|
-
if (apiModel.supports_images_input === true || (apiModel.input_modalities || []).includes('image')) input.push('image');
|
|
103
|
-
|
|
104
|
-
const priceIn = (apiModel.input_token_price || 0) * 1_000_000;
|
|
105
|
-
const priceOut = (apiModel.output_token_price || 0) * 1_000_000;
|
|
106
|
-
const cacheRead = (apiModel.cache_read_token_price || 0) * 1_000_000;
|
|
107
|
-
const cacheWrite = (apiModel.cache_write_token_price || 0) * 1_000_000;
|
|
108
|
-
|
|
109
|
-
return {
|
|
110
|
-
id,
|
|
111
|
-
name: cleanName(apiModel.name, id),
|
|
112
|
-
reasoning: apiModel.capabilities?.reasoning === true || apiModel.supports_reasoning === true,
|
|
113
|
-
input,
|
|
114
|
-
cost: {
|
|
115
|
-
input: Math.round(priceIn * 1e6) / 1e6,
|
|
116
|
-
output: Math.round(priceOut * 1e6) / 1e6,
|
|
117
|
-
cacheRead: Math.round(cacheRead * 1e6) / 1e6,
|
|
118
|
-
cacheWrite: Math.round(cacheWrite * 1e6) / 1e6,
|
|
119
|
-
},
|
|
120
|
-
contextWindow: ctx,
|
|
121
|
-
maxTokens: maxTok,
|
|
122
|
-
compat: {
|
|
123
|
-
supportsStore: false,
|
|
124
|
-
supportsDeveloperRole: false,
|
|
125
|
-
maxTokensField: 'max_tokens',
|
|
126
|
-
...((apiModel.capabilities?.reasoning === true || apiModel.supports_reasoning === true)
|
|
127
|
-
? { supportsReasoningEffort: true }
|
|
128
|
-
: {}),
|
|
129
|
-
},
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// ─── Patch & Custom Models ──────────────────────────────────────────────────
|
|
134
|
-
|
|
135
|
-
function applyPatch(model, patch) {
|
|
136
|
-
const result = { ...model };
|
|
137
|
-
if (patch.name !== undefined) result.name = patch.name;
|
|
138
|
-
if (patch.reasoning !== undefined) result.reasoning = patch.reasoning;
|
|
139
|
-
if (patch.input !== undefined) result.input = patch.input;
|
|
140
|
-
if (patch.contextWindow !== undefined) result.contextWindow = patch.contextWindow;
|
|
141
|
-
if (patch.maxTokens !== undefined) result.maxTokens = patch.maxTokens;
|
|
142
|
-
if (patch.thinkingLevelMap !== undefined) result.thinkingLevelMap = { ...patch.thinkingLevelMap };
|
|
143
|
-
if (patch.cost) {
|
|
144
|
-
result.cost = {
|
|
145
|
-
input: patch.cost.input ?? result.cost.input,
|
|
146
|
-
output: patch.cost.output ?? result.cost.output,
|
|
147
|
-
cacheRead: patch.cost.cacheRead ?? result.cost.cacheRead,
|
|
148
|
-
cacheWrite: patch.cost.cacheWrite ?? result.cost.cacheWrite,
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
if (patch.compat) {
|
|
152
|
-
result.compat = { ...(result.compat || {}), ...patch.compat };
|
|
153
|
-
}
|
|
154
|
-
if (!result.reasoning && result.compat?.thinkingFormat) {
|
|
155
|
-
delete result.compat.thinkingFormat;
|
|
156
|
-
}
|
|
157
|
-
if (!result.reasoning && result.thinkingLevelMap) {
|
|
158
|
-
delete result.thinkingLevelMap;
|
|
159
|
-
}
|
|
160
|
-
if (result.compat && Object.keys(result.compat).length === 0) {
|
|
161
|
-
delete result.compat;
|
|
162
|
-
}
|
|
163
|
-
return result;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
function buildModels(baseModels, customModels, patchData) {
|
|
167
|
-
const modelMap = new Map();
|
|
168
|
-
for (const model of baseModels) {
|
|
169
|
-
modelMap.set(model.id, model);
|
|
170
|
-
}
|
|
171
|
-
for (const [id, patchEntry] of Object.entries(patchData)) {
|
|
172
|
-
const existing = modelMap.get(id);
|
|
173
|
-
if (existing) {
|
|
174
|
-
modelMap.set(id, applyPatch(existing, patchEntry));
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
for (const model of customModels) {
|
|
178
|
-
const existing = modelMap.get(model.id);
|
|
179
|
-
const patchEntry = patchData[model.id];
|
|
180
|
-
if (existing && patchEntry) {
|
|
181
|
-
modelMap.set(model.id, applyPatch(model, patchEntry));
|
|
182
|
-
} else if (existing) {
|
|
183
|
-
modelMap.set(model.id, model);
|
|
184
|
-
} else if (patchEntry) {
|
|
185
|
-
modelMap.set(model.id, applyPatch(model, patchEntry));
|
|
186
|
-
} else {
|
|
187
|
-
modelMap.set(model.id, model);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
return Array.from(modelMap.values());
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// ─── README generation ──────────────────────────────────────────────────────
|
|
194
|
-
|
|
195
|
-
function formatCost(cost) {
|
|
196
|
-
if (cost === 0) return 'Free';
|
|
197
|
-
if (cost < 0.01) return `<$0.01`;
|
|
198
|
-
return `$${cost.toFixed(2)}`;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function formatCtx(num) {
|
|
202
|
-
if (num >= 1_000_000) return `${(num / 1_000_000).toFixed(1)}M`;
|
|
203
|
-
if (num >= 1_000) return `${Math.round(num / 1_000)}K`;
|
|
204
|
-
return num.toString();
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function generateReadme(models) {
|
|
208
|
-
const sorted = [...models].sort((a, b) => {
|
|
209
|
-
// Sort by: reasoning first, then vision, then by cost
|
|
210
|
-
if (a.reasoning !== b.reasoning) return b.reasoning - a.reasoning;
|
|
211
|
-
const aVis = a.input.includes('image') ? 1 : 0;
|
|
212
|
-
const bVis = b.input.includes('image') ? 1 : 0;
|
|
213
|
-
if (aVis !== bVis) return bVis - aVis;
|
|
214
|
-
return a.id.localeCompare(b.id);
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
const rows = sorted.map(m => {
|
|
218
|
-
const vision = m.input.includes('image') ? '✅' : '❌';
|
|
219
|
-
const reasoning = m.reasoning ? '✅' : '❌';
|
|
220
|
-
const cache = m.cost.cacheRead > 0 ? '✅' : '❌';
|
|
221
|
-
const displayName = m.name;
|
|
222
|
-
return `| ${displayName} | \`${m.id}\` | ${formatCtx(m.contextWindow)} | ${formatCtx(m.maxTokens)} | ${vision} | ${reasoning} | ${cache} | ${formatCost(m.cost.input)} | ${formatCost(m.cost.output)} |`;
|
|
223
|
-
}).join('\n');
|
|
224
|
-
|
|
225
|
-
const readme = `# pi-io-provider
|
|
226
|
-
|
|
227
|
-
A [pi](https://github.com/badlogic/pi-mono) extension that adds [IO Intelligence](https://io.net) as a custom model provider.
|
|
228
|
-
|
|
229
|
-
## Features
|
|
230
|
-
|
|
231
|
-
- **OpenAI-compatible API** — Uses IO Intelligence's \`/api/v1/chat/completions\` endpoint
|
|
232
|
-
- **23+ AI models** — DeepSeek, Kimi, GLM, Llama, Qwen, Mistral, and more
|
|
233
|
-
- **Reasoning models** — DeepSeek R1, Kimi K2 Thinking with extended reasoning
|
|
234
|
-
- **Vision models** — Kimi K2.5/K2.6, Llama 4 Maverick, Llama 3.2 Vision, Qwen2.5 VL, Mistral Large
|
|
235
|
-
- **Prompt caching** — Cache read/write support on most models
|
|
236
|
-
- **Confidential inference** — Verifiable TEE inference with attestation (via /private/ endpoints)
|
|
237
|
-
- **Streaming** — Real-time token streaming
|
|
238
|
-
|
|
239
|
-
## Available Models
|
|
240
|
-
|
|
241
|
-
| Model | ID | Context | Max Output | Vision | Reasoning | Cache | Input $/M | Output $/M |
|
|
242
|
-
|-------|----|---------|------------|--------|-----------|-------|-----------|------------|
|
|
243
|
-
${rows}
|
|
244
|
-
|
|
245
|
-
*Costs are per million tokens. Cache read/write pricing available on most models.*
|
|
246
|
-
|
|
247
|
-
## Installation
|
|
248
|
-
|
|
249
|
-
### Option 1: Using \`pi install\` (Recommended)
|
|
250
|
-
|
|
251
|
-
Install directly from GitHub:
|
|
252
|
-
|
|
253
|
-
\`\`\`bash
|
|
254
|
-
pi install git:github.com/monotykamary/pi-io-provider
|
|
255
|
-
\`\`\`
|
|
256
|
-
|
|
257
|
-
Then set your API key and run pi:
|
|
258
|
-
\`\`\`bash
|
|
259
|
-
# Recommended: add to auth.json
|
|
260
|
-
# See Authentication section below
|
|
261
|
-
|
|
262
|
-
# Or set as environment variable
|
|
263
|
-
export IOINTELLIGENCE_API_KEY=your-api-key-here
|
|
264
|
-
|
|
265
|
-
pi
|
|
266
|
-
\`\`\`
|
|
267
|
-
|
|
268
|
-
Get your API key from [io.net](https://io.net).
|
|
269
|
-
|
|
270
|
-
### Option 2: Manual Clone
|
|
271
|
-
|
|
272
|
-
1. Clone this repository:
|
|
273
|
-
\`\`\`bash
|
|
274
|
-
git clone https://github.com/monotykamary/pi-io-provider.git
|
|
275
|
-
cd pi-io-provider
|
|
276
|
-
\`\`\`
|
|
277
|
-
|
|
278
|
-
2. Set your IO Intelligence API key:
|
|
279
|
-
\`\`\`bash
|
|
280
|
-
# Recommended: add to auth.json
|
|
281
|
-
# See Authentication section below
|
|
282
|
-
|
|
283
|
-
# Or set as environment variable
|
|
284
|
-
export IOINTELLIGENCE_API_KEY=your-api-key-here
|
|
285
|
-
\`\`\`
|
|
286
|
-
|
|
287
|
-
3. Run pi with the extension:
|
|
288
|
-
\`\`\`bash
|
|
289
|
-
pi -e /path/to/pi-io-provider
|
|
290
|
-
\`\`\`
|
|
291
|
-
|
|
292
|
-
## Authentication
|
|
293
|
-
|
|
294
|
-
The IO Intelligence API key can be configured in multiple ways (resolved in this order):
|
|
295
|
-
|
|
296
|
-
1. **\`auth.json\`** (recommended) — Add to \`~/.pi/agent/auth.json\`:
|
|
297
|
-
\`\`\`json
|
|
298
|
-
{ "io-intelligence": { "type": "api_key", "key": "your-api-key" } }
|
|
299
|
-
\`\`\`
|
|
300
|
-
The \`key\` field supports literal values, env var names, and shell commands (prefix with \`!\`). See [pi's auth file docs](https://github.com/badlogic/pi-mono) for details.
|
|
301
|
-
2. **Runtime override** — Use the \`--api-key\` CLI flag
|
|
302
|
-
3. **Environment variable** — Set \`IOINTELLIGENCE_API_KEY\`
|
|
303
|
-
|
|
304
|
-
Get your API key from [io.net](https://io.net).
|
|
305
|
-
|
|
306
|
-
## Environment Variables
|
|
307
|
-
|
|
308
|
-
| Variable | Required | Description |
|
|
309
|
-
|----------|----------|-------------|
|
|
310
|
-
| \`IOINTELLIGENCE_API_KEY\` | No | Your IO Intelligence API key (fallback if not in auth.json) |
|
|
311
|
-
|
|
312
|
-
## Configuration
|
|
313
|
-
|
|
314
|
-
Add to your pi configuration for automatic loading:
|
|
315
|
-
|
|
316
|
-
\`\`\`json
|
|
317
|
-
{
|
|
318
|
-
"extensions": [
|
|
319
|
-
"/path/to/pi-io-provider"
|
|
320
|
-
]
|
|
321
|
-
}
|
|
322
|
-
\`\`\`
|
|
323
|
-
|
|
324
|
-
## Usage
|
|
325
|
-
|
|
326
|
-
Once loaded, select a model with:
|
|
327
|
-
|
|
328
|
-
\`\`\`
|
|
329
|
-
/model io-intelligence deepseek-ai/DeepSeek-R1-0528
|
|
330
|
-
\`\`\`
|
|
331
|
-
|
|
332
|
-
Or use \`/models\` to browse all available IO Intelligence models.
|
|
333
|
-
|
|
334
|
-
## API Documentation
|
|
335
|
-
|
|
336
|
-
- IO Intelligence Docs: https://io.net/docs/guides/confidential-inference/quick-start
|
|
337
|
-
- OpenAI-compatible endpoint: \`https://api.intelligence.io.solutions/api/v1\`
|
|
338
|
-
- Models endpoint: \`https://api.intelligence.io.solutions/api/v1/models\`
|
|
339
|
-
- Confidential inference: \`https://api.intelligence.io.solutions/api/v1/private/completions\`
|
|
340
|
-
|
|
341
|
-
## License
|
|
342
|
-
|
|
343
|
-
MIT
|
|
344
|
-
`;
|
|
345
|
-
|
|
346
|
-
return readme;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
// ─── Main ────────────────────────────────────────────────────────────────────
|
|
350
|
-
|
|
351
|
-
// Grace period for delisted models: update-models.js moves models the API no
|
|
352
|
-
// longer lists into deprecated-models.json (stamped with deprecatedAt) instead
|
|
353
|
-
// of dropping them; the runtime appends them back so sessions and saved model
|
|
354
|
-
// settings keep working, and after 14 days they are evicted permanently.
|
|
355
|
-
const DEPRECATED_MODEL_TTL_MS = 14 * 24 * 60 * 60 * 1000;
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Reconcile deprecated-models.json against the freshly fetched model list.
|
|
359
|
-
* - in old models.json but not the API: moved into the deprecated file
|
|
360
|
-
* (deprecatedAt = now; preserved on repeat runs so the grace clock is not reset)
|
|
361
|
-
* - back in the API: resurrected (dropped from the deprecated file)
|
|
362
|
-
* - deprecatedAt older than 14 days: evicted permanently
|
|
363
|
-
* Must run BEFORE the new models.json is written; it reads the old file itself.
|
|
364
|
-
*/
|
|
365
|
-
function updateDeprecatedModels(modelsJsonPath, newModels) {
|
|
366
|
-
const deprecatedPath = path.join(path.dirname(modelsJsonPath), 'deprecated-models.json');
|
|
367
|
-
|
|
368
|
-
let oldModels = [];
|
|
369
|
-
try {
|
|
370
|
-
const parsed = JSON.parse(fs.readFileSync(modelsJsonPath, 'utf8'));
|
|
371
|
-
if (Array.isArray(parsed)) oldModels = parsed;
|
|
372
|
-
} catch { /* first run: no previous models.json */ }
|
|
373
|
-
|
|
374
|
-
let deprecated = {};
|
|
375
|
-
try {
|
|
376
|
-
const parsed = JSON.parse(fs.readFileSync(deprecatedPath, 'utf8'));
|
|
377
|
-
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) deprecated = parsed;
|
|
378
|
-
} catch { /* no graveyard yet */ }
|
|
379
|
-
|
|
380
|
-
const currentIds = new Set(newModels.map(m => m.id));
|
|
381
|
-
const now = new Date().toISOString();
|
|
382
|
-
const added = [];
|
|
383
|
-
const resurrected = [];
|
|
384
|
-
const evicted = [];
|
|
385
|
-
|
|
386
|
-
for (const old of oldModels) {
|
|
387
|
-
if (old && old.id && !currentIds.has(old.id) && !deprecated[old.id]) {
|
|
388
|
-
deprecated[old.id] = { ...old, deprecatedAt: now };
|
|
389
|
-
added.push(old.id);
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
for (const [id, entry] of Object.entries(deprecated)) {
|
|
394
|
-
if (currentIds.has(id)) {
|
|
395
|
-
delete deprecated[id];
|
|
396
|
-
resurrected.push(id);
|
|
397
|
-
continue;
|
|
398
|
-
}
|
|
399
|
-
const removedAt = Date.parse(entry && entry.deprecatedAt ? entry.deprecatedAt : '');
|
|
400
|
-
if (Number.isNaN(removedAt) || Date.now() - removedAt > DEPRECATED_MODEL_TTL_MS) {
|
|
401
|
-
delete deprecated[id];
|
|
402
|
-
evicted.push(id);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
if (added.length > 0 || resurrected.length > 0 || evicted.length > 0) {
|
|
407
|
-
fs.writeFileSync(deprecatedPath, JSON.stringify(deprecated, null, 2) + '\n');
|
|
408
|
-
console.log('Updated deprecated-models.json ' + JSON.stringify({ added, resurrected, evicted }));
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
async function main() {
|
|
413
|
-
const apiKey = process.env.IOINTELLIGENCE_API_KEY;
|
|
414
|
-
if (!apiKey) {
|
|
415
|
-
console.error('Error: IOINTELLIGENCE_API_KEY environment variable is required');
|
|
416
|
-
console.error('Usage: IOINTELLIGENCE_API_KEY=your-key node scripts/update-models.js');
|
|
417
|
-
process.exit(1);
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
console.log('Fetching models from IO Intelligence API...\n');
|
|
421
|
-
|
|
422
|
-
try {
|
|
423
|
-
const data = await fetchJSON(`${API_BASE}/models`, {
|
|
424
|
-
Authorization: `Bearer ${apiKey}`,
|
|
425
|
-
});
|
|
426
|
-
|
|
427
|
-
const apiModels = data.data || [];
|
|
428
|
-
console.log(`Total models from API: ${apiModels.length}`);
|
|
429
|
-
|
|
430
|
-
// Load existing models.json — source of truth for curated specs
|
|
431
|
-
let existingModels = [];
|
|
432
|
-
try {
|
|
433
|
-
existingModels = JSON.parse(fs.readFileSync(MODELS_PATH, 'utf8'));
|
|
434
|
-
} catch (e) {
|
|
435
|
-
// File might not exist or be invalid
|
|
436
|
-
}
|
|
437
|
-
const existingModelsMap = {};
|
|
438
|
-
for (const m of existingModels) {
|
|
439
|
-
existingModelsMap[m.id] = m;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
const models = apiModels.map(m => convertModel(m, existingModelsMap));
|
|
443
|
-
console.log(`Converted ${models.length} models`);
|
|
444
|
-
|
|
445
|
-
// Save models.json (pure API output, no patch/custom baked in)
|
|
446
|
-
// Move delisted models to deprecated-models.json BEFORE models.json is overwritten
|
|
447
|
-
updateDeprecatedModels(MODELS_PATH, models);
|
|
448
|
-
fs.writeFileSync(MODELS_PATH, JSON.stringify(models, null, 2) + '\n');
|
|
449
|
-
console.log(`✓ Saved ${models.length} models to models.json`);
|
|
450
|
-
|
|
451
|
-
// Build full model list for README: base → patch → custom
|
|
452
|
-
let patchData = {};
|
|
453
|
-
let customModels = [];
|
|
454
|
-
try {
|
|
455
|
-
patchData = JSON.parse(fs.readFileSync(PATCH_PATH, 'utf8'));
|
|
456
|
-
} catch {}
|
|
457
|
-
try {
|
|
458
|
-
customModels = JSON.parse(fs.readFileSync(CUSTOM_MODELS_PATH, 'utf8'));
|
|
459
|
-
if (!Array.isArray(customModels)) customModels = [];
|
|
460
|
-
} catch {}
|
|
461
|
-
const readmeModels = buildModels(models, customModels, patchData);
|
|
462
|
-
readmeModels.sort((a, b) => a.name.localeCompare(b.name));
|
|
463
|
-
|
|
464
|
-
// Update README
|
|
465
|
-
const readme = generateReadme(readmeModels);
|
|
466
|
-
fs.writeFileSync(path.join(process.cwd(), 'README.md'), readme);
|
|
467
|
-
console.log(`✓ Updated README.md`);
|
|
468
|
-
|
|
469
|
-
console.log('\nDone!');
|
|
470
|
-
} catch (error) {
|
|
471
|
-
console.error('Error:', error.message);
|
|
472
|
-
process.exit(1);
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
main();
|