@monotykamary/pi-opencode-provider 1.0.6 → 1.0.7

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
@@ -15,7 +15,7 @@ _GPT, Claude, Gemini, GLM, MiniMax, Kimi, DeepSeek — unified API for [pi](http
15
15
 
16
16
  ## Features
17
17
 
18
- - **60+ AI Models** including GPT-5.x Codex, Claude Opus/Sonnet/Haiku, Gemini 3.x, GLM, MiniMax, Kimi K2.5, and more
18
+ - **62+ AI Models** including GPT-5.x Codex, Claude Opus/Sonnet/Haiku, Gemini 3.x, GLM, MiniMax, Kimi K2.5, and more
19
19
  - **Multi-API Support** — uses the correct API protocol per model (Anthropic, OpenAI Responses, OpenAI Completions, Gemini)
20
20
  - **Cost Tracking** with per-model pricing for budget management
21
21
  - **Reasoning Models** with thinking level maps for proper effort control
@@ -83,14 +83,15 @@ pi
83
83
  | Claude Opus 4.7 | Anthropic | Text + Image | 1.0M | 128K | $5.00 | $25.00 |
84
84
  | Claude Opus 4.8 | Anthropic | Text + Image | 1.0M | 128K | $5.00 | $25.00 |
85
85
  | Claude Opus 5 | Anthropic | Text + Image | 1.0M | 128K | $5.00 | $25.00 |
86
- | Claude Sonnet 4 | Anthropic | Text + Image | 1.0M | 64K | $3.00 | $15.00 |
87
- | Claude Sonnet 4.5 | Anthropic | Text + Image | 1.0M | 64K | $3.00 | $15.00 |
86
+ | Claude Sonnet 4 | Anthropic | Text + Image | 200K | 64K | $3.00 | $15.00 |
87
+ | Claude Sonnet 4.5 | Anthropic | Text + Image | 200K | 64K | $3.00 | $15.00 |
88
88
  | Claude Sonnet 4.6 | Anthropic | Text + Image | 1.0M | 64K | $3.00 | $15.00 |
89
89
  | Claude Sonnet 5 | Anthropic | Text + Image | 1.0M | 128K | $2.00 | $10.00 |
90
90
  | DeepSeek V4 Flash | Completions | Text | 1.0M | 384K | $0.14 | $0.28 |
91
91
  | DeepSeek V4 Flash Free | Completions | Text | 200K | 128K | Free | Free |
92
92
  | DeepSeek V4 Pro | Completions | Text | 1.0M | 384K | $1.74 | $3.84 |
93
93
  | Gemini 3 Flash | Gemini | Text + Image | 1.0M | 66K | $0.50 | $3.00 |
94
+ | Gemini 3 Pro | Gemini | Text + Image | 1.0M | 66K | $1.25 | $10.00 |
94
95
  | Gemini 3.1 Pro Preview | Gemini | Text + Image | 1.0M | 66K | $2.00 | $12.00 |
95
96
  | Gemini 3.5 Flash | Gemini | Text + Image | 1.0M | 66K | $1.50 | $9.00 |
96
97
  | Gemini 3.5 Flash Lite | Gemini | Text + Image | 1.0M | 66K | $0.30 | $2.50 |
@@ -109,7 +110,7 @@ pi
109
110
  | GPT-5.2 Codex | Responses | Text + Image | 400K | 128K | $1.75 | $14.00 |
110
111
  | GPT-5.3 Codex | Responses | Text + Image | 400K | 128K | $1.75 | $14.00 |
111
112
  | GPT-5.3 Codex Spark | Responses | Text | 128K | 128K | $1.75 | $14.00 |
112
- | GPT-5.4 | Responses | Text + Image | 1.1M | 128K | $2.50 | $15.00 |
113
+ | GPT-5.4 | Responses | Text + Image | 272K | 128K | $2.50 | $15.00 |
113
114
  | GPT-5.4 Mini | Responses | Text + Image | 400K | 128K | $0.75 | $4.50 |
114
115
  | GPT-5.4 Nano | Responses | Text + Image | 400K | 128K | $0.20 | $1.25 |
115
116
  | GPT-5.4 Pro | Responses | Text + Image | 1.1M | 128K | $30.00 | $180.00 |
@@ -120,6 +121,7 @@ pi
120
121
  | GPT-5.6 Terra | Responses | Text + Image | 1.1M | 128K | $2.50 | $15.00 |
121
122
  | Grok 4.5 | Responses | Text + Image | 500K | 500K | $2.00 | $6.00 |
122
123
  | Grok Build 0.1 | Completions | Text + Image | 256K | 256K | $1.00 | $2.00 |
124
+ | Grok Code | Completions | Text + Image | 256K | 256K | $1.00 | $2.00 |
123
125
  | Kimi K2.5 | Completions | Text + Image | 262K | 66K | $0.60 | $3.00 |
124
126
  | Kimi K2.6 | Completions | Text + Image | 262K | 66K | $0.95 | $4.00 |
125
127
  | Kimi K2.7 Code | Completions | Text + Image | 262K | 262K | $0.95 | $4.00 |
package/models.json CHANGED
@@ -283,7 +283,7 @@
283
283
  },
284
284
  {
285
285
  "id": "deepseek-v4-flash",
286
- "name": "DeepSeek V4 Flash",
286
+ "name": "DeepSeek V4 Flash 0731",
287
287
  "api": "openai-completions",
288
288
  "baseUrl": "https://opencode.ai/zen/v1",
289
289
  "reasoning": true,
@@ -429,7 +429,7 @@
429
429
  },
430
430
  {
431
431
  "id": "deepseek-v4-flash-free",
432
- "name": "DeepSeek V4 Flash Free",
432
+ "name": "DeepSeek V4 Flash Free (New)",
433
433
  "api": "openai-completions",
434
434
  "baseUrl": "https://opencode.ai/zen/v1",
435
435
  "reasoning": true,
@@ -758,10 +758,10 @@
758
758
  "image"
759
759
  ],
760
760
  "cost": {
761
- "input": 1,
762
- "output": 6,
763
- "cacheRead": 0.1,
764
- "cacheWrite": 1.25
761
+ "input": 0.2,
762
+ "output": 1.2,
763
+ "cacheRead": 0.02,
764
+ "cacheWrite": 0.25
765
765
  },
766
766
  "contextWindow": 1050000,
767
767
  "maxTokens": 128000
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monotykamary/pi-opencode-provider",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Opencode provider extension for pi - Access GPT, Claude, Gemini, GLM, MiniMax, Kimi and more through the opencode.ai API",
5
5
  "type": "module",
6
6
  "main": "index.ts",
package/patch.json CHANGED
@@ -1,49 +1,118 @@
1
1
  {
2
- "claude-opus-4-6": {
3
- "compat": {
4
- "forceAdaptiveThinking": true
5
- },
2
+ "gpt-5.1-codex-mini": {
6
3
  "thinkingLevelMap": {
7
- "max": "max"
4
+ "off": null,
5
+ "minimal": null,
6
+ "low": "low",
7
+ "medium": "medium",
8
+ "high": "high",
9
+ "xhigh": null,
10
+ "max": null
11
+ },
12
+ "compat": {
13
+ "sessionAffinityFormat": "openai-nosession",
14
+ "supportsOpenAIGrammarTools": true
8
15
  }
9
16
  },
10
- "claude-opus-4-7": {
17
+ "claude-sonnet-4-6": {
18
+ "thinkingLevelMap": {
19
+ "max": "max"
20
+ },
11
21
  "compat": {
12
22
  "forceAdaptiveThinking": true
13
- },
23
+ }
24
+ },
25
+ "gpt-5.5-pro": {
14
26
  "thinkingLevelMap": {
15
- "xhigh": "xhigh"
27
+ "off": null,
28
+ "minimal": null,
29
+ "low": null,
30
+ "medium": "medium",
31
+ "high": "high",
32
+ "xhigh": "xhigh",
33
+ "max": null
34
+ },
35
+ "compat": {
36
+ "sessionAffinityFormat": "openai-nosession",
37
+ "supportsOpenAIGrammarTools": true
16
38
  }
17
39
  },
18
- "claude-opus-4-8": {
40
+ "glm-5": {
19
41
  "compat": {
20
- "forceAdaptiveThinking": true
21
- },
42
+ "supportsStore": false,
43
+ "supportsDeveloperRole": false,
44
+ "maxTokensField": "max_tokens"
45
+ }
46
+ },
47
+ "gemini-3.5-flash": {
22
48
  "thinkingLevelMap": {
49
+ "off": null
50
+ }
51
+ },
52
+ "gpt-5.3-codex-spark": {
53
+ "thinkingLevelMap": {
54
+ "off": null,
23
55
  "xhigh": "xhigh"
24
56
  }
25
57
  },
26
- "deepseek-v4-flash-free": {
27
- "compat": {
28
- "requiresReasoningContentOnAssistantMessages": true,
29
- "thinkingFormat": "deepseek"
30
- },
58
+ "gpt-5.4-pro": {
31
59
  "thinkingLevelMap": {
60
+ "off": null,
32
61
  "minimal": null,
33
62
  "low": null,
34
- "medium": null,
63
+ "medium": "medium",
35
64
  "high": "high",
65
+ "xhigh": "xhigh",
66
+ "max": null
67
+ },
68
+ "compat": {
69
+ "sessionAffinityFormat": "openai-nosession",
70
+ "supportsOpenAIGrammarTools": true
71
+ }
72
+ },
73
+ "gpt-5.6-sol": {
74
+ "thinkingLevelMap": {
75
+ "off": null,
76
+ "minimal": null,
77
+ "low": "low",
78
+ "medium": "medium",
79
+ "high": "high",
80
+ "xhigh": "xhigh",
36
81
  "max": "max"
82
+ },
83
+ "compat": {
84
+ "sessionAffinityFormat": "openai-nosession",
85
+ "supportsOpenAIGrammarTools": true
37
86
  }
38
87
  },
39
- "gemini-3-flash": {
88
+ "glm-5.1": {
89
+ "compat": {
90
+ "supportsStore": false,
91
+ "supportsDeveloperRole": false,
92
+ "maxTokensField": "max_tokens"
93
+ }
94
+ },
95
+ "gemini-3.5-flash-lite": {
40
96
  "thinkingLevelMap": {
41
97
  "off": null
42
98
  }
43
99
  },
44
- "gemini-3-pro": {
100
+ "claude-opus-4-6": {
45
101
  "thinkingLevelMap": {
46
- "off": null
102
+ "max": "max"
103
+ },
104
+ "compat": {
105
+ "forceAdaptiveThinking": true
106
+ }
107
+ },
108
+ "claude-fable-5": {
109
+ "thinkingLevelMap": {
110
+ "off": null,
111
+ "xhigh": "xhigh",
112
+ "max": "max"
113
+ },
114
+ "compat": {
115
+ "forceAdaptiveThinking": true
47
116
  }
48
117
  },
49
118
  "gemini-3.1-pro": {
@@ -55,139 +124,538 @@
55
124
  "high": "HIGH"
56
125
  }
57
126
  },
58
- "gemini-3.5-flash": {
127
+ "deepseek-v4-flash": {
128
+ "name": "DeepSeek V4 Flash",
59
129
  "thinkingLevelMap": {
60
- "off": null
130
+ "off": null,
131
+ "minimal": null,
132
+ "low": null,
133
+ "medium": null,
134
+ "high": "high",
135
+ "xhigh": null,
136
+ "max": "max"
137
+ },
138
+ "compat": {
139
+ "supportsStore": false,
140
+ "supportsDeveloperRole": false,
141
+ "maxTokensField": "max_tokens",
142
+ "supportsLongCacheRetention": false,
143
+ "requiresReasoningContentOnAssistantMessages": true
61
144
  }
62
145
  },
63
- "gpt-5": {
146
+ "kimi-k2.5": {
147
+ "compat": {
148
+ "supportsStore": false,
149
+ "supportsDeveloperRole": false,
150
+ "maxTokensField": "max_tokens",
151
+ "supportsLongCacheRetention": false
152
+ }
153
+ },
154
+ "minimax-m2.7": {
155
+ "compat": {
156
+ "supportsStore": false,
157
+ "supportsDeveloperRole": false,
158
+ "maxTokensField": "max_tokens",
159
+ "supportsLongCacheRetention": false
160
+ }
161
+ },
162
+ "claude-opus-4-8": {
64
163
  "thinkingLevelMap": {
65
- "off": null
164
+ "xhigh": "xhigh",
165
+ "max": "max"
166
+ },
167
+ "compat": {
168
+ "forceAdaptiveThinking": true,
169
+ "supportsTemperature": false
66
170
  }
67
171
  },
68
- "gpt-5-codex": {
172
+ "north-mini-code-free": {
69
173
  "thinkingLevelMap": {
70
- "off": null
174
+ "off": "none",
175
+ "minimal": null,
176
+ "low": null,
177
+ "medium": null,
178
+ "high": "high",
179
+ "xhigh": null,
180
+ "max": null
181
+ },
182
+ "compat": {
183
+ "supportsStore": false,
184
+ "supportsDeveloperRole": false,
185
+ "maxTokensField": "max_tokens"
71
186
  }
72
187
  },
73
- "gpt-5-nano": {
188
+ "glm-5.2": {
74
189
  "thinkingLevelMap": {
75
- "off": null
190
+ "off": null,
191
+ "minimal": null,
192
+ "low": null,
193
+ "medium": null,
194
+ "high": "high",
195
+ "xhigh": null,
196
+ "max": "max"
197
+ },
198
+ "compat": {
199
+ "supportsStore": false,
200
+ "supportsDeveloperRole": false,
201
+ "maxTokensField": "max_tokens"
76
202
  }
77
203
  },
78
- "gpt-5.1": {
204
+ "ling-3.0-flash-free": {
79
205
  "thinkingLevelMap": {
80
- "off": null
206
+ "off": null,
207
+ "minimal": null,
208
+ "low": "low",
209
+ "medium": "medium",
210
+ "high": "high",
211
+ "xhigh": null,
212
+ "max": null
213
+ },
214
+ "compat": {
215
+ "supportsStore": false,
216
+ "supportsDeveloperRole": false,
217
+ "maxTokensField": "max_tokens"
81
218
  }
82
219
  },
83
- "gpt-5.1-codex": {
220
+ "laguna-s-2.1-free": {
84
221
  "thinkingLevelMap": {
85
- "off": null
222
+ "off": null,
223
+ "minimal": null,
224
+ "low": "low",
225
+ "medium": "medium",
226
+ "high": "high",
227
+ "xhigh": null,
228
+ "max": null
229
+ },
230
+ "compat": {
231
+ "supportsStore": false,
232
+ "supportsDeveloperRole": false,
233
+ "maxTokensField": "max_tokens"
86
234
  }
87
235
  },
88
- "gpt-5.1-codex-max": {
236
+ "deepseek-v4-flash-free": {
237
+ "name": "DeepSeek V4 Flash Free",
89
238
  "thinkingLevelMap": {
90
- "off": null
239
+ "off": null,
240
+ "minimal": null,
241
+ "low": null,
242
+ "medium": null,
243
+ "high": "high",
244
+ "xhigh": null,
245
+ "max": "max"
246
+ },
247
+ "compat": {
248
+ "supportsStore": false,
249
+ "supportsDeveloperRole": false,
250
+ "maxTokensField": "max_tokens",
251
+ "requiresReasoningContentOnAssistantMessages": true
91
252
  }
92
253
  },
93
- "gpt-5.1-codex-mini": {
254
+ "gemini-3-flash": {
94
255
  "thinkingLevelMap": {
95
256
  "off": null
96
257
  }
97
258
  },
98
- "gpt-5.2": {
259
+ "kimi-k2.6": {
260
+ "compat": {
261
+ "supportsStore": false,
262
+ "supportsDeveloperRole": false,
263
+ "thinkingFormat": "deepseek",
264
+ "supportsReasoningEffort": false,
265
+ "maxTokensField": "max_tokens",
266
+ "supportsLongCacheRetention": false
267
+ }
268
+ },
269
+ "gpt-5.5": {
99
270
  "thinkingLevelMap": {
100
271
  "off": null,
101
- "xhigh": "xhigh"
272
+ "minimal": null,
273
+ "low": "low",
274
+ "medium": "medium",
275
+ "high": "high",
276
+ "xhigh": "xhigh",
277
+ "max": null
278
+ },
279
+ "compat": {
280
+ "sessionAffinityFormat": "openai-nosession",
281
+ "supportsOpenAIGrammarTools": true
102
282
  }
103
283
  },
104
- "gpt-5.2-codex": {
284
+ "minimax-m3": {
285
+ "compat": {
286
+ "supportsStore": false,
287
+ "supportsDeveloperRole": false,
288
+ "maxTokensField": "max_tokens"
289
+ }
290
+ },
291
+ "gpt-5": {
105
292
  "thinkingLevelMap": {
106
293
  "off": null,
107
- "xhigh": "xhigh"
294
+ "minimal": "minimal",
295
+ "low": "low",
296
+ "medium": "medium",
297
+ "high": "high",
298
+ "xhigh": null,
299
+ "max": null
300
+ },
301
+ "compat": {
302
+ "sessionAffinityFormat": "openai-nosession",
303
+ "supportsOpenAIGrammarTools": true
108
304
  }
109
305
  },
110
- "gpt-5.3-codex": {
306
+ "gpt-5-codex": {
111
307
  "thinkingLevelMap": {
112
308
  "off": null,
113
- "xhigh": "xhigh"
309
+ "minimal": null,
310
+ "low": "low",
311
+ "medium": "medium",
312
+ "high": "high",
313
+ "xhigh": null,
314
+ "max": null
315
+ },
316
+ "compat": {
317
+ "sessionAffinityFormat": "openai-nosession",
318
+ "supportsOpenAIGrammarTools": true
114
319
  }
115
320
  },
116
- "gpt-5.3-codex-spark": {
321
+ "claude-sonnet-4-5": {
322
+ "contextWindow": 200000
323
+ },
324
+ "deepseek-v4-pro": {
117
325
  "thinkingLevelMap": {
118
326
  "off": null,
119
- "xhigh": "xhigh"
327
+ "minimal": null,
328
+ "low": null,
329
+ "medium": null,
330
+ "high": "high",
331
+ "xhigh": null,
332
+ "max": "max"
333
+ },
334
+ "compat": {
335
+ "supportsStore": false,
336
+ "supportsDeveloperRole": false,
337
+ "maxTokensField": "max_tokens",
338
+ "supportsLongCacheRetention": false,
339
+ "requiresReasoningContentOnAssistantMessages": true
120
340
  }
121
341
  },
122
342
  "gpt-5.4": {
343
+ "contextWindow": 272000,
123
344
  "thinkingLevelMap": {
124
345
  "off": null,
125
- "xhigh": "xhigh"
346
+ "minimal": null,
347
+ "low": "low",
348
+ "medium": "medium",
349
+ "high": "high",
350
+ "xhigh": "xhigh",
351
+ "max": null
352
+ },
353
+ "compat": {
354
+ "sessionAffinityFormat": "openai-nosession",
355
+ "supportsOpenAIGrammarTools": true
126
356
  }
127
357
  },
128
- "gpt-5.4-mini": {
358
+ "gpt-5.2-codex": {
129
359
  "thinkingLevelMap": {
130
360
  "off": null,
131
- "xhigh": "xhigh"
361
+ "minimal": null,
362
+ "low": "low",
363
+ "medium": "medium",
364
+ "high": "high",
365
+ "xhigh": "xhigh",
366
+ "max": null
367
+ },
368
+ "compat": {
369
+ "sessionAffinityFormat": "openai-nosession",
370
+ "supportsOpenAIGrammarTools": true
132
371
  }
133
372
  },
134
373
  "gpt-5.4-nano": {
135
374
  "thinkingLevelMap": {
136
375
  "off": null,
137
- "xhigh": "xhigh"
376
+ "minimal": null,
377
+ "low": "low",
378
+ "medium": "medium",
379
+ "high": "high",
380
+ "xhigh": "xhigh",
381
+ "max": null
382
+ },
383
+ "compat": {
384
+ "sessionAffinityFormat": "openai-nosession",
385
+ "supportsOpenAIGrammarTools": true
138
386
  }
139
387
  },
140
- "gpt-5.4-pro": {
388
+ "gemini-3.6-flash": {
389
+ "thinkingLevelMap": {
390
+ "off": null
391
+ }
392
+ },
393
+ "claude-sonnet-4": {
394
+ "contextWindow": 200000
395
+ },
396
+ "gpt-5.4-mini": {
141
397
  "thinkingLevelMap": {
142
398
  "off": null,
143
- "xhigh": "xhigh"
399
+ "minimal": null,
400
+ "low": "low",
401
+ "medium": "medium",
402
+ "high": "high",
403
+ "xhigh": "xhigh",
404
+ "max": null
405
+ },
406
+ "compat": {
407
+ "sessionAffinityFormat": "openai-nosession",
408
+ "supportsOpenAIGrammarTools": true
144
409
  }
145
410
  },
146
- "gpt-5.5": {
411
+ "minimax-m2.5": {
412
+ "compat": {
413
+ "supportsStore": false,
414
+ "supportsDeveloperRole": false,
415
+ "maxTokensField": "max_tokens"
416
+ }
417
+ },
418
+ "gpt-5.6-luna": {
419
+ "cost": {
420
+ "input": 1,
421
+ "output": 6,
422
+ "cacheRead": 0.1,
423
+ "cacheWrite": 1.25
424
+ },
147
425
  "thinkingLevelMap": {
148
426
  "off": null,
149
- "xhigh": "xhigh"
427
+ "minimal": null,
428
+ "low": "low",
429
+ "medium": "medium",
430
+ "high": "high",
431
+ "xhigh": "xhigh",
432
+ "max": "max"
433
+ },
434
+ "compat": {
435
+ "sessionAffinityFormat": "openai-nosession",
436
+ "supportsOpenAIGrammarTools": true
150
437
  }
151
438
  },
152
- "gpt-5.5-pro": {
439
+ "mimo-v2.5-free": {
440
+ "compat": {
441
+ "supportsStore": false,
442
+ "supportsDeveloperRole": false,
443
+ "maxTokensField": "max_tokens"
444
+ }
445
+ },
446
+ "gpt-5.2": {
447
+ "thinkingLevelMap": {
448
+ "off": null,
449
+ "minimal": null,
450
+ "low": "low",
451
+ "medium": "medium",
452
+ "high": "high",
453
+ "xhigh": "xhigh",
454
+ "max": null
455
+ },
456
+ "compat": {
457
+ "sessionAffinityFormat": "openai-nosession",
458
+ "supportsOpenAIGrammarTools": true
459
+ }
460
+ },
461
+ "gpt-5.3-codex": {
153
462
  "thinkingLevelMap": {
154
463
  "off": null,
464
+ "minimal": null,
465
+ "low": "low",
466
+ "medium": "medium",
467
+ "high": "high",
155
468
  "xhigh": "xhigh",
469
+ "max": null
470
+ },
471
+ "compat": {
472
+ "sessionAffinityFormat": "openai-nosession",
473
+ "supportsOpenAIGrammarTools": true
474
+ }
475
+ },
476
+ "grok-4.5": {
477
+ "thinkingLevelMap": {
478
+ "off": null,
156
479
  "minimal": null,
157
- "low": null
480
+ "low": "low",
481
+ "medium": "medium",
482
+ "high": "high",
483
+ "xhigh": null,
484
+ "max": null
485
+ },
486
+ "compat": {
487
+ "sessionAffinityFormat": "openai-nosession"
158
488
  }
159
489
  },
160
- "grok-build-0.1": {
490
+ "kimi-k2.7-code": {
161
491
  "compat": {
162
- "supportsReasoningEffort": false
492
+ "supportsStore": false,
493
+ "supportsDeveloperRole": false,
494
+ "maxTokensField": "max_tokens"
495
+ }
496
+ },
497
+ "gpt-5.1": {
498
+ "thinkingLevelMap": {
499
+ "off": null,
500
+ "minimal": null,
501
+ "low": "low",
502
+ "medium": "medium",
503
+ "high": "high",
504
+ "xhigh": null,
505
+ "max": null
163
506
  },
507
+ "compat": {
508
+ "sessionAffinityFormat": "openai-nosession",
509
+ "supportsOpenAIGrammarTools": true
510
+ }
511
+ },
512
+ "big-pickle": {
513
+ "compat": {
514
+ "supportsStore": false,
515
+ "supportsDeveloperRole": false,
516
+ "maxTokensField": "max_tokens"
517
+ }
518
+ },
519
+ "grok-build-0.1": {
164
520
  "thinkingLevelMap": {
165
521
  "off": null,
166
522
  "minimal": null,
167
523
  "low": null,
168
524
  "medium": null
525
+ },
526
+ "compat": {
527
+ "supportsStore": false,
528
+ "supportsDeveloperRole": false,
529
+ "supportsReasoningEffort": false,
530
+ "maxTokensField": "max_tokens"
169
531
  }
170
532
  },
171
- "grok-code": {
533
+ "kimi-k3": {
534
+ "thinkingLevelMap": {
535
+ "off": null,
536
+ "minimal": null,
537
+ "low": null,
538
+ "medium": null,
539
+ "high": null,
540
+ "xhigh": null,
541
+ "max": "max"
542
+ },
172
543
  "compat": {
173
- "supportsReasoningEffort": false
544
+ "supportsStore": false,
545
+ "supportsDeveloperRole": false,
546
+ "maxTokensField": "max_tokens"
547
+ }
548
+ },
549
+ "gpt-5.1-codex": {
550
+ "thinkingLevelMap": {
551
+ "off": null,
552
+ "minimal": null,
553
+ "low": "low",
554
+ "medium": "medium",
555
+ "high": "high",
556
+ "xhigh": null,
557
+ "max": null
558
+ },
559
+ "compat": {
560
+ "sessionAffinityFormat": "openai-nosession",
561
+ "supportsOpenAIGrammarTools": true
562
+ }
563
+ },
564
+ "gpt-5-nano": {
565
+ "thinkingLevelMap": {
566
+ "off": null,
567
+ "minimal": "minimal",
568
+ "low": "low",
569
+ "medium": "medium",
570
+ "high": "high",
571
+ "xhigh": null,
572
+ "max": null
573
+ },
574
+ "compat": {
575
+ "sessionAffinityFormat": "openai-nosession",
576
+ "supportsOpenAIGrammarTools": true
577
+ }
578
+ },
579
+ "claude-opus-4-7": {
580
+ "thinkingLevelMap": {
581
+ "xhigh": "xhigh",
582
+ "max": "max"
583
+ },
584
+ "compat": {
585
+ "forceAdaptiveThinking": true,
586
+ "supportsTemperature": false
587
+ }
588
+ },
589
+ "gpt-5.6-terra": {
590
+ "thinkingLevelMap": {
591
+ "off": null,
592
+ "minimal": null,
593
+ "low": "low",
594
+ "medium": "medium",
595
+ "high": "high",
596
+ "xhigh": "xhigh",
597
+ "max": "max"
598
+ },
599
+ "compat": {
600
+ "sessionAffinityFormat": "openai-nosession",
601
+ "supportsOpenAIGrammarTools": true
602
+ }
603
+ },
604
+ "claude-sonnet-5": {
605
+ "thinkingLevelMap": {
606
+ "xhigh": "xhigh",
607
+ "max": "max"
608
+ },
609
+ "compat": {
610
+ "forceAdaptiveThinking": true
611
+ }
612
+ },
613
+ "nemotron-3-ultra-free": {
614
+ "compat": {
615
+ "supportsStore": false,
616
+ "supportsDeveloperRole": false,
617
+ "maxTokensField": "max_tokens"
618
+ }
619
+ },
620
+ "claude-opus-5": {
621
+ "thinkingLevelMap": {
622
+ "xhigh": "xhigh",
623
+ "max": "max"
174
624
  },
625
+ "compat": {
626
+ "forceAdaptiveThinking": true,
627
+ "supportsTemperature": false
628
+ }
629
+ },
630
+ "gpt-5.1-codex-max": {
175
631
  "thinkingLevelMap": {
176
632
  "off": null,
177
633
  "minimal": null,
178
- "low": null,
179
- "medium": null
634
+ "low": "low",
635
+ "medium": "medium",
636
+ "high": "high",
637
+ "xhigh": "xhigh",
638
+ "max": null
639
+ },
640
+ "compat": {
641
+ "sessionAffinityFormat": "openai-nosession",
642
+ "supportsOpenAIGrammarTools": true
180
643
  }
181
644
  },
182
- "kimi-k2.6": {
645
+ "gemini-3-pro": {
646
+ "thinkingLevelMap": {
647
+ "off": null
648
+ }
649
+ },
650
+ "grok-code": {
183
651
  "compat": {
184
- "thinkingFormat": "deepseek",
185
652
  "supportsReasoningEffort": false
186
653
  },
187
654
  "thinkingLevelMap": {
655
+ "off": null,
188
656
  "minimal": null,
189
657
  "low": null,
190
658
  "medium": null
191
659
  }
192
660
  }
193
- }
661
+ }
@@ -103,6 +103,46 @@ function convertModel(model) {
103
103
  };
104
104
  }
105
105
 
106
+ // Load a layered JSON model file.
107
+ function loadJson(fileName) {
108
+ try {
109
+ return JSON.parse(fs.readFileSync(path.join(process.cwd(), fileName), 'utf8'));
110
+ } catch {
111
+ return fileName === 'patch.json' ? {} : [];
112
+ }
113
+ }
114
+
115
+ // Deep-merge patch overrides into a model for README documentation. The
116
+ // generated models.json remains API-derived; only the displayed model map uses patches.
117
+ function applyPatch(model, patch) {
118
+ if (!patch) return model;
119
+ const result = { ...model };
120
+ for (const [key, value] of Object.entries(patch)) {
121
+ if (key === 'cost' || key === 'compat' || key === 'thinkingLevelMap') {
122
+ result[key] = { ...(result[key] || {}), ...value };
123
+ } else {
124
+ result[key] = value;
125
+ }
126
+ }
127
+ if (!result.reasoning) {
128
+ delete result.thinkingLevelMap;
129
+ if (result.compat?.thinkingFormat) delete result.compat.thinkingFormat;
130
+ }
131
+ return result;
132
+ }
133
+
134
+ // Merge API models, patches, and custom models in the same order as index.ts.
135
+ function buildModels(baseModels, customModels, patch) {
136
+ const byId = new Map(baseModels.map(model => [model.id, model]));
137
+ for (const [id, entry] of Object.entries(patch)) {
138
+ if (byId.has(id)) byId.set(id, applyPatch(byId.get(id), entry));
139
+ }
140
+ for (const model of customModels) {
141
+ byId.set(model.id, applyPatch(model, patch[model.id]));
142
+ }
143
+ return Array.from(byId.values());
144
+ }
145
+
106
146
  // Generate README model table row
107
147
  function generateReadmeRow(model) {
108
148
  const cost = model.cost || {};
@@ -240,8 +280,10 @@ async function main() {
240
280
  fs.writeFileSync(modelsPath, JSON.stringify(models, null, 2) + '\n');
241
281
  console.log(` Saved ${models.length} models to models.json`);
242
282
 
243
- // Update README
244
- updateReadme(models);
283
+ // Apply layered overrides for documentation: models.json → patch.json → custom-models.json.
284
+ const patch = loadJson('patch.json');
285
+ const customModels = Array.isArray(loadJson('custom-models.json')) ? loadJson('custom-models.json') : [];
286
+ updateReadme(buildModels(models, customModels, patch));
245
287
 
246
288
  console.log('\nDone!');
247
289
  } catch (error) {