@cydm/pie 1.0.41 → 1.0.42

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.
@@ -5,7 +5,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
8
+ try {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ } catch (e) {
11
+ throw mod = 0, e;
12
+ }
9
13
  };
10
14
  var __copyProps = (to, from, except, desc) => {
11
15
  if (from && typeof from === "object" || typeof from === "function") {
@@ -20,17 +20,39 @@
20
20
  },
21
21
  "remoteCatalogs": {
22
22
  "type": "array",
23
- "minItems": 1,
23
+ "minItems": 1,
24
24
  "description": "Authenticated model catalogs fetched at startup and merged without replacing local profiles.",
25
25
  "items": {
26
26
  "type": "object",
27
27
  "additionalProperties": false,
28
28
  "properties": {
29
- "id": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
30
- "url": { "type": "string", "format": "uri", "pattern": "^(?:https://(?![^/?#]*@)[^/?#]+(?::[0-9]+)?(?:/[^?#]*)?|http://(?:127\\.0\\.0\\.1|localhost)(?::[0-9]+)?(?:/[^?#]*)?)$" },
31
- "apiKeyEnv": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" }
29
+ "id": {
30
+ "type": "string",
31
+ "minLength": 1,
32
+ "pattern": "^\\S+$"
33
+ },
34
+ "url": {
35
+ "type": "string",
36
+ "format": "uri",
37
+ "pattern": "^(?:https://(?![^/?#]*@)[^/?#]+(?::[0-9]+)?(?:/[^?#]*)?|http://(?:127\\.0\\.0\\.1|localhost)(?::[0-9]+)?(?:/[^?#]*)?)$"
38
+ },
39
+ "apiKeyEnv": {
40
+ "type": "string",
41
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
42
+ }
32
43
  },
33
- "required": ["id", "url", "apiKeyEnv"]
44
+ "required": [
45
+ "id",
46
+ "url",
47
+ "apiKeyEnv"
48
+ ]
49
+ }
50
+ },
51
+ "modelOverrides": {
52
+ "type": "object",
53
+ "description": "Per-model descriptive overrides keyed by \"provider/modelId\", applied after profiles and remote catalogs are merged. Unknown keys are ignored (no model to patch).",
54
+ "additionalProperties": {
55
+ "$ref": "#/$defs/modelOverride"
34
56
  }
35
57
  },
36
58
  "defaults": {
@@ -51,40 +73,81 @@
51
73
  "type": "object",
52
74
  "additionalProperties": false,
53
75
  "properties": {
54
- "light": { "$ref": "#/$defs/modelClass" },
55
- "balanced": { "$ref": "#/$defs/modelClass" },
56
- "strong": { "$ref": "#/$defs/modelClass" }
76
+ "light": {
77
+ "$ref": "#/$defs/modelClass"
78
+ },
79
+ "balanced": {
80
+ "$ref": "#/$defs/modelClass"
81
+ },
82
+ "strong": {
83
+ "$ref": "#/$defs/modelClass"
84
+ }
57
85
  }
58
86
  },
59
87
  "toolModels": {
60
88
  "type": "object",
61
89
  "additionalProperties": false,
62
90
  "properties": {
63
- "web_search": { "$ref": "#/$defs/modelClass" },
64
- "read_file.image": { "$ref": "#/$defs/modelClass" },
65
- "read_file.video": { "$ref": "#/$defs/modelClass" },
66
- "read_file.audio": { "$ref": "#/$defs/modelClass" },
67
- "read_file.document": { "$ref": "#/$defs/modelClass" }
91
+ "web_search": {
92
+ "$ref": "#/$defs/modelClass"
93
+ },
94
+ "read_file.image": {
95
+ "$ref": "#/$defs/modelClass"
96
+ },
97
+ "read_file.video": {
98
+ "$ref": "#/$defs/modelClass"
99
+ },
100
+ "read_file.audio": {
101
+ "$ref": "#/$defs/modelClass"
102
+ },
103
+ "read_file.document": {
104
+ "$ref": "#/$defs/modelClass"
105
+ }
68
106
  }
69
107
  }
70
108
  }
71
109
  }
72
110
  },
73
111
  "anyOf": [
74
- { "required": ["profiles"] },
75
- { "required": ["remoteCatalogs"] }
112
+ {
113
+ "required": [
114
+ "profiles"
115
+ ]
116
+ },
117
+ {
118
+ "required": [
119
+ "remoteCatalogs"
120
+ ]
121
+ }
76
122
  ],
77
123
  "$defs": {
78
124
  "cost": {
79
125
  "type": "object",
80
126
  "additionalProperties": false,
81
127
  "properties": {
82
- "input": { "type": "number", "minimum": 0 },
83
- "output": { "type": "number", "minimum": 0 },
84
- "cacheRead": { "type": "number", "minimum": 0 },
85
- "cacheWrite": { "type": "number", "minimum": 0 }
128
+ "input": {
129
+ "type": "number",
130
+ "minimum": 0
131
+ },
132
+ "output": {
133
+ "type": "number",
134
+ "minimum": 0
135
+ },
136
+ "cacheRead": {
137
+ "type": "number",
138
+ "minimum": 0
139
+ },
140
+ "cacheWrite": {
141
+ "type": "number",
142
+ "minimum": 0
143
+ }
86
144
  },
87
- "required": ["input", "output", "cacheRead", "cacheWrite"]
145
+ "required": [
146
+ "input",
147
+ "output",
148
+ "cacheRead",
149
+ "cacheWrite"
150
+ ]
88
151
  },
89
152
  "cacheCapability": {
90
153
  "type": "object",
@@ -92,22 +155,45 @@
92
155
  "properties": {
93
156
  "mode": {
94
157
  "type": "string",
95
- "enum": ["none", "session_store", "prompt_cache", "usage_only"]
158
+ "enum": [
159
+ "none",
160
+ "session_store",
161
+ "prompt_cache",
162
+ "usage_only"
163
+ ]
164
+ },
165
+ "supported": {
166
+ "type": "boolean"
96
167
  },
97
- "supported": { "type": "boolean" },
98
- "supportsUsageMetrics": { "type": "boolean" },
99
- "description": { "type": "string" }
168
+ "supportsUsageMetrics": {
169
+ "type": "boolean"
170
+ },
171
+ "description": {
172
+ "type": "string"
173
+ }
100
174
  },
101
- "required": ["mode", "supported"]
175
+ "required": [
176
+ "mode",
177
+ "supported"
178
+ ]
102
179
  },
103
180
  "modelClass": {
104
181
  "type": "object",
105
182
  "additionalProperties": false,
106
183
  "properties": {
107
- "provider": { "type": "string", "minLength": 1 },
108
- "modelId": { "type": "string", "minLength": 1 }
184
+ "provider": {
185
+ "type": "string",
186
+ "minLength": 1
187
+ },
188
+ "modelId": {
189
+ "type": "string",
190
+ "minLength": 1
191
+ }
109
192
  },
110
- "required": ["provider", "modelId"]
193
+ "required": [
194
+ "provider",
195
+ "modelId"
196
+ ]
111
197
  },
112
198
  "webSearch": {
113
199
  "type": "object",
@@ -115,33 +201,64 @@
115
201
  "properties": {
116
202
  "type": {
117
203
  "type": "string",
118
- "enum": ["anthropic_server_tool", "chat_completions_web_search", "openai_responses"]
204
+ "enum": [
205
+ "anthropic_server_tool",
206
+ "chat_completions_web_search",
207
+ "openai_responses"
208
+ ]
209
+ },
210
+ "forceToolChoice": {
211
+ "type": "boolean"
212
+ },
213
+ "searchEngine": {
214
+ "type": "string",
215
+ "minLength": 1
216
+ },
217
+ "count": {
218
+ "type": "integer",
219
+ "minimum": 1
119
220
  },
120
- "forceToolChoice": { "type": "boolean" },
121
- "searchEngine": { "type": "string", "minLength": 1 },
122
- "count": { "type": "integer", "minimum": 1 },
123
221
  "contentSize": {
124
222
  "type": "string",
125
- "enum": ["low", "medium", "high"]
223
+ "enum": [
224
+ "low",
225
+ "medium",
226
+ "high"
227
+ ]
126
228
  }
127
229
  },
128
- "required": ["type"]
230
+ "required": [
231
+ "type"
232
+ ]
129
233
  },
130
234
  "fileCapabilityValue": {
131
235
  "oneOf": [
132
- { "type": "boolean" },
236
+ {
237
+ "type": "boolean"
238
+ },
133
239
  {
134
240
  "type": "object",
135
241
  "additionalProperties": false,
136
242
  "properties": {
137
- "supported": { "type": "boolean" },
243
+ "supported": {
244
+ "type": "boolean"
245
+ },
138
246
  "formats": {
139
247
  "type": "array",
140
- "items": { "type": "string", "minLength": 1 },
248
+ "items": {
249
+ "type": "string",
250
+ "minLength": 1
251
+ },
141
252
  "uniqueItems": true
142
253
  },
143
- "maxFileSizeMb": { "type": "number", "exclusiveMinimum": 0 },
144
- "maxDurationSeconds": { "type": "number", "exclusiveMinimum": 0 }
254
+ "maxFileSizeMb": {
255
+ "type": "number",
256
+ "exclusiveMinimum": 0
257
+ },
258
+ "maxDurationSeconds": {
259
+ "type": "number",
260
+ "exclusiveMinimum": 0
261
+ }
145
262
  }
146
263
  }
147
264
  ]
@@ -150,115 +267,317 @@
150
267
  "type": "object",
151
268
  "additionalProperties": false,
152
269
  "properties": {
153
- "image": { "$ref": "#/$defs/fileCapabilityValue" },
154
- "video": { "$ref": "#/$defs/fileCapabilityValue" },
155
- "audio": { "$ref": "#/$defs/fileCapabilityValue" },
156
- "document": { "$ref": "#/$defs/fileCapabilityValue" }
270
+ "image": {
271
+ "$ref": "#/$defs/fileCapabilityValue"
272
+ },
273
+ "video": {
274
+ "$ref": "#/$defs/fileCapabilityValue"
275
+ },
276
+ "audio": {
277
+ "$ref": "#/$defs/fileCapabilityValue"
278
+ },
279
+ "document": {
280
+ "$ref": "#/$defs/fileCapabilityValue"
281
+ }
157
282
  }
158
283
  },
159
284
  "compat": {
160
285
  "type": "object",
161
286
  "additionalProperties": false,
162
287
  "properties": {
163
- "supportsStore": { "type": "boolean" },
164
- "supportsDeveloperRole": { "type": "boolean" },
165
- "supportsReasoningEffort": { "type": "boolean" },
166
- "forcedReasoningEffort": { "type": "string", "enum": ["none"] },
167
- "supportsUsageInStreaming": { "type": "boolean" },
288
+ "supportsStore": {
289
+ "type": "boolean"
290
+ },
291
+ "supportsDeveloperRole": {
292
+ "type": "boolean"
293
+ },
294
+ "supportsReasoningEffort": {
295
+ "type": "boolean"
296
+ },
297
+ "forcedReasoningEffort": {
298
+ "type": "string",
299
+ "enum": [
300
+ "none"
301
+ ]
302
+ },
303
+ "supportsUsageInStreaming": {
304
+ "type": "boolean"
305
+ },
168
306
  "maxTokensField": {
169
307
  "type": "string",
170
- "enum": ["max_completion_tokens", "max_tokens"]
308
+ "enum": [
309
+ "max_completion_tokens",
310
+ "max_tokens"
311
+ ]
312
+ },
313
+ "requiresToolResultName": {
314
+ "type": "boolean"
315
+ },
316
+ "requiresAssistantAfterToolResult": {
317
+ "type": "boolean"
318
+ },
319
+ "requiresThinkingAsText": {
320
+ "type": "boolean"
321
+ },
322
+ "supportsStrictMode": {
323
+ "type": "boolean"
171
324
  },
172
- "requiresToolResultName": { "type": "boolean" },
173
- "requiresAssistantAfterToolResult": { "type": "boolean" },
174
- "requiresThinkingAsText": { "type": "boolean" },
175
- "supportsStrictMode": { "type": "boolean" },
176
- "cacheCapability": { "$ref": "#/$defs/cacheCapability" }
325
+ "streamRequiresDone": {
326
+ "type": "boolean",
327
+ "description": "Require data: [DONE] before the stream is treated as complete. Default true; disable for gateways that legitimately close streams without the terminator."
328
+ },
329
+ "streamRequiresFinishReason": {
330
+ "type": "boolean",
331
+ "description": "Require a finish_reason chunk before the stream is treated as complete. Default true; disable for endpoints that omit it."
332
+ },
333
+ "cacheCapability": {
334
+ "$ref": "#/$defs/cacheCapability"
335
+ }
177
336
  }
178
337
  },
179
338
  "headers": {
180
339
  "type": "object",
181
340
  "propertyNames": {
182
341
  "type": "string",
183
- "minLength": 1,
184
- "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
342
+ "minLength": 1,
343
+ "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
185
344
  },
186
345
  "additionalProperties": {
187
- "type": "string",
188
- "pattern": "^[^\\u0000-\\u0008\\u000A-\\u001F\\u007F]*$"
346
+ "type": "string",
347
+ "pattern": "^[^\\u0000-\\u0008\\u000A-\\u001F\\u007F]*$"
189
348
  }
190
349
  },
191
350
  "model": {
192
351
  "type": "object",
193
352
  "additionalProperties": false,
194
353
  "properties": {
195
- "id": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
196
- "name": { "type": "string", "minLength": 1 },
197
- "reasoning": { "type": "boolean" },
354
+ "id": {
355
+ "type": "string",
356
+ "minLength": 1,
357
+ "pattern": "^\\S+$"
358
+ },
359
+ "name": {
360
+ "type": "string",
361
+ "minLength": 1
362
+ },
363
+ "reasoning": {
364
+ "type": "boolean"
365
+ },
198
366
  "input": {
199
367
  "type": "array",
200
368
  "minItems": 1,
201
369
  "uniqueItems": true,
202
370
  "items": {
203
371
  "type": "string",
204
- "enum": ["text", "image", "audio", "video"]
372
+ "enum": [
373
+ "text",
374
+ "image",
375
+ "audio",
376
+ "video"
377
+ ]
205
378
  }
206
379
  },
207
- "cost": { "$ref": "#/$defs/cost" },
208
- "contextWindow": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
209
- "maxTokens": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
210
- "compat": { "$ref": "#/$defs/compat" },
211
- "cacheCapability": { "$ref": "#/$defs/cacheCapability" },
212
- "webSearch": { "$ref": "#/$defs/webSearch" },
213
- "fileCapabilities": { "$ref": "#/$defs/fileCapabilities" },
214
- "headers": { "$ref": "#/$defs/headers" },
215
- "apiKeyEnv": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
216
- "displayName": { "type": "string", "minLength": 1 },
217
- "filePlatform": { "type": "string", "minLength": 1 },
218
- "attachmentPlatform": { "type": "string", "minLength": 1 }
380
+ "cost": {
381
+ "$ref": "#/$defs/cost"
382
+ },
383
+ "contextWindow": {
384
+ "type": "integer",
385
+ "minimum": 1,
386
+ "maximum": 9007199254740991
387
+ },
388
+ "maxTokens": {
389
+ "type": "integer",
390
+ "minimum": 1,
391
+ "maximum": 9007199254740991
392
+ },
393
+ "compat": {
394
+ "$ref": "#/$defs/compat"
395
+ },
396
+ "cacheCapability": {
397
+ "$ref": "#/$defs/cacheCapability"
398
+ },
399
+ "webSearch": {
400
+ "$ref": "#/$defs/webSearch"
401
+ },
402
+ "fileCapabilities": {
403
+ "$ref": "#/$defs/fileCapabilities"
404
+ },
405
+ "headers": {
406
+ "$ref": "#/$defs/headers"
407
+ },
408
+ "apiKeyEnv": {
409
+ "type": "string",
410
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
411
+ },
412
+ "displayName": {
413
+ "type": "string",
414
+ "minLength": 1
415
+ },
416
+ "filePlatform": {
417
+ "type": "string",
418
+ "minLength": 1
419
+ },
420
+ "attachmentPlatform": {
421
+ "type": "string",
422
+ "minLength": 1
423
+ }
219
424
  },
220
- "required": ["id", "input", "cost", "contextWindow", "maxTokens"]
425
+ "required": [
426
+ "id",
427
+ "input",
428
+ "cost",
429
+ "contextWindow",
430
+ "maxTokens"
431
+ ]
221
432
  },
222
433
  "profile": {
223
434
  "type": "object",
224
435
  "additionalProperties": false,
225
436
  "properties": {
226
- "baseUrl": { "type": "string", "format": "uri", "pattern": "^https?://" },
437
+ "baseUrl": {
438
+ "type": "string",
439
+ "format": "uri",
440
+ "pattern": "^https?://"
441
+ },
227
442
  "api": {
228
443
  "type": "string",
229
- "enum": ["openai-completions", "anthropic-messages"]
230
- },
231
- "apiKey": { "type": "string", "minLength": 1 },
232
- "apiKeyEnv": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
233
- "headers": { "$ref": "#/$defs/headers" },
234
- "displayName": { "type": "string", "minLength": 1 },
235
- "filePlatform": { "type": "string", "minLength": 1 },
236
- "attachmentPlatform": { "type": "string", "minLength": 1 },
237
- "compat": { "$ref": "#/$defs/compat" },
238
- "cacheCapability": { "$ref": "#/$defs/cacheCapability" },
239
- "webSearch": { "$ref": "#/$defs/webSearch" },
240
- "fileCapabilities": { "$ref": "#/$defs/fileCapabilities" },
444
+ "enum": [
445
+ "openai-completions",
446
+ "anthropic-messages"
447
+ ]
448
+ },
449
+ "apiKey": {
450
+ "type": "string",
451
+ "minLength": 1
452
+ },
453
+ "apiKeyEnv": {
454
+ "type": "string",
455
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
456
+ },
457
+ "headers": {
458
+ "$ref": "#/$defs/headers"
459
+ },
460
+ "displayName": {
461
+ "type": "string",
462
+ "minLength": 1
463
+ },
464
+ "filePlatform": {
465
+ "type": "string",
466
+ "minLength": 1
467
+ },
468
+ "attachmentPlatform": {
469
+ "type": "string",
470
+ "minLength": 1
471
+ },
472
+ "compat": {
473
+ "$ref": "#/$defs/compat"
474
+ },
475
+ "cacheCapability": {
476
+ "$ref": "#/$defs/cacheCapability"
477
+ },
478
+ "webSearch": {
479
+ "$ref": "#/$defs/webSearch"
480
+ },
481
+ "fileCapabilities": {
482
+ "$ref": "#/$defs/fileCapabilities"
483
+ },
241
484
  "models": {
242
485
  "type": "array",
243
486
  "minItems": 1,
244
- "items": { "$ref": "#/$defs/model" }
487
+ "items": {
488
+ "$ref": "#/$defs/model"
489
+ }
245
490
  }
246
491
  },
247
- "required": ["api", "baseUrl", "models"],
492
+ "required": [
493
+ "api",
494
+ "baseUrl",
495
+ "models"
496
+ ],
248
497
  "anyOf": [
249
- { "required": ["apiKey"] },
250
- { "required": ["apiKeyEnv"] },
498
+ {
499
+ "required": [
500
+ "apiKey"
501
+ ]
502
+ },
503
+ {
504
+ "required": [
505
+ "apiKeyEnv"
506
+ ]
507
+ },
251
508
  {
252
509
  "properties": {
253
510
  "models": {
254
511
  "contains": {
255
512
  "type": "object",
256
- "required": ["apiKeyEnv"]
513
+ "required": [
514
+ "apiKeyEnv"
515
+ ]
257
516
  }
258
517
  }
259
518
  }
260
519
  }
261
520
  ]
521
+ },
522
+ "modelOverride": {
523
+ "type": "object",
524
+ "additionalProperties": false,
525
+ "description": "Descriptive field overrides applied to an existing model (declared locally or via a remote catalog). Identity/routing fields (id, provider, api, baseUrl, apiKeyEnv, filePlatform, attachmentPlatform) cannot be overridden.",
526
+ "properties": {
527
+ "name": {
528
+ "type": "string",
529
+ "minLength": 1
530
+ },
531
+ "reasoning": {
532
+ "type": "boolean"
533
+ },
534
+ "input": {
535
+ "type": "array",
536
+ "minItems": 1,
537
+ "uniqueItems": true,
538
+ "items": {
539
+ "type": "string",
540
+ "enum": [
541
+ "text",
542
+ "image",
543
+ "audio",
544
+ "video"
545
+ ]
546
+ }
547
+ },
548
+ "cost": {
549
+ "$ref": "#/$defs/cost"
550
+ },
551
+ "contextWindow": {
552
+ "type": "integer",
553
+ "minimum": 1,
554
+ "maximum": 9007199254740991
555
+ },
556
+ "maxTokens": {
557
+ "type": "integer",
558
+ "minimum": 1,
559
+ "maximum": 9007199254740991
560
+ },
561
+ "compat": {
562
+ "$ref": "#/$defs/compat"
563
+ },
564
+ "cacheCapability": {
565
+ "$ref": "#/$defs/cacheCapability"
566
+ },
567
+ "webSearch": {
568
+ "$ref": "#/$defs/webSearch"
569
+ },
570
+ "fileCapabilities": {
571
+ "$ref": "#/$defs/fileCapabilities"
572
+ },
573
+ "headers": {
574
+ "$ref": "#/$defs/headers"
575
+ },
576
+ "displayName": {
577
+ "type": "string",
578
+ "minLength": 1
579
+ }
580
+ }
262
581
  }
263
582
  }
264
583
  }