@bastani/atomic 0.9.29 → 0.9.30-alpha.2

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.
Files changed (112) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/builtin/intercom/package.json +1 -1
  3. package/dist/builtin/mcp/package.json +1 -1
  4. package/dist/builtin/subagents/package.json +1 -1
  5. package/dist/builtin/web-access/package.json +1 -1
  6. package/dist/builtin/workflows/package.json +1 -1
  7. package/dist/core/anthropic-thinking-guard.js.map +1 -1
  8. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  9. package/dist/core/extensions/loader-virtual-modules.js +6 -0
  10. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  11. package/dist/core/http-dispatcher.d.ts +1 -1
  12. package/dist/core/http-dispatcher.d.ts.map +1 -1
  13. package/dist/core/http-dispatcher.js +2 -1
  14. package/dist/core/http-dispatcher.js.map +1 -1
  15. package/dist/core/key-id-schema.d.ts +6 -0
  16. package/dist/core/key-id-schema.d.ts.map +1 -0
  17. package/dist/core/key-id-schema.js +16 -0
  18. package/dist/core/key-id-schema.js.map +1 -0
  19. package/dist/core/keybindings-schema.d.ts +4 -0
  20. package/dist/core/keybindings-schema.d.ts.map +1 -0
  21. package/dist/core/keybindings-schema.js +20 -0
  22. package/dist/core/keybindings-schema.js.map +1 -0
  23. package/dist/core/keybindings.d.ts +226 -79
  24. package/dist/core/keybindings.d.ts.map +1 -1
  25. package/dist/core/keybindings.js +25 -20
  26. package/dist/core/keybindings.js.map +1 -1
  27. package/dist/core/model-config.d.ts +685 -164
  28. package/dist/core/model-config.d.ts.map +1 -1
  29. package/dist/core/model-config.js +22 -176
  30. package/dist/core/model-config.js.map +1 -1
  31. package/dist/core/project-trust.d.ts.map +1 -1
  32. package/dist/core/project-trust.js +2 -1
  33. package/dist/core/project-trust.js.map +1 -1
  34. package/dist/core/resource-loader-context-files.d.ts.map +1 -1
  35. package/dist/core/resource-loader-context-files.js +10 -6
  36. package/dist/core/resource-loader-context-files.js.map +1 -1
  37. package/dist/core/settings-defaults.d.ts +80 -0
  38. package/dist/core/settings-defaults.d.ts.map +1 -0
  39. package/dist/core/settings-defaults.js +81 -0
  40. package/dist/core/settings-defaults.js.map +1 -0
  41. package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
  42. package/dist/core/settings-manager-basic-accessors.js +34 -29
  43. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  44. package/dist/core/settings-manager-resource-accessors.d.ts.map +1 -1
  45. package/dist/core/settings-manager-resource-accessors.js +10 -9
  46. package/dist/core/settings-manager-resource-accessors.js.map +1 -1
  47. package/dist/core/settings-manager-ui-accessors.d.ts.map +1 -1
  48. package/dist/core/settings-manager-ui-accessors.js +26 -18
  49. package/dist/core/settings-manager-ui-accessors.js.map +1 -1
  50. package/dist/core/settings-schema.d.ts +292 -0
  51. package/dist/core/settings-schema.d.ts.map +1 -0
  52. package/dist/core/settings-schema.js +403 -0
  53. package/dist/core/settings-schema.js.map +1 -0
  54. package/dist/core/settings-types.d.ts +2 -181
  55. package/dist/core/settings-types.d.ts.map +1 -1
  56. package/dist/core/settings-types.js.map +1 -1
  57. package/dist/extensions/codemode/index.d.ts.map +1 -1
  58. package/dist/extensions/codemode/index.js +2 -1
  59. package/dist/extensions/codemode/index.js.map +1 -1
  60. package/dist/extensions/codemode/tool.d.ts +1 -1
  61. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  62. package/dist/extensions/codemode/tool.js +2 -1
  63. package/dist/extensions/codemode/tool.js.map +1 -1
  64. package/dist/extensions/herdr/index.d.ts.map +1 -1
  65. package/dist/extensions/herdr/index.js +4 -1
  66. package/dist/extensions/herdr/index.js.map +1 -1
  67. package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
  68. package/dist/modes/interactive/components/settings-selector-items.js +2 -4
  69. package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
  70. package/dist/modes/interactive/components/settings-selector-submenus.d.ts.map +1 -1
  71. package/dist/modes/interactive/components/settings-selector-submenus.js +2 -1
  72. package/dist/modes/interactive/components/settings-selector-submenus.js.map +1 -1
  73. package/dist/modes/interactive/theme/catppuccin-frappe.json +1 -1
  74. package/dist/modes/interactive/theme/catppuccin-latte.json +1 -1
  75. package/dist/modes/interactive/theme/catppuccin-macchiato.json +1 -1
  76. package/dist/modes/interactive/theme/catppuccin-mocha.json +1 -1
  77. package/dist/modes/interactive/theme/dark.json +1 -1
  78. package/dist/modes/interactive/theme/light.json +1 -1
  79. package/dist/modes/interactive/theme/theme-class.d.ts +3 -12
  80. package/dist/modes/interactive/theme/theme-class.d.ts.map +1 -1
  81. package/dist/modes/interactive/theme/theme-class.js +2 -9
  82. package/dist/modes/interactive/theme/theme-class.js.map +1 -1
  83. package/dist/modes/interactive/theme/theme-loading.d.ts.map +1 -1
  84. package/dist/modes/interactive/theme/theme-loading.js +3 -21
  85. package/dist/modes/interactive/theme/theme-loading.js.map +1 -1
  86. package/dist/modes/interactive/theme/theme-parse.d.ts.map +1 -1
  87. package/dist/modes/interactive/theme/theme-parse.js +3 -0
  88. package/dist/modes/interactive/theme/theme-parse.js.map +1 -1
  89. package/dist/modes/interactive/theme/theme-schema.d.ts +5 -224
  90. package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
  91. package/dist/modes/interactive/theme/theme-schema.js +47 -72
  92. package/dist/modes/interactive/theme/theme-schema.js.map +1 -1
  93. package/dist/modes/interactive/theme/theme-tokens.d.ts +262 -0
  94. package/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
  95. package/dist/modes/interactive/theme/theme-tokens.js +126 -0
  96. package/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
  97. package/docs/compaction/reference.md +1 -1
  98. package/docs/compaction.md +2 -2
  99. package/docs/keybindings.md +2 -0
  100. package/docs/models.md +2 -0
  101. package/docs/providers.md +1 -1
  102. package/docs/settings.md +2 -0
  103. package/docs/themes/reference.md +2 -2
  104. package/docs/themes.md +3 -1
  105. package/examples/extensions/dynamic-resources/dynamic.json +1 -1
  106. package/npm-shrinkwrap.json +36 -36
  107. package/package.json +5 -3
  108. package/schemas/keybindings.schema.json +413 -0
  109. package/schemas/models.schema.json +1178 -0
  110. package/schemas/settings.schema.json +940 -0
  111. package/schemas/theme.schema.json +369 -0
  112. package/dist/modes/interactive/theme/theme-schema.json +0 -361
@@ -0,0 +1,1178 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/models.schema.json",
4
+ "$comment": "This file is generated from TypeScript source. Do not edit it manually; run npm run generate:schemas --workspace=@bastani/atomic.",
5
+ "type": "object",
6
+ "required": [
7
+ "providers"
8
+ ],
9
+ "properties": {
10
+ "$schema": {
11
+ "type": "string"
12
+ },
13
+ "providers": {
14
+ "type": "object",
15
+ "patternProperties": {
16
+ "^.*$": {
17
+ "type": "object",
18
+ "properties": {
19
+ "name": {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ "baseUrl": {
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "apiKey": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ },
31
+ "api": {
32
+ "type": "string",
33
+ "minLength": 1
34
+ },
35
+ "oauth": {
36
+ "type": "string",
37
+ "const": "radius"
38
+ },
39
+ "headers": {
40
+ "type": "object",
41
+ "patternProperties": {
42
+ "^.*$": {
43
+ "type": "string"
44
+ }
45
+ }
46
+ },
47
+ "compat": {
48
+ "$ref": "#/$defs/ProviderCompat",
49
+ "description": "Provider and model compatibility overrides."
50
+ },
51
+ "authHeader": {
52
+ "type": "boolean"
53
+ },
54
+ "models": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "object",
58
+ "required": [
59
+ "id"
60
+ ],
61
+ "properties": {
62
+ "id": {
63
+ "type": "string",
64
+ "minLength": 1
65
+ },
66
+ "name": {
67
+ "type": "string",
68
+ "minLength": 1
69
+ },
70
+ "api": {
71
+ "type": "string",
72
+ "minLength": 1
73
+ },
74
+ "baseUrl": {
75
+ "type": "string",
76
+ "minLength": 1
77
+ },
78
+ "reasoning": {
79
+ "type": "boolean"
80
+ },
81
+ "thinkingLevelMap": {
82
+ "$ref": "#/$defs/ThinkingLevelMap"
83
+ },
84
+ "input": {
85
+ "type": "array",
86
+ "items": {
87
+ "enum": [
88
+ "text",
89
+ "image",
90
+ "pdf"
91
+ ]
92
+ }
93
+ },
94
+ "inputLimits": {
95
+ "$ref": "#/$defs/ModelInputLimits"
96
+ },
97
+ "cost": {
98
+ "$ref": "#/$defs/ModelCost"
99
+ },
100
+ "promptCache": {
101
+ "$ref": "#/$defs/ModelPromptCache",
102
+ "description": "Best-effort prompt cache lifetime in seconds for each retention tier. A missing tier means the lifetime is unknown, so Pi does not warm it."
103
+ },
104
+ "contextWindow": {
105
+ "type": "number",
106
+ "exclusiveMinimum": 0
107
+ },
108
+ "maxTokens": {
109
+ "type": "number",
110
+ "exclusiveMinimum": 0
111
+ },
112
+ "samplingParams": {
113
+ "type": "object",
114
+ "patternProperties": {
115
+ "^.*$": {}
116
+ }
117
+ },
118
+ "samplingParamsByThinkingLevel": {
119
+ "type": "object",
120
+ "properties": {
121
+ "off": {
122
+ "type": "object",
123
+ "patternProperties": {
124
+ "^.*$": {}
125
+ }
126
+ },
127
+ "minimal": {
128
+ "type": "object",
129
+ "patternProperties": {
130
+ "^.*$": {}
131
+ }
132
+ },
133
+ "low": {
134
+ "type": "object",
135
+ "patternProperties": {
136
+ "^.*$": {}
137
+ }
138
+ },
139
+ "medium": {
140
+ "type": "object",
141
+ "patternProperties": {
142
+ "^.*$": {}
143
+ }
144
+ },
145
+ "high": {
146
+ "type": "object",
147
+ "patternProperties": {
148
+ "^.*$": {}
149
+ }
150
+ },
151
+ "xhigh": {
152
+ "type": "object",
153
+ "patternProperties": {
154
+ "^.*$": {}
155
+ }
156
+ },
157
+ "max": {
158
+ "type": "object",
159
+ "patternProperties": {
160
+ "^.*$": {}
161
+ }
162
+ }
163
+ }
164
+ },
165
+ "headers": {
166
+ "type": "object",
167
+ "patternProperties": {
168
+ "^.*$": {
169
+ "type": "string"
170
+ }
171
+ }
172
+ },
173
+ "compat": {
174
+ "$ref": "#/$defs/ProviderCompat",
175
+ "description": "Provider and model compatibility overrides."
176
+ }
177
+ }
178
+ }
179
+ },
180
+ "modelOverrides": {
181
+ "type": "object",
182
+ "patternProperties": {
183
+ "^.*$": {
184
+ "type": "object",
185
+ "properties": {
186
+ "name": {
187
+ "type": "string",
188
+ "minLength": 1
189
+ },
190
+ "reasoning": {
191
+ "type": "boolean"
192
+ },
193
+ "thinkingLevelMap": {
194
+ "$ref": "#/$defs/ThinkingLevelMap"
195
+ },
196
+ "input": {
197
+ "type": "array",
198
+ "items": {
199
+ "enum": [
200
+ "text",
201
+ "image",
202
+ "pdf"
203
+ ]
204
+ }
205
+ },
206
+ "inputLimits": {
207
+ "$ref": "#/$defs/ModelInputLimits"
208
+ },
209
+ "cost": {
210
+ "type": "object",
211
+ "properties": {
212
+ "input": {
213
+ "type": "number",
214
+ "description": "Input cost in USD per million tokens."
215
+ },
216
+ "output": {
217
+ "type": "number",
218
+ "description": "Output cost in USD per million tokens."
219
+ },
220
+ "cacheRead": {
221
+ "type": "number",
222
+ "description": "Cache-read cost in USD per million tokens."
223
+ },
224
+ "cacheWrite": {
225
+ "type": "number",
226
+ "description": "Cache-write cost in USD per million tokens."
227
+ },
228
+ "tiers": {
229
+ "type": "array",
230
+ "items": {
231
+ "type": "object",
232
+ "required": [
233
+ "inputTokensAbove",
234
+ "input",
235
+ "output",
236
+ "cacheRead",
237
+ "cacheWrite"
238
+ ],
239
+ "properties": {
240
+ "inputTokensAbove": {
241
+ "type": "number",
242
+ "description": "Use this tier when total request input exceeds this token count."
243
+ },
244
+ "input": {
245
+ "type": "number",
246
+ "description": "Input cost in USD per million tokens."
247
+ },
248
+ "output": {
249
+ "type": "number",
250
+ "description": "Output cost in USD per million tokens."
251
+ },
252
+ "cacheRead": {
253
+ "type": "number",
254
+ "description": "Cache-read cost in USD per million tokens."
255
+ },
256
+ "cacheWrite": {
257
+ "type": "number",
258
+ "description": "Cache-write cost in USD per million tokens."
259
+ }
260
+ }
261
+ },
262
+ "description": "Request-wide pricing tiers. The highest matching input threshold applies to the full request."
263
+ }
264
+ }
265
+ },
266
+ "promptCache": {
267
+ "$ref": "#/$defs/ModelPromptCache",
268
+ "description": "Best-effort prompt cache lifetime in seconds for each retention tier. A missing tier means the lifetime is unknown, so Pi does not warm it."
269
+ },
270
+ "contextWindow": {
271
+ "type": "number",
272
+ "exclusiveMinimum": 0
273
+ },
274
+ "maxTokens": {
275
+ "type": "number",
276
+ "exclusiveMinimum": 0
277
+ },
278
+ "samplingParams": {
279
+ "type": "object",
280
+ "patternProperties": {
281
+ "^.*$": {}
282
+ }
283
+ },
284
+ "samplingParamsByThinkingLevel": {
285
+ "type": "object",
286
+ "properties": {
287
+ "off": {
288
+ "type": "object",
289
+ "patternProperties": {
290
+ "^.*$": {}
291
+ }
292
+ },
293
+ "minimal": {
294
+ "type": "object",
295
+ "patternProperties": {
296
+ "^.*$": {}
297
+ }
298
+ },
299
+ "low": {
300
+ "type": "object",
301
+ "patternProperties": {
302
+ "^.*$": {}
303
+ }
304
+ },
305
+ "medium": {
306
+ "type": "object",
307
+ "patternProperties": {
308
+ "^.*$": {}
309
+ }
310
+ },
311
+ "high": {
312
+ "type": "object",
313
+ "patternProperties": {
314
+ "^.*$": {}
315
+ }
316
+ },
317
+ "xhigh": {
318
+ "type": "object",
319
+ "patternProperties": {
320
+ "^.*$": {}
321
+ }
322
+ },
323
+ "max": {
324
+ "type": "object",
325
+ "patternProperties": {
326
+ "^.*$": {}
327
+ }
328
+ }
329
+ }
330
+ },
331
+ "headers": {
332
+ "type": "object",
333
+ "patternProperties": {
334
+ "^.*$": {
335
+ "type": "string"
336
+ }
337
+ }
338
+ },
339
+ "compat": {
340
+ "$ref": "#/$defs/ProviderCompat",
341
+ "description": "Provider and model compatibility overrides."
342
+ }
343
+ }
344
+ }
345
+ }
346
+ }
347
+ }
348
+ }
349
+ }
350
+ }
351
+ },
352
+ "$defs": {
353
+ "ModelCost": {
354
+ "type": "object",
355
+ "required": [
356
+ "input",
357
+ "output",
358
+ "cacheRead",
359
+ "cacheWrite"
360
+ ],
361
+ "properties": {
362
+ "input": {
363
+ "type": "number",
364
+ "description": "Input cost in USD per million tokens."
365
+ },
366
+ "output": {
367
+ "type": "number",
368
+ "description": "Output cost in USD per million tokens."
369
+ },
370
+ "cacheRead": {
371
+ "type": "number",
372
+ "description": "Cache-read cost in USD per million tokens."
373
+ },
374
+ "cacheWrite": {
375
+ "type": "number",
376
+ "description": "Cache-write cost in USD per million tokens."
377
+ },
378
+ "tiers": {
379
+ "type": "array",
380
+ "items": {
381
+ "type": "object",
382
+ "required": [
383
+ "inputTokensAbove",
384
+ "input",
385
+ "output",
386
+ "cacheRead",
387
+ "cacheWrite"
388
+ ],
389
+ "properties": {
390
+ "inputTokensAbove": {
391
+ "type": "number",
392
+ "description": "Use this tier when total request input exceeds this token count."
393
+ },
394
+ "input": {
395
+ "type": "number",
396
+ "description": "Input cost in USD per million tokens."
397
+ },
398
+ "output": {
399
+ "type": "number",
400
+ "description": "Output cost in USD per million tokens."
401
+ },
402
+ "cacheRead": {
403
+ "type": "number",
404
+ "description": "Cache-read cost in USD per million tokens."
405
+ },
406
+ "cacheWrite": {
407
+ "type": "number",
408
+ "description": "Cache-write cost in USD per million tokens."
409
+ }
410
+ }
411
+ },
412
+ "description": "Request-wide pricing tiers. The highest matching input threshold applies to the full request."
413
+ }
414
+ }
415
+ },
416
+ "ModelInputLimits": {
417
+ "type": "object",
418
+ "properties": {
419
+ "maxRequestBytes": {
420
+ "type": "integer",
421
+ "minimum": 1,
422
+ "description": "Maximum serialized provider request size in bytes."
423
+ },
424
+ "images": {
425
+ "type": "object",
426
+ "properties": {
427
+ "resize": {
428
+ "type": "object",
429
+ "properties": {
430
+ "maxWidth": {
431
+ "type": "integer",
432
+ "minimum": 1
433
+ },
434
+ "maxHeight": {
435
+ "type": "integer",
436
+ "minimum": 1
437
+ },
438
+ "maxBytes": {
439
+ "type": "integer",
440
+ "minimum": 1,
441
+ "description": "Maximum base64-encoded payload size in bytes."
442
+ },
443
+ "jpegQuality": {
444
+ "type": "integer",
445
+ "minimum": 1,
446
+ "maximum": 100
447
+ }
448
+ },
449
+ "description": "Cache-safe resize profile applied before a new image enters conversation history."
450
+ },
451
+ "maxPerMessage": {
452
+ "type": "integer",
453
+ "minimum": 1,
454
+ "description": "Maximum images accepted in one provider message."
455
+ },
456
+ "maxPerRequest": {
457
+ "type": "integer",
458
+ "minimum": 1,
459
+ "description": "Maximum images accepted across one provider request."
460
+ }
461
+ }
462
+ }
463
+ }
464
+ },
465
+ "ModelPromptCache": {
466
+ "type": "object",
467
+ "properties": {
468
+ "short": {
469
+ "type": "number",
470
+ "exclusiveMinimum": 0
471
+ },
472
+ "long": {
473
+ "type": "number",
474
+ "exclusiveMinimum": 0
475
+ }
476
+ }
477
+ },
478
+ "ProviderCompat": {
479
+ "type": "object",
480
+ "properties": {
481
+ "supportsStore": {
482
+ "type": "boolean",
483
+ "description": "Whether the provider supports the store field. Default: auto-detected from URL."
484
+ },
485
+ "supportsDeveloperRole": {
486
+ "type": "boolean",
487
+ "description": "Whether the provider supports the developer role instead of system. Defaults are API-specific."
488
+ },
489
+ "supportsReasoningEffort": {
490
+ "type": "boolean",
491
+ "description": "Whether the provider supports reasoning_effort. Default: auto-detected from URL."
492
+ },
493
+ "supportsTemperature": {
494
+ "type": "boolean",
495
+ "description": "Whether the model accepts the temperature request field. Defaults to true.",
496
+ "default": true
497
+ },
498
+ "supportsForcedToolChoice": {
499
+ "type": "boolean",
500
+ "description": "Whether the model accepts forced tool use. When false, the provider rejects a forced choice with an error. \"auto\" and \"none\" are never altered. Defaults to true.",
501
+ "default": true
502
+ },
503
+ "supportsUsageInStreaming": {
504
+ "type": "boolean",
505
+ "description": "Whether the provider supports stream_options.include_usage for token usage in streaming responses.",
506
+ "default": true
507
+ },
508
+ "supportsFinishReason": {
509
+ "type": "boolean",
510
+ "description": "Whether streamed responses include finish_reason. When false, pi infers stop or toolUse when the stream ends.",
511
+ "default": true
512
+ },
513
+ "maxTokensField": {
514
+ "anyOf": [
515
+ {
516
+ "type": "string",
517
+ "const": "max_completion_tokens"
518
+ },
519
+ {
520
+ "type": "string",
521
+ "const": "max_tokens"
522
+ }
523
+ ],
524
+ "description": "Which field to use for max tokens. Default: auto-detected from URL."
525
+ },
526
+ "requiresToolResultName": {
527
+ "type": "boolean",
528
+ "description": "Whether tool results require the name field. Default: auto-detected from URL."
529
+ },
530
+ "requiresAssistantAfterToolResult": {
531
+ "type": "boolean",
532
+ "description": "Whether a user message after tool results requires an assistant message in between. Default: auto-detected from URL."
533
+ },
534
+ "requiresThinkingAsText": {
535
+ "type": "boolean",
536
+ "description": "Whether thinking blocks must be converted to text blocks with <thinking> delimiters. Default: auto-detected from URL."
537
+ },
538
+ "requiresReasoningContentOnAssistantMessages": {
539
+ "type": "boolean",
540
+ "description": "Whether all replayed assistant messages must include an empty reasoning_content field when reasoning is enabled. Default: auto-detected from URL."
541
+ },
542
+ "thinkingFormat": {
543
+ "anyOf": [
544
+ {
545
+ "type": "string",
546
+ "const": "openai"
547
+ },
548
+ {
549
+ "type": "string",
550
+ "const": "openrouter"
551
+ },
552
+ {
553
+ "type": "string",
554
+ "const": "deepseek"
555
+ },
556
+ {
557
+ "type": "string",
558
+ "const": "together"
559
+ },
560
+ {
561
+ "type": "string",
562
+ "const": "baseten"
563
+ },
564
+ {
565
+ "type": "string",
566
+ "const": "zai"
567
+ },
568
+ {
569
+ "type": "string",
570
+ "const": "qwen"
571
+ },
572
+ {
573
+ "type": "string",
574
+ "const": "chat-template"
575
+ },
576
+ {
577
+ "type": "string",
578
+ "const": "qwen-chat-template"
579
+ },
580
+ {
581
+ "type": "string",
582
+ "const": "string-thinking"
583
+ },
584
+ {
585
+ "type": "string",
586
+ "const": "ant-ling"
587
+ }
588
+ ],
589
+ "description": "Format for reasoning or thinking parameters. When omitted, Pi auto-detects the format from the provider URL. \"openai\" uses reasoning_effort, \"openrouter\" uses reasoning.effort, \"deepseek\" uses thinking.type plus reasoning_effort when supported, \"together\" uses reasoning.enabled plus reasoning_effort when supported, \"baseten\" uses configurable chat_template_args plus reasoning_effort when supported, \"zai\" uses thinking.type, \"qwen\" uses top-level enable_thinking, \"qwen-chat-template\" uses chat_template_kwargs.enable_thinking and preserve_thinking, \"chat-template\" uses configurable chat_template_kwargs, \"string-thinking\" uses top-level thinking, and \"ant-ling\" uses reasoning.effort only when the mapped effort is non-null."
590
+ },
591
+ "chatTemplateKwargs": {
592
+ "type": "object",
593
+ "patternProperties": {
594
+ "^.*$": {
595
+ "anyOf": [
596
+ {
597
+ "type": "string"
598
+ },
599
+ {
600
+ "type": "number"
601
+ },
602
+ {
603
+ "type": "boolean"
604
+ },
605
+ {
606
+ "type": "null"
607
+ },
608
+ {
609
+ "type": "object",
610
+ "required": [
611
+ "$var"
612
+ ],
613
+ "properties": {
614
+ "$var": {
615
+ "anyOf": [
616
+ {
617
+ "type": "string",
618
+ "const": "thinking.enabled"
619
+ },
620
+ {
621
+ "type": "string",
622
+ "const": "thinking.effort"
623
+ },
624
+ {
625
+ "type": "string",
626
+ "const": "thinking.budget"
627
+ }
628
+ ]
629
+ },
630
+ "omitWhenOff": {
631
+ "type": "boolean"
632
+ }
633
+ }
634
+ }
635
+ ]
636
+ }
637
+ },
638
+ "description": "Kwargs sent as chat_template_kwargs when thinkingFormat is \"chat-template\". Use $var with \"thinking.enabled\", \"thinking.effort\", or \"thinking.budget\" for pi-controlled values."
639
+ },
640
+ "chatTemplateArgs": {
641
+ "type": "object",
642
+ "patternProperties": {
643
+ "^.*$": {
644
+ "anyOf": [
645
+ {
646
+ "type": "string"
647
+ },
648
+ {
649
+ "type": "number"
650
+ },
651
+ {
652
+ "type": "boolean"
653
+ },
654
+ {
655
+ "type": "null"
656
+ },
657
+ {
658
+ "type": "object",
659
+ "required": [
660
+ "$var"
661
+ ],
662
+ "properties": {
663
+ "$var": {
664
+ "anyOf": [
665
+ {
666
+ "type": "string",
667
+ "const": "thinking.enabled"
668
+ },
669
+ {
670
+ "type": "string",
671
+ "const": "thinking.effort"
672
+ },
673
+ {
674
+ "type": "string",
675
+ "const": "thinking.budget"
676
+ }
677
+ ]
678
+ },
679
+ "omitWhenOff": {
680
+ "type": "boolean"
681
+ }
682
+ }
683
+ }
684
+ ]
685
+ }
686
+ },
687
+ "description": "Arguments sent as chat_template_args when thinkingFormat is \"baseten\". Use $var with \"thinking.enabled\", \"thinking.effort\", or \"thinking.budget\" for pi-controlled values."
688
+ },
689
+ "openRouterRouting": {
690
+ "type": "object",
691
+ "properties": {
692
+ "allow_fallbacks": {
693
+ "type": "boolean",
694
+ "description": "Whether to allow backup providers to serve requests.",
695
+ "default": true
696
+ },
697
+ "require_parameters": {
698
+ "type": "boolean",
699
+ "description": "Whether to filter providers to only those that support all parameters in the request.",
700
+ "default": false
701
+ },
702
+ "data_collection": {
703
+ "anyOf": [
704
+ {
705
+ "type": "string",
706
+ "const": "deny"
707
+ },
708
+ {
709
+ "type": "string",
710
+ "const": "allow"
711
+ }
712
+ ],
713
+ "description": "Data collection setting. \"allow\": allow providers that may store or train on data. \"deny\": only use providers that do not collect user data.",
714
+ "default": "allow"
715
+ },
716
+ "zdr": {
717
+ "type": "boolean",
718
+ "description": "Whether to restrict routing to only ZDR (Zero Data Retention) endpoints."
719
+ },
720
+ "enforce_distillable_text": {
721
+ "type": "boolean",
722
+ "description": "Whether to restrict routing to only models that allow text distillation."
723
+ },
724
+ "order": {
725
+ "type": "array",
726
+ "items": {
727
+ "type": "string"
728
+ },
729
+ "description": "An ordered list of provider names or slugs to try in sequence, falling back to the next if unavailable."
730
+ },
731
+ "only": {
732
+ "type": "array",
733
+ "items": {
734
+ "type": "string"
735
+ },
736
+ "description": "List of provider names or slugs to exclusively allow for this request."
737
+ },
738
+ "ignore": {
739
+ "type": "array",
740
+ "items": {
741
+ "type": "string"
742
+ },
743
+ "description": "List of provider names or slugs to skip for this request."
744
+ },
745
+ "quantizations": {
746
+ "type": "array",
747
+ "items": {
748
+ "type": "string"
749
+ },
750
+ "description": "A list of quantization levels to filter providers by, for example [\"fp16\", \"bf16\", \"fp8\", \"fp6\", \"int8\", \"int4\", \"fp4\", \"fp32\"]."
751
+ },
752
+ "sort": {
753
+ "anyOf": [
754
+ {
755
+ "type": "string"
756
+ },
757
+ {
758
+ "type": "object",
759
+ "properties": {
760
+ "by": {
761
+ "type": "string",
762
+ "description": "The sorting metric, such as \"price\", \"throughput\", or \"latency\"."
763
+ },
764
+ "partition": {
765
+ "anyOf": [
766
+ {
767
+ "type": "string"
768
+ },
769
+ {
770
+ "type": "null"
771
+ }
772
+ ],
773
+ "description": "Partitioning strategy: \"model\" or \"none\".",
774
+ "default": "model"
775
+ }
776
+ }
777
+ }
778
+ ],
779
+ "description": "Sorting strategy. Can be a string such as \"price\", \"throughput\", or \"latency\", or an object."
780
+ },
781
+ "max_price": {
782
+ "type": "object",
783
+ "properties": {
784
+ "prompt": {
785
+ "anyOf": [
786
+ {
787
+ "type": "number"
788
+ },
789
+ {
790
+ "type": "string"
791
+ }
792
+ ],
793
+ "description": "Price per million prompt tokens."
794
+ },
795
+ "completion": {
796
+ "anyOf": [
797
+ {
798
+ "type": "number"
799
+ },
800
+ {
801
+ "type": "string"
802
+ }
803
+ ],
804
+ "description": "Price per million completion tokens."
805
+ },
806
+ "image": {
807
+ "anyOf": [
808
+ {
809
+ "type": "number"
810
+ },
811
+ {
812
+ "type": "string"
813
+ }
814
+ ],
815
+ "description": "Price per image."
816
+ },
817
+ "audio": {
818
+ "anyOf": [
819
+ {
820
+ "type": "number"
821
+ },
822
+ {
823
+ "type": "string"
824
+ }
825
+ ],
826
+ "description": "Price per audio unit."
827
+ },
828
+ "request": {
829
+ "anyOf": [
830
+ {
831
+ "type": "number"
832
+ },
833
+ {
834
+ "type": "string"
835
+ }
836
+ ],
837
+ "description": "Price per request."
838
+ }
839
+ },
840
+ "description": "Maximum price per million tokens in USD."
841
+ },
842
+ "preferred_min_throughput": {
843
+ "anyOf": [
844
+ {
845
+ "type": "number"
846
+ },
847
+ {
848
+ "type": "object",
849
+ "properties": {
850
+ "p50": {
851
+ "type": "number",
852
+ "description": "Minimum tokens per second at the 50th percentile."
853
+ },
854
+ "p75": {
855
+ "type": "number",
856
+ "description": "Minimum tokens per second at the 75th percentile."
857
+ },
858
+ "p90": {
859
+ "type": "number",
860
+ "description": "Minimum tokens per second at the 90th percentile."
861
+ },
862
+ "p99": {
863
+ "type": "number",
864
+ "description": "Minimum tokens per second at the 99th percentile."
865
+ }
866
+ }
867
+ }
868
+ ],
869
+ "description": "Preferred minimum throughput in tokens per second. A number applies to p50."
870
+ },
871
+ "preferred_max_latency": {
872
+ "anyOf": [
873
+ {
874
+ "type": "number"
875
+ },
876
+ {
877
+ "type": "object",
878
+ "properties": {
879
+ "p50": {
880
+ "type": "number",
881
+ "description": "Maximum latency in seconds at the 50th percentile."
882
+ },
883
+ "p75": {
884
+ "type": "number",
885
+ "description": "Maximum latency in seconds at the 75th percentile."
886
+ },
887
+ "p90": {
888
+ "type": "number",
889
+ "description": "Maximum latency in seconds at the 90th percentile."
890
+ },
891
+ "p99": {
892
+ "type": "number",
893
+ "description": "Maximum latency in seconds at the 99th percentile."
894
+ }
895
+ }
896
+ }
897
+ ],
898
+ "description": "Preferred maximum latency in seconds. A number applies to p50."
899
+ }
900
+ },
901
+ "description": "OpenRouter provider routing preferences. Controls which upstream providers OpenRouter routes requests to. Sent as the provider field in the OpenRouter API request body. See https://openrouter.ai/docs/guides/routing/provider-selection."
902
+ },
903
+ "vercelGatewayRouting": {
904
+ "type": "object",
905
+ "properties": {
906
+ "only": {
907
+ "type": "array",
908
+ "items": {
909
+ "type": "string"
910
+ },
911
+ "description": "List of provider slugs to exclusively use for this request, for example [\"bedrock\", \"anthropic\"]."
912
+ },
913
+ "order": {
914
+ "type": "array",
915
+ "items": {
916
+ "type": "string"
917
+ },
918
+ "description": "List of provider slugs to try in order, for example [\"anthropic\", \"openai\"]."
919
+ }
920
+ },
921
+ "description": "Vercel AI Gateway routing preferences. Controls which upstream providers the gateway routes requests to. See https://vercel.com/docs/ai-gateway/models-and-providers/provider-options."
922
+ },
923
+ "zaiToolStream": {
924
+ "type": "boolean",
925
+ "description": "Whether z.ai supports top-level tool_stream for streaming tool call deltas.",
926
+ "default": false
927
+ },
928
+ "thinkingTokenBudgetField": {
929
+ "anyOf": [
930
+ {
931
+ "type": "string",
932
+ "const": "thinking_token_budget"
933
+ },
934
+ {
935
+ "type": "string",
936
+ "const": "thinking_budget"
937
+ },
938
+ {
939
+ "type": "string",
940
+ "const": "thinking_budget_tokens"
941
+ }
942
+ ],
943
+ "description": "Top-level request field used to cap reasoning tokens from thinkingBudgets. Reasoning and the answer share max_tokens on these endpoints. \"thinking_token_budget\" is vLLM, \"thinking_budget\" is Qwen, DashScope, or SGLang, and \"thinking_budget_tokens\" is llama.cpp. Off by default and not set on the generated catalog."
944
+ },
945
+ "supportsThinkingTokenBudget": {
946
+ "type": "boolean",
947
+ "description": "Alias for thinkingTokenBudgetField: \"thinking_token_budget\" (vLLM). Prefer thinkingTokenBudgetField.",
948
+ "default": false
949
+ },
950
+ "supportsOpenAIGrammarTools": {
951
+ "type": "boolean",
952
+ "description": "Whether the provider supports OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools.",
953
+ "default": false
954
+ },
955
+ "supportsMidConvoSystemMessages": {
956
+ "type": "boolean",
957
+ "description": "Whether the exact model accepts system or developer messages after the conversation has started. When false, later system messages are folded into the leading system message.",
958
+ "default": false
959
+ },
960
+ "supportsMidConvoToolAdditions": {
961
+ "type": "boolean",
962
+ "description": "Whether system messages can introduce additional tools mid-conversation. Requires supportsMidConvoSystemMessages. The generated catalog enables this for capable models.",
963
+ "default": false
964
+ },
965
+ "supportsStrictMode": {
966
+ "type": "boolean",
967
+ "description": "Whether the provider supports strict tool schemas. Defaults are API-specific."
968
+ },
969
+ "cacheControlFormat": {
970
+ "type": "string",
971
+ "const": "anthropic",
972
+ "description": "Cache control convention for prompt caching. Anthropic applies cache_control markers to the system prompt, last tool definition, and last user, assistant, or tool-result text content."
973
+ },
974
+ "sendSessionAffinityHeaders": {
975
+ "type": "boolean",
976
+ "description": "Whether to send session-affinity data from options.sessionId. Defaults are API-specific."
977
+ },
978
+ "sessionAffinityFormat": {
979
+ "anyOf": [
980
+ {
981
+ "type": "string",
982
+ "const": "openai"
983
+ },
984
+ {
985
+ "type": "string",
986
+ "const": "openai-nosession"
987
+ },
988
+ {
989
+ "type": "string",
990
+ "const": "openrouter"
991
+ }
992
+ ],
993
+ "description": "Session-affinity header format. Defaults are API-specific or auto-detected."
994
+ },
995
+ "supportsLongCacheRetention": {
996
+ "type": "boolean",
997
+ "description": "Whether the provider supports long prompt cache retention. Defaults are API-specific or auto-detected."
998
+ },
999
+ "vllmPriority": {
1000
+ "type": "number",
1001
+ "description": "vLLM scheduler priority sent as the top-level priority request field. Lower values are handled earlier and the server default is 0. Only meaningful with --scheduling-policy priority. Off by default and not set on the generated catalog."
1002
+ },
1003
+ "supportsAdditionalTools": {
1004
+ "type": "boolean",
1005
+ "description": "Whether the model supports message-anchored additional_tools input items.",
1006
+ "default": false
1007
+ },
1008
+ "supportsToolSearch": {
1009
+ "type": "boolean",
1010
+ "description": "Whether the model supports client-executed tool search for transcript-anchored additions.",
1011
+ "default": false
1012
+ },
1013
+ "supportsExplicitPromptCacheMode": {
1014
+ "type": "boolean",
1015
+ "description": "Whether the model accepts prompt_cache_options. Older OpenAI models reject the parameter.",
1016
+ "default": false
1017
+ },
1018
+ "supportsMaxOutputTokens": {
1019
+ "type": "boolean",
1020
+ "description": "Whether the provider accepts max_output_tokens. Some Codex-protocol gateways reject it.",
1021
+ "default": true
1022
+ },
1023
+ "supportsEagerToolInputStreaming": {
1024
+ "type": "boolean",
1025
+ "description": "Whether the provider accepts per-tool eager_input_streaming. When false, the Anthropic provider omits tools[].eager_input_streaming and sends the legacy fine-grained-tool-streaming-2025-05-14 beta header for tool-enabled requests.",
1026
+ "default": true
1027
+ },
1028
+ "supportsCacheControlOnTools": {
1029
+ "type": "boolean",
1030
+ "description": "Whether the provider supports Anthropic-style cache_control markers on tool definitions. When false, cache_control is omitted from tool parameters. Some Anthropic-compatible providers, such as Fireworks, do not support this field on tools and may reject or ignore it.",
1031
+ "default": true
1032
+ },
1033
+ "forceAdaptiveThinking": {
1034
+ "type": "boolean",
1035
+ "description": "Whether to force adaptive thinking (thinking.type: adaptive plus output_config.effort) regardless of model ID. Built-in models that require adaptive thinking set this in generated metadata. Custom Anthropic-compatible providers can set this to true for any model whose upstream requires the adaptive format. Set false to opt out on overridden built-in models.",
1036
+ "default": false
1037
+ },
1038
+ "allowEmptySignature": {
1039
+ "type": "boolean",
1040
+ "description": "Whether to replay empty thinking signatures instead of converting thinking to text.",
1041
+ "default": false
1042
+ },
1043
+ "supportsStrictTools": {
1044
+ "type": "boolean",
1045
+ "description": "Whether the provider supports Anthropic strict tool schemas. Generated Anthropic models enable it explicitly.",
1046
+ "default": false
1047
+ },
1048
+ "supportsMidConvoEffort": {
1049
+ "type": "boolean",
1050
+ "description": "Whether the exact model transport supports effort-only system messages and thinking binding controls.",
1051
+ "default": false
1052
+ },
1053
+ "supportsMidConvoToolChanges": {
1054
+ "type": "boolean",
1055
+ "description": "Whether the exact model accepts mid-conversation tool_addition and tool_removal blocks. Requires supportsMidConvoSystemMessages.",
1056
+ "default": false
1057
+ },
1058
+ "allowedFallbackModels": {
1059
+ "type": "array",
1060
+ "items": {
1061
+ "type": "object",
1062
+ "required": [
1063
+ "provider",
1064
+ "model",
1065
+ "cost"
1066
+ ],
1067
+ "properties": {
1068
+ "provider": {
1069
+ "type": "string",
1070
+ "minLength": 1
1071
+ },
1072
+ "model": {
1073
+ "type": "string",
1074
+ "minLength": 1
1075
+ },
1076
+ "cost": {
1077
+ "$ref": "#/$defs/ModelCost"
1078
+ }
1079
+ },
1080
+ "description": "An Anthropic server-side refusal fallback model with local pricing metadata."
1081
+ },
1082
+ "maxItems": 3,
1083
+ "description": "Models Anthropic accepts for server-side refusal fallback, with local pricing metadata for returned fallback responses. When absent or empty, callers must omit fallbacks; Anthropic rejects the field for models with no permitted fallback targets."
1084
+ },
1085
+ "enforcesPreservedThinkingBinding": {
1086
+ "type": "boolean",
1087
+ "description": "Whether the model runs the Anthropic preserved-thinking conversation check, which rejects a request whose system prompt, tools, or earlier messages changed since a replayed thinking block was produced. When true, the provider sends the thinking-binding-controls-2026-08-01 beta header and thinking.block_binding.prefix_mismatch_behavior: \"drop_block\", so a changed prefix drops the affected thinking blocks instead of failing the request.",
1088
+ "default": false
1089
+ },
1090
+ "delegatesThinkingModelBinding": {
1091
+ "type": "boolean",
1092
+ "description": "Whether the API adjudicates thinking-block model binding itself, always dropping a block the target model cannot read. When true, an assistant turn produced by a different model on the same provider and API replays its signed thinking and redacted_thinking blocks unchanged instead of being rewritten into plain text.",
1093
+ "default": false
1094
+ },
1095
+ "supportsGrammarTools": {
1096
+ "type": "boolean",
1097
+ "description": "Atomic alias for supportsOpenAIGrammarTools. The canonical field wins if both are set."
1098
+ }
1099
+ },
1100
+ "additionalProperties": true
1101
+ },
1102
+ "ThinkingLevelMap": {
1103
+ "type": "object",
1104
+ "properties": {
1105
+ "off": {
1106
+ "anyOf": [
1107
+ {
1108
+ "type": "string"
1109
+ },
1110
+ {
1111
+ "type": "null"
1112
+ }
1113
+ ]
1114
+ },
1115
+ "minimal": {
1116
+ "anyOf": [
1117
+ {
1118
+ "type": "string"
1119
+ },
1120
+ {
1121
+ "type": "null"
1122
+ }
1123
+ ]
1124
+ },
1125
+ "low": {
1126
+ "anyOf": [
1127
+ {
1128
+ "type": "string"
1129
+ },
1130
+ {
1131
+ "type": "null"
1132
+ }
1133
+ ]
1134
+ },
1135
+ "medium": {
1136
+ "anyOf": [
1137
+ {
1138
+ "type": "string"
1139
+ },
1140
+ {
1141
+ "type": "null"
1142
+ }
1143
+ ]
1144
+ },
1145
+ "high": {
1146
+ "anyOf": [
1147
+ {
1148
+ "type": "string"
1149
+ },
1150
+ {
1151
+ "type": "null"
1152
+ }
1153
+ ]
1154
+ },
1155
+ "xhigh": {
1156
+ "anyOf": [
1157
+ {
1158
+ "type": "string"
1159
+ },
1160
+ {
1161
+ "type": "null"
1162
+ }
1163
+ ]
1164
+ },
1165
+ "max": {
1166
+ "anyOf": [
1167
+ {
1168
+ "type": "string"
1169
+ },
1170
+ {
1171
+ "type": "null"
1172
+ }
1173
+ ]
1174
+ }
1175
+ }
1176
+ }
1177
+ }
1178
+ }