lostvibe 0.0.0-stage → 0.7.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.
package/src/prices.mjs ADDED
@@ -0,0 +1,1127 @@
1
+ // USD per 1M tokens: [input, output, cache_create, cache_read]. Source: LiteLLM price table, the one ccusage uses.
2
+ export const PRICE_TABLE_DATE = '2026-11-06';
3
+ export const PRICES = {
4
+ "claude-fable-5": [
5
+ 10.0,
6
+ 50.0,
7
+ 12.5,
8
+ 1.0
9
+ ],
10
+ "claude-fable-5-1": [
11
+ 10.0,
12
+ 50.0,
13
+ 12.5,
14
+ 0.25
15
+ ],
16
+ "claude-haiku-4-5": [
17
+ 1.0,
18
+ 5.0,
19
+ 1.25,
20
+ 0.1
21
+ ],
22
+ "claude-haiku-4-5-20251001": [
23
+ 1.0,
24
+ 5.0,
25
+ 1.25,
26
+ 0.1
27
+ ],
28
+ "claude-haiku-5-5": [
29
+ 0.1,
30
+ 0.5,
31
+ 0.125,
32
+ 0.01
33
+ ],
34
+ "claude-mythos-5": [
35
+ 10.0,
36
+ 50.0,
37
+ 12.5,
38
+ 1.0
39
+ ],
40
+ "claude-mythos-5-1": [
41
+ 10.0,
42
+ 50.0,
43
+ 12.5,
44
+ 0.25
45
+ ],
46
+ "claude-mythos-preview": [
47
+ 10.0,
48
+ 50.0,
49
+ 12.5,
50
+ 1.0
51
+ ],
52
+ "claude-opus-4-5": [
53
+ 5.0,
54
+ 25.0,
55
+ 6.25,
56
+ 0.5
57
+ ],
58
+ "claude-opus-4-5-20251101": [
59
+ 5.0,
60
+ 25.0,
61
+ 6.25,
62
+ 0.5
63
+ ],
64
+ "claude-opus-4-6": [
65
+ 5.0,
66
+ 25.0,
67
+ 6.25,
68
+ 0.5
69
+ ],
70
+ "claude-opus-4-6-20260205": [
71
+ 5.0,
72
+ 25.0,
73
+ 6.25,
74
+ 0.5
75
+ ],
76
+ "claude-opus-4-7": [
77
+ 5.0,
78
+ 25.0,
79
+ 6.25,
80
+ 0.5
81
+ ],
82
+ "claude-opus-4-7-20260416": [
83
+ 5.0,
84
+ 25.0,
85
+ 6.25,
86
+ 0.5
87
+ ],
88
+ "claude-opus-4-8": [
89
+ 5.0,
90
+ 25.0,
91
+ 6.25,
92
+ 0.5
93
+ ],
94
+ "claude-opus-5": [
95
+ 5.0,
96
+ 25.0,
97
+ 6.25,
98
+ 0.5
99
+ ],
100
+ "claude-opus-5-5": [
101
+ 4.0,
102
+ 20.0,
103
+ 5.0,
104
+ 0.2
105
+ ],
106
+ "claude-sonnet-4-5": [
107
+ 3.0,
108
+ 15.0,
109
+ 3.75,
110
+ 0.3
111
+ ],
112
+ "claude-sonnet-4-5-20250929": [
113
+ 3.0,
114
+ 15.0,
115
+ 3.75,
116
+ 0.3
117
+ ],
118
+ "claude-sonnet-4-6": [
119
+ 3.0,
120
+ 15.0,
121
+ 3.75,
122
+ 0.3
123
+ ],
124
+ "claude-sonnet-5": [
125
+ 2.0,
126
+ 10.0,
127
+ 2.5,
128
+ 0.2
129
+ ],
130
+ "claude-sonnet-5-5": [
131
+ 2.0,
132
+ 10.0,
133
+ 2.5,
134
+ 0.1
135
+ ],
136
+ "deepseek-chat": [
137
+ 0.28,
138
+ 0.42,
139
+ 0.0,
140
+ 0.028
141
+ ],
142
+ "deepseek-coder": [
143
+ 0.14,
144
+ 0.28,
145
+ 0.14,
146
+ 0.014
147
+ ],
148
+ "deepseek-flash": [
149
+ 0.3,
150
+ 1.2,
151
+ 0.0,
152
+ 0.006
153
+ ],
154
+ "deepseek-r1": [
155
+ 0.55,
156
+ 2.19,
157
+ 0.55,
158
+ 0.14
159
+ ],
160
+ "deepseek-reasoner": [
161
+ 0.28,
162
+ 0.42,
163
+ 0.28,
164
+ 0.028
165
+ ],
166
+ "deepseek-v3": [
167
+ 0.27,
168
+ 1.1,
169
+ 0.0,
170
+ 0.07
171
+ ],
172
+ "deepseek-v3.2": [
173
+ 0.28,
174
+ 0.4,
175
+ 0.28,
176
+ 0.028
177
+ ],
178
+ "deepseek-v4-flash": [
179
+ 0.3,
180
+ 1.2,
181
+ 0.0,
182
+ 0.006
183
+ ],
184
+ "deepseek-v4-pro": [
185
+ 1.32,
186
+ 3.96,
187
+ 0.0,
188
+ 0.044
189
+ ],
190
+ "devstral-latest": [
191
+ 0.4,
192
+ 2.0,
193
+ 0.4,
194
+ 0.04
195
+ ],
196
+ "devstral-medium-latest": [
197
+ 0.4,
198
+ 2.0,
199
+ 0.4,
200
+ 0.04
201
+ ],
202
+ "devstral-small-latest": [
203
+ 0.1,
204
+ 0.3,
205
+ 0.1,
206
+ 0.01
207
+ ],
208
+ "gemini-2.5-flash": [
209
+ 0.3,
210
+ 2.5,
211
+ 0.3,
212
+ 0.03
213
+ ],
214
+ "gemini-2.5-flash-lite": [
215
+ 0.1,
216
+ 0.4,
217
+ 0.1,
218
+ 0.01
219
+ ],
220
+ "gemini-2.5-flash-lite-preview-09-2025": [
221
+ 0.1,
222
+ 0.4,
223
+ 0.1,
224
+ 0.01
225
+ ],
226
+ "gemini-2.5-flash-preview-09-2025": [
227
+ 0.3,
228
+ 2.5,
229
+ 0.3,
230
+ 0.03
231
+ ],
232
+ "gemini-2.5-pro": [
233
+ 1.25,
234
+ 10.0,
235
+ 1.25,
236
+ 0.125
237
+ ],
238
+ "gemini-3-flash-preview": [
239
+ 0.5,
240
+ 3.0,
241
+ 0.5,
242
+ 0.05
243
+ ],
244
+ "gemini-3-pro-preview": [
245
+ 2.0,
246
+ 12.0,
247
+ 2.0,
248
+ 0.2
249
+ ],
250
+ "gemini-3.1-flash-lite": [
251
+ 0.25,
252
+ 1.5,
253
+ 0.25,
254
+ 0.025
255
+ ],
256
+ "gemini-3.1-flash-lite-preview": [
257
+ 0.25,
258
+ 1.5,
259
+ 0.25,
260
+ 0.025
261
+ ],
262
+ "gemini-3.1-pro-preview": [
263
+ 2.0,
264
+ 12.0,
265
+ 2.0,
266
+ 0.2
267
+ ],
268
+ "gemini-3.1-pro-preview-customtools": [
269
+ 2.0,
270
+ 12.0,
271
+ 2.0,
272
+ 0.2
273
+ ],
274
+ "gemini-3.5-flash": [
275
+ 1.5,
276
+ 9.0,
277
+ 1.5,
278
+ 0.15
279
+ ],
280
+ "gemini-3.5-flash-lite": [
281
+ 0.3,
282
+ 2.5,
283
+ 0.3,
284
+ 0.03
285
+ ],
286
+ "gemini-3.6-flash": [
287
+ 0.75,
288
+ 3.75,
289
+ 0.75,
290
+ 0.075
291
+ ],
292
+ "gemini-3.7-flash": [
293
+ 0.75,
294
+ 3.75,
295
+ 0.75,
296
+ 0.075
297
+ ],
298
+ "gemini-3.8-flash": [
299
+ 0.75,
300
+ 3.75,
301
+ 0.75,
302
+ 0.075
303
+ ],
304
+ "gemini-3.8-flash-cyber": [
305
+ 1.5,
306
+ 7.5,
307
+ 1.5,
308
+ 0.15
309
+ ],
310
+ "glm-4-32b-0414-128k": [
311
+ 0.1,
312
+ 0.1,
313
+ 0.1,
314
+ 0.1
315
+ ],
316
+ "glm-4.5": [
317
+ 0.6,
318
+ 2.2,
319
+ 0.6,
320
+ 0.6
321
+ ],
322
+ "glm-4.5-air": [
323
+ 0.2,
324
+ 1.1,
325
+ 0.2,
326
+ 0.2
327
+ ],
328
+ "glm-4.5-airx": [
329
+ 1.1,
330
+ 4.5,
331
+ 1.1,
332
+ 1.1
333
+ ],
334
+ "glm-4.5-flash": [
335
+ 0.0,
336
+ 0.0,
337
+ 0.0,
338
+ 0.0
339
+ ],
340
+ "glm-4.5-x": [
341
+ 2.2,
342
+ 8.9,
343
+ 2.2,
344
+ 2.2
345
+ ],
346
+ "glm-4.5v": [
347
+ 0.6,
348
+ 1.8,
349
+ 0.6,
350
+ 0.6
351
+ ],
352
+ "glm-4.6": [
353
+ 0.6,
354
+ 2.2,
355
+ 0.0,
356
+ 0.11
357
+ ],
358
+ "glm-4.7": [
359
+ 0.6,
360
+ 2.2,
361
+ 0.0,
362
+ 0.11
363
+ ],
364
+ "glm-4.7-flash": [
365
+ 0.0,
366
+ 0.0,
367
+ 0.0,
368
+ 0.0
369
+ ],
370
+ "glm-5": [
371
+ 1.0,
372
+ 3.2,
373
+ 0.0,
374
+ 0.2
375
+ ],
376
+ "glm-5-code": [
377
+ 1.2,
378
+ 5.0,
379
+ 0.0,
380
+ 0.3
381
+ ],
382
+ "glm-5.1": [
383
+ 1.4,
384
+ 4.4,
385
+ 0.0,
386
+ 0.26
387
+ ],
388
+ "glm-5.2": [
389
+ 1.4,
390
+ 4.4,
391
+ 0.0,
392
+ 0.26
393
+ ],
394
+ "glm-5.3": [
395
+ 1.4,
396
+ 4.4,
397
+ 0.0,
398
+ 0.26
399
+ ],
400
+ "glm-5.3-flash": [
401
+ 0.15,
402
+ 0.5,
403
+ 0.0,
404
+ 0.03
405
+ ],
406
+ "glm-5v-turbo": [
407
+ 1.2,
408
+ 4.0,
409
+ 1.2,
410
+ 0.24
411
+ ],
412
+ "gpt-4.1": [
413
+ 2.0,
414
+ 8.0,
415
+ 2.0,
416
+ 0.5
417
+ ],
418
+ "gpt-4.1-2025-04-14": [
419
+ 2.0,
420
+ 8.0,
421
+ 2.0,
422
+ 0.5
423
+ ],
424
+ "gpt-4.1-mini": [
425
+ 0.4,
426
+ 1.6,
427
+ 0.4,
428
+ 0.1
429
+ ],
430
+ "gpt-4.1-mini-2025-04-14": [
431
+ 0.4,
432
+ 1.6,
433
+ 0.4,
434
+ 0.1
435
+ ],
436
+ "gpt-4.1-nano": [
437
+ 0.1,
438
+ 0.4,
439
+ 0.1,
440
+ 0.025
441
+ ],
442
+ "gpt-4.1-nano-2025-04-14": [
443
+ 0.1,
444
+ 0.4,
445
+ 0.1,
446
+ 0.025
447
+ ],
448
+ "gpt-4o": [
449
+ 2.5,
450
+ 10.0,
451
+ 2.5,
452
+ 1.25
453
+ ],
454
+ "gpt-5": [
455
+ 1.25,
456
+ 10.0,
457
+ 1.25,
458
+ 0.125
459
+ ],
460
+ "gpt-5-2025-08-07": [
461
+ 1.25,
462
+ 10.0,
463
+ 1.25,
464
+ 0.125
465
+ ],
466
+ "gpt-5-chat": [
467
+ 1.25,
468
+ 10.0,
469
+ 1.25,
470
+ 0.125
471
+ ],
472
+ "gpt-5-chat-latest": [
473
+ 1.25,
474
+ 10.0,
475
+ 1.25,
476
+ 0.125
477
+ ],
478
+ "gpt-5-codex": [
479
+ 1.25,
480
+ 10.0,
481
+ 1.25,
482
+ 0.125
483
+ ],
484
+ "gpt-5-mini": [
485
+ 0.25,
486
+ 2.0,
487
+ 0.25,
488
+ 0.025
489
+ ],
490
+ "gpt-5-mini-2025-08-07": [
491
+ 0.25,
492
+ 2.0,
493
+ 0.25,
494
+ 0.025
495
+ ],
496
+ "gpt-5-nano": [
497
+ 0.05,
498
+ 0.4,
499
+ 0.05,
500
+ 0.005
501
+ ],
502
+ "gpt-5-nano-2025-08-07": [
503
+ 0.05,
504
+ 0.4,
505
+ 0.05,
506
+ 0.005
507
+ ],
508
+ "gpt-5-pro": [
509
+ 15.0,
510
+ 120.0,
511
+ 15.0,
512
+ 15.0
513
+ ],
514
+ "gpt-5-pro-2025-10-06": [
515
+ 15.0,
516
+ 120.0,
517
+ 15.0,
518
+ 15.0
519
+ ],
520
+ "gpt-5-search-api": [
521
+ 1.25,
522
+ 10.0,
523
+ 1.25,
524
+ 0.125
525
+ ],
526
+ "gpt-5-search-api-2025-10-14": [
527
+ 1.25,
528
+ 10.0,
529
+ 1.25,
530
+ 0.125
531
+ ],
532
+ "gpt-5.1": [
533
+ 1.25,
534
+ 10.0,
535
+ 1.25,
536
+ 0.125
537
+ ],
538
+ "gpt-5.1-2025-11-13": [
539
+ 1.25,
540
+ 10.0,
541
+ 1.25,
542
+ 0.125
543
+ ],
544
+ "gpt-5.1-chat-latest": [
545
+ 1.25,
546
+ 10.0,
547
+ 1.25,
548
+ 0.125
549
+ ],
550
+ "gpt-5.1-codex": [
551
+ 1.25,
552
+ 10.0,
553
+ 1.25,
554
+ 0.125
555
+ ],
556
+ "gpt-5.1-codex-max": [
557
+ 1.25,
558
+ 10.0,
559
+ 1.25,
560
+ 0.125
561
+ ],
562
+ "gpt-5.1-codex-mini": [
563
+ 0.25,
564
+ 2.0,
565
+ 0.25,
566
+ 0.025
567
+ ],
568
+ "gpt-5.2": [
569
+ 1.75,
570
+ 14.0,
571
+ 1.75,
572
+ 0.175
573
+ ],
574
+ "gpt-5.2-2025-12-11": [
575
+ 1.75,
576
+ 14.0,
577
+ 1.75,
578
+ 0.175
579
+ ],
580
+ "gpt-5.2-chat-latest": [
581
+ 1.75,
582
+ 14.0,
583
+ 1.75,
584
+ 0.175
585
+ ],
586
+ "gpt-5.2-codex": [
587
+ 1.75,
588
+ 14.0,
589
+ 1.75,
590
+ 0.175
591
+ ],
592
+ "gpt-5.2-pro": [
593
+ 21.0,
594
+ 168.0,
595
+ 21.0,
596
+ 21.0
597
+ ],
598
+ "gpt-5.2-pro-2025-12-11": [
599
+ 21.0,
600
+ 168.0,
601
+ 21.0,
602
+ 21.0
603
+ ],
604
+ "gpt-5.3-chat-latest": [
605
+ 1.75,
606
+ 14.0,
607
+ 1.75,
608
+ 0.175
609
+ ],
610
+ "gpt-5.3-codex": [
611
+ 1.75,
612
+ 14.0,
613
+ 1.75,
614
+ 0.175
615
+ ],
616
+ "gpt-5.4": [
617
+ 2.5,
618
+ 15.0,
619
+ 2.5,
620
+ 0.25
621
+ ],
622
+ "gpt-5.4-2026-03-05": [
623
+ 2.5,
624
+ 15.0,
625
+ 2.5,
626
+ 0.25
627
+ ],
628
+ "gpt-5.4-mini": [
629
+ 0.75,
630
+ 4.5,
631
+ 0.75,
632
+ 0.075
633
+ ],
634
+ "gpt-5.4-mini-2026-03-17": [
635
+ 0.75,
636
+ 4.5,
637
+ 0.75,
638
+ 0.075
639
+ ],
640
+ "gpt-5.4-nano": [
641
+ 0.2,
642
+ 1.25,
643
+ 0.2,
644
+ 0.02
645
+ ],
646
+ "gpt-5.4-nano-2026-03-17": [
647
+ 0.2,
648
+ 1.25,
649
+ 0.2,
650
+ 0.02
651
+ ],
652
+ "gpt-5.4-pro": [
653
+ 30.0,
654
+ 180.0,
655
+ 30.0,
656
+ 30.0
657
+ ],
658
+ "gpt-5.4-pro-2026-03-05": [
659
+ 30.0,
660
+ 180.0,
661
+ 30.0,
662
+ 30.0
663
+ ],
664
+ "gpt-5.5": [
665
+ 5.0,
666
+ 30.0,
667
+ 5.0,
668
+ 0.5
669
+ ],
670
+ "gpt-5.5-2026-04-23": [
671
+ 5.0,
672
+ 30.0,
673
+ 5.0,
674
+ 0.5
675
+ ],
676
+ "gpt-5.5-cyber": [
677
+ 12.5,
678
+ 75.0,
679
+ 12.5,
680
+ 1.25
681
+ ],
682
+ "gpt-5.5-cyber-preview": [
683
+ 12.5,
684
+ 75.0,
685
+ 12.5,
686
+ 1.25
687
+ ],
688
+ "gpt-5.5-pro": [
689
+ 30.0,
690
+ 180.0,
691
+ 30.0,
692
+ 30.0
693
+ ],
694
+ "gpt-5.5-pro-2026-04-23": [
695
+ 30.0,
696
+ 180.0,
697
+ 30.0,
698
+ 30.0
699
+ ],
700
+ "gpt-5.6": [
701
+ 4.0,
702
+ 20.0,
703
+ 5.0,
704
+ 0.4
705
+ ],
706
+ "gpt-5.6-cyber": [
707
+ 12.5,
708
+ 75.0,
709
+ 15.625,
710
+ 1.25
711
+ ],
712
+ "gpt-5.6-luna": [
713
+ 0.2,
714
+ 1.2,
715
+ 0.25,
716
+ 0.02
717
+ ],
718
+ "gpt-5.6-sol": [
719
+ 4.0,
720
+ 20.0,
721
+ 5.0,
722
+ 0.4
723
+ ],
724
+ "gpt-5.6-terra": [
725
+ 2.0,
726
+ 12.0,
727
+ 2.5,
728
+ 0.2
729
+ ],
730
+ "gpt-6-astra": [
731
+ 10.0,
732
+ 50.0,
733
+ 12.5,
734
+ 1.0
735
+ ],
736
+ "gpt-6-astra-law": [
737
+ 10.0,
738
+ 50.0,
739
+ 10.0,
740
+ 1.0
741
+ ],
742
+ "gpt-6-luna": [
743
+ 0.1,
744
+ 0.5,
745
+ 0.125,
746
+ 0.01
747
+ ],
748
+ "gpt-6-rosalind": [
749
+ 15.0,
750
+ 75.0,
751
+ 18.75,
752
+ 1.5
753
+ ],
754
+ "gpt-6-sol": [
755
+ 2.0,
756
+ 10.0,
757
+ 2.5,
758
+ 0.2
759
+ ],
760
+ "gpt-6.1-sol": [
761
+ 2.0,
762
+ 10.0,
763
+ 2.5,
764
+ 0.1
765
+ ],
766
+ "gpt-6.1-terra": [
767
+ 1.0,
768
+ 5.0,
769
+ 1.25,
770
+ 0.05
771
+ ],
772
+ "grok-3": [
773
+ 3.0,
774
+ 15.0,
775
+ 3.0,
776
+ 0.75
777
+ ],
778
+ "grok-3-mini": [
779
+ 0.3,
780
+ 0.5,
781
+ 0.3,
782
+ 0.075
783
+ ],
784
+ "grok-4": [
785
+ 3.0,
786
+ 15.0,
787
+ 3.0,
788
+ 0.75
789
+ ],
790
+ "grok-4-0709": [
791
+ 3.0,
792
+ 15.0,
793
+ 3.0,
794
+ 0.75
795
+ ],
796
+ "grok-4-1-fast-non-reasoning": [
797
+ 0.2,
798
+ 0.5,
799
+ 0.2,
800
+ 0.05
801
+ ],
802
+ "grok-4-1-fast-reasoning": [
803
+ 0.2,
804
+ 0.5,
805
+ 0.2,
806
+ 0.05
807
+ ],
808
+ "grok-4-fast-non-reasoning": [
809
+ 0.2,
810
+ 0.5,
811
+ 0.2,
812
+ 0.05
813
+ ],
814
+ "grok-4-fast-reasoning": [
815
+ 0.2,
816
+ 0.5,
817
+ 0.2,
818
+ 0.05
819
+ ],
820
+ "grok-4.20": [
821
+ 1.25,
822
+ 2.5,
823
+ 1.25,
824
+ 0.2
825
+ ],
826
+ "grok-4.20-0309": [
827
+ 1.25,
828
+ 2.5,
829
+ 1.25,
830
+ 0.2
831
+ ],
832
+ "grok-4.20-0309-non-reasoning": [
833
+ 1.25,
834
+ 2.5,
835
+ 1.25,
836
+ 0.2
837
+ ],
838
+ "grok-4.20-0309-reasoning": [
839
+ 1.25,
840
+ 2.5,
841
+ 1.25,
842
+ 0.2
843
+ ],
844
+ "grok-4.20-beta": [
845
+ 1.25,
846
+ 2.5,
847
+ 1.25,
848
+ 0.2
849
+ ],
850
+ "grok-4.20-beta-0309": [
851
+ 1.25,
852
+ 2.5,
853
+ 1.25,
854
+ 0.2
855
+ ],
856
+ "grok-4.20-beta-0309-non-reasoning": [
857
+ 1.25,
858
+ 2.5,
859
+ 1.25,
860
+ 0.2
861
+ ],
862
+ "grok-4.20-beta-0309-reasoning": [
863
+ 1.25,
864
+ 2.5,
865
+ 1.25,
866
+ 0.2
867
+ ],
868
+ "grok-4.20-beta-latest": [
869
+ 1.25,
870
+ 2.5,
871
+ 1.25,
872
+ 0.2
873
+ ],
874
+ "grok-4.20-beta-latest-non-reasoning": [
875
+ 1.25,
876
+ 2.5,
877
+ 1.25,
878
+ 0.2
879
+ ],
880
+ "grok-4.20-beta-latest-reasoning": [
881
+ 1.25,
882
+ 2.5,
883
+ 1.25,
884
+ 0.2
885
+ ],
886
+ "grok-4.20-beta-non-reasoning": [
887
+ 1.25,
888
+ 2.5,
889
+ 1.25,
890
+ 0.2
891
+ ],
892
+ "grok-4.20-beta-reasoning": [
893
+ 1.25,
894
+ 2.5,
895
+ 1.25,
896
+ 0.2
897
+ ],
898
+ "grok-4.20-experimental-beta-0304": [
899
+ 1.25,
900
+ 2.5,
901
+ 1.25,
902
+ 0.2
903
+ ],
904
+ "grok-4.20-experimental-beta-0304-non-reasoning": [
905
+ 1.25,
906
+ 2.5,
907
+ 1.25,
908
+ 0.2
909
+ ],
910
+ "grok-4.20-experimental-beta-0304-reasoning": [
911
+ 1.25,
912
+ 2.5,
913
+ 1.25,
914
+ 0.2
915
+ ],
916
+ "grok-4.20-experimental-beta-latest": [
917
+ 1.25,
918
+ 2.5,
919
+ 1.25,
920
+ 0.2
921
+ ],
922
+ "grok-4.20-experimental-beta-non-reasoning-latest": [
923
+ 1.25,
924
+ 2.5,
925
+ 1.25,
926
+ 0.2
927
+ ],
928
+ "grok-4.20-experimental-beta-reasoning-latest": [
929
+ 1.25,
930
+ 2.5,
931
+ 1.25,
932
+ 0.2
933
+ ],
934
+ "grok-4.20-non-reasoning": [
935
+ 1.25,
936
+ 2.5,
937
+ 1.25,
938
+ 0.2
939
+ ],
940
+ "grok-4.20-non-reasoning-gv2": [
941
+ 1.25,
942
+ 2.5,
943
+ 1.25,
944
+ 0.2
945
+ ],
946
+ "grok-4.20-non-reasoning-latest": [
947
+ 1.25,
948
+ 2.5,
949
+ 1.25,
950
+ 0.2
951
+ ],
952
+ "grok-4.20-reasoning": [
953
+ 1.25,
954
+ 2.5,
955
+ 1.25,
956
+ 0.2
957
+ ],
958
+ "grok-4.20-reasoning-gv2": [
959
+ 1.25,
960
+ 2.5,
961
+ 1.25,
962
+ 0.2
963
+ ],
964
+ "grok-4.20-reasoning-latest": [
965
+ 1.25,
966
+ 2.5,
967
+ 1.25,
968
+ 0.2
969
+ ],
970
+ "grok-4.3": [
971
+ 1.25,
972
+ 2.5,
973
+ 1.25,
974
+ 0.2
975
+ ],
976
+ "grok-4.3-latest": [
977
+ 1.25,
978
+ 2.5,
979
+ 1.25,
980
+ 0.2
981
+ ],
982
+ "grok-4.5": [
983
+ 2.0,
984
+ 6.0,
985
+ 2.0,
986
+ 0.3
987
+ ],
988
+ "grok-4.5-latest": [
989
+ 2.0,
990
+ 6.0,
991
+ 2.0,
992
+ 0.3
993
+ ],
994
+ "grok-4.6": [
995
+ 2.0,
996
+ 6.0,
997
+ 2.0,
998
+ 0.5
999
+ ],
1000
+ "grok-4.7": [
1001
+ 2.0,
1002
+ 6.0,
1003
+ 2.0,
1004
+ 0.5
1005
+ ],
1006
+ "grok-build-0.1": [
1007
+ 1.0,
1008
+ 2.0,
1009
+ 1.0,
1010
+ 0.2
1011
+ ],
1012
+ "grok-build-latest": [
1013
+ 2.0,
1014
+ 6.0,
1015
+ 2.0,
1016
+ 0.3
1017
+ ],
1018
+ "grok-code-fast": [
1019
+ 0.2,
1020
+ 1.5,
1021
+ 0.2,
1022
+ 0.02
1023
+ ],
1024
+ "grok-code-fast-1": [
1025
+ 0.2,
1026
+ 1.5,
1027
+ 0.2,
1028
+ 0.02
1029
+ ],
1030
+ "grok-code-fast-1-0825": [
1031
+ 0.2,
1032
+ 1.5,
1033
+ 0.2,
1034
+ 0.02
1035
+ ],
1036
+ "kimi-k2.5": [
1037
+ 0.6,
1038
+ 3.0,
1039
+ 0.6,
1040
+ 0.1
1041
+ ],
1042
+ "kimi-k2.6": [
1043
+ 0.95,
1044
+ 4.0,
1045
+ 0.95,
1046
+ 0.16
1047
+ ],
1048
+ "kimi-k2.7-code": [
1049
+ 0.95,
1050
+ 4.0,
1051
+ 0.95,
1052
+ 0.19
1053
+ ],
1054
+ "kimi-k3": [
1055
+ 3.0,
1056
+ 15.0,
1057
+ 3.0,
1058
+ 0.3
1059
+ ],
1060
+ "kimi-k3.1-pro": [
1061
+ 2.0,
1062
+ 10.0,
1063
+ 2.0,
1064
+ 0.2
1065
+ ],
1066
+ "o3": [
1067
+ 2.0,
1068
+ 8.0,
1069
+ 2.0,
1070
+ 0.5
1071
+ ],
1072
+ "o3-mini": [
1073
+ 1.1,
1074
+ 4.4,
1075
+ 1.1,
1076
+ 0.55
1077
+ ],
1078
+ "o4-mini": [
1079
+ 1.1,
1080
+ 4.4,
1081
+ 1.1,
1082
+ 0.275
1083
+ ],
1084
+ "qwen3-next-80b-a3b-instruct": [
1085
+ 0.15,
1086
+ 1.2,
1087
+ 0.15,
1088
+ 0.15
1089
+ ],
1090
+ "qwen3-next-80b-a3b-thinking": [
1091
+ 0.15,
1092
+ 1.2,
1093
+ 0.15,
1094
+ 0.15
1095
+ ],
1096
+ "qwen3.7-max": [
1097
+ 2.5,
1098
+ 7.5,
1099
+ 3.125,
1100
+ 0.5
1101
+ ],
1102
+ "qwen3.8-max": [
1103
+ 2.0,
1104
+ 6.0,
1105
+ 2.0,
1106
+ 0.25
1107
+ ]
1108
+ };
1109
+
1110
+ // Provider prefixes (anthropic/, openrouter/google/) and date suffixes name the same price.
1111
+ export function normalizeModel(model) {
1112
+ const m = String(model || '').trim().toLowerCase();
1113
+ return m.slice(m.lastIndexOf('/') + 1).replace(/-\d{8}$/, '');
1114
+ }
1115
+
1116
+ export function priceFor(model) {
1117
+ return PRICES[normalizeModel(model)] || null;
1118
+ }
1119
+
1120
+ // Tokens are already split so input never includes cache reads.
1121
+ export function costOf(model, t) {
1122
+ const p = priceFor(model);
1123
+ if (!p) return null;
1124
+ // One-hour cache writes cost twice the input rate; the table only holds the 5-minute rate.
1125
+ const oneHour = t.cc1h || 0;
1126
+ return (t.input * p[0] + t.output * p[1] + (t.cache_create - oneHour) * p[2] + oneHour * p[0] * 2 + t.cache_read * p[3]) / 1e6;
1127
+ }