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