@pydantic/genai-prices 0.0.43 → 0.0.45

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
@@ -1,4 +1,4 @@
1
- const x = [
1
+ const B = [
2
2
  {
3
3
  id: "anthropic",
4
4
  name: "Anthropic",
@@ -310,6 +310,34 @@ const x = [
310
310
  output_mtok: 75
311
311
  }
312
312
  },
313
+ {
314
+ id: "claude-opus-4-5",
315
+ name: "Claude Opus 4.5",
316
+ description: "Premium model combining maximum intelligence with practical performance",
317
+ match: {
318
+ or: [
319
+ {
320
+ starts_with: "claude-opus-4-5"
321
+ },
322
+ {
323
+ starts_with: "claude-opus-4.5"
324
+ },
325
+ {
326
+ starts_with: "claude-4-5-opus"
327
+ },
328
+ {
329
+ starts_with: "claude-4.5-opus"
330
+ }
331
+ ]
332
+ },
333
+ context_window: 2e5,
334
+ prices: {
335
+ input_mtok: 5,
336
+ cache_write_mtok: 6.25,
337
+ cache_read_mtok: 0.5,
338
+ output_mtok: 25
339
+ }
340
+ },
313
341
  {
314
342
  id: "claude-sonnet-4-0",
315
343
  name: "Claude Sonnet 4",
@@ -1260,6 +1288,111 @@ const x = [
1260
1288
  pricing_urls: ["https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/#pricing"],
1261
1289
  api_pattern: "(https?://)?([^.]*\\.)?(?:openai\\.azure\\.com|azure-api\\.net|cognitiveservices\\.azure\\.com)",
1262
1290
  price_comments: 'These are prices for "*-Global" models, prices for "Regional" models are often slightly higher. Retired models are listed at https://learn.microsoft.com/th-th/azure/ai-foundry/openai/concepts/legacy-models',
1291
+ extractors: [
1292
+ {
1293
+ api_flavor: "chat",
1294
+ root: "usage",
1295
+ model_path: "model",
1296
+ mappings: [
1297
+ {
1298
+ path: "prompt_tokens",
1299
+ dest: "input_tokens",
1300
+ required: !0
1301
+ },
1302
+ {
1303
+ path: ["prompt_tokens_details", "cached_tokens"],
1304
+ dest: "cache_read_tokens",
1305
+ required: !1
1306
+ },
1307
+ {
1308
+ path: ["prompt_tokens_details", "audio_tokens"],
1309
+ dest: "input_audio_tokens",
1310
+ required: !1
1311
+ },
1312
+ {
1313
+ path: ["completion_tokens_details", "audio_tokens"],
1314
+ dest: "output_audio_tokens",
1315
+ required: !1
1316
+ },
1317
+ {
1318
+ path: "completion_tokens",
1319
+ dest: "output_tokens",
1320
+ required: !0
1321
+ }
1322
+ ]
1323
+ },
1324
+ {
1325
+ api_flavor: "responses",
1326
+ root: "usage",
1327
+ model_path: "model",
1328
+ mappings: [
1329
+ {
1330
+ path: "input_tokens",
1331
+ dest: "input_tokens",
1332
+ required: !0
1333
+ },
1334
+ {
1335
+ path: ["input_tokens_details", "cached_tokens"],
1336
+ dest: "cache_read_tokens",
1337
+ required: !1
1338
+ },
1339
+ {
1340
+ path: "output_tokens",
1341
+ dest: "output_tokens",
1342
+ required: !0
1343
+ }
1344
+ ]
1345
+ },
1346
+ {
1347
+ api_flavor: "embeddings",
1348
+ root: "usage",
1349
+ model_path: "model",
1350
+ mappings: [
1351
+ {
1352
+ path: "prompt_tokens",
1353
+ dest: "input_tokens",
1354
+ required: !0
1355
+ }
1356
+ ]
1357
+ },
1358
+ {
1359
+ api_flavor: "anthropic",
1360
+ root: "usage",
1361
+ model_path: "model",
1362
+ mappings: [
1363
+ {
1364
+ path: "input_tokens",
1365
+ dest: "input_tokens",
1366
+ required: !0
1367
+ },
1368
+ {
1369
+ path: "cache_creation_input_tokens",
1370
+ dest: "input_tokens",
1371
+ required: !1
1372
+ },
1373
+ {
1374
+ path: "cache_read_input_tokens",
1375
+ dest: "input_tokens",
1376
+ required: !1
1377
+ },
1378
+ {
1379
+ path: "cache_creation_input_tokens",
1380
+ dest: "cache_write_tokens",
1381
+ required: !1
1382
+ },
1383
+ {
1384
+ path: "cache_read_input_tokens",
1385
+ dest: "cache_read_tokens",
1386
+ required: !1
1387
+ },
1388
+ {
1389
+ path: "output_tokens",
1390
+ dest: "output_tokens",
1391
+ required: !0
1392
+ }
1393
+ ]
1394
+ }
1395
+ ],
1263
1396
  models: [
1264
1397
  {
1265
1398
  id: "ada",
@@ -3300,326 +3433,3086 @@ Compared to other leading proprietary and open-weights models Command A delivers
3300
3433
  }
3301
3434
  },
3302
3435
  {
3303
- id: "gemma-7b-it",
3436
+ id: "gemma-7b-it",
3437
+ match: {
3438
+ equals: "gemma-7b-it"
3439
+ },
3440
+ prices: {
3441
+ input_mtok: 0.07,
3442
+ output_mtok: 0.07
3443
+ }
3444
+ },
3445
+ {
3446
+ id: "gemma2-9b-it",
3447
+ name: "Gemma 2 9B 8k",
3448
+ match: {
3449
+ or: [
3450
+ {
3451
+ equals: "gemma2-9b-it"
3452
+ },
3453
+ {
3454
+ equals: "gemma2-9b"
3455
+ }
3456
+ ]
3457
+ },
3458
+ prices: {
3459
+ input_mtok: 0.2,
3460
+ output_mtok: 0.2
3461
+ }
3462
+ },
3463
+ {
3464
+ id: "llama-3.1-405b-reasoning",
3465
+ match: {
3466
+ equals: "llama-3.1-405b-reasoning"
3467
+ },
3468
+ prices: {
3469
+ input_mtok: 0.59,
3470
+ output_mtok: 0.79
3471
+ }
3472
+ },
3473
+ {
3474
+ id: "llama-3.1-70b-versatile",
3475
+ match: {
3476
+ equals: "llama-3.1-70b-versatile"
3477
+ },
3478
+ prices: {
3479
+ input_mtok: 0.59,
3480
+ output_mtok: 0.79
3481
+ }
3482
+ },
3483
+ {
3484
+ id: "llama-3.1-8b-instant",
3485
+ name: "Llama 3.1 8B Instant 128k",
3486
+ match: {
3487
+ equals: "llama-3.1-8b-instant"
3488
+ },
3489
+ prices: {
3490
+ input_mtok: 0.05,
3491
+ output_mtok: 0.08
3492
+ }
3493
+ },
3494
+ {
3495
+ id: "llama-3.2-11b-text-preview",
3496
+ match: {
3497
+ equals: "llama-3.2-11b-text-preview"
3498
+ },
3499
+ prices: {
3500
+ input_mtok: 0.18,
3501
+ output_mtok: 0.18
3502
+ }
3503
+ },
3504
+ {
3505
+ id: "llama-3.2-11b-vision-preview",
3506
+ match: {
3507
+ equals: "llama-3.2-11b-vision-preview"
3508
+ },
3509
+ prices: {
3510
+ input_mtok: 0.18,
3511
+ output_mtok: 0.18
3512
+ }
3513
+ },
3514
+ {
3515
+ id: "llama-3.2-1b-preview",
3516
+ match: {
3517
+ equals: "llama-3.2-1b-preview"
3518
+ },
3519
+ prices: {
3520
+ input_mtok: 0.04,
3521
+ output_mtok: 0.04
3522
+ }
3523
+ },
3524
+ {
3525
+ id: "llama-3.2-3b-preview",
3526
+ match: {
3527
+ equals: "llama-3.2-3b-preview"
3528
+ },
3529
+ prices: {
3530
+ input_mtok: 0.06,
3531
+ output_mtok: 0.06
3532
+ }
3533
+ },
3534
+ {
3535
+ id: "llama-3.2-90b-text-preview",
3536
+ match: {
3537
+ equals: "llama-3.2-90b-text-preview"
3538
+ },
3539
+ prices: {
3540
+ input_mtok: 0.9,
3541
+ output_mtok: 0.9
3542
+ }
3543
+ },
3544
+ {
3545
+ id: "llama-3.2-90b-vision-preview",
3546
+ match: {
3547
+ equals: "llama-3.2-90b-vision-preview"
3548
+ },
3549
+ prices: {
3550
+ input_mtok: 0.9,
3551
+ output_mtok: 0.9
3552
+ }
3553
+ },
3554
+ {
3555
+ id: "llama-3.3-70b-specdec",
3556
+ match: {
3557
+ equals: "llama-3.3-70b-specdec"
3558
+ },
3559
+ prices: {
3560
+ input_mtok: 0.59,
3561
+ output_mtok: 0.99
3562
+ }
3563
+ },
3564
+ {
3565
+ id: "llama-3.3-70b-versatile",
3566
+ name: "Llama 3.3 70B Versatile 128k",
3567
+ match: {
3568
+ equals: "llama-3.3-70b-versatile"
3569
+ },
3570
+ prices: {
3571
+ input_mtok: 0.59,
3572
+ output_mtok: 0.79
3573
+ }
3574
+ },
3575
+ {
3576
+ id: "llama-guard-3-8b",
3577
+ match: {
3578
+ equals: "llama-guard-3-8b"
3579
+ },
3580
+ prices: {
3581
+ input_mtok: 0.2,
3582
+ output_mtok: 0.2
3583
+ }
3584
+ },
3585
+ {
3586
+ id: "llama2-70b-4096",
3587
+ match: {
3588
+ equals: "llama2-70b-4096"
3589
+ },
3590
+ prices: {
3591
+ input_mtok: 0.7,
3592
+ output_mtok: 0.8
3593
+ }
3594
+ },
3595
+ {
3596
+ id: "llama3-70b-8192",
3597
+ match: {
3598
+ equals: "llama3-70b-8192"
3599
+ },
3600
+ prices: {
3601
+ input_mtok: 0.59,
3602
+ output_mtok: 0.79
3603
+ }
3604
+ },
3605
+ {
3606
+ id: "llama3-8b-8192",
3607
+ match: {
3608
+ equals: "llama3-8b-8192"
3609
+ },
3610
+ prices: {
3611
+ input_mtok: 0.05,
3612
+ output_mtok: 0.08
3613
+ }
3614
+ },
3615
+ {
3616
+ id: "llama3-groq-70b-8192-tool-use-preview",
3617
+ match: {
3618
+ equals: "llama3-groq-70b-8192-tool-use-preview"
3619
+ },
3620
+ prices: {
3621
+ input_mtok: 0.89,
3622
+ output_mtok: 0.89
3623
+ }
3624
+ },
3625
+ {
3626
+ id: "llama3-groq-8b-8192-tool-use-preview",
3627
+ match: {
3628
+ equals: "llama3-groq-8b-8192-tool-use-preview"
3629
+ },
3630
+ prices: {
3631
+ input_mtok: 0.19,
3632
+ output_mtok: 0.19
3633
+ }
3634
+ },
3635
+ {
3636
+ id: "meta-llama/llama-4-maverick-17b-128e-instruct",
3637
+ name: "Llama 4 Maverick 17B 128E",
3638
+ match: {
3639
+ equals: "meta-llama/llama-4-maverick-17b-128e-instruct"
3640
+ },
3641
+ context_window: 131072,
3642
+ prices: {
3643
+ input_mtok: 0.2,
3644
+ output_mtok: 0.6
3645
+ }
3646
+ },
3647
+ {
3648
+ id: "meta-llama/llama-4-scout-17b-16e-instruct",
3649
+ name: "Llama 4 Scout (17Bx16E) 128k",
3650
+ match: {
3651
+ equals: "meta-llama/llama-4-scout-17b-16e-instruct"
3652
+ },
3653
+ prices: {
3654
+ input_mtok: 0.11,
3655
+ output_mtok: 0.34
3656
+ }
3657
+ },
3658
+ {
3659
+ id: "meta-llama/llama-guard-4-12b",
3660
+ name: "Llama Guard 4 12B",
3661
+ match: {
3662
+ equals: "meta-llama/llama-guard-4-12b"
3663
+ },
3664
+ context_window: 131072,
3665
+ prices: {
3666
+ input_mtok: 0.2,
3667
+ output_mtok: 0.2
3668
+ }
3669
+ },
3670
+ {
3671
+ id: "mistral-saba-24b",
3672
+ match: {
3673
+ equals: "mistral-saba-24b"
3674
+ },
3675
+ prices: {
3676
+ input_mtok: 0.79,
3677
+ output_mtok: 0.79
3678
+ }
3679
+ },
3680
+ {
3681
+ id: "mixtral-8x7b-32768",
3682
+ match: {
3683
+ equals: "mixtral-8x7b-32768"
3684
+ },
3685
+ prices: {
3686
+ input_mtok: 0.24,
3687
+ output_mtok: 0.24
3688
+ }
3689
+ },
3690
+ {
3691
+ id: "moonshotai/kimi-k2-instruct",
3692
+ name: "Kimi K2 1T 128k",
3693
+ match: {
3694
+ or: [
3695
+ {
3696
+ equals: "moonshotai/kimi-k2-instruct"
3697
+ },
3698
+ {
3699
+ equals: "moonshotai/kimi-k2-instruct-0905"
3700
+ }
3701
+ ]
3702
+ },
3703
+ context_window: 131072,
3704
+ prices: {
3705
+ input_mtok: 1,
3706
+ cache_read_mtok: 0.5,
3707
+ output_mtok: 3
3708
+ }
3709
+ },
3710
+ {
3711
+ id: "openai/gpt-oss-120b",
3712
+ description: `GPT-OSS 120B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
3713
+ 120 billion parameters and 128 experts.
3714
+ `,
3715
+ match: {
3716
+ or: [
3717
+ {
3718
+ equals: "openai/gpt-oss-120b"
3719
+ },
3720
+ {
3721
+ equals: "openai/gpt-oss-safeguard-20b"
3722
+ }
3723
+ ]
3724
+ },
3725
+ context_window: 131072,
3726
+ prices: {
3727
+ input_mtok: 0.15,
3728
+ cache_read_mtok: 0.075,
3729
+ output_mtok: 0.6
3730
+ }
3731
+ },
3732
+ {
3733
+ id: "openai/gpt-oss-20b",
3734
+ description: `GPT-OSS 20B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
3735
+ 20 billion parameters and 32 experts.
3736
+ `,
3737
+ match: {
3738
+ equals: "openai/gpt-oss-20b"
3739
+ },
3740
+ context_window: 131072,
3741
+ prices: {
3742
+ input_mtok: 0.075,
3743
+ cache_read_mtok: 0.0375,
3744
+ output_mtok: 0.3
3745
+ }
3746
+ },
3747
+ {
3748
+ id: "qwen/qwen3-32b",
3749
+ name: "Qwen3 32B 131k",
3750
+ match: {
3751
+ equals: "qwen/qwen3-32b"
3752
+ },
3753
+ prices: {
3754
+ input_mtok: 0.29,
3755
+ output_mtok: 0.59
3756
+ }
3757
+ }
3758
+ ]
3759
+ },
3760
+ {
3761
+ id: "huggingface_cerebras",
3762
+ name: "HuggingFace (cerebras)",
3763
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
3764
+ api_pattern: "https://router\\.huggingface\\.co/cerebras",
3765
+ provider_match: {
3766
+ and: [
3767
+ {
3768
+ contains: "huggingface"
3769
+ },
3770
+ {
3771
+ contains: "cerebras"
3772
+ }
3773
+ ]
3774
+ },
3775
+ extractors: [
3776
+ {
3777
+ api_flavor: "chat",
3778
+ root: "usage",
3779
+ model_path: "model",
3780
+ mappings: [
3781
+ {
3782
+ path: "prompt_tokens",
3783
+ dest: "input_tokens",
3784
+ required: !0
3785
+ },
3786
+ {
3787
+ path: ["prompt_tokens_details", "cached_tokens"],
3788
+ dest: "cache_read_tokens",
3789
+ required: !1
3790
+ },
3791
+ {
3792
+ path: ["prompt_tokens_details", "audio_tokens"],
3793
+ dest: "input_audio_tokens",
3794
+ required: !1
3795
+ },
3796
+ {
3797
+ path: ["completion_tokens_details", "audio_tokens"],
3798
+ dest: "output_audio_tokens",
3799
+ required: !1
3800
+ },
3801
+ {
3802
+ path: "completion_tokens",
3803
+ dest: "output_tokens",
3804
+ required: !0
3805
+ }
3806
+ ]
3807
+ }
3808
+ ],
3809
+ models: [
3810
+ {
3811
+ id: "Qwen/Qwen3-235B-A22B-Instruct-2507",
3812
+ name: "Qwen3-235B-A22B-Instruct-2507",
3813
+ match: {
3814
+ equals: "Qwen/Qwen3-235B-A22B-Instruct-2507"
3815
+ },
3816
+ prices: {
3817
+ input_mtok: 0.6,
3818
+ output_mtok: 1.2
3819
+ }
3820
+ },
3821
+ {
3822
+ id: "Qwen/Qwen3-32B",
3823
+ name: "Qwen3-32B",
3824
+ match: {
3825
+ equals: "Qwen/Qwen3-32B"
3826
+ },
3827
+ prices: {
3828
+ input_mtok: 0.4,
3829
+ output_mtok: 0.8
3830
+ }
3831
+ },
3832
+ {
3833
+ id: "meta-llama/Llama-3.1-8B-Instruct",
3834
+ name: "Llama-3.1-8B-Instruct",
3835
+ match: {
3836
+ equals: "meta-llama/Llama-3.1-8B-Instruct"
3837
+ },
3838
+ prices: {
3839
+ input_mtok: 0.1,
3840
+ output_mtok: 0.1
3841
+ }
3842
+ },
3843
+ {
3844
+ id: "meta-llama/Llama-3.3-70B-Instruct",
3845
+ name: "Llama-3.3-70B-Instruct",
3846
+ match: {
3847
+ equals: "meta-llama/Llama-3.3-70B-Instruct"
3848
+ },
3849
+ prices: {
3850
+ input_mtok: 0.85,
3851
+ output_mtok: 1.2
3852
+ }
3853
+ },
3854
+ {
3855
+ id: "openai/gpt-oss-120b",
3856
+ name: "gpt-oss-120b",
3857
+ match: {
3858
+ equals: "openai/gpt-oss-120b"
3859
+ },
3860
+ prices: {
3861
+ input_mtok: 0.25,
3862
+ output_mtok: 0.69
3863
+ }
3864
+ }
3865
+ ]
3866
+ },
3867
+ {
3868
+ id: "huggingface_fireworks-ai",
3869
+ name: "HuggingFace (fireworks-ai)",
3870
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
3871
+ api_pattern: "https://router\\.huggingface\\.co/fireworks-ai",
3872
+ provider_match: {
3873
+ and: [
3874
+ {
3875
+ contains: "huggingface"
3876
+ },
3877
+ {
3878
+ contains: "fireworks-ai"
3879
+ }
3880
+ ]
3881
+ },
3882
+ extractors: [
3883
+ {
3884
+ api_flavor: "chat",
3885
+ root: "usage",
3886
+ model_path: "model",
3887
+ mappings: [
3888
+ {
3889
+ path: "prompt_tokens",
3890
+ dest: "input_tokens",
3891
+ required: !0
3892
+ },
3893
+ {
3894
+ path: ["prompt_tokens_details", "cached_tokens"],
3895
+ dest: "cache_read_tokens",
3896
+ required: !1
3897
+ },
3898
+ {
3899
+ path: ["prompt_tokens_details", "audio_tokens"],
3900
+ dest: "input_audio_tokens",
3901
+ required: !1
3902
+ },
3903
+ {
3904
+ path: ["completion_tokens_details", "audio_tokens"],
3905
+ dest: "output_audio_tokens",
3906
+ required: !1
3907
+ },
3908
+ {
3909
+ path: "completion_tokens",
3910
+ dest: "output_tokens",
3911
+ required: !0
3912
+ }
3913
+ ]
3914
+ }
3915
+ ],
3916
+ models: [
3917
+ {
3918
+ id: "Qwen/Qwen2.5-VL-32B-Instruct",
3919
+ name: "Qwen2.5-VL-32B-Instruct",
3920
+ match: {
3921
+ equals: "Qwen/Qwen2.5-VL-32B-Instruct"
3922
+ },
3923
+ context_window: 128e3,
3924
+ prices: {
3925
+ input_mtok: 0.22,
3926
+ output_mtok: 0.88
3927
+ }
3928
+ },
3929
+ {
3930
+ id: "Qwen/Qwen3-235B-A22B",
3931
+ name: "Qwen3-235B-A22B",
3932
+ match: {
3933
+ or: [
3934
+ {
3935
+ equals: "Qwen/Qwen3-235B-A22B"
3936
+ },
3937
+ {
3938
+ equals: "Qwen/Qwen3-235B-A22B-Instruct-2507"
3939
+ }
3940
+ ]
3941
+ },
3942
+ context_window: 131072,
3943
+ prices: {
3944
+ input_mtok: 0.22,
3945
+ output_mtok: 0.88
3946
+ }
3947
+ },
3948
+ {
3949
+ id: "Qwen/Qwen3-30B-A3B",
3950
+ name: "Qwen3-30B-A3B",
3951
+ match: {
3952
+ equals: "Qwen/Qwen3-30B-A3B"
3953
+ },
3954
+ context_window: 131072,
3955
+ prices: {
3956
+ input_mtok: 0.15,
3957
+ output_mtok: 0.6
3958
+ }
3959
+ },
3960
+ {
3961
+ id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
3962
+ name: "Qwen3-Coder-480B-A35B-Instruct",
3963
+ match: {
3964
+ equals: "Qwen/Qwen3-Coder-480B-A35B-Instruct"
3965
+ },
3966
+ context_window: 262144,
3967
+ prices: {
3968
+ input_mtok: 0.45,
3969
+ output_mtok: 1.8
3970
+ }
3971
+ },
3972
+ {
3973
+ id: "SentientAGI/Dobby-Unhinged-Llama-3.3-70B",
3974
+ name: "Dobby-Unhinged-Llama-3.3-70B",
3975
+ match: {
3976
+ equals: "SentientAGI/Dobby-Unhinged-Llama-3.3-70B"
3977
+ },
3978
+ context_window: 131072,
3979
+ prices: {
3980
+ input_mtok: 0.9,
3981
+ output_mtok: 0.9
3982
+ }
3983
+ },
3984
+ {
3985
+ id: "deepseek-ai/DeepSeek-R1-0528",
3986
+ name: "DeepSeek-R1-0528",
3987
+ match: {
3988
+ equals: "deepseek-ai/DeepSeek-R1-0528"
3989
+ },
3990
+ context_window: 163840,
3991
+ prices: {
3992
+ input_mtok: 3,
3993
+ output_mtok: 8
3994
+ }
3995
+ },
3996
+ {
3997
+ id: "deepseek-ai/DeepSeek-V3-0324",
3998
+ name: "DeepSeek-V3-0324",
3999
+ match: {
4000
+ equals: "deepseek-ai/DeepSeek-V3-0324"
4001
+ },
4002
+ context_window: 163840,
4003
+ prices: {
4004
+ input_mtok: 0.9,
4005
+ output_mtok: 0.9
4006
+ }
4007
+ },
4008
+ {
4009
+ id: "meta-llama/Llama-3.1-405B-Instruct",
4010
+ name: "Llama-3.1-405B-Instruct",
4011
+ match: {
4012
+ equals: "meta-llama/Llama-3.1-405B-Instruct"
4013
+ },
4014
+ context_window: 131072,
4015
+ prices: {
4016
+ input_mtok: 3,
4017
+ output_mtok: 3
4018
+ }
4019
+ },
4020
+ {
4021
+ id: "meta-llama/Llama-3.1-70B-Instruct",
4022
+ name: "Llama-3.1-70B-Instruct",
4023
+ match: {
4024
+ equals: "meta-llama/Llama-3.1-70B-Instruct"
4025
+ },
4026
+ context_window: 131072,
4027
+ prices: {
4028
+ input_mtok: 0.9,
4029
+ output_mtok: 0.9
4030
+ }
4031
+ },
4032
+ {
4033
+ id: "meta-llama/Llama-3.1-8B-Instruct",
4034
+ name: "Llama-3.1-8B-Instruct",
4035
+ match: {
4036
+ equals: "meta-llama/Llama-3.1-8B-Instruct"
4037
+ },
4038
+ context_window: 131072,
4039
+ prices: {
4040
+ input_mtok: 0.2,
4041
+ output_mtok: 0.2
4042
+ }
4043
+ },
4044
+ {
4045
+ id: "meta-llama/Llama-3.3-70B-Instruct",
4046
+ name: "Llama-3.3-70B-Instruct",
4047
+ match: {
4048
+ equals: "meta-llama/Llama-3.3-70B-Instruct"
4049
+ },
4050
+ context_window: 131072,
4051
+ prices: {
4052
+ input_mtok: 0.9,
4053
+ output_mtok: 0.9
4054
+ }
4055
+ },
4056
+ {
4057
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct",
4058
+ name: "Llama-4-Maverick-17B-128E-Instruct",
4059
+ match: {
4060
+ equals: "meta-llama/Llama-4-Maverick-17B-128E-Instruct"
4061
+ },
4062
+ context_window: 1048576,
4063
+ prices: {
4064
+ input_mtok: 0.22,
4065
+ output_mtok: 0.88
4066
+ }
4067
+ },
4068
+ {
4069
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
4070
+ name: "Llama-4-Scout-17B-16E-Instruct",
4071
+ match: {
4072
+ equals: "meta-llama/Llama-4-Scout-17B-16E-Instruct"
4073
+ },
4074
+ context_window: 1048576,
4075
+ prices: {
4076
+ input_mtok: 0.15,
4077
+ output_mtok: 0.6
4078
+ }
4079
+ },
4080
+ {
4081
+ id: "moonshotai/Kimi-K2-Instruct",
4082
+ name: "Kimi-K2-Instruct",
4083
+ match: {
4084
+ equals: "moonshotai/Kimi-K2-Instruct"
4085
+ },
4086
+ context_window: 131072,
4087
+ prices: {
4088
+ input_mtok: 0.6,
4089
+ output_mtok: 2.5
4090
+ }
4091
+ },
4092
+ {
4093
+ id: "openai/gpt-oss-120b",
4094
+ name: "gpt-oss-120b",
4095
+ match: {
4096
+ equals: "openai/gpt-oss-120b"
4097
+ },
4098
+ context_window: 131072,
4099
+ prices: {
4100
+ input_mtok: 0.15,
4101
+ output_mtok: 0.6
4102
+ }
4103
+ },
4104
+ {
4105
+ id: "openai/gpt-oss-20b",
4106
+ name: "gpt-oss-20b",
4107
+ match: {
4108
+ equals: "openai/gpt-oss-20b"
4109
+ },
4110
+ context_window: 131072,
4111
+ prices: {
4112
+ input_mtok: 0.05,
4113
+ output_mtok: 0.2
4114
+ }
4115
+ },
4116
+ {
4117
+ id: "zai-org/GLM-4.5",
4118
+ name: "GLM-4.5",
4119
+ match: {
4120
+ equals: "zai-org/GLM-4.5"
4121
+ },
4122
+ context_window: 131072,
4123
+ prices: {
4124
+ input_mtok: 0.55,
4125
+ output_mtok: 2.19
4126
+ }
4127
+ }
4128
+ ]
4129
+ },
4130
+ {
4131
+ id: "huggingface_groq",
4132
+ name: "HuggingFace (groq)",
4133
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
4134
+ api_pattern: "https://router\\.huggingface\\.co/groq",
4135
+ provider_match: {
4136
+ and: [
4137
+ {
4138
+ contains: "huggingface"
4139
+ },
4140
+ {
4141
+ contains: "groq"
4142
+ }
4143
+ ]
4144
+ },
4145
+ extractors: [
4146
+ {
4147
+ api_flavor: "chat",
4148
+ root: "usage",
4149
+ model_path: "model",
4150
+ mappings: [
4151
+ {
4152
+ path: "prompt_tokens",
4153
+ dest: "input_tokens",
4154
+ required: !0
4155
+ },
4156
+ {
4157
+ path: ["prompt_tokens_details", "cached_tokens"],
4158
+ dest: "cache_read_tokens",
4159
+ required: !1
4160
+ },
4161
+ {
4162
+ path: ["prompt_tokens_details", "audio_tokens"],
4163
+ dest: "input_audio_tokens",
4164
+ required: !1
4165
+ },
4166
+ {
4167
+ path: ["completion_tokens_details", "audio_tokens"],
4168
+ dest: "output_audio_tokens",
4169
+ required: !1
4170
+ },
4171
+ {
4172
+ path: "completion_tokens",
4173
+ dest: "output_tokens",
4174
+ required: !0
4175
+ }
4176
+ ]
4177
+ }
4178
+ ],
4179
+ models: [
4180
+ {
4181
+ id: "Qwen/Qwen3-32B",
4182
+ name: "Qwen3-32B",
4183
+ match: {
4184
+ equals: "Qwen/Qwen3-32B"
4185
+ },
4186
+ context_window: 131072,
4187
+ prices: {
4188
+ input_mtok: 0.29,
4189
+ output_mtok: 0.59
4190
+ }
4191
+ },
4192
+ {
4193
+ id: "meta-llama/Llama-3.3-70B-Instruct",
4194
+ name: "Llama-3.3-70B-Instruct",
4195
+ match: {
4196
+ equals: "meta-llama/Llama-3.3-70B-Instruct"
4197
+ },
4198
+ context_window: 131072,
4199
+ prices: {
4200
+ input_mtok: 0.59,
4201
+ output_mtok: 0.79
4202
+ }
4203
+ },
4204
+ {
4205
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct",
4206
+ name: "Llama-4-Maverick-17B-128E-Instruct",
4207
+ match: {
4208
+ equals: "meta-llama/Llama-4-Maverick-17B-128E-Instruct"
4209
+ },
4210
+ context_window: 131072,
4211
+ prices: {
4212
+ input_mtok: 0.2,
4213
+ output_mtok: 0.6
4214
+ }
4215
+ },
4216
+ {
4217
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
4218
+ name: "Llama-4-Scout-17B-16E-Instruct",
4219
+ match: {
4220
+ equals: "meta-llama/Llama-4-Scout-17B-16E-Instruct"
4221
+ },
4222
+ context_window: 131072,
4223
+ prices: {
4224
+ input_mtok: 0.11,
4225
+ output_mtok: 0.34
4226
+ }
4227
+ },
4228
+ {
4229
+ id: "meta-llama/Llama-Guard-4-12B",
4230
+ name: "Llama-Guard-4-12B",
4231
+ match: {
4232
+ equals: "meta-llama/Llama-Guard-4-12B"
4233
+ },
4234
+ context_window: 131072,
4235
+ prices: {
4236
+ input_mtok: 0.2,
4237
+ output_mtok: 0.2
4238
+ }
4239
+ },
4240
+ {
4241
+ id: "openai/gpt-oss-120b",
4242
+ name: "gpt-oss-120b",
4243
+ match: {
4244
+ equals: "openai/gpt-oss-120b"
4245
+ },
4246
+ context_window: 131072,
4247
+ prices: {
4248
+ input_mtok: 0.15,
4249
+ output_mtok: 0.75
4250
+ }
4251
+ },
4252
+ {
4253
+ id: "openai/gpt-oss-20b",
4254
+ name: "gpt-oss-20b",
4255
+ match: {
4256
+ equals: "openai/gpt-oss-20b"
4257
+ },
4258
+ context_window: 131072,
4259
+ prices: {
4260
+ input_mtok: 0.1,
4261
+ output_mtok: 0.5
4262
+ }
4263
+ }
4264
+ ]
4265
+ },
4266
+ {
4267
+ id: "huggingface_hyperbolic",
4268
+ name: "HuggingFace (hyperbolic)",
4269
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
4270
+ api_pattern: "https://router\\.huggingface\\.co/hyperbolic",
4271
+ provider_match: {
4272
+ and: [
4273
+ {
4274
+ contains: "huggingface"
4275
+ },
4276
+ {
4277
+ contains: "hyperbolic"
4278
+ }
4279
+ ]
4280
+ },
4281
+ extractors: [
4282
+ {
4283
+ api_flavor: "chat",
4284
+ root: "usage",
4285
+ model_path: "model",
4286
+ mappings: [
4287
+ {
4288
+ path: "prompt_tokens",
4289
+ dest: "input_tokens",
4290
+ required: !0
4291
+ },
4292
+ {
4293
+ path: ["prompt_tokens_details", "cached_tokens"],
4294
+ dest: "cache_read_tokens",
4295
+ required: !1
4296
+ },
4297
+ {
4298
+ path: ["prompt_tokens_details", "audio_tokens"],
4299
+ dest: "input_audio_tokens",
4300
+ required: !1
4301
+ },
4302
+ {
4303
+ path: ["completion_tokens_details", "audio_tokens"],
4304
+ dest: "output_audio_tokens",
4305
+ required: !1
4306
+ },
4307
+ {
4308
+ path: "completion_tokens",
4309
+ dest: "output_tokens",
4310
+ required: !0
4311
+ }
4312
+ ]
4313
+ }
4314
+ ],
4315
+ models: [
4316
+ {
4317
+ id: "Qwen/QwQ-32B",
4318
+ name: "QwQ-32B",
4319
+ match: {
4320
+ equals: "Qwen/QwQ-32B"
4321
+ },
4322
+ context_window: 131072,
4323
+ prices: {
4324
+ input_mtok: 0.4,
4325
+ output_mtok: 0.4
4326
+ }
4327
+ },
4328
+ {
4329
+ id: "Qwen/Qwen2.5-72B-Instruct",
4330
+ name: "Qwen2.5-72B-Instruct",
4331
+ match: {
4332
+ equals: "Qwen/Qwen2.5-72B-Instruct"
4333
+ },
4334
+ context_window: 131072,
4335
+ prices: {
4336
+ input_mtok: 0.4,
4337
+ output_mtok: 0.4
4338
+ }
4339
+ },
4340
+ {
4341
+ id: "Qwen/Qwen2.5-Coder-32B-Instruct",
4342
+ name: "Qwen2.5-Coder-32B-Instruct",
4343
+ match: {
4344
+ equals: "Qwen/Qwen2.5-Coder-32B-Instruct"
4345
+ },
4346
+ context_window: 32768,
4347
+ prices: {
4348
+ input_mtok: 0.2,
4349
+ output_mtok: 0.2
4350
+ }
4351
+ },
4352
+ {
4353
+ id: "Qwen/Qwen2.5-VL-72B-Instruct",
4354
+ name: "Qwen2.5-VL-72B-Instruct",
4355
+ match: {
4356
+ equals: "Qwen/Qwen2.5-VL-72B-Instruct"
4357
+ },
4358
+ context_window: 32768,
4359
+ prices: {
4360
+ input_mtok: 0.6,
4361
+ output_mtok: 0.6
4362
+ }
4363
+ },
4364
+ {
4365
+ id: "Qwen/Qwen2.5-VL-7B-Instruct",
4366
+ name: "Qwen2.5-VL-7B-Instruct",
4367
+ match: {
4368
+ equals: "Qwen/Qwen2.5-VL-7B-Instruct"
4369
+ },
4370
+ context_window: 32768,
4371
+ prices: {
4372
+ input_mtok: 0.2,
4373
+ output_mtok: 0.2
4374
+ }
4375
+ },
4376
+ {
4377
+ id: "Qwen/Qwen3-235B-A22B-Instruct-2507",
4378
+ name: "Qwen3-235B-A22B-Instruct-2507",
4379
+ match: {
4380
+ equals: "Qwen/Qwen3-235B-A22B-Instruct-2507"
4381
+ },
4382
+ context_window: 262144,
4383
+ prices: {
4384
+ input_mtok: 2,
4385
+ output_mtok: 2
4386
+ }
4387
+ },
4388
+ {
4389
+ id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
4390
+ name: "Qwen3-Coder-480B-A35B-Instruct",
4391
+ match: {
4392
+ equals: "Qwen/Qwen3-Coder-480B-A35B-Instruct"
4393
+ },
4394
+ context_window: 262144,
4395
+ prices: {
4396
+ input_mtok: 2,
4397
+ output_mtok: 2
4398
+ }
4399
+ },
4400
+ {
4401
+ id: "Qwen/Qwen3-Next-80B-A3B-Instruct",
4402
+ name: "Qwen3-Next-80B-A3B-Instruct",
4403
+ match: {
4404
+ equals: "Qwen/Qwen3-Next-80B-A3B-Instruct"
4405
+ },
4406
+ context_window: 262144,
4407
+ prices: {
4408
+ input_mtok: 0.3,
4409
+ output_mtok: 0.3
4410
+ }
4411
+ },
4412
+ {
4413
+ id: "Qwen/Qwen3-Next-80B-A3B-Thinking",
4414
+ name: "Qwen3-Next-80B-A3B-Thinking",
4415
+ match: {
4416
+ equals: "Qwen/Qwen3-Next-80B-A3B-Thinking"
4417
+ },
4418
+ context_window: 262144,
4419
+ prices: {
4420
+ input_mtok: 0.3,
4421
+ output_mtok: 0.3
4422
+ }
4423
+ },
4424
+ {
4425
+ id: "deepseek-ai/DeepSeek-R1",
4426
+ name: "DeepSeek-R1",
4427
+ match: {
4428
+ equals: "deepseek-ai/DeepSeek-R1"
4429
+ },
4430
+ context_window: 163840,
4431
+ prices: {
4432
+ input_mtok: 2,
4433
+ output_mtok: 2
4434
+ }
4435
+ },
4436
+ {
4437
+ id: "deepseek-ai/DeepSeek-R1-0528",
4438
+ name: "DeepSeek-R1-0528",
4439
+ match: {
4440
+ equals: "deepseek-ai/DeepSeek-R1-0528"
4441
+ },
4442
+ context_window: 163840,
4443
+ prices: {
4444
+ input_mtok: 3,
4445
+ output_mtok: 3
4446
+ }
4447
+ },
4448
+ {
4449
+ id: "deepseek-ai/DeepSeek-V3-0324",
4450
+ name: "DeepSeek-V3-0324",
4451
+ match: {
4452
+ equals: "deepseek-ai/DeepSeek-V3-0324"
4453
+ },
4454
+ context_window: 163840,
4455
+ prices: {
4456
+ input_mtok: 1.25,
4457
+ output_mtok: 1.25
4458
+ }
4459
+ },
4460
+ {
4461
+ id: "meta-llama/Llama-3.1-70B-Instruct",
4462
+ name: "Llama-3.1-70B-Instruct",
4463
+ match: {
4464
+ equals: "meta-llama/Llama-3.1-70B-Instruct"
4465
+ },
4466
+ context_window: 131072,
4467
+ prices: {
4468
+ input_mtok: 0.4,
4469
+ output_mtok: 0.4
4470
+ }
4471
+ },
4472
+ {
4473
+ id: "meta-llama/Llama-3.1-8B-Instruct",
4474
+ name: "Llama-3.1-8B-Instruct",
4475
+ match: {
4476
+ equals: "meta-llama/Llama-3.1-8B-Instruct"
4477
+ },
4478
+ context_window: 131072,
4479
+ prices: {
4480
+ input_mtok: 0.1,
4481
+ output_mtok: 0.1
4482
+ }
4483
+ },
4484
+ {
4485
+ id: "meta-llama/Llama-3.2-3B-Instruct",
4486
+ name: "Llama-3.2-3B-Instruct",
4487
+ match: {
4488
+ equals: "meta-llama/Llama-3.2-3B-Instruct"
4489
+ },
4490
+ context_window: 131072,
4491
+ prices: {
4492
+ input_mtok: 0.1,
4493
+ output_mtok: 0.1
4494
+ }
4495
+ },
4496
+ {
4497
+ id: "meta-llama/Llama-3.3-70B-Instruct",
4498
+ name: "Llama-3.3-70B-Instruct",
4499
+ match: {
4500
+ equals: "meta-llama/Llama-3.3-70B-Instruct"
4501
+ },
4502
+ context_window: 131072,
4503
+ prices: {
4504
+ input_mtok: 0.4,
4505
+ output_mtok: 0.4
4506
+ }
4507
+ },
4508
+ {
4509
+ id: "meta-llama/Meta-Llama-3-70B-Instruct",
4510
+ name: "Meta-Llama-3-70B-Instruct",
4511
+ match: {
4512
+ equals: "meta-llama/Meta-Llama-3-70B-Instruct"
4513
+ },
4514
+ context_window: 8192,
4515
+ prices: {
4516
+ input_mtok: 0.4,
4517
+ output_mtok: 0.4
4518
+ }
4519
+ },
4520
+ {
4521
+ id: "openai/gpt-oss-120b",
4522
+ name: "gpt-oss-120b",
4523
+ match: {
4524
+ equals: "openai/gpt-oss-120b"
4525
+ },
4526
+ context_window: 131072,
4527
+ prices: {
4528
+ input_mtok: 0.3,
4529
+ output_mtok: 0.3
4530
+ }
4531
+ },
4532
+ {
4533
+ id: "openai/gpt-oss-20b",
4534
+ name: "gpt-oss-20b",
4535
+ match: {
4536
+ equals: "openai/gpt-oss-20b"
4537
+ },
4538
+ context_window: 131072,
4539
+ prices: {
4540
+ input_mtok: 0.1,
4541
+ output_mtok: 0.1
4542
+ }
4543
+ }
4544
+ ]
4545
+ },
4546
+ {
4547
+ id: "huggingface_nebius",
4548
+ name: "HuggingFace (nebius)",
4549
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
4550
+ api_pattern: "https://router\\.huggingface\\.co/nebius",
4551
+ provider_match: {
4552
+ and: [
4553
+ {
4554
+ contains: "huggingface"
4555
+ },
4556
+ {
4557
+ contains: "nebius"
4558
+ }
4559
+ ]
4560
+ },
4561
+ extractors: [
4562
+ {
4563
+ api_flavor: "chat",
4564
+ root: "usage",
4565
+ model_path: "model",
4566
+ mappings: [
4567
+ {
4568
+ path: "prompt_tokens",
4569
+ dest: "input_tokens",
4570
+ required: !0
4571
+ },
4572
+ {
4573
+ path: ["prompt_tokens_details", "cached_tokens"],
4574
+ dest: "cache_read_tokens",
4575
+ required: !1
4576
+ },
4577
+ {
4578
+ path: ["prompt_tokens_details", "audio_tokens"],
4579
+ dest: "input_audio_tokens",
4580
+ required: !1
4581
+ },
4582
+ {
4583
+ path: ["completion_tokens_details", "audio_tokens"],
4584
+ dest: "output_audio_tokens",
4585
+ required: !1
4586
+ },
4587
+ {
4588
+ path: "completion_tokens",
4589
+ dest: "output_tokens",
4590
+ required: !0
4591
+ }
4592
+ ]
4593
+ }
4594
+ ],
4595
+ models: [
4596
+ {
4597
+ id: "NousResearch/Hermes-4-405B",
4598
+ name: "Hermes-4-405B",
4599
+ match: {
4600
+ equals: "NousResearch/Hermes-4-405B"
4601
+ },
4602
+ context_window: 131072,
4603
+ prices: {
4604
+ input_mtok: 1,
4605
+ output_mtok: 3
4606
+ }
4607
+ },
4608
+ {
4609
+ id: "NousResearch/Hermes-4-70B",
4610
+ name: "Hermes-4-70B",
4611
+ match: {
4612
+ equals: "NousResearch/Hermes-4-70B"
4613
+ },
4614
+ context_window: 131072,
4615
+ prices: {
4616
+ input_mtok: 0.13,
4617
+ output_mtok: 0.4
4618
+ }
4619
+ },
4620
+ {
4621
+ id: "Qwen/Qwen2.5-Coder-7B",
4622
+ name: "Qwen2.5-Coder-7B",
4623
+ match: {
4624
+ equals: "Qwen/Qwen2.5-Coder-7B"
4625
+ },
4626
+ context_window: 32768,
4627
+ prices: {
4628
+ input_mtok: 0.03,
4629
+ output_mtok: 0.09
4630
+ }
4631
+ },
4632
+ {
4633
+ id: "Qwen/Qwen2.5-VL-72B-Instruct",
4634
+ name: "Qwen2.5-VL-72B-Instruct",
4635
+ match: {
4636
+ equals: "Qwen/Qwen2.5-VL-72B-Instruct"
4637
+ },
4638
+ context_window: 32e3,
4639
+ prices: {
4640
+ input_mtok: 0.25,
4641
+ output_mtok: 0.75
4642
+ }
4643
+ },
4644
+ {
4645
+ id: "Qwen/Qwen3-235B-A22B-Instruct-2507",
4646
+ name: "Qwen3-235B-A22B-Instruct-2507",
4647
+ match: {
4648
+ equals: "Qwen/Qwen3-235B-A22B-Instruct-2507"
4649
+ },
4650
+ context_window: 262144,
4651
+ prices: {
4652
+ input_mtok: 0.2,
4653
+ output_mtok: 0.6
4654
+ }
4655
+ },
4656
+ {
4657
+ id: "Qwen/Qwen3-30B-A3B-Instruct-2507",
4658
+ name: "Qwen3-30B-A3B-Instruct-2507",
4659
+ match: {
4660
+ equals: "Qwen/Qwen3-30B-A3B-Instruct-2507"
4661
+ },
4662
+ context_window: 262144,
4663
+ prices: {
4664
+ input_mtok: 0.1,
4665
+ output_mtok: 0.3
4666
+ }
4667
+ },
4668
+ {
4669
+ id: "Qwen/Qwen3-30B-A3B-Thinking-2507",
4670
+ name: "Qwen3-30B-A3B-Thinking-2507",
4671
+ match: {
4672
+ equals: "Qwen/Qwen3-30B-A3B-Thinking-2507"
4673
+ },
4674
+ context_window: 262144,
4675
+ prices: {
4676
+ input_mtok: 0.1,
4677
+ output_mtok: 0.3
4678
+ }
4679
+ },
4680
+ {
4681
+ id: "Qwen/Qwen3-32B",
4682
+ name: "Qwen3-32B",
4683
+ match: {
4684
+ equals: "Qwen/Qwen3-32B"
4685
+ },
4686
+ context_window: 40960,
4687
+ prices: {
4688
+ input_mtok: 0.1,
4689
+ output_mtok: 0.3
4690
+ }
4691
+ },
4692
+ {
4693
+ id: "Qwen/Qwen3-Coder-30B-A3B-Instruct",
4694
+ name: "Qwen3-Coder-30B-A3B-Instruct",
4695
+ match: {
4696
+ equals: "Qwen/Qwen3-Coder-30B-A3B-Instruct"
4697
+ },
4698
+ context_window: 262144,
4699
+ prices: {
4700
+ input_mtok: 0.1,
4701
+ output_mtok: 0.3
4702
+ }
4703
+ },
4704
+ {
4705
+ id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
4706
+ name: "Qwen3-Coder-480B-A35B-Instruct",
4707
+ match: {
4708
+ equals: "Qwen/Qwen3-Coder-480B-A35B-Instruct"
4709
+ },
4710
+ context_window: 262144,
4711
+ prices: {
4712
+ input_mtok: 0.4,
4713
+ output_mtok: 1.8
4714
+ }
4715
+ },
4716
+ {
4717
+ id: "deepseek-ai/DeepSeek-R1-0528",
4718
+ name: "DeepSeek-R1-0528",
4719
+ match: {
4720
+ equals: "deepseek-ai/DeepSeek-R1-0528"
4721
+ },
4722
+ context_window: 163840,
4723
+ prices: {
4724
+ input_mtok: 0.8,
4725
+ output_mtok: 2.4
4726
+ }
4727
+ },
4728
+ {
4729
+ id: "deepseek-ai/DeepSeek-V3-0324",
4730
+ name: "DeepSeek-V3-0324",
4731
+ match: {
4732
+ equals: "deepseek-ai/DeepSeek-V3-0324"
4733
+ },
4734
+ context_window: 32768,
4735
+ prices: {
4736
+ input_mtok: 0.75,
4737
+ output_mtok: 2.25
4738
+ }
4739
+ },
4740
+ {
4741
+ id: "google/gemma-2-2b-it",
4742
+ name: "gemma-2-2b-it",
4743
+ match: {
4744
+ equals: "google/gemma-2-2b-it"
4745
+ },
4746
+ context_window: 8192,
4747
+ prices: {
4748
+ input_mtok: 0.02,
4749
+ output_mtok: 0.06
4750
+ }
4751
+ },
4752
+ {
4753
+ id: "google/gemma-2-9b-it",
4754
+ name: "gemma-2-9b-it",
4755
+ match: {
4756
+ equals: "google/gemma-2-9b-it"
4757
+ },
4758
+ context_window: 8192,
4759
+ prices: {
4760
+ input_mtok: 0.03,
4761
+ output_mtok: 0.09
4762
+ }
4763
+ },
4764
+ {
4765
+ id: "google/gemma-3-27b-it",
4766
+ name: "gemma-3-27b-it",
4767
+ match: {
4768
+ equals: "google/gemma-3-27b-it"
4769
+ },
4770
+ context_window: 11e4,
4771
+ prices: {
4772
+ input_mtok: 0.2,
4773
+ output_mtok: 0.6
4774
+ }
4775
+ },
4776
+ {
4777
+ id: "meta-llama/Llama-3.1-8B-Instruct",
4778
+ name: "Llama-3.1-8B-Instruct",
4779
+ match: {
4780
+ equals: "meta-llama/Llama-3.1-8B-Instruct"
4781
+ },
4782
+ context_window: 131072,
4783
+ prices: {
4784
+ input_mtok: 0.03,
4785
+ output_mtok: 0.09
4786
+ }
4787
+ },
4788
+ {
4789
+ id: "meta-llama/Llama-3.3-70B-Instruct",
4790
+ name: "Llama-3.3-70B-Instruct",
4791
+ match: {
4792
+ equals: "meta-llama/Llama-3.3-70B-Instruct"
4793
+ },
4794
+ context_window: 131072,
4795
+ prices: {
4796
+ input_mtok: 0.25,
4797
+ output_mtok: 0.75
4798
+ }
4799
+ },
4800
+ {
4801
+ id: "moonshotai/Kimi-K2-Instruct",
4802
+ name: "Kimi-K2-Instruct",
4803
+ match: {
4804
+ equals: "moonshotai/Kimi-K2-Instruct"
4805
+ },
4806
+ context_window: 131072,
4807
+ prices: {
4808
+ input_mtok: 0.5,
4809
+ output_mtok: 2.4
4810
+ }
4811
+ },
4812
+ {
4813
+ id: "nvidia/Llama-3_1-Nemotron-Ultra-253B-v1",
4814
+ name: "Llama-3_1-Nemotron-Ultra-253B-v1",
4815
+ match: {
4816
+ equals: "nvidia/Llama-3_1-Nemotron-Ultra-253B-v1"
4817
+ },
4818
+ context_window: 131072,
4819
+ prices: {
4820
+ input_mtok: 0.6,
4821
+ output_mtok: 1.8
4822
+ }
4823
+ },
4824
+ {
4825
+ id: "nvidia/NVIDIA-Nemotron-Nano-12B-v2",
4826
+ name: "NVIDIA-Nemotron-Nano-12B-v2",
4827
+ match: {
4828
+ equals: "nvidia/NVIDIA-Nemotron-Nano-12B-v2"
4829
+ },
4830
+ context_window: 131072,
4831
+ prices: {
4832
+ input_mtok: 0.07,
4833
+ output_mtok: 0.2
4834
+ }
4835
+ },
4836
+ {
4837
+ id: "openai/gpt-oss-120b",
4838
+ name: "gpt-oss-120b",
4839
+ match: {
4840
+ equals: "openai/gpt-oss-120b"
4841
+ },
4842
+ context_window: 131072,
4843
+ prices: {
4844
+ input_mtok: 0.15,
4845
+ output_mtok: 0.6
4846
+ }
4847
+ },
4848
+ {
4849
+ id: "openai/gpt-oss-20b",
4850
+ name: "gpt-oss-20b",
4851
+ match: {
4852
+ equals: "openai/gpt-oss-20b"
4853
+ },
4854
+ context_window: 131072,
4855
+ prices: {
4856
+ input_mtok: 0.05,
4857
+ output_mtok: 0.2
4858
+ }
4859
+ },
4860
+ {
4861
+ id: "zai-org/GLM-4.5",
4862
+ name: "GLM-4.5",
4863
+ match: {
4864
+ equals: "zai-org/GLM-4.5"
4865
+ },
4866
+ context_window: 131072,
4867
+ prices: {
4868
+ input_mtok: 0.6,
4869
+ output_mtok: 2.2
4870
+ }
4871
+ },
4872
+ {
4873
+ id: "zai-org/GLM-4.5-Air",
4874
+ name: "GLM-4.5-Air",
4875
+ match: {
4876
+ equals: "zai-org/GLM-4.5-Air"
4877
+ },
4878
+ context_window: 131072,
4879
+ prices: {
4880
+ input_mtok: 0.2,
4881
+ output_mtok: 1.2
4882
+ }
4883
+ }
4884
+ ]
4885
+ },
4886
+ {
4887
+ id: "huggingface_novita",
4888
+ name: "HuggingFace (novita)",
4889
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
4890
+ api_pattern: "https://router\\.huggingface\\.co/novita",
4891
+ provider_match: {
4892
+ and: [
4893
+ {
4894
+ contains: "huggingface"
4895
+ },
4896
+ {
4897
+ contains: "novita"
4898
+ }
4899
+ ]
4900
+ },
4901
+ extractors: [
4902
+ {
4903
+ api_flavor: "chat",
4904
+ root: "usage",
4905
+ model_path: "model",
4906
+ mappings: [
4907
+ {
4908
+ path: "prompt_tokens",
4909
+ dest: "input_tokens",
4910
+ required: !0
4911
+ },
4912
+ {
4913
+ path: ["prompt_tokens_details", "cached_tokens"],
4914
+ dest: "cache_read_tokens",
4915
+ required: !1
4916
+ },
4917
+ {
4918
+ path: ["prompt_tokens_details", "audio_tokens"],
4919
+ dest: "input_audio_tokens",
4920
+ required: !1
4921
+ },
4922
+ {
4923
+ path: ["completion_tokens_details", "audio_tokens"],
4924
+ dest: "output_audio_tokens",
4925
+ required: !1
4926
+ },
4927
+ {
4928
+ path: "completion_tokens",
4929
+ dest: "output_tokens",
4930
+ required: !0
4931
+ }
4932
+ ]
4933
+ }
4934
+ ],
4935
+ models: [
4936
+ {
4937
+ id: "MiniMaxAI/MiniMax-M1-80k",
4938
+ name: "MiniMax-M1-80k",
4939
+ match: {
4940
+ equals: "MiniMaxAI/MiniMax-M1-80k"
4941
+ },
4942
+ context_window: 1e6,
4943
+ prices: {
4944
+ input_mtok: 0.44,
4945
+ output_mtok: 1.76
4946
+ }
4947
+ },
4948
+ {
4949
+ id: "MiniMaxAI/MiniMax-M2",
4950
+ name: "MiniMax-M2",
4951
+ match: {
4952
+ equals: "MiniMaxAI/MiniMax-M2"
4953
+ },
4954
+ context_window: 204800,
4955
+ prices: {
4956
+ input_mtok: 0.24,
4957
+ output_mtok: 0.96
4958
+ }
4959
+ },
4960
+ {
4961
+ id: "NousResearch/Hermes-2-Pro-Llama-3-8B",
4962
+ name: "Hermes-2-Pro-Llama-3-8B",
4963
+ match: {
4964
+ equals: "NousResearch/Hermes-2-Pro-Llama-3-8B"
4965
+ },
4966
+ context_window: 8192,
4967
+ prices: {
4968
+ input_mtok: 0.14,
4969
+ output_mtok: 0.14
4970
+ }
4971
+ },
4972
+ {
4973
+ id: "Qwen/Qwen2.5-72B-Instruct",
4974
+ name: "Qwen2.5-72B-Instruct",
4975
+ match: {
4976
+ equals: "Qwen/Qwen2.5-72B-Instruct"
4977
+ },
4978
+ context_window: 32e3,
4979
+ prices: {
4980
+ input_mtok: 0.304,
4981
+ output_mtok: 0.32
4982
+ }
4983
+ },
4984
+ {
4985
+ id: "Qwen/Qwen3-235B-A22B",
4986
+ name: "Qwen3-235B-A22B",
4987
+ match: {
4988
+ equals: "Qwen/Qwen3-235B-A22B"
4989
+ },
4990
+ context_window: 40960,
4991
+ prices: {
4992
+ input_mtok: 0.16,
4993
+ output_mtok: 0.64
4994
+ }
4995
+ },
4996
+ {
4997
+ id: "Qwen/Qwen3-235B-A22B-Instruct-2507",
4998
+ name: "Qwen3-235B-A22B-Instruct-2507",
4999
+ match: {
5000
+ equals: "Qwen/Qwen3-235B-A22B-Instruct-2507"
5001
+ },
5002
+ context_window: 131072,
5003
+ prices: {
5004
+ input_mtok: 0.072,
5005
+ output_mtok: 0.464
5006
+ }
5007
+ },
5008
+ {
5009
+ id: "Qwen/Qwen3-235B-A22B-Thinking-2507",
5010
+ name: "Qwen3-235B-A22B-Thinking-2507",
5011
+ match: {
5012
+ equals: "Qwen/Qwen3-235B-A22B-Thinking-2507"
5013
+ },
5014
+ context_window: 131072,
5015
+ prices: {
5016
+ input_mtok: 0.24,
5017
+ output_mtok: 2.4
5018
+ }
5019
+ },
5020
+ {
5021
+ id: "Qwen/Qwen3-30B-A3B",
5022
+ name: "Qwen3-30B-A3B",
5023
+ match: {
5024
+ equals: "Qwen/Qwen3-30B-A3B"
5025
+ },
5026
+ context_window: 40960,
5027
+ prices: {
5028
+ input_mtok: 0.072,
5029
+ output_mtok: 0.36
5030
+ }
5031
+ },
5032
+ {
5033
+ id: "Qwen/Qwen3-32B",
5034
+ name: "Qwen3-32B",
5035
+ match: {
5036
+ equals: "Qwen/Qwen3-32B"
5037
+ },
5038
+ context_window: 40960,
5039
+ prices: {
5040
+ input_mtok: 0.08,
5041
+ output_mtok: 0.36
5042
+ }
5043
+ },
5044
+ {
5045
+ id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
5046
+ name: "Qwen3-Coder-480B-A35B-Instruct",
5047
+ match: {
5048
+ equals: "Qwen/Qwen3-Coder-480B-A35B-Instruct"
5049
+ },
5050
+ context_window: 262144,
5051
+ prices: {
5052
+ input_mtok: 0.232,
5053
+ output_mtok: 0.96
5054
+ }
5055
+ },
5056
+ {
5057
+ id: "Qwen/Qwen3-Next-80B-A3B-Instruct",
5058
+ name: "Qwen3-Next-80B-A3B-Instruct",
5059
+ match: {
5060
+ equals: "Qwen/Qwen3-Next-80B-A3B-Instruct"
5061
+ },
5062
+ context_window: 131072,
5063
+ prices: {
5064
+ input_mtok: 0.12,
5065
+ output_mtok: 1.2
5066
+ }
5067
+ },
5068
+ {
5069
+ id: "Qwen/Qwen3-Next-80B-A3B-Thinking",
5070
+ name: "Qwen3-Next-80B-A3B-Thinking",
5071
+ match: {
5072
+ equals: "Qwen/Qwen3-Next-80B-A3B-Thinking"
5073
+ },
5074
+ context_window: 131072,
5075
+ prices: {
5076
+ input_mtok: 0.12,
5077
+ output_mtok: 1.2
5078
+ }
5079
+ },
5080
+ {
5081
+ id: "Qwen/Qwen3-VL-235B-A22B-Instruct",
5082
+ name: "Qwen3-VL-235B-A22B-Instruct",
5083
+ match: {
5084
+ equals: "Qwen/Qwen3-VL-235B-A22B-Instruct"
5085
+ },
5086
+ context_window: 131072,
5087
+ prices: {
5088
+ input_mtok: 0.24,
5089
+ output_mtok: 1.2
5090
+ }
5091
+ },
5092
+ {
5093
+ id: "Qwen/Qwen3-VL-235B-A22B-Thinking",
5094
+ name: "Qwen3-VL-235B-A22B-Thinking",
5095
+ match: {
5096
+ equals: "Qwen/Qwen3-VL-235B-A22B-Thinking"
5097
+ },
5098
+ context_window: 131072,
5099
+ prices: {
5100
+ input_mtok: 0.784,
5101
+ output_mtok: 3.16
5102
+ }
5103
+ },
5104
+ {
5105
+ id: "Qwen/Qwen3-VL-30B-A3B-Instruct",
5106
+ name: "Qwen3-VL-30B-A3B-Instruct",
5107
+ match: {
5108
+ equals: "Qwen/Qwen3-VL-30B-A3B-Instruct"
5109
+ },
5110
+ context_window: 131072,
5111
+ prices: {
5112
+ input_mtok: 0.16,
5113
+ output_mtok: 0.56
5114
+ }
5115
+ },
5116
+ {
5117
+ id: "Qwen/Qwen3-VL-30B-A3B-Thinking",
5118
+ name: "Qwen3-VL-30B-A3B-Thinking",
5119
+ match: {
5120
+ equals: "Qwen/Qwen3-VL-30B-A3B-Thinking"
5121
+ },
5122
+ context_window: 131072,
5123
+ prices: {
5124
+ input_mtok: 0.16,
5125
+ output_mtok: 0.8
5126
+ }
5127
+ },
5128
+ {
5129
+ id: "Qwen/Qwen3-VL-8B-Instruct",
5130
+ name: "Qwen3-VL-8B-Instruct",
5131
+ match: {
5132
+ equals: "Qwen/Qwen3-VL-8B-Instruct"
5133
+ },
5134
+ context_window: 131072,
5135
+ prices: {
5136
+ input_mtok: 0.064,
5137
+ output_mtok: 0.4
5138
+ }
5139
+ },
5140
+ {
5141
+ id: "Sao10K/L3-70B-Euryale-v2.1",
5142
+ name: "L3-70B-Euryale-v2.1",
5143
+ match: {
5144
+ equals: "Sao10K/L3-70B-Euryale-v2.1"
5145
+ },
5146
+ context_window: 8192,
5147
+ prices: {
5148
+ input_mtok: 1.48,
5149
+ output_mtok: 1.48
5150
+ }
5151
+ },
5152
+ {
5153
+ id: "Sao10K/L3-8B-Lunaris-v1",
5154
+ name: "L3-8B-Lunaris-v1",
5155
+ match: {
5156
+ equals: "Sao10K/L3-8B-Lunaris-v1"
5157
+ },
5158
+ context_window: 8192,
5159
+ prices: {
5160
+ input_mtok: 0.05,
5161
+ output_mtok: 0.05
5162
+ }
5163
+ },
5164
+ {
5165
+ id: "Sao10K/L3-8B-Stheno-v3.2",
5166
+ name: "L3-8B-Stheno-v3.2",
5167
+ match: {
5168
+ equals: "Sao10K/L3-8B-Stheno-v3.2"
5169
+ },
5170
+ context_window: 8192,
5171
+ prices: {
5172
+ input_mtok: 0.05,
5173
+ output_mtok: 0.05
5174
+ }
5175
+ },
5176
+ {
5177
+ id: "alpindale/WizardLM-2-8x22B",
5178
+ name: "WizardLM-2-8x22B",
5179
+ match: {
5180
+ equals: "alpindale/WizardLM-2-8x22B"
5181
+ },
5182
+ context_window: 65535,
5183
+ prices: {
5184
+ input_mtok: 0.496,
5185
+ output_mtok: 0.496
5186
+ }
5187
+ },
5188
+ {
5189
+ id: "baichuan-inc/Baichuan-M2-32B",
5190
+ name: "Baichuan-M2-32B",
5191
+ match: {
5192
+ equals: "baichuan-inc/Baichuan-M2-32B"
5193
+ },
5194
+ context_window: 131072,
5195
+ prices: {
5196
+ input_mtok: 0.056,
5197
+ output_mtok: 0.056
5198
+ }
5199
+ },
5200
+ {
5201
+ id: "baidu/ERNIE-4.5-21B-A3B-PT",
5202
+ name: "ERNIE-4.5-21B-A3B-PT",
5203
+ match: {
5204
+ equals: "baidu/ERNIE-4.5-21B-A3B-PT"
5205
+ },
5206
+ context_window: 12e4,
5207
+ prices: {
5208
+ input_mtok: 0.056,
5209
+ output_mtok: 0.224
5210
+ }
5211
+ },
5212
+ {
5213
+ id: "baidu/ERNIE-4.5-300B-A47B-Base-PT",
5214
+ name: "ERNIE-4.5-300B-A47B-Base-PT",
5215
+ match: {
5216
+ equals: "baidu/ERNIE-4.5-300B-A47B-Base-PT"
5217
+ },
5218
+ context_window: 123e3,
5219
+ prices: {
5220
+ input_mtok: 0.224,
5221
+ output_mtok: 0.88
5222
+ }
5223
+ },
5224
+ {
5225
+ id: "baidu/ERNIE-4.5-VL-28B-A3B-PT",
5226
+ name: "ERNIE-4.5-VL-28B-A3B-PT",
5227
+ match: {
5228
+ equals: "baidu/ERNIE-4.5-VL-28B-A3B-PT"
5229
+ },
5230
+ context_window: 3e4,
5231
+ prices: {
5232
+ input_mtok: 0.112,
5233
+ output_mtok: 0.448
5234
+ }
5235
+ },
5236
+ {
5237
+ id: "baidu/ERNIE-4.5-VL-424B-A47B-Base-PT",
5238
+ name: "ERNIE-4.5-VL-424B-A47B-Base-PT",
5239
+ match: {
5240
+ equals: "baidu/ERNIE-4.5-VL-424B-A47B-Base-PT"
5241
+ },
5242
+ context_window: 123e3,
5243
+ prices: {
5244
+ input_mtok: 0.336,
5245
+ output_mtok: 1
5246
+ }
5247
+ },
5248
+ {
5249
+ id: "deepseek-ai/DeepSeek-Prover-V2-671B",
5250
+ name: "DeepSeek-Prover-V2-671B",
5251
+ match: {
5252
+ equals: "deepseek-ai/DeepSeek-Prover-V2-671B"
5253
+ },
5254
+ context_window: 16e4,
5255
+ prices: {
5256
+ input_mtok: 0.56,
5257
+ output_mtok: 2
5258
+ }
5259
+ },
5260
+ {
5261
+ id: "deepseek-ai/DeepSeek-R1",
5262
+ name: "DeepSeek-R1",
5263
+ match: {
5264
+ or: [
5265
+ {
5266
+ equals: "deepseek-ai/DeepSeek-R1"
5267
+ },
5268
+ {
5269
+ equals: "deepseek-ai/DeepSeek-R1-0528"
5270
+ }
5271
+ ]
5272
+ },
5273
+ context_window: 64e3,
5274
+ prices: {
5275
+ input_mtok: 0.56,
5276
+ output_mtok: 2
5277
+ }
5278
+ },
5279
+ {
5280
+ id: "deepseek-ai/DeepSeek-R1-0528-Qwen3-8B",
5281
+ name: "DeepSeek-R1-0528-Qwen3-8B",
5282
+ match: {
5283
+ equals: "deepseek-ai/DeepSeek-R1-0528-Qwen3-8B"
5284
+ },
5285
+ context_window: 128e3,
5286
+ prices: {
5287
+ input_mtok: 0.06,
5288
+ output_mtok: 0.09
5289
+ }
5290
+ },
5291
+ {
5292
+ id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
5293
+ name: "DeepSeek-R1-Distill-Llama-70B",
5294
+ match: {
5295
+ equals: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B"
5296
+ },
5297
+ context_window: 8192,
5298
+ prices: {
5299
+ input_mtok: 0.64,
5300
+ output_mtok: 0.64
5301
+ }
5302
+ },
5303
+ {
5304
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B",
5305
+ name: "DeepSeek-R1-Distill-Qwen-14B",
5306
+ match: {
5307
+ equals: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B"
5308
+ },
5309
+ context_window: 32768,
5310
+ prices: {
5311
+ input_mtok: 0.15,
5312
+ output_mtok: 0.15
5313
+ }
5314
+ },
5315
+ {
5316
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
5317
+ name: "DeepSeek-R1-Distill-Qwen-32B",
5318
+ match: {
5319
+ equals: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B"
5320
+ },
5321
+ context_window: 64e3,
5322
+ prices: {
5323
+ input_mtok: 0.24,
5324
+ output_mtok: 0.24
5325
+ }
5326
+ },
5327
+ {
5328
+ id: "deepseek-ai/DeepSeek-V3",
5329
+ name: "DeepSeek-V3",
5330
+ match: {
5331
+ equals: "deepseek-ai/DeepSeek-V3"
5332
+ },
5333
+ context_window: 64e3,
5334
+ prices: {
5335
+ input_mtok: 0.32,
5336
+ output_mtok: 1.04
5337
+ }
5338
+ },
5339
+ {
5340
+ id: "deepseek-ai/DeepSeek-V3-0324",
5341
+ name: "DeepSeek-V3-0324",
5342
+ match: {
5343
+ equals: "deepseek-ai/DeepSeek-V3-0324"
5344
+ },
5345
+ context_window: 163840,
5346
+ prices: {
5347
+ input_mtok: 0.216,
5348
+ output_mtok: 0.896
5349
+ }
5350
+ },
5351
+ {
5352
+ id: "deepseek-ai/DeepSeek-V3.1",
5353
+ name: "DeepSeek-V3.1",
5354
+ match: {
5355
+ or: [
5356
+ {
5357
+ equals: "deepseek-ai/DeepSeek-V3.1"
5358
+ },
5359
+ {
5360
+ equals: "deepseek-ai/DeepSeek-V3.1-Terminus"
5361
+ }
5362
+ ]
5363
+ },
5364
+ context_window: 131072,
5365
+ prices: {
5366
+ input_mtok: 0.216,
5367
+ output_mtok: 0.8
5368
+ }
5369
+ },
5370
+ {
5371
+ id: "deepseek-ai/DeepSeek-V3.2-Exp",
5372
+ name: "DeepSeek-V3.2-Exp",
5373
+ match: {
5374
+ equals: "deepseek-ai/DeepSeek-V3.2-Exp"
5375
+ },
5376
+ context_window: 163840,
5377
+ prices: {
5378
+ input_mtok: 0.216,
5379
+ output_mtok: 0.328
5380
+ }
5381
+ },
5382
+ {
5383
+ id: "meta-llama/Llama-3.1-8B-Instruct",
5384
+ name: "Llama-3.1-8B-Instruct",
5385
+ match: {
5386
+ equals: "meta-llama/Llama-3.1-8B-Instruct"
5387
+ },
5388
+ context_window: 16384,
5389
+ prices: {
5390
+ input_mtok: 0.02,
5391
+ output_mtok: 0.05
5392
+ }
5393
+ },
5394
+ {
5395
+ id: "meta-llama/Llama-3.2-3B-Instruct",
5396
+ name: "Llama-3.2-3B-Instruct",
5397
+ match: {
5398
+ equals: "meta-llama/Llama-3.2-3B-Instruct"
5399
+ },
5400
+ context_window: 32768,
5401
+ prices: {
5402
+ input_mtok: 0.024,
5403
+ output_mtok: 0.04
5404
+ }
5405
+ },
5406
+ {
5407
+ id: "meta-llama/Llama-3.3-70B-Instruct",
5408
+ name: "Llama-3.3-70B-Instruct",
5409
+ match: {
5410
+ equals: "meta-llama/Llama-3.3-70B-Instruct"
5411
+ },
5412
+ context_window: 131072,
5413
+ prices: {
5414
+ input_mtok: 0.104,
5415
+ output_mtok: 0.312
5416
+ }
5417
+ },
5418
+ {
5419
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
5420
+ name: "Llama-4-Maverick-17B-128E-Instruct-FP8",
5421
+ match: {
5422
+ equals: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8"
5423
+ },
5424
+ context_window: 1048576,
5425
+ prices: {
5426
+ input_mtok: 0.136,
5427
+ output_mtok: 0.68
5428
+ }
5429
+ },
5430
+ {
5431
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
5432
+ name: "Llama-4-Scout-17B-16E-Instruct",
5433
+ match: {
5434
+ equals: "meta-llama/Llama-4-Scout-17B-16E-Instruct"
5435
+ },
5436
+ context_window: 131072,
5437
+ prices: {
5438
+ input_mtok: 0.08,
5439
+ output_mtok: 0.4
5440
+ }
5441
+ },
5442
+ {
5443
+ id: "meta-llama/Meta-Llama-3-70B-Instruct",
5444
+ name: "Meta-Llama-3-70B-Instruct",
5445
+ match: {
5446
+ equals: "meta-llama/Meta-Llama-3-70B-Instruct"
5447
+ },
5448
+ context_window: 8192,
5449
+ prices: {
5450
+ input_mtok: 0.51,
5451
+ output_mtok: 0.74
5452
+ }
5453
+ },
5454
+ {
5455
+ id: "meta-llama/Meta-Llama-3-8B-Instruct",
5456
+ name: "Meta-Llama-3-8B-Instruct",
5457
+ match: {
5458
+ equals: "meta-llama/Meta-Llama-3-8B-Instruct"
5459
+ },
5460
+ context_window: 8192,
5461
+ prices: {
5462
+ input_mtok: 0.032,
5463
+ output_mtok: 0.032
5464
+ }
5465
+ },
5466
+ {
5467
+ id: "moonshotai/Kimi-K2-Instruct",
5468
+ name: "Kimi-K2-Instruct",
5469
+ match: {
5470
+ equals: "moonshotai/Kimi-K2-Instruct"
5471
+ },
5472
+ context_window: 131072,
5473
+ prices: {
5474
+ input_mtok: 0.456,
5475
+ output_mtok: 1.84
5476
+ }
5477
+ },
5478
+ {
5479
+ id: "moonshotai/Kimi-K2-Instruct-0905",
5480
+ name: "Kimi-K2-Instruct-0905",
5481
+ match: {
5482
+ equals: "moonshotai/Kimi-K2-Instruct-0905"
5483
+ },
5484
+ context_window: 262144,
5485
+ prices: {
5486
+ input_mtok: 0.48,
5487
+ output_mtok: 2
5488
+ }
5489
+ },
5490
+ {
5491
+ id: "moonshotai/Kimi-K2-Thinking",
5492
+ name: "Kimi-K2-Thinking",
5493
+ match: {
5494
+ equals: "moonshotai/Kimi-K2-Thinking"
5495
+ },
5496
+ context_window: 262144,
5497
+ prices: {
5498
+ input_mtok: 0.48,
5499
+ output_mtok: 2
5500
+ }
5501
+ },
5502
+ {
5503
+ id: "openai/gpt-oss-120b",
5504
+ name: "gpt-oss-120b",
5505
+ match: {
5506
+ equals: "openai/gpt-oss-120b"
5507
+ },
5508
+ context_window: 131072,
5509
+ prices: {
5510
+ input_mtok: 0.04,
5511
+ output_mtok: 0.2
5512
+ }
5513
+ },
5514
+ {
5515
+ id: "openai/gpt-oss-20b",
5516
+ name: "gpt-oss-20b",
5517
+ match: {
5518
+ equals: "openai/gpt-oss-20b"
5519
+ },
5520
+ context_window: 131072,
5521
+ prices: {
5522
+ input_mtok: 0.032,
5523
+ output_mtok: 0.12
5524
+ }
5525
+ },
5526
+ {
5527
+ id: "zai-org/GLM-4-32B-0414",
5528
+ name: "GLM-4-32B-0414",
5529
+ match: {
5530
+ equals: "zai-org/GLM-4-32B-0414"
5531
+ },
5532
+ context_window: 32e3,
5533
+ prices: {
5534
+ input_mtok: 0.55,
5535
+ output_mtok: 1.66
5536
+ }
5537
+ },
5538
+ {
5539
+ id: "zai-org/GLM-4.1V-9B-Thinking",
5540
+ name: "GLM-4.1V-9B-Thinking",
5541
+ match: {
5542
+ equals: "zai-org/GLM-4.1V-9B-Thinking"
5543
+ },
5544
+ context_window: 65536,
5545
+ prices: {
5546
+ input_mtok: 0.028,
5547
+ output_mtok: 0.1104
5548
+ }
5549
+ },
5550
+ {
5551
+ id: "zai-org/GLM-4.5",
5552
+ name: "GLM-4.5",
5553
+ match: {
5554
+ equals: "zai-org/GLM-4.5"
5555
+ },
5556
+ context_window: 131072,
5557
+ prices: {
5558
+ input_mtok: 0.48,
5559
+ output_mtok: 1.76
5560
+ }
5561
+ },
5562
+ {
5563
+ id: "zai-org/GLM-4.5-Air",
5564
+ name: "GLM-4.5-Air",
5565
+ match: {
5566
+ equals: "zai-org/GLM-4.5-Air"
5567
+ },
5568
+ context_window: 131072,
5569
+ prices: {
5570
+ input_mtok: 0.104,
5571
+ output_mtok: 0.68
5572
+ }
5573
+ },
5574
+ {
5575
+ id: "zai-org/GLM-4.5V",
5576
+ name: "GLM-4.5V",
5577
+ match: {
5578
+ equals: "zai-org/GLM-4.5V"
5579
+ },
5580
+ context_window: 65536,
5581
+ prices: {
5582
+ input_mtok: 0.48,
5583
+ output_mtok: 1.44
5584
+ }
5585
+ },
5586
+ {
5587
+ id: "zai-org/GLM-4.6",
5588
+ name: "GLM-4.6",
5589
+ match: {
5590
+ equals: "zai-org/GLM-4.6"
5591
+ },
5592
+ context_window: 204800,
5593
+ prices: {
5594
+ input_mtok: 0.48,
5595
+ output_mtok: 1.76
5596
+ }
5597
+ }
5598
+ ]
5599
+ },
5600
+ {
5601
+ id: "huggingface_nscale",
5602
+ name: "HuggingFace (nscale)",
5603
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
5604
+ api_pattern: "https://router\\.huggingface\\.co/nscale",
5605
+ provider_match: {
5606
+ and: [
5607
+ {
5608
+ contains: "huggingface"
5609
+ },
5610
+ {
5611
+ contains: "nscale"
5612
+ }
5613
+ ]
5614
+ },
5615
+ extractors: [
5616
+ {
5617
+ api_flavor: "chat",
5618
+ root: "usage",
5619
+ model_path: "model",
5620
+ mappings: [
5621
+ {
5622
+ path: "prompt_tokens",
5623
+ dest: "input_tokens",
5624
+ required: !0
5625
+ },
5626
+ {
5627
+ path: ["prompt_tokens_details", "cached_tokens"],
5628
+ dest: "cache_read_tokens",
5629
+ required: !1
5630
+ },
5631
+ {
5632
+ path: ["prompt_tokens_details", "audio_tokens"],
5633
+ dest: "input_audio_tokens",
5634
+ required: !1
5635
+ },
5636
+ {
5637
+ path: ["completion_tokens_details", "audio_tokens"],
5638
+ dest: "output_audio_tokens",
5639
+ required: !1
5640
+ },
5641
+ {
5642
+ path: "completion_tokens",
5643
+ dest: "output_tokens",
5644
+ required: !0
5645
+ }
5646
+ ]
5647
+ }
5648
+ ],
5649
+ models: [
5650
+ {
5651
+ id: "Qwen/QwQ-32B",
5652
+ name: "QwQ-32B",
5653
+ match: {
5654
+ equals: "Qwen/QwQ-32B"
5655
+ },
5656
+ context_window: 131072,
5657
+ prices: {
5658
+ input_mtok: 0.18,
5659
+ output_mtok: 0.2
5660
+ }
5661
+ },
5662
+ {
5663
+ id: "Qwen/Qwen2.5-Coder-32B-Instruct",
5664
+ name: "Qwen2.5-Coder-32B-Instruct",
5665
+ match: {
5666
+ equals: "Qwen/Qwen2.5-Coder-32B-Instruct"
5667
+ },
5668
+ context_window: 131072,
5669
+ prices: {
5670
+ input_mtok: 0.06,
5671
+ output_mtok: 0.2
5672
+ }
5673
+ },
5674
+ {
5675
+ id: "Qwen/Qwen2.5-Coder-3B-Instruct",
5676
+ name: "Qwen2.5-Coder-3B-Instruct",
5677
+ match: {
5678
+ equals: "Qwen/Qwen2.5-Coder-3B-Instruct"
5679
+ },
5680
+ context_window: 32768,
5681
+ prices: {
5682
+ input_mtok: 0.01,
5683
+ output_mtok: 0.03
5684
+ }
5685
+ },
5686
+ {
5687
+ id: "Qwen/Qwen2.5-Coder-7B-Instruct",
5688
+ name: "Qwen2.5-Coder-7B-Instruct",
5689
+ match: {
5690
+ equals: "Qwen/Qwen2.5-Coder-7B-Instruct"
5691
+ },
5692
+ context_window: 131072,
5693
+ prices: {
5694
+ input_mtok: 0.01,
5695
+ output_mtok: 0.03
5696
+ }
5697
+ },
5698
+ {
5699
+ id: "Qwen/Qwen3-14B",
5700
+ name: "Qwen3-14B",
5701
+ match: {
5702
+ equals: "Qwen/Qwen3-14B"
5703
+ },
5704
+ context_window: 40960,
5705
+ prices: {
5706
+ input_mtok: 0.07,
5707
+ output_mtok: 0.2
5708
+ }
5709
+ },
5710
+ {
5711
+ id: "Qwen/Qwen3-235B-A22B",
5712
+ name: "Qwen3-235B-A22B",
5713
+ match: {
5714
+ or: [
5715
+ {
5716
+ equals: "Qwen/Qwen3-235B-A22B"
5717
+ },
5718
+ {
5719
+ equals: "Qwen/Qwen3-235B-A22B-Instruct-2507"
5720
+ }
5721
+ ]
5722
+ },
5723
+ context_window: 32e3,
5724
+ prices: {
5725
+ input_mtok: 0.2,
5726
+ output_mtok: 0.6
5727
+ }
5728
+ },
5729
+ {
5730
+ id: "Qwen/Qwen3-32B",
5731
+ name: "Qwen3-32B",
5732
+ match: {
5733
+ equals: "Qwen/Qwen3-32B"
5734
+ },
5735
+ context_window: 40960,
5736
+ prices: {
5737
+ input_mtok: 0.08,
5738
+ output_mtok: 0.25
5739
+ }
5740
+ },
5741
+ {
5742
+ id: "Qwen/Qwen3-4B-Instruct-2507",
5743
+ name: "Qwen3-4B-Instruct-2507",
5744
+ match: {
5745
+ equals: "Qwen/Qwen3-4B-Instruct-2507"
5746
+ },
5747
+ context_window: 262144,
5748
+ prices: {
5749
+ input_mtok: 0.01,
5750
+ output_mtok: 0.03
5751
+ }
5752
+ },
5753
+ {
5754
+ id: "Qwen/Qwen3-4B-Thinking-2507",
5755
+ name: "Qwen3-4B-Thinking-2507",
5756
+ match: {
5757
+ equals: "Qwen/Qwen3-4B-Thinking-2507"
5758
+ },
5759
+ context_window: 262144,
5760
+ prices: {
5761
+ input_mtok: 0.01,
5762
+ output_mtok: 0.03
5763
+ }
5764
+ },
5765
+ {
5766
+ id: "Qwen/Qwen3-8B",
5767
+ name: "Qwen3-8B",
5768
+ match: {
5769
+ equals: "Qwen/Qwen3-8B"
5770
+ },
5771
+ context_window: 40960,
5772
+ prices: {
5773
+ input_mtok: 0.07,
5774
+ output_mtok: 0.18
5775
+ }
5776
+ },
5777
+ {
5778
+ id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
5779
+ name: "DeepSeek-R1-Distill-Llama-70B",
5780
+ match: {
5781
+ equals: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B"
5782
+ },
5783
+ context_window: 131072,
5784
+ prices: {
5785
+ input_mtok: 0.75,
5786
+ output_mtok: 0.75
5787
+ }
5788
+ },
5789
+ {
5790
+ id: "deepseek-ai/DeepSeek-R1-Distill-Llama-8B",
5791
+ name: "DeepSeek-R1-Distill-Llama-8B",
5792
+ match: {
5793
+ equals: "deepseek-ai/DeepSeek-R1-Distill-Llama-8B"
5794
+ },
5795
+ context_window: 131072,
5796
+ prices: {
5797
+ input_mtok: 0.05,
5798
+ output_mtok: 0.05
5799
+ }
5800
+ },
5801
+ {
5802
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",
5803
+ name: "DeepSeek-R1-Distill-Qwen-1.5B",
5804
+ match: {
5805
+ equals: "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"
5806
+ },
5807
+ context_window: 131072,
5808
+ prices: {
5809
+ input_mtok: 0.1,
5810
+ output_mtok: 0.1
5811
+ }
5812
+ },
5813
+ {
5814
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B",
5815
+ name: "DeepSeek-R1-Distill-Qwen-14B",
5816
+ match: {
5817
+ equals: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B"
5818
+ },
5819
+ context_window: 131072,
5820
+ prices: {
5821
+ input_mtok: 0.2,
5822
+ output_mtok: 0.2
5823
+ }
5824
+ },
5825
+ {
5826
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
5827
+ name: "DeepSeek-R1-Distill-Qwen-32B",
5828
+ match: {
5829
+ equals: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B"
5830
+ },
5831
+ context_window: 131072,
5832
+ prices: {
5833
+ input_mtok: 0.3,
5834
+ output_mtok: 0.3
5835
+ }
5836
+ },
5837
+ {
5838
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B",
5839
+ name: "DeepSeek-R1-Distill-Qwen-7B",
5840
+ match: {
5841
+ equals: "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B"
5842
+ },
5843
+ context_window: 131072,
5844
+ prices: {
5845
+ input_mtok: 0.15,
5846
+ output_mtok: 0.15
5847
+ }
5848
+ },
5849
+ {
5850
+ id: "meta-llama/Llama-3.1-8B-Instruct",
5851
+ name: "Llama-3.1-8B-Instruct",
5852
+ match: {
5853
+ equals: "meta-llama/Llama-3.1-8B-Instruct"
5854
+ },
5855
+ context_window: 131072,
5856
+ prices: {
5857
+ input_mtok: 0.06,
5858
+ output_mtok: 0.06
5859
+ }
5860
+ },
5861
+ {
5862
+ id: "meta-llama/Llama-3.3-70B-Instruct",
5863
+ name: "Llama-3.3-70B-Instruct",
5864
+ match: {
5865
+ equals: "meta-llama/Llama-3.3-70B-Instruct"
5866
+ },
5867
+ context_window: 131072,
5868
+ prices: {
5869
+ input_mtok: 0.4,
5870
+ output_mtok: 0.4
5871
+ }
5872
+ },
5873
+ {
5874
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
5875
+ name: "Llama-4-Scout-17B-16E-Instruct",
5876
+ match: {
5877
+ equals: "meta-llama/Llama-4-Scout-17B-16E-Instruct"
5878
+ },
5879
+ context_window: 89e4,
5880
+ prices: {
5881
+ input_mtok: 0.09,
5882
+ output_mtok: 0.29
5883
+ }
5884
+ },
5885
+ {
5886
+ id: "openai/gpt-oss-120b",
5887
+ name: "gpt-oss-120b",
5888
+ match: {
5889
+ equals: "openai/gpt-oss-120b"
5890
+ },
5891
+ context_window: 131072,
5892
+ prices: {
5893
+ input_mtok: 0.1,
5894
+ output_mtok: 0.4
5895
+ }
5896
+ },
5897
+ {
5898
+ id: "openai/gpt-oss-20b",
5899
+ name: "gpt-oss-20b",
5900
+ match: {
5901
+ equals: "openai/gpt-oss-20b"
5902
+ },
5903
+ context_window: 131072,
5904
+ prices: {
5905
+ input_mtok: 0.05,
5906
+ output_mtok: 0.2
5907
+ }
5908
+ }
5909
+ ]
5910
+ },
5911
+ {
5912
+ id: "huggingface_publicai",
5913
+ name: "HuggingFace (publicai)",
5914
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
5915
+ api_pattern: "https://router\\.huggingface\\.co/publicai",
5916
+ provider_match: {
5917
+ and: [
5918
+ {
5919
+ contains: "huggingface"
5920
+ },
5921
+ {
5922
+ contains: "publicai"
5923
+ }
5924
+ ]
5925
+ },
5926
+ extractors: [
5927
+ {
5928
+ api_flavor: "chat",
5929
+ root: "usage",
5930
+ model_path: "model",
5931
+ mappings: [
5932
+ {
5933
+ path: "prompt_tokens",
5934
+ dest: "input_tokens",
5935
+ required: !0
5936
+ },
5937
+ {
5938
+ path: ["prompt_tokens_details", "cached_tokens"],
5939
+ dest: "cache_read_tokens",
5940
+ required: !1
5941
+ },
5942
+ {
5943
+ path: ["prompt_tokens_details", "audio_tokens"],
5944
+ dest: "input_audio_tokens",
5945
+ required: !1
5946
+ },
5947
+ {
5948
+ path: ["completion_tokens_details", "audio_tokens"],
5949
+ dest: "output_audio_tokens",
5950
+ required: !1
5951
+ },
5952
+ {
5953
+ path: "completion_tokens",
5954
+ dest: "output_tokens",
5955
+ required: !0
5956
+ }
5957
+ ]
5958
+ }
5959
+ ],
5960
+ models: [
5961
+ {
5962
+ id: "aisingapore/Gemma-SEA-LION-v4-27B-IT",
5963
+ name: "Gemma-SEA-LION-v4-27B-IT",
5964
+ match: {
5965
+ equals: "aisingapore/Gemma-SEA-LION-v4-27B-IT"
5966
+ },
5967
+ prices: {}
5968
+ },
5969
+ {
5970
+ id: "swiss-ai/Apertus-70B-Instruct-2509",
5971
+ name: "Apertus-70B-Instruct-2509",
5972
+ match: {
5973
+ equals: "swiss-ai/Apertus-70B-Instruct-2509"
5974
+ },
5975
+ prices: {}
5976
+ },
5977
+ {
5978
+ id: "swiss-ai/Apertus-8B-Instruct-2509",
5979
+ name: "Apertus-8B-Instruct-2509",
5980
+ match: {
5981
+ equals: "swiss-ai/Apertus-8B-Instruct-2509"
5982
+ },
5983
+ prices: {}
5984
+ }
5985
+ ]
5986
+ },
5987
+ {
5988
+ id: "huggingface_sambanova",
5989
+ name: "HuggingFace (sambanova)",
5990
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
5991
+ api_pattern: "https://router\\.huggingface\\.co/sambanova",
5992
+ provider_match: {
5993
+ and: [
5994
+ {
5995
+ contains: "huggingface"
5996
+ },
5997
+ {
5998
+ contains: "sambanova"
5999
+ }
6000
+ ]
6001
+ },
6002
+ extractors: [
6003
+ {
6004
+ api_flavor: "chat",
6005
+ root: "usage",
6006
+ model_path: "model",
6007
+ mappings: [
6008
+ {
6009
+ path: "prompt_tokens",
6010
+ dest: "input_tokens",
6011
+ required: !0
6012
+ },
6013
+ {
6014
+ path: ["prompt_tokens_details", "cached_tokens"],
6015
+ dest: "cache_read_tokens",
6016
+ required: !1
6017
+ },
6018
+ {
6019
+ path: ["prompt_tokens_details", "audio_tokens"],
6020
+ dest: "input_audio_tokens",
6021
+ required: !1
6022
+ },
6023
+ {
6024
+ path: ["completion_tokens_details", "audio_tokens"],
6025
+ dest: "output_audio_tokens",
6026
+ required: !1
6027
+ },
6028
+ {
6029
+ path: "completion_tokens",
6030
+ dest: "output_tokens",
6031
+ required: !0
6032
+ }
6033
+ ]
6034
+ }
6035
+ ],
6036
+ models: [
6037
+ {
6038
+ id: "Qwen/Qwen3-32B",
6039
+ name: "Qwen3-32B",
6040
+ match: {
6041
+ equals: "Qwen/Qwen3-32B"
6042
+ },
6043
+ context_window: 32768,
6044
+ prices: {
6045
+ input_mtok: 0.4,
6046
+ output_mtok: 0.8
6047
+ }
6048
+ },
6049
+ {
6050
+ id: "deepseek-ai/DeepSeek-R1-0528",
6051
+ name: "DeepSeek-R1-0528",
6052
+ match: {
6053
+ equals: "deepseek-ai/DeepSeek-R1-0528"
6054
+ },
6055
+ context_window: 131072,
6056
+ prices: {
6057
+ input_mtok: 5,
6058
+ output_mtok: 7
6059
+ }
6060
+ },
6061
+ {
6062
+ id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
6063
+ name: "DeepSeek-R1-Distill-Llama-70B",
6064
+ match: {
6065
+ equals: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B"
6066
+ },
6067
+ context_window: 131072,
6068
+ prices: {
6069
+ input_mtok: 0.7,
6070
+ output_mtok: 1.4
6071
+ }
6072
+ },
6073
+ {
6074
+ id: "deepseek-ai/DeepSeek-V3-0324",
6075
+ name: "DeepSeek-V3-0324",
6076
+ match: {
6077
+ equals: "deepseek-ai/DeepSeek-V3-0324"
6078
+ },
6079
+ context_window: 131072,
6080
+ prices: {
6081
+ input_mtok: 3,
6082
+ output_mtok: 4.5
6083
+ }
6084
+ },
6085
+ {
6086
+ id: "meta-llama/Llama-3.1-8B-Instruct",
6087
+ name: "Llama-3.1-8B-Instruct",
6088
+ match: {
6089
+ equals: "meta-llama/Llama-3.1-8B-Instruct"
6090
+ },
6091
+ context_window: 16384,
6092
+ prices: {
6093
+ input_mtok: 0.1,
6094
+ output_mtok: 0.2
6095
+ }
6096
+ },
6097
+ {
6098
+ id: "meta-llama/Llama-3.3-70B-Instruct",
6099
+ name: "Llama-3.3-70B-Instruct",
6100
+ match: {
6101
+ equals: "meta-llama/Llama-3.3-70B-Instruct"
6102
+ },
6103
+ context_window: 131072,
6104
+ prices: {
6105
+ input_mtok: 0.6,
6106
+ output_mtok: 1.2
6107
+ }
6108
+ },
6109
+ {
6110
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct",
6111
+ name: "Llama-4-Maverick-17B-128E-Instruct",
6112
+ match: {
6113
+ equals: "meta-llama/Llama-4-Maverick-17B-128E-Instruct"
6114
+ },
6115
+ context_window: 131072,
6116
+ prices: {
6117
+ input_mtok: 0.63,
6118
+ output_mtok: 1.8
6119
+ }
6120
+ },
6121
+ {
6122
+ id: "tokyotech-llm/Llama-3.3-Swallow-70B-Instruct-v0.4",
6123
+ name: "Llama-3.3-Swallow-70B-Instruct-v0.4",
6124
+ match: {
6125
+ equals: "tokyotech-llm/Llama-3.3-Swallow-70B-Instruct-v0.4"
6126
+ },
6127
+ context_window: 131072,
6128
+ prices: {
6129
+ input_mtok: 0.6,
6130
+ output_mtok: 1.2
6131
+ }
6132
+ }
6133
+ ]
6134
+ },
6135
+ {
6136
+ id: "huggingface_together",
6137
+ name: "HuggingFace (together)",
6138
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
6139
+ api_pattern: "https://router\\.huggingface\\.co/together",
6140
+ provider_match: {
6141
+ and: [
6142
+ {
6143
+ contains: "huggingface"
6144
+ },
6145
+ {
6146
+ contains: "together"
6147
+ }
6148
+ ]
6149
+ },
6150
+ extractors: [
6151
+ {
6152
+ api_flavor: "chat",
6153
+ root: "usage",
6154
+ model_path: "model",
6155
+ mappings: [
6156
+ {
6157
+ path: "prompt_tokens",
6158
+ dest: "input_tokens",
6159
+ required: !0
6160
+ },
6161
+ {
6162
+ path: ["prompt_tokens_details", "cached_tokens"],
6163
+ dest: "cache_read_tokens",
6164
+ required: !1
6165
+ },
6166
+ {
6167
+ path: ["prompt_tokens_details", "audio_tokens"],
6168
+ dest: "input_audio_tokens",
6169
+ required: !1
6170
+ },
6171
+ {
6172
+ path: ["completion_tokens_details", "audio_tokens"],
6173
+ dest: "output_audio_tokens",
6174
+ required: !1
6175
+ },
6176
+ {
6177
+ path: "completion_tokens",
6178
+ dest: "output_tokens",
6179
+ required: !0
6180
+ }
6181
+ ]
6182
+ }
6183
+ ],
6184
+ models: [
6185
+ {
6186
+ id: "Qwen/Qwen2.5-72B-Instruct",
6187
+ name: "Qwen2.5-72B-Instruct",
6188
+ match: {
6189
+ equals: "Qwen/Qwen2.5-72B-Instruct"
6190
+ },
6191
+ context_window: 131072,
6192
+ prices: {
6193
+ input_mtok: 1.2,
6194
+ output_mtok: 1.2
6195
+ }
6196
+ },
6197
+ {
6198
+ id: "Qwen/Qwen2.5-7B-Instruct",
6199
+ name: "Qwen2.5-7B-Instruct",
3304
6200
  match: {
3305
- equals: "gemma-7b-it"
6201
+ equals: "Qwen/Qwen2.5-7B-Instruct"
3306
6202
  },
6203
+ context_window: 32768,
3307
6204
  prices: {
3308
- input_mtok: 0.07,
3309
- output_mtok: 0.07
6205
+ input_mtok: 0.3,
6206
+ output_mtok: 0.3
3310
6207
  }
3311
6208
  },
3312
6209
  {
3313
- id: "gemma2-9b-it",
3314
- name: "Gemma 2 9B 8k",
6210
+ id: "Qwen/Qwen3-235B-A22B",
6211
+ name: "Qwen3-235B-A22B",
3315
6212
  match: {
3316
6213
  or: [
3317
6214
  {
3318
- equals: "gemma2-9b-it"
6215
+ equals: "Qwen/Qwen3-235B-A22B"
3319
6216
  },
3320
6217
  {
3321
- equals: "gemma2-9b"
6218
+ equals: "Qwen/Qwen3-235B-A22B-FP8"
6219
+ },
6220
+ {
6221
+ equals: "Qwen/Qwen3-235B-A22B-Instruct-2507"
3322
6222
  }
3323
6223
  ]
3324
6224
  },
6225
+ context_window: 40960,
3325
6226
  prices: {
3326
6227
  input_mtok: 0.2,
3327
- output_mtok: 0.2
3328
- }
3329
- },
3330
- {
3331
- id: "llama-3.1-405b-reasoning",
3332
- match: {
3333
- equals: "llama-3.1-405b-reasoning"
3334
- },
3335
- prices: {
3336
- input_mtok: 0.59,
3337
- output_mtok: 0.79
3338
- }
3339
- },
3340
- {
3341
- id: "llama-3.1-70b-versatile",
3342
- match: {
3343
- equals: "llama-3.1-70b-versatile"
3344
- },
3345
- prices: {
3346
- input_mtok: 0.59,
3347
- output_mtok: 0.79
3348
- }
3349
- },
3350
- {
3351
- id: "llama-3.1-8b-instant",
3352
- name: "Llama 3.1 8B Instant 128k",
3353
- match: {
3354
- equals: "llama-3.1-8b-instant"
3355
- },
3356
- prices: {
3357
- input_mtok: 0.05,
3358
- output_mtok: 0.08
3359
- }
3360
- },
3361
- {
3362
- id: "llama-3.2-11b-text-preview",
3363
- match: {
3364
- equals: "llama-3.2-11b-text-preview"
3365
- },
3366
- prices: {
3367
- input_mtok: 0.18,
3368
- output_mtok: 0.18
3369
- }
3370
- },
3371
- {
3372
- id: "llama-3.2-11b-vision-preview",
3373
- match: {
3374
- equals: "llama-3.2-11b-vision-preview"
3375
- },
3376
- prices: {
3377
- input_mtok: 0.18,
3378
- output_mtok: 0.18
3379
- }
3380
- },
3381
- {
3382
- id: "llama-3.2-1b-preview",
3383
- match: {
3384
- equals: "llama-3.2-1b-preview"
3385
- },
3386
- prices: {
3387
- input_mtok: 0.04,
3388
- output_mtok: 0.04
6228
+ output_mtok: 0.6
3389
6229
  }
3390
6230
  },
3391
6231
  {
3392
- id: "llama-3.2-3b-preview",
6232
+ id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
6233
+ name: "Qwen3-Coder-480B-A35B-Instruct",
3393
6234
  match: {
3394
- equals: "llama-3.2-3b-preview"
6235
+ or: [
6236
+ {
6237
+ equals: "Qwen/Qwen3-Coder-480B-A35B-Instruct"
6238
+ },
6239
+ {
6240
+ equals: "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8"
6241
+ }
6242
+ ]
3395
6243
  },
6244
+ context_window: 262144,
3396
6245
  prices: {
3397
- input_mtok: 0.06,
3398
- output_mtok: 0.06
6246
+ input_mtok: 2,
6247
+ output_mtok: 2
3399
6248
  }
3400
6249
  },
3401
6250
  {
3402
- id: "llama-3.2-90b-text-preview",
6251
+ id: "Qwen/Qwen3-Next-80B-A3B-Instruct",
6252
+ name: "Qwen3-Next-80B-A3B-Instruct",
3403
6253
  match: {
3404
- equals: "llama-3.2-90b-text-preview"
6254
+ equals: "Qwen/Qwen3-Next-80B-A3B-Instruct"
3405
6255
  },
6256
+ context_window: 262144,
3406
6257
  prices: {
3407
- input_mtok: 0.9,
3408
- output_mtok: 0.9
6258
+ input_mtok: 0.15,
6259
+ output_mtok: 1.5
3409
6260
  }
3410
6261
  },
3411
6262
  {
3412
- id: "llama-3.2-90b-vision-preview",
6263
+ id: "Qwen/Qwen3-Next-80B-A3B-Thinking",
6264
+ name: "Qwen3-Next-80B-A3B-Thinking",
3413
6265
  match: {
3414
- equals: "llama-3.2-90b-vision-preview"
6266
+ equals: "Qwen/Qwen3-Next-80B-A3B-Thinking"
3415
6267
  },
6268
+ context_window: 262144,
3416
6269
  prices: {
3417
- input_mtok: 0.9,
3418
- output_mtok: 0.9
6270
+ input_mtok: 0.15,
6271
+ output_mtok: 1.5
3419
6272
  }
3420
6273
  },
3421
6274
  {
3422
- id: "llama-3.3-70b-specdec",
6275
+ id: "deepcogito/cogito-671b-v2.1",
6276
+ name: "cogito-671b-v2.1",
3423
6277
  match: {
3424
- equals: "llama-3.3-70b-specdec"
6278
+ or: [
6279
+ {
6280
+ equals: "deepcogito/cogito-671b-v2.1"
6281
+ },
6282
+ {
6283
+ equals: "deepcogito/cogito-671b-v2.1-FP8"
6284
+ }
6285
+ ]
3425
6286
  },
6287
+ context_window: 163840,
3426
6288
  prices: {
3427
- input_mtok: 0.59,
3428
- output_mtok: 0.99
6289
+ input_mtok: 1.25,
6290
+ output_mtok: 1.25
3429
6291
  }
3430
6292
  },
3431
6293
  {
3432
- id: "llama-3.3-70b-versatile",
3433
- name: "Llama 3.3 70B Versatile 128k",
6294
+ id: "deepcogito/cogito-v2-preview-llama-109B-MoE",
6295
+ name: "cogito-v2-preview-llama-109B-MoE",
3434
6296
  match: {
3435
- equals: "llama-3.3-70b-versatile"
6297
+ equals: "deepcogito/cogito-v2-preview-llama-109B-MoE"
3436
6298
  },
6299
+ context_window: 32767,
3437
6300
  prices: {
3438
- input_mtok: 0.59,
3439
- output_mtok: 0.79
6301
+ input_mtok: 0.18000000000000002,
6302
+ output_mtok: 0.5900000000000001
3440
6303
  }
3441
6304
  },
3442
6305
  {
3443
- id: "llama-guard-3-8b",
6306
+ id: "deepcogito/cogito-v2-preview-llama-405B",
6307
+ name: "cogito-v2-preview-llama-405B",
3444
6308
  match: {
3445
- equals: "llama-guard-3-8b"
6309
+ equals: "deepcogito/cogito-v2-preview-llama-405B"
3446
6310
  },
6311
+ context_window: 32768,
3447
6312
  prices: {
3448
- input_mtok: 0.2,
3449
- output_mtok: 0.2
6313
+ input_mtok: 3.5,
6314
+ output_mtok: 3.5
3450
6315
  }
3451
6316
  },
3452
6317
  {
3453
- id: "llama2-70b-4096",
6318
+ id: "deepcogito/cogito-v2-preview-llama-70B",
6319
+ name: "cogito-v2-preview-llama-70B",
3454
6320
  match: {
3455
- equals: "llama2-70b-4096"
6321
+ equals: "deepcogito/cogito-v2-preview-llama-70B"
3456
6322
  },
6323
+ context_window: 32768,
3457
6324
  prices: {
3458
- input_mtok: 0.7,
3459
- output_mtok: 0.8
6325
+ input_mtok: 0.88,
6326
+ output_mtok: 0.88
3460
6327
  }
3461
6328
  },
3462
6329
  {
3463
- id: "llama3-70b-8192",
6330
+ id: "deepseek-ai/DeepSeek-R1",
6331
+ name: "DeepSeek-R1",
3464
6332
  match: {
3465
- equals: "llama3-70b-8192"
6333
+ or: [
6334
+ {
6335
+ equals: "deepseek-ai/DeepSeek-R1"
6336
+ },
6337
+ {
6338
+ equals: "deepseek-ai/DeepSeek-R1-0528"
6339
+ }
6340
+ ]
3466
6341
  },
6342
+ context_window: 163840,
3467
6343
  prices: {
3468
- input_mtok: 0.59,
3469
- output_mtok: 0.79
6344
+ input_mtok: 3,
6345
+ output_mtok: 7
3470
6346
  }
3471
6347
  },
3472
6348
  {
3473
- id: "llama3-8b-8192",
6349
+ id: "deepseek-ai/DeepSeek-V3",
6350
+ name: "DeepSeek-V3",
3474
6351
  match: {
3475
- equals: "llama3-8b-8192"
6352
+ or: [
6353
+ {
6354
+ equals: "deepseek-ai/DeepSeek-V3"
6355
+ },
6356
+ {
6357
+ equals: "deepseek-ai/DeepSeek-V3-0324"
6358
+ }
6359
+ ]
3476
6360
  },
6361
+ context_window: 131072,
3477
6362
  prices: {
3478
- input_mtok: 0.05,
3479
- output_mtok: 0.08
6363
+ input_mtok: 1.25,
6364
+ output_mtok: 1.25
3480
6365
  }
3481
6366
  },
3482
6367
  {
3483
- id: "llama3-groq-70b-8192-tool-use-preview",
6368
+ id: "deepseek-ai/DeepSeek-V3.1",
6369
+ name: "DeepSeek-V3.1",
3484
6370
  match: {
3485
- equals: "llama3-groq-70b-8192-tool-use-preview"
6371
+ equals: "deepseek-ai/DeepSeek-V3.1"
3486
6372
  },
6373
+ context_window: 131072,
3487
6374
  prices: {
3488
- input_mtok: 0.89,
3489
- output_mtok: 0.89
6375
+ input_mtok: 0.6,
6376
+ output_mtok: 1.7
3490
6377
  }
3491
6378
  },
3492
6379
  {
3493
- id: "llama3-groq-8b-8192-tool-use-preview",
6380
+ id: "marin-community/marin-8b-instruct",
6381
+ name: "marin-8b-instruct",
3494
6382
  match: {
3495
- equals: "llama3-groq-8b-8192-tool-use-preview"
6383
+ equals: "marin-community/marin-8b-instruct"
3496
6384
  },
6385
+ context_window: 4096,
3497
6386
  prices: {
3498
- input_mtok: 0.19,
3499
- output_mtok: 0.19
6387
+ input_mtok: 0.18000000000000002,
6388
+ output_mtok: 0.18000000000000002
3500
6389
  }
3501
6390
  },
3502
6391
  {
3503
- id: "meta-llama/llama-4-maverick-17b-128e-instruct",
3504
- name: "Llama 4 Maverick 17B 128E",
6392
+ id: "meta-llama/Llama-3.2-3B-Instruct",
6393
+ name: "Llama-3.2-3B-Instruct",
3505
6394
  match: {
3506
- equals: "meta-llama/llama-4-maverick-17b-128e-instruct"
6395
+ equals: "meta-llama/Llama-3.2-3B-Instruct"
3507
6396
  },
3508
6397
  context_window: 131072,
3509
6398
  prices: {
3510
- input_mtok: 0.2,
3511
- output_mtok: 0.6
6399
+ input_mtok: 0.060000000000000005,
6400
+ output_mtok: 0.060000000000000005
3512
6401
  }
3513
6402
  },
3514
6403
  {
3515
- id: "meta-llama/llama-4-scout-17b-16e-instruct",
3516
- name: "Llama 4 Scout (17Bx16E) 128k",
6404
+ id: "meta-llama/Llama-3.3-70B-Instruct",
6405
+ name: "Llama-3.3-70B-Instruct",
3517
6406
  match: {
3518
- equals: "meta-llama/llama-4-scout-17b-16e-instruct"
6407
+ equals: "meta-llama/Llama-3.3-70B-Instruct"
3519
6408
  },
6409
+ context_window: 131072,
3520
6410
  prices: {
3521
- input_mtok: 0.11,
3522
- output_mtok: 0.34
6411
+ input_mtok: 0.88,
6412
+ output_mtok: 0.88
3523
6413
  }
3524
6414
  },
3525
6415
  {
3526
- id: "meta-llama/llama-guard-4-12b",
3527
- name: "Llama Guard 4 12B",
6416
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
6417
+ name: "Llama-4-Maverick-17B-128E-Instruct-FP8",
3528
6418
  match: {
3529
- equals: "meta-llama/llama-guard-4-12b"
6419
+ equals: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8"
3530
6420
  },
3531
- context_window: 131072,
6421
+ context_window: 1048576,
3532
6422
  prices: {
3533
- input_mtok: 0.2,
3534
- output_mtok: 0.2
6423
+ input_mtok: 0.27,
6424
+ output_mtok: 0.85
3535
6425
  }
3536
6426
  },
3537
6427
  {
3538
- id: "mistral-saba-24b",
6428
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
6429
+ name: "Llama-4-Scout-17B-16E-Instruct",
3539
6430
  match: {
3540
- equals: "mistral-saba-24b"
6431
+ equals: "meta-llama/Llama-4-Scout-17B-16E-Instruct"
3541
6432
  },
6433
+ context_window: 1048576,
3542
6434
  prices: {
3543
- input_mtok: 0.79,
3544
- output_mtok: 0.79
6435
+ input_mtok: 0.18000000000000002,
6436
+ output_mtok: 0.5900000000000001
3545
6437
  }
3546
6438
  },
3547
6439
  {
3548
- id: "mixtral-8x7b-32768",
6440
+ id: "meta-llama/Meta-Llama-3-70B-Instruct",
6441
+ name: "Meta-Llama-3-70B-Instruct",
3549
6442
  match: {
3550
- equals: "mixtral-8x7b-32768"
6443
+ equals: "meta-llama/Meta-Llama-3-70B-Instruct"
3551
6444
  },
6445
+ context_window: 8192,
3552
6446
  prices: {
3553
- input_mtok: 0.24,
3554
- output_mtok: 0.24
6447
+ input_mtok: 0.88,
6448
+ output_mtok: 0.88
3555
6449
  }
3556
6450
  },
3557
6451
  {
3558
- id: "moonshotai/kimi-k2-instruct",
3559
- name: "Kimi K2 1T 128k",
6452
+ id: "moonshotai/Kimi-K2-Instruct",
6453
+ name: "Kimi-K2-Instruct",
3560
6454
  match: {
3561
6455
  or: [
3562
6456
  {
3563
- equals: "moonshotai/kimi-k2-instruct"
6457
+ equals: "moonshotai/Kimi-K2-Instruct"
3564
6458
  },
3565
6459
  {
3566
- equals: "moonshotai/kimi-k2-instruct-0905"
6460
+ equals: "moonshotai/Kimi-K2-Instruct-0905"
3567
6461
  }
3568
6462
  ]
3569
6463
  },
3570
6464
  context_window: 131072,
3571
6465
  prices: {
3572
6466
  input_mtok: 1,
3573
- cache_read_mtok: 0.5,
3574
6467
  output_mtok: 3
3575
6468
  }
3576
6469
  },
6470
+ {
6471
+ id: "moonshotai/Kimi-K2-Thinking",
6472
+ name: "Kimi-K2-Thinking",
6473
+ match: {
6474
+ equals: "moonshotai/Kimi-K2-Thinking"
6475
+ },
6476
+ context_window: 262144,
6477
+ prices: {
6478
+ input_mtok: 1.2,
6479
+ output_mtok: 4
6480
+ }
6481
+ },
3577
6482
  {
3578
6483
  id: "openai/gpt-oss-120b",
3579
- description: `GPT-OSS 120B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
3580
- 120 billion parameters and 128 experts.
3581
- `,
6484
+ name: "gpt-oss-120b",
3582
6485
  match: {
3583
- or: [
3584
- {
3585
- equals: "openai/gpt-oss-120b"
3586
- },
3587
- {
3588
- equals: "openai/gpt-oss-safeguard-20b"
3589
- }
3590
- ]
6486
+ equals: "openai/gpt-oss-120b"
3591
6487
  },
3592
6488
  context_window: 131072,
3593
6489
  prices: {
3594
6490
  input_mtok: 0.15,
3595
- cache_read_mtok: 0.075,
3596
6491
  output_mtok: 0.6
3597
6492
  }
3598
6493
  },
3599
6494
  {
3600
6495
  id: "openai/gpt-oss-20b",
3601
- description: `GPT-OSS 20B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
3602
- 20 billion parameters and 32 experts.
3603
- `,
6496
+ name: "gpt-oss-20b",
3604
6497
  match: {
3605
6498
  equals: "openai/gpt-oss-20b"
3606
6499
  },
3607
6500
  context_window: 131072,
3608
6501
  prices: {
3609
- input_mtok: 0.075,
3610
- cache_read_mtok: 0.0375,
3611
- output_mtok: 0.3
6502
+ input_mtok: 0.05,
6503
+ output_mtok: 0.2
3612
6504
  }
3613
6505
  },
3614
6506
  {
3615
- id: "qwen/qwen3-32b",
3616
- name: "Qwen3 32B 131k",
6507
+ id: "zai-org/GLM-4.5-Air-FP8",
6508
+ name: "GLM-4.5-Air-FP8",
3617
6509
  match: {
3618
- equals: "qwen/qwen3-32b"
6510
+ equals: "zai-org/GLM-4.5-Air-FP8"
3619
6511
  },
6512
+ context_window: 131072,
3620
6513
  prices: {
3621
- input_mtok: 0.29,
3622
- output_mtok: 0.59
6514
+ input_mtok: 0.2,
6515
+ output_mtok: 1.1
3623
6516
  }
3624
6517
  }
3625
6518
  ]
@@ -12651,45 +15544,45 @@ Compared to other leading proprietary and open-weights models Command A delivers
12651
15544
  ]
12652
15545
  }
12653
15546
  ];
12654
- function M(t, e) {
15547
+ function L(t, e) {
12655
15548
  if (e <= 0) return 0;
12656
15549
  let a = 0;
12657
- const i = [...t.tiers].sort((m, s) => m.start - s.start), o = i[0]?.start ?? e, r = Math.min(e, o);
12658
- a += r * t.base / 1e6;
12659
- for (let m = 0; m < i.length; m++) {
12660
- const s = i[m], n = i[m + 1]?.start ?? 1 / 0, u = Math.max(0, Math.min(e, n) - s.start);
12661
- u > 0 && (a += u * s.price / 1e6);
15550
+ const i = [...t.tiers].sort((r, n) => r.start - n.start), o = i[0]?.start ?? e, m = Math.min(e, o);
15551
+ a += m * t.base / 1e6;
15552
+ for (let r = 0; r < i.length; r++) {
15553
+ const n = i[r], s = i[r + 1]?.start ?? 1 / 0, u = Math.max(0, Math.min(e, s) - n.start);
15554
+ u > 0 && (a += u * n.price / 1e6);
12662
15555
  }
12663
15556
  return a;
12664
15557
  }
12665
15558
  function c(t, e, a) {
12666
- return t === void 0 || e === void 0 ? 0 : typeof t == "number" ? t * e / 1e6 : M(t, e);
15559
+ return t === void 0 || e === void 0 ? 0 : typeof t == "number" ? t * e / 1e6 : L(t, e);
12667
15560
  }
12668
- function I(t, e) {
15561
+ function Q(t, e) {
12669
15562
  let a = 0, i = 0;
12670
- const o = t.cache_read_tokens ?? 0, r = t.cache_write_tokens ?? 0, m = t.cache_audio_read_tokens ?? 0, s = t.output_audio_tokens ?? 0;
12671
- let n = t.input_audio_tokens ?? 0;
12672
- if (n -= m, n < 0)
15563
+ const o = t.cache_read_tokens ?? 0, m = t.cache_write_tokens ?? 0, r = t.cache_audio_read_tokens ?? 0, n = t.output_audio_tokens ?? 0;
15564
+ let s = t.input_audio_tokens ?? 0;
15565
+ if (s -= r, s < 0)
12673
15566
  throw new Error("cache_audio_read_tokens cannot be greater than input_audio_tokens");
12674
15567
  let u = t.input_tokens ?? 0;
12675
- if (u -= o, u -= r, u -= n, u < 0)
15568
+ if (u -= o, u -= m, u -= s, u < 0)
12676
15569
  throw new Error("Uncached text input tokens cannot be negative");
12677
15570
  let p = o;
12678
- if (p -= m, p < 0)
15571
+ if (p -= r, p < 0)
12679
15572
  throw new Error("cache_audio_read_tokens cannot be greater than cache_read_tokens");
12680
- a += c(e.input_mtok, u), a += c(e.cache_read_mtok, p), a += c(e.cache_write_mtok, r), a += c(e.input_audio_mtok, n), a += c(e.cache_audio_read_mtok, m);
12681
- let _ = t.output_tokens ?? 0;
12682
- if (_ -= s, _ < 0)
15573
+ a += c(e.input_mtok, u), a += c(e.cache_read_mtok, p), a += c(e.cache_write_mtok, m), a += c(e.input_audio_mtok, s), a += c(e.cache_audio_read_mtok, r);
15574
+ let k = t.output_tokens ?? 0;
15575
+ if (k -= n, k < 0)
12683
15576
  throw new Error("output_audio_tokens cannot be greater than output_tokens");
12684
- i += c(e.output_mtok, _), i += c(e.output_audio_mtok, t.output_audio_tokens);
12685
- let w = a + i;
12686
- return e.requests_kcount !== void 0 && (w += e.requests_kcount / 1e3), {
15577
+ i += c(e.output_mtok, k), i += c(e.output_audio_mtok, t.output_audio_tokens);
15578
+ let f = a + i;
15579
+ return e.requests_kcount !== void 0 && (f += e.requests_kcount / 1e3), {
12687
15580
  input_price: a,
12688
15581
  output_price: i,
12689
- total_price: w
15582
+ total_price: f
12690
15583
  };
12691
15584
  }
12692
- function L(t, e) {
15585
+ function M(t, e) {
12693
15586
  if (!Array.isArray(t.prices))
12694
15587
  return t.prices;
12695
15588
  for (let a = t.prices.length - 1; a >= 0; a--) {
@@ -12700,170 +15593,170 @@ function L(t, e) {
12700
15593
  if (e >= new Date(o.start_date))
12701
15594
  return i.prices;
12702
15595
  } else {
12703
- const r = e.toISOString().slice(11, 19), m = o.start_time, s = o.end_time;
12704
- if (s < m) {
12705
- if (r >= m || r < s)
15596
+ const m = e.toISOString().slice(11, 19), r = o.start_time, n = o.end_time;
15597
+ if (n < r) {
15598
+ if (m >= r || m < n)
12706
15599
  return i.prices;
12707
- } else if (r >= m && r < s)
15600
+ } else if (m >= r && m < n)
12708
15601
  return i.prices;
12709
15602
  }
12710
15603
  }
12711
15604
  return t.prices[0].prices;
12712
15605
  }
12713
- function h(t, e) {
12714
- return "or" in t ? t.or.some((a) => h(a, e)) : "and" in t ? t.and.every((a) => h(a, e)) : "equals" in t ? e === t.equals : "starts_with" in t ? e.startsWith(t.starts_with) : "ends_with" in t ? e.endsWith(t.ends_with) : "contains" in t ? e.includes(t.contains) : "regex" in t ? new RegExp(t.regex).test(e) : !1;
15606
+ function _(t, e) {
15607
+ return "or" in t ? t.or.some((a) => _(a, e)) : "and" in t ? t.and.every((a) => _(a, e)) : "equals" in t ? e === t.equals : "starts_with" in t ? e.startsWith(t.starts_with) : "ends_with" in t ? e.endsWith(t.ends_with) : "contains" in t ? e.includes(t.contains) : "regex" in t ? new RegExp(t.regex).test(e) : !1;
12715
15608
  }
12716
- function P(t, e) {
15609
+ function y(t, e) {
12717
15610
  const a = e.toLowerCase().trim(), i = t.find((o) => o.id === a);
12718
- return i || t.find((o) => o.provider_match && h(o.provider_match, a));
15611
+ return i || t.find((o) => o.provider_match && _(o.provider_match, a));
12719
15612
  }
12720
- function B(t, { modelId: e, providerApiUrl: a, providerId: i }) {
15613
+ function x(t, { modelId: e, providerApiUrl: a, providerId: i }) {
12721
15614
  if (i)
12722
- return P(t, i);
15615
+ return y(t, i);
12723
15616
  if (a)
12724
15617
  return t.find((o) => new RegExp(o.api_pattern).test(a));
12725
15618
  if (e)
12726
- return t.find((o) => o.model_match && h(o.model_match, e));
15619
+ return t.find((o) => o.model_match && _(o.model_match, e));
12727
15620
  }
12728
- function T(t, e) {
12729
- return t.find((a) => h(a.match, e));
15621
+ function S(t, e) {
15622
+ return t.find((a) => _(a.match, e));
12730
15623
  }
12731
- const G = "https://raw.githubusercontent.com/pydantic/genai-prices/main/prices/data.json";
12732
- let g = x, b = Promise.resolve(x), f = null;
12733
- function S(t) {
12734
- t !== null && ("then" in t ? (b = t, t.then((e) => {
15624
+ const A = "https://raw.githubusercontent.com/pydantic/genai-prices/main/prices/data.json";
15625
+ let g = B, q = Promise.resolve(B), b = null;
15626
+ function T(t) {
15627
+ t !== null && ("then" in t ? (q = t, t.then((e) => {
12735
15628
  e !== null && (g = e);
12736
- })) : (b = Promise.resolve(t), g = t));
15629
+ })) : (q = Promise.resolve(t), g = t));
12737
15630
  }
12738
- function C(t) {
12739
- f = t;
15631
+ function P(t) {
15632
+ b = t;
12740
15633
  }
12741
- function Q(t) {
15634
+ function C(t) {
12742
15635
  t({
12743
- onCalc: C,
12744
- remoteDataUrl: G,
12745
- setProviderData: S
15636
+ onCalc: P,
15637
+ remoteDataUrl: A,
15638
+ setProviderData: T
12746
15639
  });
12747
15640
  }
12748
- function N() {
12749
- return b;
15641
+ function E() {
15642
+ return q;
12750
15643
  }
12751
- function O(t, e, a) {
12752
- f?.();
12753
- const i = e.toLowerCase().trim(), o = a?.provider ?? B(g, { modelId: i, providerApiUrl: a?.providerApiUrl, providerId: a?.providerId });
15644
+ function z(t, e, a) {
15645
+ b?.();
15646
+ const i = e.toLowerCase().trim(), o = a?.provider ?? x(g, { modelId: i, providerApiUrl: a?.providerApiUrl, providerId: a?.providerId });
12754
15647
  if (!o) return null;
12755
- const r = T(o.models, i);
12756
- if (!r) return null;
12757
- const m = a?.timestamp ?? /* @__PURE__ */ new Date(), s = L(r, m), n = I(t, s);
15648
+ const m = S(o.models, i);
15649
+ if (!m) return null;
15650
+ const r = a?.timestamp ?? /* @__PURE__ */ new Date(), n = M(m, r), s = Q(t, n);
12758
15651
  return {
12759
15652
  auto_update_timestamp: void 0,
12760
- model: r,
12761
- model_price: s,
15653
+ model: m,
15654
+ model_price: n,
12762
15655
  provider: o,
12763
- ...n
15656
+ ...s
12764
15657
  };
12765
15658
  }
12766
- function D(t) {
12767
- return f?.(), B(g, t);
15659
+ function N(t) {
15660
+ return b?.(), x(g, t);
12768
15661
  }
12769
- function E(t, e, a) {
15662
+ function V(t, e, a) {
12770
15663
  if (a = a ?? "default", !t.extractors)
12771
15664
  throw new Error("No extraction logic defined for this provider");
12772
- const i = t.extractors.find((n) => n.api_flavor === a);
15665
+ const i = t.extractors.find((s) => s.api_flavor === a);
12773
15666
  if (!i) {
12774
- const n = t.extractors.map((u) => u.api_flavor).join(", ");
12775
- throw new Error(`Unknown apiFlavor '${a}', allowed values: ${n}`);
15667
+ const s = t.extractors.map((u) => u.api_flavor).join(", ");
15668
+ throw new Error(`Unknown apiFlavor '${a}', allowed values: ${s}`);
12776
15669
  }
12777
- if (!k.guard(e))
15670
+ if (!h.guard(e))
12778
15671
  throw new Error(`Expected response data to be a mapping object, got ${l(e)}`);
12779
- const o = q(i.model_path, e, R, !1, []), r = y(i.root), m = q(r, e, k, !0, []), s = {};
12780
- for (const n of i.mappings) {
12781
- const u = q(n.path, m, z, n.required, r);
15672
+ const o = w(i.model_path, e, D, !1, []), m = I(i.root), r = w(m, e, h, !0, []), n = {};
15673
+ for (const s of i.mappings) {
15674
+ const u = w(s.path, r, R, s.required, m);
12782
15675
  if (u !== null) {
12783
- const p = s[n.dest] ?? 0;
12784
- s[n.dest] = p + u;
15676
+ const p = n[s.dest] ?? 0;
15677
+ n[s.dest] = p + u;
12785
15678
  }
12786
15679
  }
12787
- if (!Object.keys(s).length)
15680
+ if (!Object.keys(n).length)
12788
15681
  throw new Error(`No usage information found at ${JSON.stringify(i.root)}`);
12789
- return { model: o, usage: s };
15682
+ return { model: o, usage: n };
12790
15683
  }
12791
- function q(t, e, a, i, o) {
12792
- const [r, ...m] = y(t).reverse();
12793
- if (typeof r != "string")
12794
- throw new Error(`Expected last step of path to be a string, got ${l(r)}`);
12795
- m.reverse();
12796
- let s = e;
12797
- const n = [];
12798
- for (const p of m) {
12799
- if (n.push(p), typeof p == "object")
12800
- if (Array.isArray(s))
12801
- s = A(p, s);
15684
+ function w(t, e, a, i, o) {
15685
+ const [m, ...r] = I(t).reverse();
15686
+ if (typeof m != "string")
15687
+ throw new Error(`Expected last step of path to be a string, got ${l(m)}`);
15688
+ r.reverse();
15689
+ let n = e;
15690
+ const s = [];
15691
+ for (const p of r) {
15692
+ if (s.push(p), typeof p == "object")
15693
+ if (Array.isArray(n))
15694
+ n = G(p, n);
12802
15695
  else {
12803
15696
  if (i)
12804
- throw new Error(`Expected \`${d(o, n)}\` value to be a mapping, got ${l(s)}`);
15697
+ throw new Error(`Expected \`${d(o, s)}\` value to be a mapping, got ${l(n)}`);
12805
15698
  return null;
12806
15699
  }
12807
- else if (k.guard(s))
12808
- s = s[p];
15700
+ else if (h.guard(n))
15701
+ n = n[p];
12809
15702
  else {
12810
15703
  if (i)
12811
- throw new Error(`Expected \`${d(o, n)}\` value to be a mapping, got ${l(s)}`);
15704
+ throw new Error(`Expected \`${d(o, s)}\` value to be a mapping, got ${l(n)}`);
12812
15705
  return null;
12813
15706
  }
12814
- if (typeof s > "u")
15707
+ if (typeof n > "u")
12815
15708
  if (i) {
12816
- const _ = typeof p == "object" ? "Unable to find item" : "Missing value";
12817
- throw new Error(`${_} at \`${d(o, n)}\``);
15709
+ const k = typeof p == "object" ? "Unable to find item" : "Missing value";
15710
+ throw new Error(`${k} at \`${d(o, s)}\``);
12818
15711
  } else
12819
15712
  return null;
12820
15713
  }
12821
- if (!k.guard(s)) {
15714
+ if (!h.guard(n)) {
12822
15715
  if (i)
12823
- throw new Error(`Expected \`${d(o, n)}\` value to be a mapping, got ${l(s)}`);
15716
+ throw new Error(`Expected \`${d(o, s)}\` value to be a mapping, got ${l(n)}`);
12824
15717
  return null;
12825
15718
  }
12826
- const u = s[r];
15719
+ const u = n[m];
12827
15720
  if (typeof u > "u") {
12828
15721
  if (i)
12829
- throw n.push(r), new Error(`Missing value at \`${d(o, n)}\``);
15722
+ throw s.push(m), new Error(`Missing value at \`${d(o, s)}\``);
12830
15723
  return null;
12831
15724
  }
12832
15725
  if (a.guard(u))
12833
15726
  return u;
12834
15727
  if (i)
12835
- throw n.push(r), new Error(`Expected \`${d(o, n)}\` value to be a ${a.name}, got ${l(u)}`);
15728
+ throw s.push(m), new Error(`Expected \`${d(o, s)}\` value to be a ${a.name}, got ${l(u)}`);
12836
15729
  return null;
12837
15730
  }
12838
- function A(t, e) {
15731
+ function G(t, e) {
12839
15732
  for (const a of e)
12840
- if (k.guard(a)) {
15733
+ if (h.guard(a)) {
12841
15734
  const i = a[t.field];
12842
- if (typeof i == "string" && h(t.match, i))
15735
+ if (typeof i == "string" && _(t.match, i))
12843
15736
  return a;
12844
15737
  }
12845
15738
  }
12846
- function y(t) {
15739
+ function I(t) {
12847
15740
  return Array.isArray(t) ? [...t] : [t];
12848
15741
  }
12849
15742
  function l(t) {
12850
15743
  return t === null ? "null" : Array.isArray(t) ? "array" : typeof t == "object" ? "mapping" : typeof t;
12851
15744
  }
12852
- const k = {
15745
+ const h = {
12853
15746
  guard: (t) => l(t) === "mapping",
12854
15747
  name: "mapping"
12855
- }, R = {
15748
+ }, D = {
12856
15749
  guard: (t) => typeof t == "string",
12857
15750
  name: "string"
12858
- }, z = {
15751
+ }, R = {
12859
15752
  guard: (t) => typeof t == "number",
12860
15753
  name: "number"
12861
15754
  }, d = (t, e) => [...t.map(v), ...e.map(v)].join("."), v = (t) => typeof t == "string" ? t : JSON.stringify(t);
12862
15755
  export {
12863
- G as REMOTE_DATA_JSON_URL,
12864
- O as calcPrice,
12865
- E as extractUsage,
12866
- D as findProvider,
12867
- Q as updatePrices,
12868
- N as waitForUpdate
15756
+ A as REMOTE_DATA_JSON_URL,
15757
+ z as calcPrice,
15758
+ V as extractUsage,
15759
+ N as findProvider,
15760
+ C as updatePrices,
15761
+ E as waitForUpdate
12869
15762
  };