@mzwing/pi-model-info 0.1.0

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.
@@ -0,0 +1,543 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/mzwing/pi-packages/main/packages/pi-model-info/schemas/config.schema.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "$schema": {
7
+ "type": "string",
8
+ "minLength": 1
9
+ },
10
+ "providers": {
11
+ "default": {},
12
+ "type": "object",
13
+ "propertyNames": {
14
+ "type": "string",
15
+ "minLength": 1
16
+ },
17
+ "additionalProperties": {
18
+ "type": "object",
19
+ "properties": {
20
+ "catalogProvider": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "costMultiplier": {
25
+ "type": "number",
26
+ "minimum": 0
27
+ },
28
+ "costPolicy": {
29
+ "type": "string",
30
+ "enum": ["catalog", "zero", "keep"]
31
+ },
32
+ "contextWindowPolicy": {
33
+ "type": "string",
34
+ "enum": ["catalog", "min", "keep"]
35
+ },
36
+ "capabilityPolicy": {
37
+ "type": "string",
38
+ "enum": ["catalog", "widen", "keep"]
39
+ },
40
+ "useCatalogName": {
41
+ "type": "boolean"
42
+ },
43
+ "mapThinkingLevels": {
44
+ "type": "boolean"
45
+ },
46
+ "allowDynamic": {
47
+ "type": "boolean"
48
+ },
49
+ "models": {
50
+ "type": "object",
51
+ "propertyNames": {
52
+ "type": "string",
53
+ "minLength": 1
54
+ },
55
+ "additionalProperties": {
56
+ "type": "object",
57
+ "properties": {
58
+ "prefixes": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "string",
62
+ "minLength": 1
63
+ }
64
+ },
65
+ "suffixes": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "string",
69
+ "minLength": 1
70
+ }
71
+ },
72
+ "alias": {
73
+ "type": "string",
74
+ "minLength": 1
75
+ },
76
+ "override": {
77
+ "type": "object",
78
+ "properties": {
79
+ "name": {
80
+ "type": "string",
81
+ "minLength": 1
82
+ },
83
+ "reasoning": {
84
+ "type": "boolean"
85
+ },
86
+ "input": {
87
+ "minItems": 1,
88
+ "type": "array",
89
+ "items": {
90
+ "type": "string",
91
+ "enum": ["text", "image"]
92
+ }
93
+ },
94
+ "cost": {
95
+ "type": "object",
96
+ "properties": {
97
+ "input": {
98
+ "type": "number",
99
+ "minimum": 0
100
+ },
101
+ "output": {
102
+ "type": "number",
103
+ "minimum": 0
104
+ },
105
+ "cacheRead": {
106
+ "type": "number",
107
+ "minimum": 0
108
+ },
109
+ "cacheWrite": {
110
+ "type": "number",
111
+ "minimum": 0
112
+ },
113
+ "tiers": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "object",
117
+ "properties": {
118
+ "input": {
119
+ "type": "number",
120
+ "minimum": 0
121
+ },
122
+ "output": {
123
+ "type": "number",
124
+ "minimum": 0
125
+ },
126
+ "cacheRead": {
127
+ "type": "number",
128
+ "minimum": 0
129
+ },
130
+ "cacheWrite": {
131
+ "type": "number",
132
+ "minimum": 0
133
+ },
134
+ "inputTokensAbove": {
135
+ "type": "integer",
136
+ "exclusiveMinimum": 0,
137
+ "maximum": 9007199254740991
138
+ }
139
+ },
140
+ "required": ["input", "output", "cacheRead", "cacheWrite", "inputTokensAbove"],
141
+ "additionalProperties": false
142
+ }
143
+ }
144
+ },
145
+ "additionalProperties": false
146
+ },
147
+ "contextWindow": {
148
+ "type": "integer",
149
+ "exclusiveMinimum": 0,
150
+ "maximum": 9007199254740991
151
+ },
152
+ "maxTokens": {
153
+ "type": "integer",
154
+ "exclusiveMinimum": 0,
155
+ "maximum": 9007199254740991
156
+ },
157
+ "thinkingLevelMap": {
158
+ "type": "object",
159
+ "properties": {
160
+ "off": {
161
+ "type": ["string", "null"]
162
+ },
163
+ "minimal": {
164
+ "type": ["string", "null"]
165
+ },
166
+ "low": {
167
+ "type": ["string", "null"]
168
+ },
169
+ "medium": {
170
+ "type": ["string", "null"]
171
+ },
172
+ "high": {
173
+ "type": ["string", "null"]
174
+ },
175
+ "xhigh": {
176
+ "type": ["string", "null"]
177
+ },
178
+ "max": {
179
+ "type": ["string", "null"]
180
+ }
181
+ },
182
+ "additionalProperties": false
183
+ },
184
+ "compat": {}
185
+ },
186
+ "additionalProperties": false
187
+ },
188
+ "skip": {
189
+ "type": "boolean"
190
+ }
191
+ },
192
+ "additionalProperties": false
193
+ }
194
+ }
195
+ },
196
+ "additionalProperties": false
197
+ }
198
+ },
199
+ "aliases": {
200
+ "type": "object",
201
+ "propertyNames": {
202
+ "type": "string",
203
+ "minLength": 1
204
+ },
205
+ "additionalProperties": {
206
+ "type": "string",
207
+ "minLength": 1
208
+ }
209
+ },
210
+ "models": {
211
+ "type": "object",
212
+ "propertyNames": {
213
+ "type": "string",
214
+ "minLength": 1
215
+ },
216
+ "additionalProperties": {
217
+ "type": "object",
218
+ "properties": {
219
+ "prefixes": {
220
+ "type": "array",
221
+ "items": {
222
+ "type": "string",
223
+ "minLength": 1
224
+ }
225
+ },
226
+ "suffixes": {
227
+ "type": "array",
228
+ "items": {
229
+ "type": "string",
230
+ "minLength": 1
231
+ }
232
+ },
233
+ "alias": {
234
+ "type": "string",
235
+ "minLength": 1
236
+ },
237
+ "override": {
238
+ "type": "object",
239
+ "properties": {
240
+ "name": {
241
+ "type": "string",
242
+ "minLength": 1
243
+ },
244
+ "reasoning": {
245
+ "type": "boolean"
246
+ },
247
+ "input": {
248
+ "minItems": 1,
249
+ "type": "array",
250
+ "items": {
251
+ "type": "string",
252
+ "enum": ["text", "image"]
253
+ }
254
+ },
255
+ "cost": {
256
+ "type": "object",
257
+ "properties": {
258
+ "input": {
259
+ "type": "number",
260
+ "minimum": 0
261
+ },
262
+ "output": {
263
+ "type": "number",
264
+ "minimum": 0
265
+ },
266
+ "cacheRead": {
267
+ "type": "number",
268
+ "minimum": 0
269
+ },
270
+ "cacheWrite": {
271
+ "type": "number",
272
+ "minimum": 0
273
+ },
274
+ "tiers": {
275
+ "type": "array",
276
+ "items": {
277
+ "type": "object",
278
+ "properties": {
279
+ "input": {
280
+ "type": "number",
281
+ "minimum": 0
282
+ },
283
+ "output": {
284
+ "type": "number",
285
+ "minimum": 0
286
+ },
287
+ "cacheRead": {
288
+ "type": "number",
289
+ "minimum": 0
290
+ },
291
+ "cacheWrite": {
292
+ "type": "number",
293
+ "minimum": 0
294
+ },
295
+ "inputTokensAbove": {
296
+ "type": "integer",
297
+ "exclusiveMinimum": 0,
298
+ "maximum": 9007199254740991
299
+ }
300
+ },
301
+ "required": ["input", "output", "cacheRead", "cacheWrite", "inputTokensAbove"],
302
+ "additionalProperties": false
303
+ }
304
+ }
305
+ },
306
+ "additionalProperties": false
307
+ },
308
+ "contextWindow": {
309
+ "type": "integer",
310
+ "exclusiveMinimum": 0,
311
+ "maximum": 9007199254740991
312
+ },
313
+ "maxTokens": {
314
+ "type": "integer",
315
+ "exclusiveMinimum": 0,
316
+ "maximum": 9007199254740991
317
+ },
318
+ "thinkingLevelMap": {
319
+ "type": "object",
320
+ "properties": {
321
+ "off": {
322
+ "type": ["string", "null"]
323
+ },
324
+ "minimal": {
325
+ "type": ["string", "null"]
326
+ },
327
+ "low": {
328
+ "type": ["string", "null"]
329
+ },
330
+ "medium": {
331
+ "type": ["string", "null"]
332
+ },
333
+ "high": {
334
+ "type": ["string", "null"]
335
+ },
336
+ "xhigh": {
337
+ "type": ["string", "null"]
338
+ },
339
+ "max": {
340
+ "type": ["string", "null"]
341
+ }
342
+ },
343
+ "additionalProperties": false
344
+ },
345
+ "compat": {}
346
+ },
347
+ "additionalProperties": false
348
+ },
349
+ "skip": {
350
+ "type": "boolean"
351
+ }
352
+ },
353
+ "additionalProperties": false
354
+ }
355
+ },
356
+ "rules": {
357
+ "type": "array",
358
+ "items": {
359
+ "type": "object",
360
+ "properties": {
361
+ "id": {
362
+ "type": "string",
363
+ "minLength": 1
364
+ },
365
+ "kind": {
366
+ "type": "string",
367
+ "enum": ["prefix", "suffix"]
368
+ },
369
+ "value": {
370
+ "type": "string",
371
+ "minLength": 1
372
+ },
373
+ "enabled": {
374
+ "type": "boolean"
375
+ },
376
+ "override": {
377
+ "type": "object",
378
+ "properties": {
379
+ "name": {
380
+ "type": "string",
381
+ "minLength": 1
382
+ },
383
+ "reasoning": {
384
+ "type": "boolean"
385
+ },
386
+ "input": {
387
+ "minItems": 1,
388
+ "type": "array",
389
+ "items": {
390
+ "type": "string",
391
+ "enum": ["text", "image"]
392
+ }
393
+ },
394
+ "cost": {
395
+ "type": "object",
396
+ "properties": {
397
+ "input": {
398
+ "type": "number",
399
+ "minimum": 0
400
+ },
401
+ "output": {
402
+ "type": "number",
403
+ "minimum": 0
404
+ },
405
+ "cacheRead": {
406
+ "type": "number",
407
+ "minimum": 0
408
+ },
409
+ "cacheWrite": {
410
+ "type": "number",
411
+ "minimum": 0
412
+ },
413
+ "tiers": {
414
+ "type": "array",
415
+ "items": {
416
+ "type": "object",
417
+ "properties": {
418
+ "input": {
419
+ "type": "number",
420
+ "minimum": 0
421
+ },
422
+ "output": {
423
+ "type": "number",
424
+ "minimum": 0
425
+ },
426
+ "cacheRead": {
427
+ "type": "number",
428
+ "minimum": 0
429
+ },
430
+ "cacheWrite": {
431
+ "type": "number",
432
+ "minimum": 0
433
+ },
434
+ "inputTokensAbove": {
435
+ "type": "integer",
436
+ "exclusiveMinimum": 0,
437
+ "maximum": 9007199254740991
438
+ }
439
+ },
440
+ "required": ["input", "output", "cacheRead", "cacheWrite", "inputTokensAbove"],
441
+ "additionalProperties": false
442
+ }
443
+ }
444
+ },
445
+ "additionalProperties": false
446
+ },
447
+ "contextWindow": {
448
+ "type": "integer",
449
+ "exclusiveMinimum": 0,
450
+ "maximum": 9007199254740991
451
+ },
452
+ "maxTokens": {
453
+ "type": "integer",
454
+ "exclusiveMinimum": 0,
455
+ "maximum": 9007199254740991
456
+ },
457
+ "thinkingLevelMap": {
458
+ "type": "object",
459
+ "properties": {
460
+ "off": {
461
+ "type": ["string", "null"]
462
+ },
463
+ "minimal": {
464
+ "type": ["string", "null"]
465
+ },
466
+ "low": {
467
+ "type": ["string", "null"]
468
+ },
469
+ "medium": {
470
+ "type": ["string", "null"]
471
+ },
472
+ "high": {
473
+ "type": ["string", "null"]
474
+ },
475
+ "xhigh": {
476
+ "type": ["string", "null"]
477
+ },
478
+ "max": {
479
+ "type": ["string", "null"]
480
+ }
481
+ },
482
+ "additionalProperties": false
483
+ },
484
+ "compat": {}
485
+ },
486
+ "additionalProperties": false
487
+ }
488
+ },
489
+ "required": ["id", "kind", "value"],
490
+ "additionalProperties": false
491
+ }
492
+ },
493
+ "builtinRules": {
494
+ "type": "boolean"
495
+ },
496
+ "sources": {
497
+ "minItems": 1,
498
+ "type": "array",
499
+ "items": {
500
+ "type": "string",
501
+ "enum": ["pi.dev", "models.dev"]
502
+ }
503
+ },
504
+ "network": {
505
+ "type": "object",
506
+ "properties": {
507
+ "enabled": {
508
+ "type": "boolean"
509
+ },
510
+ "timeoutMs": {
511
+ "type": "integer",
512
+ "exclusiveMinimum": 0,
513
+ "maximum": 120000
514
+ },
515
+ "maxBytes": {
516
+ "type": "integer",
517
+ "exclusiveMinimum": 0,
518
+ "maximum": 9007199254740991
519
+ }
520
+ },
521
+ "additionalProperties": false
522
+ },
523
+ "cache": {
524
+ "type": "object",
525
+ "properties": {
526
+ "ttlMs": {
527
+ "type": "integer",
528
+ "minimum": 0,
529
+ "maximum": 9007199254740991
530
+ },
531
+ "dir": {
532
+ "type": "string",
533
+ "minLength": 1
534
+ }
535
+ },
536
+ "additionalProperties": false
537
+ },
538
+ "applyOnIdleOnly": {
539
+ "type": "boolean"
540
+ }
541
+ },
542
+ "additionalProperties": false
543
+ }