@linxiraos/pi-catalog 1.1.13 → 1.1.15

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 (43) hide show
  1. package/CHANGELOG.md +2 -69
  2. package/README.md +20 -0
  3. package/dist/types/compat/auth-ids.d.ts +2 -2
  4. package/dist/types/models.d.ts +10 -6
  5. package/dist/types/pricing.d.ts +5 -0
  6. package/dist/types/provider-models/descriptor-types.d.ts +15 -0
  7. package/dist/types/provider-models/descriptors.d.ts +20 -0
  8. package/dist/types/provider-models/openai-compat.d.ts +44 -0
  9. package/dist/types/types.d.ts +43 -2
  10. package/dist/types/wire/charm-hyper.d.ts +21 -0
  11. package/dist/types/wire/github-copilot.d.ts +19 -0
  12. package/package.json +4 -4
  13. package/src/build.ts +16 -2
  14. package/src/compat/auth-ids.ts +4 -0
  15. package/src/compat/axes.ts +9 -0
  16. package/src/compat/resolve.ts +18 -4
  17. package/src/compat/rules/README.md +37 -0
  18. package/src/compat/rules/auth/_order.kdl +1 -1
  19. package/src/compat/rules/auth/charm-hyper.kdl +19 -0
  20. package/src/compat/rules/auth/commandcode.kdl +13 -0
  21. package/src/compat/rules/classes/anthropic.kdl +41 -0
  22. package/src/compat/rules/classes/deepseek.kdl +11 -0
  23. package/src/compat/rules/classes/minimax.kdl +4 -2
  24. package/src/compat/rules/providers/amazon-bedrock.kdl +7 -0
  25. package/src/compat/rules/providers/anthropic.kdl +8 -0
  26. package/src/compat/rules/providers/charm-hyper.kdl +82 -0
  27. package/src/compat/rules/providers/commandcode.kdl +601 -0
  28. package/src/compat/rules/providers/deepseek.kdl +83 -1
  29. package/src/compat/rules/providers/opencode-go.kdl +22 -0
  30. package/src/compat/rules/providers/opencode-zen.kdl +12 -0
  31. package/src/compat/rules/runtime/behavior.kdl +5 -0
  32. package/src/compat/rules.json +2143 -131
  33. package/src/model-manager.ts +27 -13
  34. package/src/models.json +12953 -5481
  35. package/src/models.ts +93 -19
  36. package/src/pricing.ts +136 -0
  37. package/src/provider-models/cache-provider-id.ts +28 -4
  38. package/src/provider-models/descriptor-types.ts +15 -0
  39. package/src/provider-models/descriptors.ts +36 -0
  40. package/src/provider-models/openai-compat.ts +297 -3
  41. package/src/types.ts +46 -1
  42. package/src/wire/charm-hyper.ts +26 -0
  43. package/src/wire/github-copilot.ts +26 -0
@@ -0,0 +1,601 @@
1
+ // Command Code Provider API deployment contract. Model capabilities and effort
2
+ // ladders follow command-code@1.44.0: the thinking-efforts below reproduce the
3
+ // bundle's 36-id effort registry 1:1 (verified against its effort map), plus
4
+ // the 5 Muse Spark lineage ids whose ladder OMP's classes/meta.kdl carries.
5
+ // Every other served id exposes no effort dial upstream (`modelSupports-
6
+ // ReasoningEffort` is false for them in the CLI), so a missing ladder here
7
+ // is a deliberate absence, not a gap.
8
+ provider "commandcode" {
9
+ supports-developer-role #false
10
+ supports-store #false
11
+ // No effort dial by default: only the exact ids below expose one
12
+ // upstream (command-code@1.44.0 effort registry + Muse Spark lineage).
13
+ // Every other served id must omit the effort control on the wire.
14
+ supports-reasoning-effort #false
15
+ // Discovery rows carry no reasoning metadata and stay neutral, so exact
16
+ // ladders below opt into repairing the neutral default (the cascade
17
+ // upgrade for stale source capability data).
18
+ thinking-upgrade-neutral #true
19
+ thinking-mode "effort"
20
+ max-tokens-field "max_tokens"
21
+ // Default output cap: the Provider API exposes no per-model maximum and
22
+ // the CLI requests 64K by default, so 64K (2^16); the two registry caps
23
+ // below are the only per-model maxOutputTokens in command-code@1.44.0.
24
+ limits-patch {
25
+ max-tokens 65536
26
+ }
27
+ class "anthropic" {
28
+ thinking-mode "anthropic-adaptive"
29
+ supports-eager-tool-input-streaming #false
30
+ supports-long-cache-retention #false
31
+ }
32
+ models "claude-fable-5" "claude-fable-5-1" "claude-opus-4-7" "claude-opus-4-8" \
33
+ "claude-opus-5" "claude-sonnet-4-6" "claude-sonnet-5" {
34
+ supports-reasoning-effort #true
35
+ thinking-efforts "low" "medium" "high" "xhigh" "max"
36
+ }
37
+ models "deepseek/deepseek-v4-flash" "deepseek/deepseek-v4-flash-vision-exp" \
38
+ "deepseek/deepseek-v4-pro" "zai-org/GLM-5.2" {
39
+ supports-reasoning-effort #true
40
+ thinking-efforts "high" "max"
41
+ }
42
+ models "deepseek/deepseek-v4-flash-fast" "moonshotai/Kimi-K3" "z-ai/glm-5.3-flash" \
43
+ "zai-org/GLM-5.3" {
44
+ supports-reasoning-effort #true
45
+ thinking-efforts "low" "high" "max"
46
+ }
47
+ models "google/gemini-3.1-flash-lite" "google/gemini-3.5-flash" \
48
+ "google/gemini-3.5-flash-lite" "google/gemini-3.6-flash" "google/gemini-3.7-flash" \
49
+ "google/gemini-3.8-flash" "gpt-5.4-mini" "xai/grok-4.5" {
50
+ supports-reasoning-effort #true
51
+ thinking-efforts "low" "medium" "high"
52
+ }
53
+ models "gpt-5.3-codex" "gpt-5.4" "gpt-5.5" "xai/grok-4.6" {
54
+ supports-reasoning-effort #true
55
+ thinking-efforts "low" "medium" "high" "xhigh"
56
+ }
57
+ models "gpt-5.6-luna" "gpt-5.6-sol" "gpt-5.6-terra" {
58
+ supports-reasoning-effort #true
59
+ thinking-efforts "low" "medium" "high" "xhigh" "max"
60
+ }
61
+ models "meta/muse-spark-1.1" "meta/muse-spark-1.2" "meta/muse-spark-1.2-contributor" \
62
+ "meta/muse-spark-1.3" "meta/muse-spark-1.3-contributor" {
63
+ supports-reasoning-effort #true
64
+ thinking-efforts "minimal" "low" "medium" "high" "xhigh"
65
+ }
66
+ models "Qwen/Qwen3.8-27B" "Qwen/Qwen3.8-Flash" "Qwen/Qwen3.8-Max" "Qwen/Qwen3.8-Max-0902" {
67
+ supports-reasoning-effort #true
68
+ thinking-efforts "low" "medium" "xhigh"
69
+ }
70
+ models "sakana/fugu-ultra" {
71
+ supports-reasoning-effort #true
72
+ thinking-efforts "high" "xhigh"
73
+ }
74
+ models "tencent/hy4-preview" {
75
+ supports-reasoning-effort #true
76
+ thinking-efforts "low" "medium" "high"
77
+ }
78
+ models "Qwen/Qwen3.8-27B" {
79
+ limits-patch {
80
+ max-tokens 32768
81
+ }
82
+ }
83
+ models "z-ai/glm-5.3-flash" {
84
+ limits-patch {
85
+ max-tokens 131072
86
+ }
87
+ }
88
+ // Codex SKUs report the output budget inside the advertised window, so
89
+ // the class lineage pins the 272K prompt window; restate it here or the
90
+ // class rule wins the whole limits axis and drops the 64K provider cap.
91
+ models "gpt-5.3-codex" {
92
+ limits-patch {
93
+ context-window 272000
94
+ max-tokens 65536
95
+ }
96
+ }
97
+ // ---------------------------------------------------------------------------
98
+ // Provider pricing. Every model id served by GET /provider/v1/models is
99
+ // priced here; discovery defaults each model to zero cost and the mapper
100
+ // never inherits another provider's rates, so this table is the sole
101
+ // pricing source. Base rates are Command Code's per-1M-token USD list
102
+ // prices, cross-checked 1:1 against the rate card bundled in
103
+ // command-code@1.44.0 (67 rows, zero mismatches) and the live catalog on
104
+ // 2026-09-09 (68 rows: the bundle plus `inclusionai/ling-3.0-flash-sante:free`).
105
+ // The page's Sonnet 4.5 / Opus 4.6 / GPT-6 Astra rows are not served by
106
+ // the Provider API and stay absent. A "—" Cache Write column on the page
107
+ // means 0. Standing deals (MiniMax M3 50% off, MiMo V2.5 discounts) are
108
+ // priced at their current effective rates. Free models
109
+ // (`poolside/laguna-s-2.1-free`, `meituan/LongCat-2.0:free`,
110
+ // `inclusionai/ling-3.0-flash-sante:free`) keep the zero discovery default.
111
+ // ---------------------------------------------------------------------------
112
+ models "claude-sonnet-5" {
113
+ cost-patch {
114
+ input 2.0
115
+ output 10.0
116
+ cache-read 0.2
117
+ cache-write 2.5
118
+ }
119
+ }
120
+ models "claude-sonnet-4-6" {
121
+ cost-patch {
122
+ input 3.0
123
+ output 15.0
124
+ cache-read 0.3
125
+ cache-write 3.75
126
+ }
127
+ }
128
+ // Fable 5.1 cut cache reads to 0.25; Fable 5 stays at 1.0.
129
+ models "claude-fable-5-1" {
130
+ cost-patch {
131
+ input 10.0
132
+ output 50.0
133
+ cache-read 0.25
134
+ cache-write 12.5
135
+ }
136
+ }
137
+ models "claude-fable-5" {
138
+ cost-patch {
139
+ input 10.0
140
+ output 50.0
141
+ cache-read 1.0
142
+ cache-write 12.5
143
+ }
144
+ }
145
+ models "claude-opus-5" "claude-opus-4-8" "claude-opus-4-7" {
146
+ cost-patch {
147
+ input 5.0
148
+ output 25.0
149
+ cache-read 0.5
150
+ cache-write 6.25
151
+ }
152
+ }
153
+ models "claude-haiku-4-5-20251001" {
154
+ cost-patch {
155
+ input 1.0
156
+ output 5.0
157
+ cache-read 0.1
158
+ cache-write 1.25
159
+ }
160
+ }
161
+ models "gpt-5.6-sol" {
162
+ cost-patch {
163
+ input 5.0
164
+ output 30.0
165
+ cache-read 0.5
166
+ cache-write 6.25
167
+ }
168
+ }
169
+ models "gpt-5.6-terra" {
170
+ cost-patch {
171
+ input 2.0
172
+ output 12.0
173
+ cache-read 0.2
174
+ cache-write 2.5
175
+ }
176
+ }
177
+ models "gpt-5.6-luna" {
178
+ cost-patch {
179
+ input 0.2
180
+ output 1.2
181
+ cache-read 0.02
182
+ cache-write 0.25
183
+ }
184
+ }
185
+ models "gpt-5.5" {
186
+ cost-patch {
187
+ input 5.0
188
+ output 30.0
189
+ cache-read 0.5
190
+ cache-write 0.0
191
+ }
192
+ }
193
+ models "gpt-5.4" {
194
+ cost-patch {
195
+ input 2.5
196
+ output 15.0
197
+ cache-read 0.25
198
+ cache-write 0.0
199
+ }
200
+ }
201
+ models "gpt-5.3-codex" {
202
+ cost-patch {
203
+ input 2.0
204
+ output 8.0
205
+ cache-read 0.5
206
+ cache-write 0.0
207
+ }
208
+ }
209
+ models "gpt-5.4-mini" {
210
+ cost-patch {
211
+ input 0.75
212
+ output 4.5
213
+ cache-read 0.075
214
+ cache-write 0.0
215
+ }
216
+ }
217
+ // DeepSeek V4 bills time-dependent rates; the page displays the off-peak
218
+ // rates that apply 17h/day (peak doubles input/output). Off-peak is the
219
+ // documented display convention; the Usage page stays authoritative.
220
+ models "deepseek/deepseek-v4-pro" {
221
+ cost-patch {
222
+ input 0.66
223
+ output 1.98
224
+ cache-read 0.022
225
+ cache-write 0.0
226
+ }
227
+ }
228
+ models "deepseek/deepseek-v4-flash" "deepseek/deepseek-v4-flash-vision-exp" {
229
+ cost-patch {
230
+ input 0.22
231
+ output 0.66
232
+ cache-read 0.007
233
+ cache-write 0.0
234
+ }
235
+ }
236
+ models "deepseek/deepseek-v4-flash-fast" {
237
+ cost-patch {
238
+ input 0.28
239
+ output 0.56
240
+ cache-read 0.07
241
+ cache-write 0.0
242
+ }
243
+ }
244
+ // Served by the live catalog but absent from command-code@1.44.0: models
245
+ // page off-peak rates as listed 2026-09-10 (cache-write "—" means 0).
246
+ models "deepseek/deepseek-v4.1-flash" {
247
+ cost-patch {
248
+ input 0.15
249
+ output 0.6
250
+ cache-read 0.003
251
+ cache-write 0.0
252
+ }
253
+ }
254
+ models "moonshotai/Kimi-K3" {
255
+ cost-patch {
256
+ input 3.0
257
+ output 15.0
258
+ cache-read 0.3
259
+ cache-write 0.0
260
+ }
261
+ }
262
+ models "moonshotai/Kimi-K2.7-Code" {
263
+ cost-patch {
264
+ input 0.95
265
+ output 4.0
266
+ cache-read 0.19
267
+ cache-write 0.0
268
+ }
269
+ }
270
+ models "moonshotai/Kimi-K2.7-Code-Highspeed" {
271
+ cost-patch {
272
+ input 1.9
273
+ output 8.0
274
+ cache-read 0.38
275
+ cache-write 0.0
276
+ }
277
+ }
278
+ models "moonshotai/Kimi-K2.6" {
279
+ cost-patch {
280
+ input 0.95
281
+ output 4.0
282
+ cache-read 0.16
283
+ cache-write 0.0
284
+ }
285
+ }
286
+ models "moonshotai/Kimi-K2.5" {
287
+ cost-patch {
288
+ input 0.6
289
+ output 3.0
290
+ cache-read 0.1
291
+ cache-write 0.0
292
+ }
293
+ }
294
+ // Permanent documented list price, matching the zai-host correction in
295
+ // classes/glm.kdl (stencil.so's launch promotion expired 2026-09-09).
296
+ models "z-ai/glm-5.3-flash" {
297
+ cost-patch {
298
+ input 0.15
299
+ output 0.5
300
+ cache-read 0.03
301
+ cache-write 0.0
302
+ }
303
+ }
304
+ models "zai-org/GLM-5.3" "zai-org/GLM-5.2" "zai-org/GLM-5.1" {
305
+ cost-patch {
306
+ input 1.4
307
+ output 4.4
308
+ cache-read 0.26
309
+ cache-write 0.0
310
+ }
311
+ }
312
+ models "zai-org/GLM-5.2-Fast" {
313
+ cost-patch {
314
+ input 3.0
315
+ output 10.25
316
+ cache-read 0.5
317
+ cache-write 0.0
318
+ }
319
+ }
320
+ models "zai-org/GLM-5" {
321
+ cost-patch {
322
+ input 1.0
323
+ output 3.2
324
+ cache-read 0.2
325
+ cache-write 0.0
326
+ }
327
+ }
328
+ // MiniMax M3 carries a standing 50%-off deal; priced at the effective rate.
329
+ models "MiniMaxAI/MiniMax-M3" "MiniMaxAI/MiniMax-M2.7" {
330
+ cost-patch {
331
+ input 0.3
332
+ output 1.2
333
+ cache-read 0.06
334
+ cache-write 0.0
335
+ }
336
+ }
337
+ models "MiniMaxAI/MiniMax-M2.5" {
338
+ cost-patch {
339
+ input 0.3
340
+ output 1.2
341
+ cache-read 0.03
342
+ cache-write 0.0
343
+ }
344
+ }
345
+ // MiMo V2.5 carries standing Xiaomi discounts; priced at the current
346
+ // unified-context effective rates.
347
+ models "xiaomi/mimo-v2.5-pro" {
348
+ cost-patch {
349
+ input 0.435
350
+ output 0.87
351
+ cache-read 0.0036
352
+ cache-write 0.0
353
+ }
354
+ }
355
+ models "xiaomi/mimo-v2.5" {
356
+ cost-patch {
357
+ input 0.14
358
+ output 0.28
359
+ cache-read 0.0028
360
+ cache-write 0.0
361
+ }
362
+ }
363
+ models "Qwen/Qwen3.8-Max-0902" {
364
+ cost-patch {
365
+ input 2.0
366
+ output 6.0
367
+ cache-read 0.25
368
+ cache-write 0.0
369
+ }
370
+ }
371
+ models "Qwen/Qwen3.8-Max" {
372
+ cost-patch {
373
+ input 2.0
374
+ output 6.0
375
+ cache-read 0.25
376
+ cache-write 2.5
377
+ }
378
+ }
379
+ models "Qwen/Qwen3.8-27B" {
380
+ cost-patch {
381
+ input 0.4
382
+ output 3.0
383
+ cache-read 0.04
384
+ cache-write 0.0
385
+ }
386
+ }
387
+ models "Qwen/Qwen3.8-Flash" {
388
+ cost-patch {
389
+ input 0.16
390
+ output 0.47
391
+ cache-read 0.016
392
+ cache-write 0.0
393
+ }
394
+ }
395
+ models "Qwen/Qwen3.7-Max" {
396
+ cost-patch {
397
+ input 2.5
398
+ output 7.5
399
+ cache-read 0.5
400
+ cache-write 3.13
401
+ }
402
+ }
403
+ models "Qwen/Qwen3.7-Plus" {
404
+ cost-patch {
405
+ input 0.4
406
+ output 1.6
407
+ cache-read 0.08
408
+ cache-write 0.5
409
+ }
410
+ long-context-cost {
411
+ input-threshold 256000
412
+ input 1.2
413
+ output 4.8
414
+ cache-read 0.24
415
+ cache-write 1.5
416
+ }
417
+ }
418
+ // Two upstream tiers (>32K at 0.10/0.40 and >256K at 0.20/0.80); the
419
+ // catalog carries a single long-context slot, so the highest tier is
420
+ // encoded from the first crossing — 32K-256K over-reports rather than
421
+ // under-reporting spend above 256K.
422
+ models "Qwen/Qwen3.7-Flash" {
423
+ cost-patch {
424
+ input 0.03
425
+ output 0.13
426
+ cache-read 0.006
427
+ cache-write 0.038
428
+ }
429
+ long-context-cost {
430
+ input-threshold 32000
431
+ input 0.2
432
+ output 0.8
433
+ cache-read 0.04
434
+ cache-write 0.25
435
+ }
436
+ }
437
+ models "Qwen/Qwen3.6-Max-Preview" {
438
+ cost-patch {
439
+ input 1.3
440
+ output 7.8
441
+ cache-read 0.26
442
+ cache-write 1.63
443
+ }
444
+ }
445
+ models "Qwen/Qwen3.6-Plus" {
446
+ cost-patch {
447
+ input 0.5
448
+ output 3.0
449
+ cache-read 0.1
450
+ cache-write 0.0
451
+ }
452
+ }
453
+ models "stepfun/Step-3.7-Flash" {
454
+ cost-patch {
455
+ input 0.2
456
+ output 1.15
457
+ cache-read 0.04
458
+ cache-write 0.0
459
+ }
460
+ }
461
+ models "stepfun/Step-3.5-Flash" {
462
+ cost-patch {
463
+ input 0.1
464
+ output 0.3
465
+ cache-read 0.02
466
+ cache-write 0.0
467
+ }
468
+ }
469
+ models "tencent/hy4-preview" {
470
+ cost-patch {
471
+ input 0.834
472
+ output 2.501
473
+ cache-read 0.042
474
+ cache-write 0.0
475
+ }
476
+ }
477
+ models "tencent/hy3-paid" {
478
+ cost-patch {
479
+ input 0.14
480
+ output 0.58
481
+ cache-read 0.035
482
+ cache-write 0.0
483
+ }
484
+ }
485
+ models "google/gemini-3.8-flash" "google/gemini-3.6-flash" {
486
+ cost-patch {
487
+ input 1.5
488
+ output 7.5
489
+ cache-read 0.15
490
+ cache-write 0.0
491
+ }
492
+ }
493
+ // Gemini 3.7 Flash is the only Gemini row with a Cache Write column.
494
+ models "google/gemini-3.7-flash" {
495
+ cost-patch {
496
+ input 1.5
497
+ output 7.5
498
+ cache-read 0.15
499
+ cache-write 0.08334
500
+ }
501
+ }
502
+ models "google/gemini-3.5-flash" {
503
+ cost-patch {
504
+ input 1.5
505
+ output 9.0
506
+ cache-read 0.15
507
+ cache-write 0.0
508
+ }
509
+ }
510
+ models "google/gemini-3.5-flash-lite" {
511
+ cost-patch {
512
+ input 0.3
513
+ output 2.5
514
+ cache-read 0.03
515
+ cache-write 0.0
516
+ }
517
+ }
518
+ models "google/gemini-3.1-flash-lite" {
519
+ cost-patch {
520
+ input 0.25
521
+ output 1.5
522
+ cache-read 0.03
523
+ cache-write 0.0
524
+ }
525
+ }
526
+ models "sakana/fugu-ultra" {
527
+ cost-patch {
528
+ input 5.0
529
+ output 30.0
530
+ cache-read 0.5
531
+ cache-write 0.0
532
+ }
533
+ }
534
+ models "nvidia/nemotron-3-ultra-550b-a55b" {
535
+ cost-patch {
536
+ input 0.6
537
+ output 2.4
538
+ cache-read 0.12
539
+ cache-write 0.0
540
+ }
541
+ }
542
+ models "thinkingmachines/inkling" {
543
+ cost-patch {
544
+ input 1.0
545
+ output 4.05
546
+ cache-read 0.17
547
+ cache-write 0.0
548
+ }
549
+ }
550
+ models "thinkingmachines/inkling-small" {
551
+ cost-patch {
552
+ input 0.5
553
+ output 1.2
554
+ cache-read 0.1
555
+ cache-write 0.0
556
+ }
557
+ }
558
+ models "meta/muse-spark-1.1" "meta/muse-spark-1.2" "meta/muse-spark-1.3" {
559
+ cost-patch {
560
+ input 1.25
561
+ output 4.25
562
+ cache-read 0.15
563
+ cache-write 0.0
564
+ }
565
+ }
566
+ models "meta/muse-spark-1.2-contributor" "meta/muse-spark-1.3-contributor" {
567
+ cost-patch {
568
+ input 0.1
569
+ output 0.2
570
+ cache-read 0.002
571
+ cache-write 0.0
572
+ }
573
+ }
574
+ models "xai/grok-4.5" {
575
+ cost-patch {
576
+ input 2.0
577
+ output 6.0
578
+ cache-read 0.5
579
+ cache-write 0.0
580
+ }
581
+ }
582
+ // Grok 4.6 bills a whole-request 2x tier above 200K input. Absolute rates
583
+ // (not the classes/xai.kdl multiplier form, which is scoped to providers
584
+ // "xai"/"xai-oauth" and never matches here): discovery specs carry zero
585
+ // base cost, so a multiplier derives nothing.
586
+ models "xai/grok-4.6" {
587
+ cost-patch {
588
+ input 2.0
589
+ output 6.0
590
+ cache-read 0.5
591
+ cache-write 0.0
592
+ }
593
+ long-context-cost {
594
+ input-threshold 200000
595
+ input 4.0
596
+ output 12.0
597
+ cache-read 1.0
598
+ cache-write 0.0
599
+ }
600
+ }
601
+ }
@@ -10,12 +10,94 @@ provider "deepseek" {
10
10
  class "deepseek" {
11
11
  thinking-mode "effort"
12
12
  }
13
+ // First-party peak USD / 1M tokens; all other UTC hours receive 50% off.
14
+ // Source: https://api-docs.deepseek.com/quick_start/pricing (2026-09-10).
15
+ // residue: the pricing page's Flash-priced names, not a taxonomy family: the
16
+ // bare alias carries no family, and the retired `v4-flash`/`-vision-exp` ids
17
+ // are still accepted and billed at the Flash card.
18
+ models "deepseek-flash" "deepseek-v4-flash" "deepseek-v4-flash-vision-exp" {
19
+ clamp-output-to-model-max #true
20
+ time-based-cost {
21
+ off-peak-multiplier 0.5
22
+ peak-windows {
23
+ morning {
24
+ weekdays "1,2,3,4,5"
25
+ start-minute 60
26
+ end-minute 240
27
+ }
28
+ afternoon {
29
+ weekdays "1,2,3,4,5"
30
+ start-minute 360
31
+ end-minute 600
32
+ }
33
+ }
34
+ }
35
+ cost-patch {
36
+ input 0.30
37
+ output 1.20
38
+ cache-read 0.006
39
+ cache-write 0
40
+ }
41
+ }
42
+ // residue: upstream discovery has not seeded the bare alias's limits; the
43
+ // pricing page documents this SKU (DeepSeek-V4.1-Flash) as 1M context / 384K
44
+ // output, and without them the agent cannot enforce its context budget.
45
+ models "deepseek-flash" {
46
+ limits-patch {
47
+ context-window 1000000
48
+ max-tokens 384000
49
+ }
50
+ }
51
+ // residue: the dated price transition applies to the documented exact Pro SKU only.
52
+ models "deepseek-v4-pro" {
53
+ cost-patch {
54
+ input 1.32
55
+ output 3.96
56
+ cache-read 0.044
57
+ cache-write 0
58
+ }
59
+ time-based-cost {
60
+ off-peak-multiplier 0.5
61
+ peak-windows {
62
+ morning {
63
+ weekdays "1,2,3,4,5"
64
+ start-minute 60
65
+ end-minute 240
66
+ }
67
+ afternoon {
68
+ weekdays "1,2,3,4,5"
69
+ start-minute 360
70
+ end-minute 600
71
+ }
72
+ }
73
+ effective-rates {
74
+ flash-pricing {
75
+ effective-from "2026-09-14T04:00:00Z"
76
+ input 0.30
77
+ output 1.20
78
+ cache-read 0.006
79
+ cache-write 0
80
+ }
81
+ }
82
+ }
83
+ }
13
84
  // residue: taxonomy ranks and exact globs do not isolate these models.
14
- models "deepseek-v4-flash" {
85
+ // The bare `deepseek-flash` alias serves DeepSeek-V4.1-Flash, so it shares
86
+ // the V4.1 wire contract: max_tokens + reasoning_content, mandatory replay
87
+ // (synthetic placeholders rejected upstream), no tool choice, and the
88
+ // low/high/max effort ladder the bare alias cannot inherit by family.
89
+ models "deepseek-flash" "deepseek-v4-flash" "deepseek-v4.1-flash-expires-on-0910" {
90
+ // Stale source capability data: discovery reports the bare alias as
91
+ // non-reasoning, so opt into the cascade upgrade for the exact ladder.
92
+ thinking-upgrade-neutral #true
15
93
  max-tokens-field "max_tokens"
16
94
  reasoning-content-field "reasoning_content"
17
95
  requires-assistant-content-for-tool-calls #true
18
96
  requires-reasoning-content-for-tool-calls #true
97
+ allows-synthetic-reasoning-content-for-tool-calls #false
19
98
  supports-tool-choice #false
99
+ // The bare alias carries no taxonomy family, so it cannot inherit the
100
+ // flash ladder; the exact rule owns it instead.
101
+ thinking-efforts "low" "high" "max"
20
102
  }
21
103
  }