@diogonzafe/tokenwatch 0.1.1 → 0.1.3

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/dist/index.cjs CHANGED
@@ -41,6 +41,10 @@ function resolvePrice(model, layers) {
41
41
  );
42
42
  return { input: 0, output: 0 };
43
43
  }
44
+ function findPrice(model, layers) {
45
+ const { customPrices, remotePrices, bundledPrices: bundledPrices2 } = layers;
46
+ return lookupInMap(model, customPrices) ?? lookupInMap(model, remotePrices) ?? lookupInMap(model, bundledPrices2);
47
+ }
44
48
  function lookupInMap(model, map) {
45
49
  if (!map) return void 0;
46
50
  if (model in map) return map[model];
@@ -201,55 +205,1158 @@ async function getRemotePrices() {
201
205
  // prices.json
202
206
  var prices_default = {
203
207
  updated_at: "2026-04-16",
204
- source: "https://raw.githubusercontent.com/diogonzafe/tokenwatch/main/prices.json",
208
+ source: "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json",
205
209
  models: {
206
210
  "gpt-4o": {
207
211
  input: 2.5,
208
- output: 10
212
+ output: 10,
213
+ maxInputTokens: 128e3
209
214
  },
210
215
  "gpt-4o-mini": {
211
216
  input: 0.15,
212
- output: 0.6
217
+ output: 0.6,
218
+ maxInputTokens: 128e3
213
219
  },
214
220
  "gpt-5": {
215
221
  input: 1.25,
216
- output: 10
222
+ output: 10,
223
+ maxInputTokens: 272e3
217
224
  },
218
225
  "gpt-5-mini": {
219
226
  input: 0.25,
220
- output: 2
227
+ output: 2,
228
+ maxInputTokens: 272e3
221
229
  },
222
230
  "gpt-5-nano": {
223
231
  input: 0.05,
224
- output: 0.4
232
+ output: 0.4,
233
+ maxInputTokens: 272e3
225
234
  },
226
235
  "claude-opus-4-6": {
227
236
  input: 5,
228
- output: 25
237
+ output: 25,
238
+ maxInputTokens: 1e6
229
239
  },
230
240
  "claude-sonnet-4-6": {
231
241
  input: 3,
232
- output: 15
242
+ output: 15,
243
+ maxInputTokens: 1e6
233
244
  },
234
245
  "claude-haiku-4-5": {
235
246
  input: 1,
236
- output: 5
247
+ output: 5,
248
+ maxInputTokens: 2e5
237
249
  },
238
250
  "gemini-2.5-pro": {
239
251
  input: 1.25,
240
- output: 10
252
+ output: 10,
253
+ maxInputTokens: 1048576
241
254
  },
242
255
  "gemini-2.5-flash": {
243
256
  input: 0.3,
244
- output: 2.5
257
+ output: 2.5,
258
+ maxInputTokens: 1048576
245
259
  },
246
260
  "deepseek-chat": {
247
261
  input: 0.28,
248
- output: 0.42
262
+ output: 0.42,
263
+ maxInputTokens: 131072
249
264
  },
250
265
  "deepseek-reasoner": {
266
+ input: 0.28,
267
+ output: 0.42,
268
+ maxInputTokens: 131072
269
+ },
270
+ "claude-opus-4-5": {
271
+ input: 5,
272
+ output: 25,
273
+ maxInputTokens: 2e5
274
+ },
275
+ "claude-opus-4-7": {
276
+ input: 5,
277
+ output: 25,
278
+ maxInputTokens: 1e6
279
+ },
280
+ "claude-opus-4-1": {
281
+ input: 15,
282
+ output: 75,
283
+ maxInputTokens: 2e5
284
+ },
285
+ "claude-sonnet-4-5": {
286
+ input: 3,
287
+ output: 15,
288
+ maxInputTokens: 2e5
289
+ },
290
+ "gpt-oss-120b": {
291
+ input: 3,
292
+ output: 4.5,
293
+ maxInputTokens: 131072
294
+ },
295
+ "gpt-3.5-turbo": {
296
+ input: 0.5,
297
+ output: 1.5,
298
+ maxInputTokens: 16385
299
+ },
300
+ "gpt-3.5-turbo-0125": {
301
+ input: 0.5,
302
+ output: 1.5,
303
+ maxInputTokens: 16385
304
+ },
305
+ "gpt-35-turbo": {
306
+ input: 0.5,
307
+ output: 1.5,
308
+ maxInputTokens: 4097
309
+ },
310
+ "gpt-35-turbo-0125": {
311
+ input: 0.5,
312
+ output: 1.5,
313
+ maxInputTokens: 16384
314
+ },
315
+ "gpt-35-turbo-1106": {
316
+ input: 1,
317
+ output: 2,
318
+ maxInputTokens: 16384
319
+ },
320
+ "gpt-35-turbo-16k": {
321
+ input: 3,
322
+ output: 4,
323
+ maxInputTokens: 16385
324
+ },
325
+ "gpt-35-turbo-16k-0613": {
326
+ input: 3,
327
+ output: 4,
328
+ maxInputTokens: 16385
329
+ },
330
+ "gpt-4": {
331
+ input: 30,
332
+ output: 60,
333
+ maxInputTokens: 8192
334
+ },
335
+ "gpt-4-0125-preview": {
336
+ input: 10,
337
+ output: 30,
338
+ maxInputTokens: 128e3
339
+ },
340
+ "gpt-4-0613": {
341
+ input: 30,
342
+ output: 60,
343
+ maxInputTokens: 8192
344
+ },
345
+ "gpt-4-1106-preview": {
346
+ input: 10,
347
+ output: 30,
348
+ maxInputTokens: 128e3
349
+ },
350
+ "gpt-4-32k": {
351
+ input: 60,
352
+ output: 120,
353
+ maxInputTokens: 32768
354
+ },
355
+ "gpt-4-32k-0613": {
356
+ input: 60,
357
+ output: 120,
358
+ maxInputTokens: 32768
359
+ },
360
+ "gpt-4-turbo": {
361
+ input: 10,
362
+ output: 30,
363
+ maxInputTokens: 128e3
364
+ },
365
+ "gpt-4-turbo-2024-04-09": {
366
+ input: 10,
367
+ output: 30,
368
+ maxInputTokens: 128e3
369
+ },
370
+ "gpt-4-turbo-vision-preview": {
371
+ input: 10,
372
+ output: 30,
373
+ maxInputTokens: 128e3
374
+ },
375
+ "gpt-4.1": {
376
+ input: 2,
377
+ output: 8,
378
+ maxInputTokens: 1047576
379
+ },
380
+ "gpt-4.1-2025-04-14": {
381
+ input: 2,
382
+ output: 8,
383
+ maxInputTokens: 1047576
384
+ },
385
+ "gpt-4.1-mini": {
386
+ input: 0.4,
387
+ output: 1.6,
388
+ maxInputTokens: 1047576
389
+ },
390
+ "gpt-4.1-mini-2025-04-14": {
391
+ input: 0.4,
392
+ output: 1.6,
393
+ maxInputTokens: 1047576
394
+ },
395
+ "gpt-4.1-nano": {
396
+ input: 0.1,
397
+ output: 0.4,
398
+ maxInputTokens: 1047576
399
+ },
400
+ "gpt-4.1-nano-2025-04-14": {
401
+ input: 0.1,
402
+ output: 0.4,
403
+ maxInputTokens: 1047576
404
+ },
405
+ "gpt-4.5-preview": {
406
+ input: 75,
407
+ output: 150,
408
+ maxInputTokens: 128e3
409
+ },
410
+ "gpt-4o-2024-05-13": {
411
+ input: 5,
412
+ output: 15,
413
+ maxInputTokens: 128e3
414
+ },
415
+ "gpt-4o-2024-08-06": {
416
+ input: 2.5,
417
+ output: 10,
418
+ maxInputTokens: 128e3
419
+ },
420
+ "gpt-4o-2024-11-20": {
421
+ input: 2.5,
422
+ output: 10,
423
+ maxInputTokens: 128e3
424
+ },
425
+ "gpt-audio-2025-08-28": {
426
+ input: 2.5,
427
+ output: 10,
428
+ maxInputTokens: 128e3
429
+ },
430
+ "gpt-audio-1.5-2026-02-23": {
431
+ input: 2.5,
432
+ output: 10,
433
+ maxInputTokens: 128e3
434
+ },
435
+ "gpt-audio-mini-2025-10-06": {
436
+ input: 0.6,
437
+ output: 2.4,
438
+ maxInputTokens: 128e3
439
+ },
440
+ "gpt-4o-audio-preview-2024-12-17": {
441
+ input: 2.5,
442
+ output: 10,
443
+ maxInputTokens: 128e3
444
+ },
445
+ "gpt-4o-mini-2024-07-18": {
446
+ input: 0.15,
447
+ output: 0.6,
448
+ maxInputTokens: 128e3
449
+ },
450
+ "gpt-4o-mini-audio-preview-2024-12-17": {
451
+ input: 0.15,
452
+ output: 0.6,
453
+ maxInputTokens: 128e3
454
+ },
455
+ "gpt-4o-mini-realtime-preview-2024-12-17": {
456
+ input: 0.6,
457
+ output: 2.4,
458
+ maxInputTokens: 128e3
459
+ },
460
+ "gpt-realtime-2025-08-28": {
461
+ input: 4,
462
+ output: 16,
463
+ maxInputTokens: 32e3
464
+ },
465
+ "gpt-realtime-1.5-2026-02-23": {
466
+ input: 4,
467
+ output: 16,
468
+ maxInputTokens: 32e3
469
+ },
470
+ "gpt-realtime-mini-2025-10-06": {
471
+ input: 0.6,
472
+ output: 2.4,
473
+ maxInputTokens: 128e3
474
+ },
475
+ "gpt-4o-mini-transcribe": {
476
+ input: 1.25,
477
+ output: 5,
478
+ maxInputTokens: 16e3
479
+ },
480
+ "gpt-4o-realtime-preview-2024-10-01": {
481
+ input: 5,
482
+ output: 20,
483
+ maxInputTokens: 128e3
484
+ },
485
+ "gpt-4o-realtime-preview-2024-12-17": {
486
+ input: 5,
487
+ output: 20,
488
+ maxInputTokens: 128e3
489
+ },
490
+ "gpt-4o-transcribe": {
491
+ input: 2.5,
492
+ output: 10,
493
+ maxInputTokens: 16e3
494
+ },
495
+ "gpt-4o-transcribe-diarize": {
496
+ input: 2.5,
497
+ output: 10,
498
+ maxInputTokens: 16e3
499
+ },
500
+ "gpt-5.1-2025-11-13": {
501
+ input: 1.25,
502
+ output: 10,
503
+ maxInputTokens: 272e3
504
+ },
505
+ "gpt-5.1-chat-2025-11-13": {
506
+ input: 1.25,
507
+ output: 10,
508
+ maxInputTokens: 128e3
509
+ },
510
+ "gpt-5.1-codex-2025-11-13": {
511
+ input: 1.25,
512
+ output: 10,
513
+ maxInputTokens: 272e3
514
+ },
515
+ "gpt-5.1-codex-mini-2025-11-13": {
516
+ input: 0.25,
517
+ output: 2,
518
+ maxInputTokens: 272e3
519
+ },
520
+ "gpt-5-2025-08-07": {
521
+ input: 1.25,
522
+ output: 10,
523
+ maxInputTokens: 272e3
524
+ },
525
+ "gpt-5-chat": {
526
+ input: 1.25,
527
+ output: 10,
528
+ maxInputTokens: 128e3
529
+ },
530
+ "gpt-5-chat-latest": {
531
+ input: 1.25,
532
+ output: 10,
533
+ maxInputTokens: 128e3
534
+ },
535
+ "gpt-5-codex": {
536
+ input: 1.25,
537
+ output: 10,
538
+ maxInputTokens: 272e3
539
+ },
540
+ "gpt-5-mini-2025-08-07": {
541
+ input: 0.25,
542
+ output: 2,
543
+ maxInputTokens: 272e3
544
+ },
545
+ "gpt-5-nano-2025-08-07": {
546
+ input: 0.05,
547
+ output: 0.4,
548
+ maxInputTokens: 272e3
549
+ },
550
+ "gpt-5-pro": {
551
+ input: 15,
552
+ output: 120,
553
+ maxInputTokens: 128e3
554
+ },
555
+ "gpt-5.1": {
556
+ input: 1.25,
557
+ output: 10,
558
+ maxInputTokens: 272e3
559
+ },
560
+ "gpt-5.1-chat": {
561
+ input: 1.25,
562
+ output: 10,
563
+ maxInputTokens: 128e3
564
+ },
565
+ "gpt-5.1-codex": {
566
+ input: 1.25,
567
+ output: 10,
568
+ maxInputTokens: 272e3
569
+ },
570
+ "gpt-5.1-codex-max": {
571
+ input: 1.25,
572
+ output: 10,
573
+ maxInputTokens: 272e3
574
+ },
575
+ "gpt-5.1-codex-mini": {
576
+ input: 0.25,
577
+ output: 2,
578
+ maxInputTokens: 272e3
579
+ },
580
+ "gpt-5.2": {
581
+ input: 1.75,
582
+ output: 14,
583
+ maxInputTokens: 272e3
584
+ },
585
+ "gpt-5.2-2025-12-11": {
586
+ input: 1.75,
587
+ output: 14,
588
+ maxInputTokens: 272e3
589
+ },
590
+ "gpt-5.2-chat": {
591
+ input: 1.75,
592
+ output: 14,
593
+ maxInputTokens: 128e3
594
+ },
595
+ "gpt-5.2-chat-2025-12-11": {
596
+ input: 1.75,
597
+ output: 14,
598
+ maxInputTokens: 128e3
599
+ },
600
+ "gpt-5.2-codex": {
601
+ input: 1.75,
602
+ output: 14,
603
+ maxInputTokens: 272e3
604
+ },
605
+ "gpt-5.3-chat": {
606
+ input: 1.75,
607
+ output: 14,
608
+ maxInputTokens: 128e3
609
+ },
610
+ "gpt-5.3-codex": {
611
+ input: 1.75,
612
+ output: 14,
613
+ maxInputTokens: 272e3
614
+ },
615
+ "gpt-5.2-pro": {
616
+ input: 21,
617
+ output: 168,
618
+ maxInputTokens: 272e3
619
+ },
620
+ "gpt-5.2-pro-2025-12-11": {
621
+ input: 21,
622
+ output: 168,
623
+ maxInputTokens: 272e3
624
+ },
625
+ "gpt-5.4": {
626
+ input: 2.5,
627
+ output: 15,
628
+ maxInputTokens: 105e4
629
+ },
630
+ "gpt-5.4-2026-03-05": {
631
+ input: 2.5,
632
+ output: 15,
633
+ maxInputTokens: 105e4
634
+ },
635
+ "gpt-5.4-pro": {
636
+ input: 30,
637
+ output: 180,
638
+ maxInputTokens: 105e4
639
+ },
640
+ "gpt-5.4-pro-2026-03-05": {
641
+ input: 30,
642
+ output: 180,
643
+ maxInputTokens: 105e4
644
+ },
645
+ "gpt-5.4-mini": {
646
+ input: 0.75,
647
+ output: 4.5,
648
+ maxInputTokens: 272e3
649
+ },
650
+ "gpt-5.4-nano": {
651
+ input: 0.2,
652
+ output: 1.25,
653
+ maxInputTokens: 272e3
654
+ },
655
+ "o1-2024-12-17": {
656
+ input: 15,
657
+ output: 60,
658
+ maxInputTokens: 2e5
659
+ },
660
+ "o1-mini": {
661
+ input: 1.21,
662
+ output: 4.84,
663
+ maxInputTokens: 128e3
664
+ },
665
+ "o1-mini-2024-09-12": {
666
+ input: 1.1,
667
+ output: 4.4,
668
+ maxInputTokens: 128e3
669
+ },
670
+ "o1-preview": {
671
+ input: 15,
672
+ output: 60,
673
+ maxInputTokens: 128e3
674
+ },
675
+ "o1-preview-2024-09-12": {
676
+ input: 15,
677
+ output: 60,
678
+ maxInputTokens: 128e3
679
+ },
680
+ "o3-2025-04-16": {
681
+ input: 2,
682
+ output: 8,
683
+ maxInputTokens: 2e5
684
+ },
685
+ "o3-mini": {
686
+ input: 1.1,
687
+ output: 4.4,
688
+ maxInputTokens: 2e5
689
+ },
690
+ "o3-mini-2025-01-31": {
691
+ input: 1.1,
692
+ output: 4.4,
693
+ maxInputTokens: 2e5
694
+ },
695
+ "o3-pro": {
696
+ input: 20,
697
+ output: 80,
698
+ maxInputTokens: 2e5
699
+ },
700
+ "o3-pro-2025-06-10": {
701
+ input: 20,
702
+ output: 80,
703
+ maxInputTokens: 2e5
704
+ },
705
+ "o4-mini": {
706
+ input: 1.1,
707
+ output: 4.4,
708
+ maxInputTokens: 2e5
709
+ },
710
+ "o4-mini-2025-04-16": {
711
+ input: 1.1,
712
+ output: 4.4,
713
+ maxInputTokens: 2e5
714
+ },
715
+ "deepseek-v3.2": {
716
+ input: 0.28,
717
+ output: 0.4,
718
+ maxInputTokens: 163840
719
+ },
720
+ "deepseek-v3.2-speciale": {
721
+ input: 0.58,
722
+ output: 1.68,
723
+ maxInputTokens: 163840
724
+ },
725
+ "deepseek-r1": {
251
726
  input: 0.55,
252
- output: 2.19
727
+ output: 2.19,
728
+ maxInputTokens: 65536
729
+ },
730
+ "deepseek-v3": {
731
+ input: 0.27,
732
+ output: 1.1,
733
+ maxInputTokens: 65536
734
+ },
735
+ "deepseek-v3-0324": {
736
+ input: 0.2,
737
+ output: 0.6,
738
+ maxInputTokens: 131072
739
+ },
740
+ "chatgpt-4o-latest": {
741
+ input: 5,
742
+ output: 15,
743
+ maxInputTokens: 128e3
744
+ },
745
+ "claude-haiku-4-5-20251001": {
746
+ input: 1,
747
+ output: 5,
748
+ maxInputTokens: 2e5
749
+ },
750
+ "claude-3-7-sonnet-20250219": {
751
+ input: 3,
752
+ output: 15,
753
+ maxInputTokens: 2e5
754
+ },
755
+ "claude-3-haiku-20240307": {
756
+ input: 0.25,
757
+ output: 1.25,
758
+ maxInputTokens: 2e5
759
+ },
760
+ "claude-3-opus-20240229": {
761
+ input: 15,
762
+ output: 75,
763
+ maxInputTokens: 2e5
764
+ },
765
+ "claude-4-opus-20250514": {
766
+ input: 15,
767
+ output: 75,
768
+ maxInputTokens: 2e5
769
+ },
770
+ "claude-4-sonnet-20250514": {
771
+ input: 3,
772
+ output: 15,
773
+ maxInputTokens: 1e6
774
+ },
775
+ "claude-sonnet-4-5-20250929": {
776
+ input: 3,
777
+ output: 15,
778
+ maxInputTokens: 2e5
779
+ },
780
+ "claude-sonnet-4-5-20250929-v1:0": {
781
+ input: 3,
782
+ output: 15,
783
+ maxInputTokens: 2e5
784
+ },
785
+ "claude-opus-4-1-20250805": {
786
+ input: 15,
787
+ output: 75,
788
+ maxInputTokens: 2e5
789
+ },
790
+ "claude-opus-4-20250514": {
791
+ input: 15,
792
+ output: 75,
793
+ maxInputTokens: 2e5
794
+ },
795
+ "claude-opus-4-5-20251101": {
796
+ input: 5,
797
+ output: 25,
798
+ maxInputTokens: 2e5
799
+ },
800
+ "claude-opus-4-6-20260205": {
801
+ input: 5,
802
+ output: 25,
803
+ maxInputTokens: 1e6
804
+ },
805
+ "claude-opus-4-7-20260416": {
806
+ input: 5,
807
+ output: 25,
808
+ maxInputTokens: 1e6
809
+ },
810
+ "claude-sonnet-4-20250514": {
811
+ input: 3,
812
+ output: 15,
813
+ maxInputTokens: 1e6
814
+ },
815
+ "codex-mini-latest": {
816
+ input: 1.5,
817
+ output: 6,
818
+ maxInputTokens: 2e5
819
+ },
820
+ "deepseek-ai/deepseek-r1": {
821
+ input: 3,
822
+ output: 7,
823
+ maxInputTokens: 128e3
824
+ },
825
+ "deepseek-ai/deepseek-r1-0528": {
826
+ input: 135e3,
827
+ output: 54e4,
828
+ maxInputTokens: 161e3
829
+ },
830
+ "deepseek-ai/deepseek-r1-0528-turbo": {
831
+ input: 1,
832
+ output: 3,
833
+ maxInputTokens: 32768
834
+ },
835
+ "deepseek-ai/deepseek-r1-distill-llama-70b": {
836
+ input: 0.25,
837
+ output: 0.75,
838
+ maxInputTokens: 128e3
839
+ },
840
+ "deepseek-ai/deepseek-r1-distill-qwen-32b": {
841
+ input: 0.15,
842
+ output: 0.15
843
+ },
844
+ "deepseek-ai/deepseek-r1-turbo": {
845
+ input: 1,
846
+ output: 3,
847
+ maxInputTokens: 40960
848
+ },
849
+ "deepseek-ai/deepseek-v3": {
850
+ input: 1.25,
851
+ output: 1.25,
852
+ maxInputTokens: 65536
853
+ },
854
+ "deepseek-ai/deepseek-v3-0324": {
855
+ input: 114e3,
856
+ output: 275e3,
857
+ maxInputTokens: 161e3
858
+ },
859
+ "deepseek-ai/deepseek-v3.1": {
860
+ input: 55e3,
861
+ output: 165e3,
862
+ maxInputTokens: 128e3
863
+ },
864
+ "deepseek-ai/deepseek-v3.1-terminus": {
865
+ input: 0.27,
866
+ output: 1,
867
+ maxInputTokens: 163840
868
+ },
869
+ "deepseek-coder": {
870
+ input: 0.14,
871
+ output: 0.28,
872
+ maxInputTokens: 128e3
873
+ },
874
+ "gemini-2.0-flash": {
875
+ input: 0.1,
876
+ output: 0.4,
877
+ maxInputTokens: 1048576
878
+ },
879
+ "gemini-2.0-flash-001": {
880
+ input: 0.1,
881
+ output: 0.4,
882
+ maxInputTokens: 1048576
883
+ },
884
+ "gemini-2.0-flash-lite": {
885
+ input: 0.075,
886
+ output: 0.3,
887
+ maxInputTokens: 1048576
888
+ },
889
+ "gemini-2.0-flash-lite-001": {
890
+ input: 0.075,
891
+ output: 0.3,
892
+ maxInputTokens: 1048576
893
+ },
894
+ "gemini-2.5-flash-image": {
895
+ input: 0.3,
896
+ output: 2.5,
897
+ maxInputTokens: 32768
898
+ },
899
+ "gemini-3-pro-image-preview": {
900
+ input: 2,
901
+ output: 12,
902
+ maxInputTokens: 65536
903
+ },
904
+ "gemini-3.1-flash-image-preview": {
905
+ input: 0.5,
906
+ output: 3,
907
+ maxInputTokens: 65536
908
+ },
909
+ "gemini-3.1-flash-lite-preview": {
910
+ input: 0.25,
911
+ output: 1.5,
912
+ maxInputTokens: 1048576
913
+ },
914
+ "gemini-2.5-flash-lite": {
915
+ input: 0.1,
916
+ output: 0.4,
917
+ maxInputTokens: 1048576
918
+ },
919
+ "gemini-2.5-flash-lite-preview-09-2025": {
920
+ input: 0.1,
921
+ output: 0.4,
922
+ maxInputTokens: 1048576
923
+ },
924
+ "gemini-2.5-flash-preview-09-2025": {
925
+ input: 0.3,
926
+ output: 2.5,
927
+ maxInputTokens: 1048576
928
+ },
929
+ "gemini-live-2.5-flash-preview-native-audio-09-2025": {
930
+ input: 0.3,
931
+ output: 2,
932
+ maxInputTokens: 1048576
933
+ },
934
+ "gemini-2.5-flash-lite-preview-06-17": {
935
+ input: 0.1,
936
+ output: 0.4,
937
+ maxInputTokens: 1048576
938
+ },
939
+ "gemini-3-pro-preview": {
940
+ input: 2,
941
+ output: 12,
942
+ maxInputTokens: 1048576
943
+ },
944
+ "gemini-3.1-pro-preview": {
945
+ input: 2,
946
+ output: 12,
947
+ maxInputTokens: 1048576
948
+ },
949
+ "gemini-3.1-pro-preview-customtools": {
950
+ input: 2,
951
+ output: 12,
952
+ maxInputTokens: 1048576
953
+ },
954
+ "gemini-3-flash-preview": {
955
+ input: 0.5,
956
+ output: 3,
957
+ maxInputTokens: 1048576
958
+ },
959
+ "gemini-robotics-er-1.5-preview": {
960
+ input: 0.3,
961
+ output: 2.5,
962
+ maxInputTokens: 1048576
963
+ },
964
+ "gemini-2.5-computer-use-preview-10-2025": {
965
+ input: 1.25,
966
+ output: 10,
967
+ maxInputTokens: 128e3
968
+ },
969
+ "gemini-flash-latest": {
970
+ input: 0.3,
971
+ output: 2.5,
972
+ maxInputTokens: 1048576
973
+ },
974
+ "gemini-flash-lite-latest": {
975
+ input: 0.1,
976
+ output: 0.4,
977
+ maxInputTokens: 1048576
978
+ },
979
+ "gemini-gemma-2-27b-it": {
980
+ input: 0.35,
981
+ output: 1.05,
982
+ maxInputTokens: 8192
983
+ },
984
+ "gemini-gemma-2-9b-it": {
985
+ input: 0.35,
986
+ output: 1.05,
987
+ maxInputTokens: 8192
988
+ },
989
+ "deepseek-ai/deepseek-v3.2": {
990
+ input: 0.28,
991
+ output: 0.4,
992
+ maxInputTokens: 163840
993
+ },
994
+ "gpt-3.5-turbo-1106": {
995
+ input: 1,
996
+ output: 2,
997
+ maxInputTokens: 16385
998
+ },
999
+ "gpt-3.5-turbo-16k": {
1000
+ input: 3,
1001
+ output: 4,
1002
+ maxInputTokens: 16385
1003
+ },
1004
+ "gpt-4-0314": {
1005
+ input: 30,
1006
+ output: 60,
1007
+ maxInputTokens: 8192
1008
+ },
1009
+ "gpt-4-turbo-preview": {
1010
+ input: 10,
1011
+ output: 30,
1012
+ maxInputTokens: 128e3
1013
+ },
1014
+ "gpt-4o-audio-preview": {
1015
+ input: 2.5,
1016
+ output: 10,
1017
+ maxInputTokens: 128e3
1018
+ },
1019
+ "gpt-4o-audio-preview-2025-06-03": {
1020
+ input: 2.5,
1021
+ output: 10,
1022
+ maxInputTokens: 128e3
1023
+ },
1024
+ "gpt-audio": {
1025
+ input: 2.5,
1026
+ output: 10,
1027
+ maxInputTokens: 128e3
1028
+ },
1029
+ "gpt-audio-1.5": {
1030
+ input: 2.5,
1031
+ output: 10,
1032
+ maxInputTokens: 128e3
1033
+ },
1034
+ "gpt-audio-mini": {
1035
+ input: 0.6,
1036
+ output: 2.4,
1037
+ maxInputTokens: 128e3
1038
+ },
1039
+ "gpt-audio-mini-2025-12-15": {
1040
+ input: 0.6,
1041
+ output: 2.4,
1042
+ maxInputTokens: 128e3
1043
+ },
1044
+ "gpt-4o-mini-audio-preview": {
1045
+ input: 0.15,
1046
+ output: 0.6,
1047
+ maxInputTokens: 128e3
1048
+ },
1049
+ "gpt-4o-mini-realtime-preview": {
1050
+ input: 0.6,
1051
+ output: 2.4,
1052
+ maxInputTokens: 128e3
1053
+ },
1054
+ "gpt-4o-realtime-preview": {
1055
+ input: 5,
1056
+ output: 20,
1057
+ maxInputTokens: 128e3
1058
+ },
1059
+ "gpt-4o-realtime-preview-2025-06-03": {
1060
+ input: 5,
1061
+ output: 20,
1062
+ maxInputTokens: 128e3
1063
+ },
1064
+ "gpt-image-1.5": {
1065
+ input: 5,
1066
+ output: 10
1067
+ },
1068
+ "gpt-image-1.5-2025-12-16": {
1069
+ input: 5,
1070
+ output: 10
1071
+ },
1072
+ "gpt-5.1-chat-latest": {
1073
+ input: 1.25,
1074
+ output: 10,
1075
+ maxInputTokens: 128e3
1076
+ },
1077
+ "gpt-5.2-chat-latest": {
1078
+ input: 1.75,
1079
+ output: 14,
1080
+ maxInputTokens: 128e3
1081
+ },
1082
+ "gpt-5.3-chat-latest": {
1083
+ input: 1.75,
1084
+ output: 14,
1085
+ maxInputTokens: 128e3
1086
+ },
1087
+ "gpt-5-pro-2025-10-06": {
1088
+ input: 15,
1089
+ output: 120,
1090
+ maxInputTokens: 128e3
1091
+ },
1092
+ "gpt-realtime": {
1093
+ input: 4,
1094
+ output: 16,
1095
+ maxInputTokens: 32e3
1096
+ },
1097
+ "gpt-realtime-1.5": {
1098
+ input: 4,
1099
+ output: 16,
1100
+ maxInputTokens: 32e3
1101
+ },
1102
+ "gpt-realtime-mini": {
1103
+ input: 0.6,
1104
+ output: 2.4,
1105
+ maxInputTokens: 128e3
1106
+ },
1107
+ "deepseek-r1-distill-llama-70b": {
1108
+ input: 0.99,
1109
+ output: 0.99,
1110
+ maxInputTokens: 8e3
1111
+ },
1112
+ "deepseek-llama3.3-70b": {
1113
+ input: 0.2,
1114
+ output: 0.6,
1115
+ maxInputTokens: 131072
1116
+ },
1117
+ "deepseek-r1-0528": {
1118
+ input: 0.2,
1119
+ output: 0.6,
1120
+ maxInputTokens: 131072
1121
+ },
1122
+ "deepseek-r1-671b": {
1123
+ input: 0.8,
1124
+ output: 0.8,
1125
+ maxInputTokens: 131072
1126
+ },
1127
+ "deepseek-ai/deepseek-r1-distill-llama-8b": {
1128
+ input: 0.025,
1129
+ output: 0.025
1130
+ },
1131
+ "deepseek-ai/deepseek-r1-distill-qwen-1.5b": {
1132
+ input: 0.09,
1133
+ output: 0.09
1134
+ },
1135
+ "deepseek-ai/deepseek-r1-distill-qwen-14b": {
1136
+ input: 0.07,
1137
+ output: 0.07
1138
+ },
1139
+ "deepseek-ai/deepseek-r1-distill-qwen-7b": {
1140
+ input: 0.2,
1141
+ output: 0.2
1142
+ },
1143
+ o1: {
1144
+ input: 15,
1145
+ output: 60,
1146
+ maxInputTokens: 2e5
1147
+ },
1148
+ "o1-pro": {
1149
+ input: 150,
1150
+ output: 600,
1151
+ maxInputTokens: 2e5
1152
+ },
1153
+ "o1-pro-2025-03-19": {
1154
+ input: 150,
1155
+ output: 600,
1156
+ maxInputTokens: 2e5
1157
+ },
1158
+ o3: {
1159
+ input: 2,
1160
+ output: 8,
1161
+ maxInputTokens: 2e5
1162
+ },
1163
+ "gpt-oss-20b": {
1164
+ input: 0.09,
1165
+ output: 0.36
1166
+ },
1167
+ "deepseek-ai/deepseek-r1-0528-tput": {
1168
+ input: 0.55,
1169
+ output: 2.19,
1170
+ maxInputTokens: 128e3
1171
+ },
1172
+ "claude-3-5-haiku": {
1173
+ input: 1,
1174
+ output: 5,
1175
+ maxInputTokens: 2e5
1176
+ },
1177
+ "claude-3-5-haiku@20241022": {
1178
+ input: 1,
1179
+ output: 5,
1180
+ maxInputTokens: 2e5
1181
+ },
1182
+ "claude-haiku-4-5@20251001": {
1183
+ input: 1,
1184
+ output: 5,
1185
+ maxInputTokens: 2e5
1186
+ },
1187
+ "claude-3-5-sonnet": {
1188
+ input: 3,
1189
+ output: 15,
1190
+ maxInputTokens: 2e5
1191
+ },
1192
+ "claude-3-5-sonnet@20240620": {
1193
+ input: 3,
1194
+ output: 15,
1195
+ maxInputTokens: 2e5
1196
+ },
1197
+ "claude-3-7-sonnet@20250219": {
1198
+ input: 3,
1199
+ output: 15,
1200
+ maxInputTokens: 2e5
1201
+ },
1202
+ "claude-3-haiku": {
1203
+ input: 0.25,
1204
+ output: 1.25,
1205
+ maxInputTokens: 2e5
1206
+ },
1207
+ "claude-3-haiku@20240307": {
1208
+ input: 0.25,
1209
+ output: 1.25,
1210
+ maxInputTokens: 2e5
1211
+ },
1212
+ "claude-3-opus": {
1213
+ input: 15,
1214
+ output: 75,
1215
+ maxInputTokens: 2e5
1216
+ },
1217
+ "claude-3-opus@20240229": {
1218
+ input: 15,
1219
+ output: 75,
1220
+ maxInputTokens: 2e5
1221
+ },
1222
+ "claude-3-sonnet": {
1223
+ input: 3,
1224
+ output: 15,
1225
+ maxInputTokens: 2e5
1226
+ },
1227
+ "claude-3-sonnet@20240229": {
1228
+ input: 3,
1229
+ output: 15,
1230
+ maxInputTokens: 2e5
1231
+ },
1232
+ "claude-opus-4": {
1233
+ input: 15,
1234
+ output: 75,
1235
+ maxInputTokens: 2e5
1236
+ },
1237
+ "claude-opus-4-1@20250805": {
1238
+ input: 15,
1239
+ output: 75,
1240
+ maxInputTokens: 2e5
1241
+ },
1242
+ "claude-opus-4-5@20251101": {
1243
+ input: 5,
1244
+ output: 25,
1245
+ maxInputTokens: 2e5
1246
+ },
1247
+ "claude-opus-4-6@default": {
1248
+ input: 5,
1249
+ output: 25,
1250
+ maxInputTokens: 1e6
1251
+ },
1252
+ "claude-opus-4-7@default": {
1253
+ input: 5,
1254
+ output: 25,
1255
+ maxInputTokens: 1e6
1256
+ },
1257
+ "claude-sonnet-4-5@20250929": {
1258
+ input: 3,
1259
+ output: 15,
1260
+ maxInputTokens: 2e5
1261
+ },
1262
+ "claude-opus-4@20250514": {
1263
+ input: 15,
1264
+ output: 75,
1265
+ maxInputTokens: 2e5
1266
+ },
1267
+ "claude-sonnet-4": {
1268
+ input: 3,
1269
+ output: 15,
1270
+ maxInputTokens: 1e6
1271
+ },
1272
+ "claude-sonnet-4@20250514": {
1273
+ input: 3,
1274
+ output: 15,
1275
+ maxInputTokens: 1e6
1276
+ },
1277
+ "deepseek-ai/deepseek-v3.1-maas": {
1278
+ input: 1.35,
1279
+ output: 5.4,
1280
+ maxInputTokens: 163840
1281
+ },
1282
+ "deepseek-ai/deepseek-v3.2-maas": {
1283
+ input: 0.56,
1284
+ output: 1.68,
1285
+ maxInputTokens: 163840
1286
+ },
1287
+ "deepseek-ai/deepseek-r1-0528-maas": {
1288
+ input: 1.35,
1289
+ output: 5.4,
1290
+ maxInputTokens: 65336
1291
+ },
1292
+ "deepseek-ai/deepseek-ocr-maas": {
1293
+ input: 0.3,
1294
+ output: 1.2
1295
+ },
1296
+ "deepseek-r1-8b": {
1297
+ input: 0.1,
1298
+ output: 0.2,
1299
+ maxInputTokens: 65536
1300
+ },
1301
+ "deepseek-r1-7b-qwen": {
1302
+ input: 0.08,
1303
+ output: 0.15,
1304
+ maxInputTokens: 131072
1305
+ },
1306
+ "deepseek-coder-6.7b": {
1307
+ input: 0.06,
1308
+ output: 0.12,
1309
+ maxInputTokens: 16384
1310
+ },
1311
+ "gpt-4o-mini-transcribe-2025-03-20": {
1312
+ input: 1.25,
1313
+ output: 5,
1314
+ maxInputTokens: 16e3
1315
+ },
1316
+ "gpt-4o-mini-transcribe-2025-12-15": {
1317
+ input: 1.25,
1318
+ output: 5,
1319
+ maxInputTokens: 16e3
1320
+ },
1321
+ "gpt-realtime-mini-2025-12-15": {
1322
+ input: 0.6,
1323
+ output: 2.4,
1324
+ maxInputTokens: 128e3
1325
+ },
1326
+ "gemini-2.5-flash-native-audio-latest": {
1327
+ input: 0.3,
1328
+ output: 2.5,
1329
+ maxInputTokens: 1048576
1330
+ },
1331
+ "gemini-2.5-flash-native-audio-preview-09-2025": {
1332
+ input: 0.3,
1333
+ output: 2.5,
1334
+ maxInputTokens: 1048576
1335
+ },
1336
+ "gemini-2.5-flash-native-audio-preview-12-2025": {
1337
+ input: 0.3,
1338
+ output: 2.5,
1339
+ maxInputTokens: 1048576
1340
+ },
1341
+ "gemini-3.1-flash-live-preview": {
1342
+ input: 0.75,
1343
+ output: 4.5,
1344
+ maxInputTokens: 131072
1345
+ },
1346
+ "gemini-pro-latest": {
1347
+ input: 1.25,
1348
+ output: 10,
1349
+ maxInputTokens: 1048576
1350
+ },
1351
+ "gemini-exp-1206": {
1352
+ input: 0.3,
1353
+ output: 2.5,
1354
+ maxInputTokens: 1048576
1355
+ },
1356
+ "claude-sonnet-4-6@default": {
1357
+ input: 3,
1358
+ output: 15,
1359
+ maxInputTokens: 1e6
253
1360
  }
254
1361
  }
255
1362
  };
@@ -390,7 +1497,14 @@ ${issues}`);
390
1497
  );
391
1498
  return [header, ...rows].join("\n");
392
1499
  }
393
- return { track, getReport, reset, resetSession, exportJSON, exportCSV };
1500
+ function getModelInfo(model) {
1501
+ return findPrice(model, {
1502
+ bundledPrices,
1503
+ ...customPrices !== void 0 && { customPrices },
1504
+ ...remotePrices !== void 0 && { remotePrices }
1505
+ }) ?? null;
1506
+ }
1507
+ return { track, getReport, reset, resetSession, exportJSON, exportCSV, getModelInfo };
394
1508
  }
395
1509
  function computeTotal(entries) {
396
1510
  return entries.reduce((sum, e) => sum + e.costUSD, 0);