@pydantic/genai-prices 0.0.44 → 0.0.46

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
@@ -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",
@@ -3405,263 +3433,3028 @@ Compared to other leading proprietary and open-weights models Command A delivers
3405
3433
  }
3406
3434
  },
3407
3435
  {
3408
- 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: "openai/gpt-oss-120b",
4826
+ name: "gpt-oss-120b",
4827
+ match: {
4828
+ equals: "openai/gpt-oss-120b"
4829
+ },
4830
+ context_window: 131072,
4831
+ prices: {
4832
+ input_mtok: 0.15,
4833
+ output_mtok: 0.6
4834
+ }
4835
+ },
4836
+ {
4837
+ id: "openai/gpt-oss-20b",
4838
+ name: "gpt-oss-20b",
4839
+ match: {
4840
+ equals: "openai/gpt-oss-20b"
4841
+ },
4842
+ context_window: 131072,
4843
+ prices: {
4844
+ input_mtok: 0.05,
4845
+ output_mtok: 0.2
4846
+ }
4847
+ },
4848
+ {
4849
+ id: "zai-org/GLM-4.5",
4850
+ name: "GLM-4.5",
4851
+ match: {
4852
+ equals: "zai-org/glm-4.5"
4853
+ },
4854
+ context_window: 131072,
4855
+ prices: {
4856
+ input_mtok: 0.6,
4857
+ output_mtok: 2.2
4858
+ }
4859
+ },
4860
+ {
4861
+ id: "zai-org/GLM-4.5-Air",
4862
+ name: "GLM-4.5-Air",
4863
+ match: {
4864
+ equals: "zai-org/glm-4.5-air"
4865
+ },
4866
+ context_window: 131072,
4867
+ prices: {
4868
+ input_mtok: 0.2,
4869
+ output_mtok: 1.2
4870
+ }
4871
+ }
4872
+ ]
4873
+ },
4874
+ {
4875
+ id: "huggingface_novita",
4876
+ name: "HuggingFace (novita)",
4877
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
4878
+ api_pattern: "https://router\\.huggingface\\.co/novita",
4879
+ provider_match: {
4880
+ and: [
4881
+ {
4882
+ contains: "huggingface"
4883
+ },
4884
+ {
4885
+ contains: "novita"
4886
+ }
4887
+ ]
4888
+ },
4889
+ extractors: [
4890
+ {
4891
+ api_flavor: "chat",
4892
+ root: "usage",
4893
+ model_path: "model",
4894
+ mappings: [
4895
+ {
4896
+ path: "prompt_tokens",
4897
+ dest: "input_tokens",
4898
+ required: !0
4899
+ },
4900
+ {
4901
+ path: ["prompt_tokens_details", "cached_tokens"],
4902
+ dest: "cache_read_tokens",
4903
+ required: !1
4904
+ },
4905
+ {
4906
+ path: ["prompt_tokens_details", "audio_tokens"],
4907
+ dest: "input_audio_tokens",
4908
+ required: !1
4909
+ },
4910
+ {
4911
+ path: ["completion_tokens_details", "audio_tokens"],
4912
+ dest: "output_audio_tokens",
4913
+ required: !1
4914
+ },
4915
+ {
4916
+ path: "completion_tokens",
4917
+ dest: "output_tokens",
4918
+ required: !0
4919
+ }
4920
+ ]
4921
+ }
4922
+ ],
4923
+ models: [
4924
+ {
4925
+ id: "MiniMaxAI/MiniMax-M1-80k",
4926
+ name: "MiniMax-M1-80k",
4927
+ match: {
4928
+ equals: "minimaxai/minimax-m1-80k"
4929
+ },
4930
+ context_window: 1e6,
4931
+ prices: {
4932
+ input_mtok: 0.44,
4933
+ output_mtok: 1.76
4934
+ }
4935
+ },
4936
+ {
4937
+ id: "MiniMaxAI/MiniMax-M2",
4938
+ name: "MiniMax-M2",
4939
+ match: {
4940
+ equals: "minimaxai/minimax-m2"
4941
+ },
4942
+ context_window: 204800,
4943
+ prices: {
4944
+ input_mtok: 0.24,
4945
+ output_mtok: 0.96
4946
+ }
4947
+ },
4948
+ {
4949
+ id: "NousResearch/Hermes-2-Pro-Llama-3-8B",
4950
+ name: "Hermes-2-Pro-Llama-3-8B",
4951
+ match: {
4952
+ equals: "nousresearch/hermes-2-pro-llama-3-8b"
4953
+ },
4954
+ context_window: 8192,
4955
+ prices: {
4956
+ input_mtok: 0.14,
4957
+ output_mtok: 0.14
4958
+ }
4959
+ },
4960
+ {
4961
+ id: "Qwen/Qwen2.5-72B-Instruct",
4962
+ name: "Qwen2.5-72B-Instruct",
4963
+ match: {
4964
+ equals: "qwen/qwen2.5-72b-instruct"
4965
+ },
4966
+ context_window: 32e3,
4967
+ prices: {
4968
+ input_mtok: 0.304,
4969
+ output_mtok: 0.32
4970
+ }
4971
+ },
4972
+ {
4973
+ id: "Qwen/Qwen3-235B-A22B",
4974
+ name: "Qwen3-235B-A22B",
4975
+ match: {
4976
+ equals: "qwen/qwen3-235b-a22b"
4977
+ },
4978
+ context_window: 40960,
4979
+ prices: {
4980
+ input_mtok: 0.16,
4981
+ output_mtok: 0.64
4982
+ }
4983
+ },
4984
+ {
4985
+ id: "Qwen/Qwen3-235B-A22B-Instruct-2507",
4986
+ name: "Qwen3-235B-A22B-Instruct-2507",
4987
+ match: {
4988
+ equals: "qwen/qwen3-235b-a22b-instruct-2507"
4989
+ },
4990
+ context_window: 131072,
4991
+ prices: {
4992
+ input_mtok: 0.072,
4993
+ output_mtok: 0.464
4994
+ }
4995
+ },
4996
+ {
4997
+ id: "Qwen/Qwen3-235B-A22B-Thinking-2507",
4998
+ name: "Qwen3-235B-A22B-Thinking-2507",
4999
+ match: {
5000
+ equals: "qwen/qwen3-235b-a22b-thinking-2507"
5001
+ },
5002
+ context_window: 131072,
5003
+ prices: {
5004
+ input_mtok: 0.24,
5005
+ output_mtok: 2.4
5006
+ }
5007
+ },
5008
+ {
5009
+ id: "Qwen/Qwen3-30B-A3B",
5010
+ name: "Qwen3-30B-A3B",
5011
+ match: {
5012
+ equals: "qwen/qwen3-30b-a3b"
5013
+ },
5014
+ context_window: 40960,
5015
+ prices: {
5016
+ input_mtok: 0.072,
5017
+ output_mtok: 0.36
5018
+ }
5019
+ },
5020
+ {
5021
+ id: "Qwen/Qwen3-32B",
5022
+ name: "Qwen3-32B",
5023
+ match: {
5024
+ equals: "qwen/qwen3-32b"
5025
+ },
5026
+ context_window: 40960,
5027
+ prices: {
5028
+ input_mtok: 0.08,
5029
+ output_mtok: 0.36
5030
+ }
5031
+ },
5032
+ {
5033
+ id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
5034
+ name: "Qwen3-Coder-480B-A35B-Instruct",
5035
+ match: {
5036
+ equals: "qwen/qwen3-coder-480b-a35b-instruct"
5037
+ },
5038
+ context_window: 262144,
5039
+ prices: {
5040
+ input_mtok: 0.232,
5041
+ output_mtok: 0.96
5042
+ }
5043
+ },
5044
+ {
5045
+ id: "Qwen/Qwen3-Next-80B-A3B-Instruct",
5046
+ name: "Qwen3-Next-80B-A3B-Instruct",
5047
+ match: {
5048
+ equals: "qwen/qwen3-next-80b-a3b-instruct"
5049
+ },
5050
+ context_window: 131072,
5051
+ prices: {
5052
+ input_mtok: 0.12,
5053
+ output_mtok: 1.2
5054
+ }
5055
+ },
5056
+ {
5057
+ id: "Qwen/Qwen3-Next-80B-A3B-Thinking",
5058
+ name: "Qwen3-Next-80B-A3B-Thinking",
5059
+ match: {
5060
+ equals: "qwen/qwen3-next-80b-a3b-thinking"
5061
+ },
5062
+ context_window: 131072,
5063
+ prices: {
5064
+ input_mtok: 0.12,
5065
+ output_mtok: 1.2
5066
+ }
5067
+ },
5068
+ {
5069
+ id: "Qwen/Qwen3-VL-235B-A22B-Instruct",
5070
+ name: "Qwen3-VL-235B-A22B-Instruct",
5071
+ match: {
5072
+ equals: "qwen/qwen3-vl-235b-a22b-instruct"
5073
+ },
5074
+ context_window: 131072,
5075
+ prices: {
5076
+ input_mtok: 0.24,
5077
+ output_mtok: 1.2
5078
+ }
5079
+ },
5080
+ {
5081
+ id: "Qwen/Qwen3-VL-235B-A22B-Thinking",
5082
+ name: "Qwen3-VL-235B-A22B-Thinking",
5083
+ match: {
5084
+ equals: "qwen/qwen3-vl-235b-a22b-thinking"
5085
+ },
5086
+ context_window: 131072,
5087
+ prices: {
5088
+ input_mtok: 0.784,
5089
+ output_mtok: 3.16
5090
+ }
5091
+ },
5092
+ {
5093
+ id: "Qwen/Qwen3-VL-30B-A3B-Instruct",
5094
+ name: "Qwen3-VL-30B-A3B-Instruct",
5095
+ match: {
5096
+ equals: "qwen/qwen3-vl-30b-a3b-instruct"
5097
+ },
5098
+ context_window: 131072,
5099
+ prices: {
5100
+ input_mtok: 0.16,
5101
+ output_mtok: 0.56
5102
+ }
5103
+ },
5104
+ {
5105
+ id: "Qwen/Qwen3-VL-30B-A3B-Thinking",
5106
+ name: "Qwen3-VL-30B-A3B-Thinking",
5107
+ match: {
5108
+ equals: "qwen/qwen3-vl-30b-a3b-thinking"
5109
+ },
5110
+ context_window: 131072,
5111
+ prices: {
5112
+ input_mtok: 0.16,
5113
+ output_mtok: 0.8
5114
+ }
5115
+ },
5116
+ {
5117
+ id: "Qwen/Qwen3-VL-8B-Instruct",
5118
+ name: "Qwen3-VL-8B-Instruct",
5119
+ match: {
5120
+ equals: "qwen/qwen3-vl-8b-instruct"
5121
+ },
5122
+ context_window: 131072,
5123
+ prices: {
5124
+ input_mtok: 0.064,
5125
+ output_mtok: 0.4
5126
+ }
5127
+ },
5128
+ {
5129
+ id: "Sao10K/L3-70B-Euryale-v2.1",
5130
+ name: "L3-70B-Euryale-v2.1",
5131
+ match: {
5132
+ equals: "sao10k/l3-70b-euryale-v2.1"
5133
+ },
5134
+ context_window: 8192,
5135
+ prices: {
5136
+ input_mtok: 1.48,
5137
+ output_mtok: 1.48
5138
+ }
5139
+ },
5140
+ {
5141
+ id: "Sao10K/L3-8B-Lunaris-v1",
5142
+ name: "L3-8B-Lunaris-v1",
5143
+ match: {
5144
+ equals: "sao10k/l3-8b-lunaris-v1"
5145
+ },
5146
+ context_window: 8192,
5147
+ prices: {
5148
+ input_mtok: 0.05,
5149
+ output_mtok: 0.05
5150
+ }
5151
+ },
5152
+ {
5153
+ id: "Sao10K/L3-8B-Stheno-v3.2",
5154
+ name: "L3-8B-Stheno-v3.2",
5155
+ match: {
5156
+ equals: "sao10k/l3-8b-stheno-v3.2"
5157
+ },
5158
+ context_window: 8192,
5159
+ prices: {
5160
+ input_mtok: 0.05,
5161
+ output_mtok: 0.05
5162
+ }
5163
+ },
5164
+ {
5165
+ id: "alpindale/WizardLM-2-8x22B",
5166
+ name: "WizardLM-2-8x22B",
5167
+ match: {
5168
+ equals: "alpindale/wizardlm-2-8x22b"
5169
+ },
5170
+ context_window: 65535,
5171
+ prices: {
5172
+ input_mtok: 0.496,
5173
+ output_mtok: 0.496
5174
+ }
5175
+ },
5176
+ {
5177
+ id: "baichuan-inc/Baichuan-M2-32B",
5178
+ name: "Baichuan-M2-32B",
5179
+ match: {
5180
+ equals: "baichuan-inc/baichuan-m2-32b"
5181
+ },
5182
+ context_window: 131072,
5183
+ prices: {
5184
+ input_mtok: 0.056,
5185
+ output_mtok: 0.056
5186
+ }
5187
+ },
5188
+ {
5189
+ id: "baidu/ERNIE-4.5-21B-A3B-PT",
5190
+ name: "ERNIE-4.5-21B-A3B-PT",
5191
+ match: {
5192
+ equals: "baidu/ernie-4.5-21b-a3b-pt"
5193
+ },
5194
+ context_window: 12e4,
5195
+ prices: {
5196
+ input_mtok: 0.056,
5197
+ output_mtok: 0.224
5198
+ }
5199
+ },
5200
+ {
5201
+ id: "baidu/ERNIE-4.5-300B-A47B-Base-PT",
5202
+ name: "ERNIE-4.5-300B-A47B-Base-PT",
5203
+ match: {
5204
+ equals: "baidu/ernie-4.5-300b-a47b-base-pt"
5205
+ },
5206
+ context_window: 123e3,
5207
+ prices: {
5208
+ input_mtok: 0.224,
5209
+ output_mtok: 0.88
5210
+ }
5211
+ },
5212
+ {
5213
+ id: "baidu/ERNIE-4.5-VL-28B-A3B-PT",
5214
+ name: "ERNIE-4.5-VL-28B-A3B-PT",
5215
+ match: {
5216
+ equals: "baidu/ernie-4.5-vl-28b-a3b-pt"
5217
+ },
5218
+ context_window: 3e4,
5219
+ prices: {
5220
+ input_mtok: 0.112,
5221
+ output_mtok: 0.448
5222
+ }
5223
+ },
5224
+ {
5225
+ id: "baidu/ERNIE-4.5-VL-424B-A47B-Base-PT",
5226
+ name: "ERNIE-4.5-VL-424B-A47B-Base-PT",
5227
+ match: {
5228
+ equals: "baidu/ernie-4.5-vl-424b-a47b-base-pt"
5229
+ },
5230
+ context_window: 123e3,
5231
+ prices: {
5232
+ input_mtok: 0.336,
5233
+ output_mtok: 1
5234
+ }
5235
+ },
5236
+ {
5237
+ id: "deepseek-ai/DeepSeek-Prover-V2-671B",
5238
+ name: "DeepSeek-Prover-V2-671B",
5239
+ match: {
5240
+ equals: "deepseek-ai/deepseek-prover-v2-671b"
5241
+ },
5242
+ context_window: 16e4,
5243
+ prices: {
5244
+ input_mtok: 0.56,
5245
+ output_mtok: 2
5246
+ }
5247
+ },
5248
+ {
5249
+ id: "deepseek-ai/DeepSeek-R1",
5250
+ name: "DeepSeek-R1",
5251
+ match: {
5252
+ or: [
5253
+ {
5254
+ equals: "deepseek-ai/deepseek-r1"
5255
+ },
5256
+ {
5257
+ equals: "deepseek-ai/deepseek-r1-0528"
5258
+ }
5259
+ ]
5260
+ },
5261
+ context_window: 64e3,
5262
+ prices: {
5263
+ input_mtok: 0.56,
5264
+ output_mtok: 2
5265
+ }
5266
+ },
5267
+ {
5268
+ id: "deepseek-ai/DeepSeek-R1-0528-Qwen3-8B",
5269
+ name: "DeepSeek-R1-0528-Qwen3-8B",
5270
+ match: {
5271
+ equals: "deepseek-ai/deepseek-r1-0528-qwen3-8b"
5272
+ },
5273
+ context_window: 128e3,
5274
+ prices: {
5275
+ input_mtok: 0.048,
5276
+ output_mtok: 0.072
5277
+ }
5278
+ },
5279
+ {
5280
+ id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
5281
+ name: "DeepSeek-R1-Distill-Llama-70B",
5282
+ match: {
5283
+ equals: "deepseek-ai/deepseek-r1-distill-llama-70b"
5284
+ },
5285
+ context_window: 8192,
5286
+ prices: {
5287
+ input_mtok: 0.64,
5288
+ output_mtok: 0.64
5289
+ }
5290
+ },
5291
+ {
5292
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B",
5293
+ name: "DeepSeek-R1-Distill-Qwen-14B",
5294
+ match: {
5295
+ equals: "deepseek-ai/deepseek-r1-distill-qwen-14b"
5296
+ },
5297
+ context_window: 32768,
5298
+ prices: {
5299
+ input_mtok: 0.12,
5300
+ output_mtok: 0.12
5301
+ }
5302
+ },
5303
+ {
5304
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
5305
+ name: "DeepSeek-R1-Distill-Qwen-32B",
5306
+ match: {
5307
+ equals: "deepseek-ai/deepseek-r1-distill-qwen-32b"
5308
+ },
5309
+ context_window: 64e3,
5310
+ prices: {
5311
+ input_mtok: 0.24,
5312
+ output_mtok: 0.24
5313
+ }
5314
+ },
5315
+ {
5316
+ id: "deepseek-ai/DeepSeek-V3",
5317
+ name: "DeepSeek-V3",
5318
+ match: {
5319
+ equals: "deepseek-ai/deepseek-v3"
5320
+ },
5321
+ context_window: 64e3,
5322
+ prices: {
5323
+ input_mtok: 0.32,
5324
+ output_mtok: 1.04
5325
+ }
5326
+ },
5327
+ {
5328
+ id: "deepseek-ai/DeepSeek-V3-0324",
5329
+ name: "DeepSeek-V3-0324",
5330
+ match: {
5331
+ equals: "deepseek-ai/deepseek-v3-0324"
5332
+ },
5333
+ context_window: 163840,
5334
+ prices: {
5335
+ input_mtok: 0.216,
5336
+ output_mtok: 0.896
5337
+ }
5338
+ },
5339
+ {
5340
+ id: "deepseek-ai/DeepSeek-V3.1",
5341
+ name: "DeepSeek-V3.1",
5342
+ match: {
5343
+ or: [
5344
+ {
5345
+ equals: "deepseek-ai/deepseek-v3.1"
5346
+ },
5347
+ {
5348
+ equals: "deepseek-ai/deepseek-v3.1-terminus"
5349
+ }
5350
+ ]
5351
+ },
5352
+ context_window: 131072,
5353
+ prices: {
5354
+ input_mtok: 0.216,
5355
+ output_mtok: 0.8
5356
+ }
5357
+ },
5358
+ {
5359
+ id: "deepseek-ai/DeepSeek-V3.2-Exp",
5360
+ name: "DeepSeek-V3.2-Exp",
5361
+ match: {
5362
+ equals: "deepseek-ai/deepseek-v3.2-exp"
5363
+ },
5364
+ context_window: 163840,
5365
+ prices: {
5366
+ input_mtok: 0.216,
5367
+ output_mtok: 0.328
5368
+ }
5369
+ },
5370
+ {
5371
+ id: "meta-llama/Llama-3.1-8B-Instruct",
5372
+ name: "Llama-3.1-8B-Instruct",
5373
+ match: {
5374
+ equals: "meta-llama/llama-3.1-8b-instruct"
5375
+ },
5376
+ context_window: 16384,
5377
+ prices: {
5378
+ input_mtok: 0.02,
5379
+ output_mtok: 0.05
5380
+ }
5381
+ },
5382
+ {
5383
+ id: "meta-llama/Llama-3.2-3B-Instruct",
5384
+ name: "Llama-3.2-3B-Instruct",
5385
+ match: {
5386
+ equals: "meta-llama/llama-3.2-3b-instruct"
5387
+ },
5388
+ context_window: 32768,
5389
+ prices: {
5390
+ input_mtok: 0.024,
5391
+ output_mtok: 0.04
5392
+ }
5393
+ },
5394
+ {
5395
+ id: "meta-llama/Llama-3.3-70B-Instruct",
5396
+ name: "Llama-3.3-70B-Instruct",
5397
+ match: {
5398
+ equals: "meta-llama/llama-3.3-70b-instruct"
5399
+ },
5400
+ context_window: 131072,
5401
+ prices: {
5402
+ input_mtok: 0.104,
5403
+ output_mtok: 0.312
5404
+ }
5405
+ },
5406
+ {
5407
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
5408
+ name: "Llama-4-Maverick-17B-128E-Instruct-FP8",
5409
+ match: {
5410
+ equals: "meta-llama/llama-4-maverick-17b-128e-instruct-fp8"
5411
+ },
5412
+ context_window: 1048576,
5413
+ prices: {
5414
+ input_mtok: 0.136,
5415
+ output_mtok: 0.68
5416
+ }
5417
+ },
5418
+ {
5419
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
5420
+ name: "Llama-4-Scout-17B-16E-Instruct",
5421
+ match: {
5422
+ equals: "meta-llama/llama-4-scout-17b-16e-instruct"
5423
+ },
5424
+ context_window: 131072,
5425
+ prices: {
5426
+ input_mtok: 0.08,
5427
+ output_mtok: 0.4
5428
+ }
5429
+ },
5430
+ {
5431
+ id: "meta-llama/Meta-Llama-3-70B-Instruct",
5432
+ name: "Meta-Llama-3-70B-Instruct",
5433
+ match: {
5434
+ equals: "meta-llama/meta-llama-3-70b-instruct"
5435
+ },
5436
+ context_window: 8192,
5437
+ prices: {
5438
+ input_mtok: 0.51,
5439
+ output_mtok: 0.74
5440
+ }
5441
+ },
5442
+ {
5443
+ id: "meta-llama/Meta-Llama-3-8B-Instruct",
5444
+ name: "Meta-Llama-3-8B-Instruct",
5445
+ match: {
5446
+ equals: "meta-llama/meta-llama-3-8b-instruct"
5447
+ },
5448
+ context_window: 8192,
5449
+ prices: {
5450
+ input_mtok: 0.032,
5451
+ output_mtok: 0.032
5452
+ }
5453
+ },
5454
+ {
5455
+ id: "moonshotai/Kimi-K2-Instruct",
5456
+ name: "Kimi-K2-Instruct",
5457
+ match: {
5458
+ equals: "moonshotai/kimi-k2-instruct"
5459
+ },
5460
+ context_window: 131072,
5461
+ prices: {
5462
+ input_mtok: 0.456,
5463
+ output_mtok: 1.84
5464
+ }
5465
+ },
5466
+ {
5467
+ id: "moonshotai/Kimi-K2-Instruct-0905",
5468
+ name: "Kimi-K2-Instruct-0905",
5469
+ match: {
5470
+ equals: "moonshotai/kimi-k2-instruct-0905"
5471
+ },
5472
+ context_window: 262144,
5473
+ prices: {
5474
+ input_mtok: 0.48,
5475
+ output_mtok: 2
5476
+ }
5477
+ },
5478
+ {
5479
+ id: "moonshotai/Kimi-K2-Thinking",
5480
+ name: "Kimi-K2-Thinking",
5481
+ match: {
5482
+ equals: "moonshotai/kimi-k2-thinking"
5483
+ },
5484
+ context_window: 262144,
5485
+ prices: {
5486
+ input_mtok: 0.48,
5487
+ output_mtok: 2
5488
+ }
5489
+ },
5490
+ {
5491
+ id: "openai/gpt-oss-120b",
5492
+ name: "gpt-oss-120b",
5493
+ match: {
5494
+ equals: "openai/gpt-oss-120b"
5495
+ },
5496
+ context_window: 131072,
5497
+ prices: {
5498
+ input_mtok: 0.04,
5499
+ output_mtok: 0.2
5500
+ }
5501
+ },
5502
+ {
5503
+ id: "openai/gpt-oss-20b",
5504
+ name: "gpt-oss-20b",
5505
+ match: {
5506
+ equals: "openai/gpt-oss-20b"
5507
+ },
5508
+ context_window: 131072,
5509
+ prices: {
5510
+ input_mtok: 0.032,
5511
+ output_mtok: 0.12
5512
+ }
5513
+ },
5514
+ {
5515
+ id: "zai-org/GLM-4-32B-0414",
5516
+ name: "GLM-4-32B-0414",
5517
+ match: {
5518
+ equals: "zai-org/glm-4-32b-0414"
5519
+ },
5520
+ context_window: 32e3,
5521
+ prices: {
5522
+ input_mtok: 0.55,
5523
+ output_mtok: 1.66
5524
+ }
5525
+ },
5526
+ {
5527
+ id: "zai-org/GLM-4.1V-9B-Thinking",
5528
+ name: "GLM-4.1V-9B-Thinking",
5529
+ match: {
5530
+ equals: "zai-org/glm-4.1v-9b-thinking"
5531
+ },
5532
+ context_window: 65536,
5533
+ prices: {
5534
+ input_mtok: 0.028,
5535
+ output_mtok: 0.1104
5536
+ }
5537
+ },
5538
+ {
5539
+ id: "zai-org/GLM-4.5",
5540
+ name: "GLM-4.5",
5541
+ match: {
5542
+ equals: "zai-org/glm-4.5"
5543
+ },
5544
+ context_window: 131072,
5545
+ prices: {
5546
+ input_mtok: 0.48,
5547
+ output_mtok: 1.76
5548
+ }
5549
+ },
5550
+ {
5551
+ id: "zai-org/GLM-4.5-Air",
5552
+ name: "GLM-4.5-Air",
5553
+ match: {
5554
+ equals: "zai-org/glm-4.5-air"
5555
+ },
5556
+ context_window: 131072,
5557
+ prices: {
5558
+ input_mtok: 0.104,
5559
+ output_mtok: 0.68
5560
+ }
5561
+ },
5562
+ {
5563
+ id: "zai-org/GLM-4.5V",
5564
+ name: "GLM-4.5V",
5565
+ match: {
5566
+ equals: "zai-org/glm-4.5v"
5567
+ },
5568
+ context_window: 65536,
5569
+ prices: {
5570
+ input_mtok: 0.48,
5571
+ output_mtok: 1.44
5572
+ }
5573
+ },
5574
+ {
5575
+ id: "zai-org/GLM-4.6",
5576
+ name: "GLM-4.6",
5577
+ match: {
5578
+ equals: "zai-org/glm-4.6"
5579
+ },
5580
+ context_window: 204800,
5581
+ prices: {
5582
+ input_mtok: 0.48,
5583
+ output_mtok: 1.76
5584
+ }
5585
+ }
5586
+ ]
5587
+ },
5588
+ {
5589
+ id: "huggingface_nscale",
5590
+ name: "HuggingFace (nscale)",
5591
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
5592
+ api_pattern: "https://router\\.huggingface\\.co/nscale",
5593
+ provider_match: {
5594
+ and: [
5595
+ {
5596
+ contains: "huggingface"
5597
+ },
5598
+ {
5599
+ contains: "nscale"
5600
+ }
5601
+ ]
5602
+ },
5603
+ extractors: [
5604
+ {
5605
+ api_flavor: "chat",
5606
+ root: "usage",
5607
+ model_path: "model",
5608
+ mappings: [
5609
+ {
5610
+ path: "prompt_tokens",
5611
+ dest: "input_tokens",
5612
+ required: !0
5613
+ },
5614
+ {
5615
+ path: ["prompt_tokens_details", "cached_tokens"],
5616
+ dest: "cache_read_tokens",
5617
+ required: !1
5618
+ },
5619
+ {
5620
+ path: ["prompt_tokens_details", "audio_tokens"],
5621
+ dest: "input_audio_tokens",
5622
+ required: !1
5623
+ },
5624
+ {
5625
+ path: ["completion_tokens_details", "audio_tokens"],
5626
+ dest: "output_audio_tokens",
5627
+ required: !1
5628
+ },
5629
+ {
5630
+ path: "completion_tokens",
5631
+ dest: "output_tokens",
5632
+ required: !0
5633
+ }
5634
+ ]
5635
+ }
5636
+ ],
5637
+ models: [
5638
+ {
5639
+ id: "Qwen/QwQ-32B",
5640
+ name: "QwQ-32B",
5641
+ match: {
5642
+ equals: "qwen/qwq-32b"
5643
+ },
5644
+ context_window: 131072,
5645
+ prices: {
5646
+ input_mtok: 0.18,
5647
+ output_mtok: 0.2
5648
+ }
5649
+ },
5650
+ {
5651
+ id: "Qwen/Qwen2.5-Coder-32B-Instruct",
5652
+ name: "Qwen2.5-Coder-32B-Instruct",
5653
+ match: {
5654
+ equals: "qwen/qwen2.5-coder-32b-instruct"
5655
+ },
5656
+ context_window: 131072,
5657
+ prices: {
5658
+ input_mtok: 0.06,
5659
+ output_mtok: 0.2
5660
+ }
5661
+ },
5662
+ {
5663
+ id: "Qwen/Qwen2.5-Coder-3B-Instruct",
5664
+ name: "Qwen2.5-Coder-3B-Instruct",
5665
+ match: {
5666
+ equals: "qwen/qwen2.5-coder-3b-instruct"
5667
+ },
5668
+ context_window: 32768,
5669
+ prices: {
5670
+ input_mtok: 0.01,
5671
+ output_mtok: 0.03
5672
+ }
5673
+ },
5674
+ {
5675
+ id: "Qwen/Qwen2.5-Coder-7B-Instruct",
5676
+ name: "Qwen2.5-Coder-7B-Instruct",
5677
+ match: {
5678
+ equals: "qwen/qwen2.5-coder-7b-instruct"
5679
+ },
5680
+ context_window: 131072,
5681
+ prices: {
5682
+ input_mtok: 0.01,
5683
+ output_mtok: 0.03
5684
+ }
5685
+ },
5686
+ {
5687
+ id: "Qwen/Qwen3-14B",
5688
+ name: "Qwen3-14B",
5689
+ match: {
5690
+ equals: "qwen/qwen3-14b"
5691
+ },
5692
+ context_window: 40960,
5693
+ prices: {
5694
+ input_mtok: 0.07,
5695
+ output_mtok: 0.2
5696
+ }
5697
+ },
5698
+ {
5699
+ id: "Qwen/Qwen3-235B-A22B",
5700
+ name: "Qwen3-235B-A22B",
5701
+ match: {
5702
+ or: [
5703
+ {
5704
+ equals: "qwen/qwen3-235b-a22b"
5705
+ },
5706
+ {
5707
+ equals: "qwen/qwen3-235b-a22b-instruct-2507"
5708
+ }
5709
+ ]
5710
+ },
5711
+ context_window: 32e3,
5712
+ prices: {
5713
+ input_mtok: 0.2,
5714
+ output_mtok: 0.6
5715
+ }
5716
+ },
5717
+ {
5718
+ id: "Qwen/Qwen3-32B",
5719
+ name: "Qwen3-32B",
5720
+ match: {
5721
+ equals: "qwen/qwen3-32b"
5722
+ },
5723
+ context_window: 40960,
5724
+ prices: {
5725
+ input_mtok: 0.08,
5726
+ output_mtok: 0.25
5727
+ }
5728
+ },
5729
+ {
5730
+ id: "Qwen/Qwen3-4B-Instruct-2507",
5731
+ name: "Qwen3-4B-Instruct-2507",
5732
+ match: {
5733
+ equals: "qwen/qwen3-4b-instruct-2507"
5734
+ },
5735
+ context_window: 262144,
5736
+ prices: {
5737
+ input_mtok: 0.01,
5738
+ output_mtok: 0.03
5739
+ }
5740
+ },
5741
+ {
5742
+ id: "Qwen/Qwen3-4B-Thinking-2507",
5743
+ name: "Qwen3-4B-Thinking-2507",
5744
+ match: {
5745
+ equals: "qwen/qwen3-4b-thinking-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-8B",
5755
+ name: "Qwen3-8B",
5756
+ match: {
5757
+ equals: "qwen/qwen3-8b"
5758
+ },
5759
+ context_window: 40960,
5760
+ prices: {
5761
+ input_mtok: 0.07,
5762
+ output_mtok: 0.18
5763
+ }
5764
+ },
5765
+ {
5766
+ id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
5767
+ name: "DeepSeek-R1-Distill-Llama-70B",
5768
+ match: {
5769
+ equals: "deepseek-ai/deepseek-r1-distill-llama-70b"
5770
+ },
5771
+ context_window: 131072,
5772
+ prices: {
5773
+ input_mtok: 0.75,
5774
+ output_mtok: 0.75
5775
+ }
5776
+ },
5777
+ {
5778
+ id: "deepseek-ai/DeepSeek-R1-Distill-Llama-8B",
5779
+ name: "DeepSeek-R1-Distill-Llama-8B",
5780
+ match: {
5781
+ equals: "deepseek-ai/deepseek-r1-distill-llama-8b"
5782
+ },
5783
+ context_window: 131072,
5784
+ prices: {
5785
+ input_mtok: 0.05,
5786
+ output_mtok: 0.05
5787
+ }
5788
+ },
5789
+ {
5790
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",
5791
+ name: "DeepSeek-R1-Distill-Qwen-1.5B",
5792
+ match: {
5793
+ equals: "deepseek-ai/deepseek-r1-distill-qwen-1.5b"
5794
+ },
5795
+ context_window: 131072,
5796
+ prices: {
5797
+ input_mtok: 0.1,
5798
+ output_mtok: 0.1
5799
+ }
5800
+ },
5801
+ {
5802
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B",
5803
+ name: "DeepSeek-R1-Distill-Qwen-14B",
5804
+ match: {
5805
+ equals: "deepseek-ai/deepseek-r1-distill-qwen-14b"
5806
+ },
5807
+ context_window: 131072,
5808
+ prices: {
5809
+ input_mtok: 0.2,
5810
+ output_mtok: 0.2
5811
+ }
5812
+ },
5813
+ {
5814
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
5815
+ name: "DeepSeek-R1-Distill-Qwen-32B",
5816
+ match: {
5817
+ equals: "deepseek-ai/deepseek-r1-distill-qwen-32b"
5818
+ },
5819
+ context_window: 131072,
5820
+ prices: {
5821
+ input_mtok: 0.3,
5822
+ output_mtok: 0.3
5823
+ }
5824
+ },
5825
+ {
5826
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B",
5827
+ name: "DeepSeek-R1-Distill-Qwen-7B",
5828
+ match: {
5829
+ equals: "deepseek-ai/deepseek-r1-distill-qwen-7b"
5830
+ },
5831
+ context_window: 131072,
5832
+ prices: {
5833
+ input_mtok: 0.15,
5834
+ output_mtok: 0.15
5835
+ }
5836
+ },
5837
+ {
5838
+ id: "meta-llama/Llama-3.1-8B-Instruct",
5839
+ name: "Llama-3.1-8B-Instruct",
5840
+ match: {
5841
+ equals: "meta-llama/llama-3.1-8b-instruct"
5842
+ },
5843
+ context_window: 131072,
5844
+ prices: {
5845
+ input_mtok: 0.06,
5846
+ output_mtok: 0.06
5847
+ }
5848
+ },
5849
+ {
5850
+ id: "meta-llama/Llama-3.3-70B-Instruct",
5851
+ name: "Llama-3.3-70B-Instruct",
5852
+ match: {
5853
+ equals: "meta-llama/llama-3.3-70b-instruct"
5854
+ },
5855
+ context_window: 131072,
5856
+ prices: {
5857
+ input_mtok: 0.4,
5858
+ output_mtok: 0.4
5859
+ }
5860
+ },
5861
+ {
5862
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
5863
+ name: "Llama-4-Scout-17B-16E-Instruct",
5864
+ match: {
5865
+ equals: "meta-llama/llama-4-scout-17b-16e-instruct"
5866
+ },
5867
+ context_window: 89e4,
5868
+ prices: {
5869
+ input_mtok: 0.09,
5870
+ output_mtok: 0.29
5871
+ }
5872
+ },
5873
+ {
5874
+ id: "openai/gpt-oss-120b",
5875
+ name: "gpt-oss-120b",
5876
+ match: {
5877
+ equals: "openai/gpt-oss-120b"
5878
+ },
5879
+ context_window: 131072,
5880
+ prices: {
5881
+ input_mtok: 0.1,
5882
+ output_mtok: 0.4
5883
+ }
5884
+ },
5885
+ {
5886
+ id: "openai/gpt-oss-20b",
5887
+ name: "gpt-oss-20b",
5888
+ match: {
5889
+ equals: "openai/gpt-oss-20b"
5890
+ },
5891
+ context_window: 131072,
5892
+ prices: {
5893
+ input_mtok: 0.05,
5894
+ output_mtok: 0.2
5895
+ }
5896
+ }
5897
+ ]
5898
+ },
5899
+ {
5900
+ id: "huggingface_publicai",
5901
+ name: "HuggingFace (publicai)",
5902
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
5903
+ api_pattern: "https://router\\.huggingface\\.co/publicai",
5904
+ provider_match: {
5905
+ and: [
5906
+ {
5907
+ contains: "huggingface"
5908
+ },
5909
+ {
5910
+ contains: "publicai"
5911
+ }
5912
+ ]
5913
+ },
5914
+ extractors: [
5915
+ {
5916
+ api_flavor: "chat",
5917
+ root: "usage",
5918
+ model_path: "model",
5919
+ mappings: [
5920
+ {
5921
+ path: "prompt_tokens",
5922
+ dest: "input_tokens",
5923
+ required: !0
5924
+ },
5925
+ {
5926
+ path: ["prompt_tokens_details", "cached_tokens"],
5927
+ dest: "cache_read_tokens",
5928
+ required: !1
5929
+ },
5930
+ {
5931
+ path: ["prompt_tokens_details", "audio_tokens"],
5932
+ dest: "input_audio_tokens",
5933
+ required: !1
5934
+ },
5935
+ {
5936
+ path: ["completion_tokens_details", "audio_tokens"],
5937
+ dest: "output_audio_tokens",
5938
+ required: !1
5939
+ },
5940
+ {
5941
+ path: "completion_tokens",
5942
+ dest: "output_tokens",
5943
+ required: !0
5944
+ }
5945
+ ]
5946
+ }
5947
+ ],
5948
+ models: [
5949
+ {
5950
+ id: "aisingapore/Gemma-SEA-LION-v4-27B-IT",
5951
+ name: "Gemma-SEA-LION-v4-27B-IT",
5952
+ match: {
5953
+ equals: "aisingapore/gemma-sea-lion-v4-27b-it"
5954
+ },
5955
+ prices: {}
5956
+ },
5957
+ {
5958
+ id: "aisingapore/Qwen-SEA-LION-v4-32B-IT",
5959
+ name: "Qwen-SEA-LION-v4-32B-IT",
5960
+ match: {
5961
+ equals: "aisingapore/qwen-sea-lion-v4-32b-it"
5962
+ },
5963
+ prices: {}
5964
+ },
5965
+ {
5966
+ id: "allenai/Olmo-3-7B-Instruct",
5967
+ name: "Olmo-3-7B-Instruct",
5968
+ match: {
5969
+ equals: "allenai/olmo-3-7b-instruct"
5970
+ },
5971
+ prices: {}
5972
+ },
5973
+ {
5974
+ id: "swiss-ai/Apertus-70B-Instruct-2509",
5975
+ name: "Apertus-70B-Instruct-2509",
5976
+ match: {
5977
+ equals: "swiss-ai/apertus-70b-instruct-2509"
5978
+ },
5979
+ prices: {}
5980
+ },
5981
+ {
5982
+ id: "swiss-ai/Apertus-8B-Instruct-2509",
5983
+ name: "Apertus-8B-Instruct-2509",
5984
+ match: {
5985
+ equals: "swiss-ai/apertus-8b-instruct-2509"
5986
+ },
5987
+ prices: {}
5988
+ }
5989
+ ]
5990
+ },
5991
+ {
5992
+ id: "huggingface_sambanova",
5993
+ name: "HuggingFace (sambanova)",
5994
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
5995
+ api_pattern: "https://router\\.huggingface\\.co/sambanova",
5996
+ provider_match: {
5997
+ and: [
5998
+ {
5999
+ contains: "huggingface"
6000
+ },
6001
+ {
6002
+ contains: "sambanova"
6003
+ }
6004
+ ]
6005
+ },
6006
+ extractors: [
6007
+ {
6008
+ api_flavor: "chat",
6009
+ root: "usage",
6010
+ model_path: "model",
6011
+ mappings: [
6012
+ {
6013
+ path: "prompt_tokens",
6014
+ dest: "input_tokens",
6015
+ required: !0
6016
+ },
6017
+ {
6018
+ path: ["prompt_tokens_details", "cached_tokens"],
6019
+ dest: "cache_read_tokens",
6020
+ required: !1
6021
+ },
6022
+ {
6023
+ path: ["prompt_tokens_details", "audio_tokens"],
6024
+ dest: "input_audio_tokens",
6025
+ required: !1
6026
+ },
6027
+ {
6028
+ path: ["completion_tokens_details", "audio_tokens"],
6029
+ dest: "output_audio_tokens",
6030
+ required: !1
6031
+ },
6032
+ {
6033
+ path: "completion_tokens",
6034
+ dest: "output_tokens",
6035
+ required: !0
6036
+ }
6037
+ ]
6038
+ }
6039
+ ],
6040
+ models: [
6041
+ {
6042
+ id: "Qwen/Qwen3-32B",
6043
+ name: "Qwen3-32B",
6044
+ match: {
6045
+ equals: "qwen/qwen3-32b"
6046
+ },
6047
+ context_window: 32768,
6048
+ prices: {
6049
+ input_mtok: 0.4,
6050
+ output_mtok: 0.8
6051
+ }
6052
+ },
6053
+ {
6054
+ id: "deepseek-ai/DeepSeek-R1-0528",
6055
+ name: "DeepSeek-R1-0528",
6056
+ match: {
6057
+ equals: "deepseek-ai/deepseek-r1-0528"
6058
+ },
6059
+ context_window: 131072,
6060
+ prices: {
6061
+ input_mtok: 5,
6062
+ output_mtok: 7
6063
+ }
6064
+ },
6065
+ {
6066
+ id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
6067
+ name: "DeepSeek-R1-Distill-Llama-70B",
6068
+ match: {
6069
+ equals: "deepseek-ai/deepseek-r1-distill-llama-70b"
6070
+ },
6071
+ context_window: 131072,
6072
+ prices: {
6073
+ input_mtok: 0.7,
6074
+ output_mtok: 1.4
6075
+ }
6076
+ },
6077
+ {
6078
+ id: "deepseek-ai/DeepSeek-V3-0324",
6079
+ name: "DeepSeek-V3-0324",
6080
+ match: {
6081
+ equals: "deepseek-ai/deepseek-v3-0324"
6082
+ },
6083
+ context_window: 131072,
6084
+ prices: {
6085
+ input_mtok: 3,
6086
+ output_mtok: 4.5
6087
+ }
6088
+ },
6089
+ {
6090
+ id: "meta-llama/Llama-3.1-8B-Instruct",
6091
+ name: "Llama-3.1-8B-Instruct",
6092
+ match: {
6093
+ equals: "meta-llama/llama-3.1-8b-instruct"
6094
+ },
6095
+ context_window: 16384,
6096
+ prices: {
6097
+ input_mtok: 0.1,
6098
+ output_mtok: 0.2
6099
+ }
6100
+ },
6101
+ {
6102
+ id: "meta-llama/Llama-3.3-70B-Instruct",
6103
+ name: "Llama-3.3-70B-Instruct",
6104
+ match: {
6105
+ equals: "meta-llama/llama-3.3-70b-instruct"
6106
+ },
6107
+ context_window: 131072,
6108
+ prices: {
6109
+ input_mtok: 0.6,
6110
+ output_mtok: 1.2
6111
+ }
6112
+ },
6113
+ {
6114
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct",
6115
+ name: "Llama-4-Maverick-17B-128E-Instruct",
6116
+ match: {
6117
+ equals: "meta-llama/llama-4-maverick-17b-128e-instruct"
6118
+ },
6119
+ context_window: 131072,
6120
+ prices: {
6121
+ input_mtok: 0.63,
6122
+ output_mtok: 1.8
6123
+ }
6124
+ },
6125
+ {
6126
+ id: "tokyotech-llm/Llama-3.3-Swallow-70B-Instruct-v0.4",
6127
+ name: "Llama-3.3-Swallow-70B-Instruct-v0.4",
6128
+ match: {
6129
+ equals: "tokyotech-llm/llama-3.3-swallow-70b-instruct-v0.4"
6130
+ },
6131
+ context_window: 131072,
6132
+ prices: {
6133
+ input_mtok: 0.6,
6134
+ output_mtok: 1.2
6135
+ }
6136
+ }
6137
+ ]
6138
+ },
6139
+ {
6140
+ id: "huggingface_together",
6141
+ name: "HuggingFace (together)",
6142
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
6143
+ api_pattern: "https://router\\.huggingface\\.co/together",
6144
+ provider_match: {
6145
+ and: [
6146
+ {
6147
+ contains: "huggingface"
6148
+ },
6149
+ {
6150
+ contains: "together"
6151
+ }
6152
+ ]
6153
+ },
6154
+ extractors: [
6155
+ {
6156
+ api_flavor: "chat",
6157
+ root: "usage",
6158
+ model_path: "model",
6159
+ mappings: [
6160
+ {
6161
+ path: "prompt_tokens",
6162
+ dest: "input_tokens",
6163
+ required: !0
6164
+ },
6165
+ {
6166
+ path: ["prompt_tokens_details", "cached_tokens"],
6167
+ dest: "cache_read_tokens",
6168
+ required: !1
6169
+ },
6170
+ {
6171
+ path: ["prompt_tokens_details", "audio_tokens"],
6172
+ dest: "input_audio_tokens",
6173
+ required: !1
6174
+ },
6175
+ {
6176
+ path: ["completion_tokens_details", "audio_tokens"],
6177
+ dest: "output_audio_tokens",
6178
+ required: !1
6179
+ },
6180
+ {
6181
+ path: "completion_tokens",
6182
+ dest: "output_tokens",
6183
+ required: !0
6184
+ }
6185
+ ]
6186
+ }
6187
+ ],
6188
+ models: [
6189
+ {
6190
+ id: "Qwen/Qwen2.5-72B-Instruct",
6191
+ name: "Qwen2.5-72B-Instruct",
6192
+ match: {
6193
+ equals: "qwen/qwen2.5-72b-instruct"
6194
+ },
6195
+ context_window: 131072,
6196
+ prices: {
6197
+ input_mtok: 1.2,
6198
+ output_mtok: 1.2
6199
+ }
6200
+ },
6201
+ {
6202
+ id: "Qwen/Qwen2.5-7B-Instruct",
6203
+ name: "Qwen2.5-7B-Instruct",
3409
6204
  match: {
3410
- equals: "gemma-7b-it"
6205
+ equals: "qwen/qwen2.5-7b-instruct"
3411
6206
  },
6207
+ context_window: 32768,
3412
6208
  prices: {
3413
- input_mtok: 0.07,
3414
- output_mtok: 0.07
6209
+ input_mtok: 0.3,
6210
+ output_mtok: 0.3
3415
6211
  }
3416
6212
  },
3417
6213
  {
3418
- id: "gemma2-9b-it",
3419
- name: "Gemma 2 9B 8k",
6214
+ id: "Qwen/Qwen3-235B-A22B",
6215
+ name: "Qwen3-235B-A22B",
3420
6216
  match: {
3421
6217
  or: [
3422
6218
  {
3423
- equals: "gemma2-9b-it"
6219
+ equals: "qwen/qwen3-235b-a22b"
3424
6220
  },
3425
6221
  {
3426
- equals: "gemma2-9b"
6222
+ equals: "qwen/qwen3-235b-a22b-fp8"
6223
+ },
6224
+ {
6225
+ equals: "qwen/qwen3-235b-a22b-instruct-2507"
3427
6226
  }
3428
6227
  ]
3429
6228
  },
6229
+ context_window: 40960,
3430
6230
  prices: {
3431
6231
  input_mtok: 0.2,
3432
- output_mtok: 0.2
3433
- }
3434
- },
3435
- {
3436
- id: "llama-3.1-405b-reasoning",
3437
- match: {
3438
- equals: "llama-3.1-405b-reasoning"
3439
- },
3440
- prices: {
3441
- input_mtok: 0.59,
3442
- output_mtok: 0.79
3443
- }
3444
- },
3445
- {
3446
- id: "llama-3.1-70b-versatile",
3447
- match: {
3448
- equals: "llama-3.1-70b-versatile"
3449
- },
3450
- prices: {
3451
- input_mtok: 0.59,
3452
- output_mtok: 0.79
3453
- }
3454
- },
3455
- {
3456
- id: "llama-3.1-8b-instant",
3457
- name: "Llama 3.1 8B Instant 128k",
3458
- match: {
3459
- equals: "llama-3.1-8b-instant"
3460
- },
3461
- prices: {
3462
- input_mtok: 0.05,
3463
- output_mtok: 0.08
3464
- }
3465
- },
3466
- {
3467
- id: "llama-3.2-11b-text-preview",
3468
- match: {
3469
- equals: "llama-3.2-11b-text-preview"
3470
- },
3471
- prices: {
3472
- input_mtok: 0.18,
3473
- output_mtok: 0.18
3474
- }
3475
- },
3476
- {
3477
- id: "llama-3.2-11b-vision-preview",
3478
- match: {
3479
- equals: "llama-3.2-11b-vision-preview"
3480
- },
3481
- prices: {
3482
- input_mtok: 0.18,
3483
- output_mtok: 0.18
3484
- }
3485
- },
3486
- {
3487
- id: "llama-3.2-1b-preview",
3488
- match: {
3489
- equals: "llama-3.2-1b-preview"
3490
- },
3491
- prices: {
3492
- input_mtok: 0.04,
3493
- output_mtok: 0.04
6232
+ output_mtok: 0.6
3494
6233
  }
3495
6234
  },
3496
6235
  {
3497
- id: "llama-3.2-3b-preview",
6236
+ id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
6237
+ name: "Qwen3-Coder-480B-A35B-Instruct",
3498
6238
  match: {
3499
- equals: "llama-3.2-3b-preview"
6239
+ or: [
6240
+ {
6241
+ equals: "qwen/qwen3-coder-480b-a35b-instruct"
6242
+ },
6243
+ {
6244
+ equals: "qwen/qwen3-coder-480b-a35b-instruct-fp8"
6245
+ }
6246
+ ]
3500
6247
  },
6248
+ context_window: 262144,
3501
6249
  prices: {
3502
- input_mtok: 0.06,
3503
- output_mtok: 0.06
6250
+ input_mtok: 2,
6251
+ output_mtok: 2
3504
6252
  }
3505
6253
  },
3506
6254
  {
3507
- id: "llama-3.2-90b-text-preview",
6255
+ id: "Qwen/Qwen3-Next-80B-A3B-Instruct",
6256
+ name: "Qwen3-Next-80B-A3B-Instruct",
3508
6257
  match: {
3509
- equals: "llama-3.2-90b-text-preview"
6258
+ equals: "qwen/qwen3-next-80b-a3b-instruct"
3510
6259
  },
6260
+ context_window: 262144,
3511
6261
  prices: {
3512
- input_mtok: 0.9,
3513
- output_mtok: 0.9
6262
+ input_mtok: 0.15,
6263
+ output_mtok: 1.5
3514
6264
  }
3515
6265
  },
3516
6266
  {
3517
- id: "llama-3.2-90b-vision-preview",
6267
+ id: "Qwen/Qwen3-Next-80B-A3B-Thinking",
6268
+ name: "Qwen3-Next-80B-A3B-Thinking",
3518
6269
  match: {
3519
- equals: "llama-3.2-90b-vision-preview"
6270
+ equals: "qwen/qwen3-next-80b-a3b-thinking"
3520
6271
  },
6272
+ context_window: 262144,
3521
6273
  prices: {
3522
- input_mtok: 0.9,
3523
- output_mtok: 0.9
6274
+ input_mtok: 0.15,
6275
+ output_mtok: 1.5
3524
6276
  }
3525
6277
  },
3526
6278
  {
3527
- id: "llama-3.3-70b-specdec",
6279
+ id: "deepcogito/cogito-671b-v2.1",
6280
+ name: "cogito-671b-v2.1",
3528
6281
  match: {
3529
- equals: "llama-3.3-70b-specdec"
6282
+ or: [
6283
+ {
6284
+ equals: "deepcogito/cogito-671b-v2.1"
6285
+ },
6286
+ {
6287
+ equals: "deepcogito/cogito-671b-v2.1-fp8"
6288
+ }
6289
+ ]
3530
6290
  },
6291
+ context_window: 163840,
3531
6292
  prices: {
3532
- input_mtok: 0.59,
3533
- output_mtok: 0.99
6293
+ input_mtok: 1.25,
6294
+ output_mtok: 1.25
3534
6295
  }
3535
6296
  },
3536
6297
  {
3537
- id: "llama-3.3-70b-versatile",
3538
- name: "Llama 3.3 70B Versatile 128k",
6298
+ id: "deepcogito/cogito-v2-preview-llama-109B-MoE",
6299
+ name: "cogito-v2-preview-llama-109B-MoE",
3539
6300
  match: {
3540
- equals: "llama-3.3-70b-versatile"
6301
+ equals: "deepcogito/cogito-v2-preview-llama-109b-moe"
3541
6302
  },
6303
+ context_window: 32767,
3542
6304
  prices: {
3543
- input_mtok: 0.59,
3544
- output_mtok: 0.79
6305
+ input_mtok: 0.18000000000000002,
6306
+ output_mtok: 0.5900000000000001
3545
6307
  }
3546
6308
  },
3547
6309
  {
3548
- id: "llama-guard-3-8b",
6310
+ id: "deepcogito/cogito-v2-preview-llama-405B",
6311
+ name: "cogito-v2-preview-llama-405B",
3549
6312
  match: {
3550
- equals: "llama-guard-3-8b"
6313
+ equals: "deepcogito/cogito-v2-preview-llama-405b"
3551
6314
  },
6315
+ context_window: 32768,
3552
6316
  prices: {
3553
- input_mtok: 0.2,
3554
- output_mtok: 0.2
6317
+ input_mtok: 3.5,
6318
+ output_mtok: 3.5
3555
6319
  }
3556
6320
  },
3557
6321
  {
3558
- id: "llama2-70b-4096",
6322
+ id: "deepcogito/cogito-v2-preview-llama-70B",
6323
+ name: "cogito-v2-preview-llama-70B",
3559
6324
  match: {
3560
- equals: "llama2-70b-4096"
6325
+ equals: "deepcogito/cogito-v2-preview-llama-70b"
3561
6326
  },
6327
+ context_window: 32768,
3562
6328
  prices: {
3563
- input_mtok: 0.7,
3564
- output_mtok: 0.8
6329
+ input_mtok: 0.88,
6330
+ output_mtok: 0.88
3565
6331
  }
3566
6332
  },
3567
6333
  {
3568
- id: "llama3-70b-8192",
6334
+ id: "deepseek-ai/DeepSeek-R1",
6335
+ name: "DeepSeek-R1",
3569
6336
  match: {
3570
- equals: "llama3-70b-8192"
6337
+ or: [
6338
+ {
6339
+ equals: "deepseek-ai/deepseek-r1"
6340
+ },
6341
+ {
6342
+ equals: "deepseek-ai/deepseek-r1-0528"
6343
+ }
6344
+ ]
3571
6345
  },
6346
+ context_window: 163840,
3572
6347
  prices: {
3573
- input_mtok: 0.59,
3574
- output_mtok: 0.79
6348
+ input_mtok: 3,
6349
+ output_mtok: 7
3575
6350
  }
3576
6351
  },
3577
6352
  {
3578
- id: "llama3-8b-8192",
6353
+ id: "deepseek-ai/DeepSeek-V3",
6354
+ name: "DeepSeek-V3",
3579
6355
  match: {
3580
- equals: "llama3-8b-8192"
6356
+ or: [
6357
+ {
6358
+ equals: "deepseek-ai/deepseek-v3"
6359
+ },
6360
+ {
6361
+ equals: "deepseek-ai/deepseek-v3-0324"
6362
+ }
6363
+ ]
3581
6364
  },
6365
+ context_window: 131072,
3582
6366
  prices: {
3583
- input_mtok: 0.05,
3584
- output_mtok: 0.08
6367
+ input_mtok: 1.25,
6368
+ output_mtok: 1.25
3585
6369
  }
3586
6370
  },
3587
6371
  {
3588
- id: "llama3-groq-70b-8192-tool-use-preview",
6372
+ id: "deepseek-ai/DeepSeek-V3.1",
6373
+ name: "DeepSeek-V3.1",
3589
6374
  match: {
3590
- equals: "llama3-groq-70b-8192-tool-use-preview"
6375
+ equals: "deepseek-ai/deepseek-v3.1"
3591
6376
  },
6377
+ context_window: 131072,
3592
6378
  prices: {
3593
- input_mtok: 0.89,
3594
- output_mtok: 0.89
6379
+ input_mtok: 0.6,
6380
+ output_mtok: 1.7
3595
6381
  }
3596
6382
  },
3597
6383
  {
3598
- id: "llama3-groq-8b-8192-tool-use-preview",
6384
+ id: "marin-community/marin-8b-instruct",
6385
+ name: "marin-8b-instruct",
3599
6386
  match: {
3600
- equals: "llama3-groq-8b-8192-tool-use-preview"
6387
+ equals: "marin-community/marin-8b-instruct"
3601
6388
  },
6389
+ context_window: 4096,
3602
6390
  prices: {
3603
- input_mtok: 0.19,
3604
- output_mtok: 0.19
6391
+ input_mtok: 0.18000000000000002,
6392
+ output_mtok: 0.18000000000000002
3605
6393
  }
3606
6394
  },
3607
6395
  {
3608
- id: "meta-llama/llama-4-maverick-17b-128e-instruct",
3609
- name: "Llama 4 Maverick 17B 128E",
6396
+ id: "meta-llama/Llama-3.2-3B-Instruct",
6397
+ name: "Llama-3.2-3B-Instruct",
3610
6398
  match: {
3611
- equals: "meta-llama/llama-4-maverick-17b-128e-instruct"
6399
+ equals: "meta-llama/llama-3.2-3b-instruct"
3612
6400
  },
3613
6401
  context_window: 131072,
3614
6402
  prices: {
3615
- input_mtok: 0.2,
3616
- output_mtok: 0.6
6403
+ input_mtok: 0.060000000000000005,
6404
+ output_mtok: 0.060000000000000005
3617
6405
  }
3618
6406
  },
3619
6407
  {
3620
- id: "meta-llama/llama-4-scout-17b-16e-instruct",
3621
- name: "Llama 4 Scout (17Bx16E) 128k",
6408
+ id: "meta-llama/Llama-3.3-70B-Instruct",
6409
+ name: "Llama-3.3-70B-Instruct",
3622
6410
  match: {
3623
- equals: "meta-llama/llama-4-scout-17b-16e-instruct"
6411
+ equals: "meta-llama/llama-3.3-70b-instruct"
3624
6412
  },
6413
+ context_window: 131072,
3625
6414
  prices: {
3626
- input_mtok: 0.11,
3627
- output_mtok: 0.34
6415
+ input_mtok: 0.88,
6416
+ output_mtok: 0.88
3628
6417
  }
3629
6418
  },
3630
6419
  {
3631
- id: "meta-llama/llama-guard-4-12b",
3632
- name: "Llama Guard 4 12B",
6420
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
6421
+ name: "Llama-4-Maverick-17B-128E-Instruct-FP8",
3633
6422
  match: {
3634
- equals: "meta-llama/llama-guard-4-12b"
6423
+ equals: "meta-llama/llama-4-maverick-17b-128e-instruct-fp8"
3635
6424
  },
3636
- context_window: 131072,
6425
+ context_window: 1048576,
3637
6426
  prices: {
3638
- input_mtok: 0.2,
3639
- output_mtok: 0.2
6427
+ input_mtok: 0.27,
6428
+ output_mtok: 0.85
3640
6429
  }
3641
6430
  },
3642
6431
  {
3643
- id: "mistral-saba-24b",
6432
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
6433
+ name: "Llama-4-Scout-17B-16E-Instruct",
3644
6434
  match: {
3645
- equals: "mistral-saba-24b"
6435
+ equals: "meta-llama/llama-4-scout-17b-16e-instruct"
3646
6436
  },
6437
+ context_window: 1048576,
3647
6438
  prices: {
3648
- input_mtok: 0.79,
3649
- output_mtok: 0.79
6439
+ input_mtok: 0.18000000000000002,
6440
+ output_mtok: 0.5900000000000001
3650
6441
  }
3651
6442
  },
3652
6443
  {
3653
- id: "mixtral-8x7b-32768",
6444
+ id: "meta-llama/Meta-Llama-3-70B-Instruct",
6445
+ name: "Meta-Llama-3-70B-Instruct",
3654
6446
  match: {
3655
- equals: "mixtral-8x7b-32768"
6447
+ equals: "meta-llama/meta-llama-3-70b-instruct"
3656
6448
  },
6449
+ context_window: 8192,
3657
6450
  prices: {
3658
- input_mtok: 0.24,
3659
- output_mtok: 0.24
6451
+ input_mtok: 0.88,
6452
+ output_mtok: 0.88
3660
6453
  }
3661
6454
  },
3662
6455
  {
3663
- id: "moonshotai/kimi-k2-instruct",
3664
- name: "Kimi K2 1T 128k",
6456
+ id: "moonshotai/Kimi-K2-Instruct",
6457
+ name: "Kimi-K2-Instruct",
3665
6458
  match: {
3666
6459
  or: [
3667
6460
  {
@@ -3675,56 +6468,55 @@ Compared to other leading proprietary and open-weights models Command A delivers
3675
6468
  context_window: 131072,
3676
6469
  prices: {
3677
6470
  input_mtok: 1,
3678
- cache_read_mtok: 0.5,
3679
6471
  output_mtok: 3
3680
6472
  }
3681
6473
  },
6474
+ {
6475
+ id: "moonshotai/Kimi-K2-Thinking",
6476
+ name: "Kimi-K2-Thinking",
6477
+ match: {
6478
+ equals: "moonshotai/kimi-k2-thinking"
6479
+ },
6480
+ context_window: 262144,
6481
+ prices: {
6482
+ input_mtok: 1.2,
6483
+ output_mtok: 4
6484
+ }
6485
+ },
3682
6486
  {
3683
6487
  id: "openai/gpt-oss-120b",
3684
- description: `GPT-OSS 120B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
3685
- 120 billion parameters and 128 experts.
3686
- `,
6488
+ name: "gpt-oss-120b",
3687
6489
  match: {
3688
- or: [
3689
- {
3690
- equals: "openai/gpt-oss-120b"
3691
- },
3692
- {
3693
- equals: "openai/gpt-oss-safeguard-20b"
3694
- }
3695
- ]
6490
+ equals: "openai/gpt-oss-120b"
3696
6491
  },
3697
6492
  context_window: 131072,
3698
6493
  prices: {
3699
6494
  input_mtok: 0.15,
3700
- cache_read_mtok: 0.075,
3701
6495
  output_mtok: 0.6
3702
6496
  }
3703
6497
  },
3704
6498
  {
3705
6499
  id: "openai/gpt-oss-20b",
3706
- description: `GPT-OSS 20B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
3707
- 20 billion parameters and 32 experts.
3708
- `,
6500
+ name: "gpt-oss-20b",
3709
6501
  match: {
3710
6502
  equals: "openai/gpt-oss-20b"
3711
6503
  },
3712
6504
  context_window: 131072,
3713
6505
  prices: {
3714
- input_mtok: 0.075,
3715
- cache_read_mtok: 0.0375,
3716
- output_mtok: 0.3
6506
+ input_mtok: 0.05,
6507
+ output_mtok: 0.2
3717
6508
  }
3718
6509
  },
3719
6510
  {
3720
- id: "qwen/qwen3-32b",
3721
- name: "Qwen3 32B 131k",
6511
+ id: "zai-org/GLM-4.5-Air-FP8",
6512
+ name: "GLM-4.5-Air-FP8",
3722
6513
  match: {
3723
- equals: "qwen/qwen3-32b"
6514
+ equals: "zai-org/glm-4.5-air-fp8"
3724
6515
  },
6516
+ context_window: 131072,
3725
6517
  prices: {
3726
- input_mtok: 0.29,
3727
- output_mtok: 0.59
6518
+ input_mtok: 0.2,
6519
+ output_mtok: 1.1
3728
6520
  }
3729
6521
  }
3730
6522
  ]
@@ -12756,45 +15548,45 @@ Compared to other leading proprietary and open-weights models Command A delivers
12756
15548
  ]
12757
15549
  }
12758
15550
  ];
12759
- function M(t, e) {
15551
+ function L(t, e) {
12760
15552
  if (e <= 0) return 0;
12761
15553
  let a = 0;
12762
- const i = [...t.tiers].sort((m, s) => m.start - s.start), o = i[0]?.start ?? e, r = Math.min(e, o);
12763
- a += r * t.base / 1e6;
12764
- for (let m = 0; m < i.length; m++) {
12765
- const s = i[m], n = i[m + 1]?.start ?? 1 / 0, u = Math.max(0, Math.min(e, n) - s.start);
12766
- u > 0 && (a += u * s.price / 1e6);
15554
+ const i = [...t.tiers].sort((r, n) => r.start - n.start), o = i[0]?.start ?? e, m = Math.min(e, o);
15555
+ a += m * t.base / 1e6;
15556
+ for (let r = 0; r < i.length; r++) {
15557
+ const n = i[r], s = i[r + 1]?.start ?? 1 / 0, u = Math.max(0, Math.min(e, s) - n.start);
15558
+ u > 0 && (a += u * n.price / 1e6);
12767
15559
  }
12768
15560
  return a;
12769
15561
  }
12770
15562
  function c(t, e, a) {
12771
- return t === void 0 || e === void 0 ? 0 : typeof t == "number" ? t * e / 1e6 : M(t, e);
15563
+ return t === void 0 || e === void 0 ? 0 : typeof t == "number" ? t * e / 1e6 : L(t, e);
12772
15564
  }
12773
- function I(t, e) {
15565
+ function y(t, e) {
12774
15566
  let a = 0, i = 0;
12775
- 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;
12776
- let n = t.input_audio_tokens ?? 0;
12777
- if (n -= m, n < 0)
15567
+ 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;
15568
+ let s = t.input_audio_tokens ?? 0;
15569
+ if (s -= r, s < 0)
12778
15570
  throw new Error("cache_audio_read_tokens cannot be greater than input_audio_tokens");
12779
15571
  let u = t.input_tokens ?? 0;
12780
- if (u -= o, u -= r, u -= n, u < 0)
15572
+ if (u -= o, u -= m, u -= s, u < 0)
12781
15573
  throw new Error("Uncached text input tokens cannot be negative");
12782
15574
  let p = o;
12783
- if (p -= m, p < 0)
15575
+ if (p -= r, p < 0)
12784
15576
  throw new Error("cache_audio_read_tokens cannot be greater than cache_read_tokens");
12785
- 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);
12786
- let _ = t.output_tokens ?? 0;
12787
- if (_ -= s, _ < 0)
15577
+ 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);
15578
+ let k = t.output_tokens ?? 0;
15579
+ if (k -= n, k < 0)
12788
15580
  throw new Error("output_audio_tokens cannot be greater than output_tokens");
12789
- i += c(e.output_mtok, _), i += c(e.output_audio_mtok, t.output_audio_tokens);
12790
- let w = a + i;
12791
- return e.requests_kcount !== void 0 && (w += e.requests_kcount / 1e3), {
15581
+ i += c(e.output_mtok, k), i += c(e.output_audio_mtok, t.output_audio_tokens);
15582
+ let f = a + i;
15583
+ return e.requests_kcount !== void 0 && (f += e.requests_kcount / 1e3), {
12792
15584
  input_price: a,
12793
15585
  output_price: i,
12794
- total_price: w
15586
+ total_price: f
12795
15587
  };
12796
15588
  }
12797
- function L(t, e) {
15589
+ function M(t, e) {
12798
15590
  if (!Array.isArray(t.prices))
12799
15591
  return t.prices;
12800
15592
  for (let a = t.prices.length - 1; a >= 0; a--) {
@@ -12805,170 +15597,170 @@ function L(t, e) {
12805
15597
  if (e >= new Date(o.start_date))
12806
15598
  return i.prices;
12807
15599
  } else {
12808
- const r = e.toISOString().slice(11, 19), m = o.start_time, s = o.end_time;
12809
- if (s < m) {
12810
- if (r >= m || r < s)
15600
+ const m = e.toISOString().slice(11, 19), r = o.start_time, n = o.end_time;
15601
+ if (n < r) {
15602
+ if (m >= r || m < n)
12811
15603
  return i.prices;
12812
- } else if (r >= m && r < s)
15604
+ } else if (m >= r && m < n)
12813
15605
  return i.prices;
12814
15606
  }
12815
15607
  }
12816
15608
  return t.prices[0].prices;
12817
15609
  }
12818
- function h(t, e) {
12819
- 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;
15610
+ function _(t, e) {
15611
+ 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;
12820
15612
  }
12821
- function P(t, e) {
15613
+ function Q(t, e) {
12822
15614
  const a = e.toLowerCase().trim(), i = t.find((o) => o.id === a);
12823
- return i || t.find((o) => o.provider_match && h(o.provider_match, a));
15615
+ return i || t.find((o) => o.provider_match && _(o.provider_match, a));
12824
15616
  }
12825
15617
  function B(t, { modelId: e, providerApiUrl: a, providerId: i }) {
12826
15618
  if (i)
12827
- return P(t, i);
15619
+ return Q(t, i);
12828
15620
  if (a)
12829
15621
  return t.find((o) => new RegExp(o.api_pattern).test(a));
12830
15622
  if (e)
12831
- return t.find((o) => o.model_match && h(o.model_match, e));
15623
+ return t.find((o) => o.model_match && _(o.model_match, e));
12832
15624
  }
12833
- function T(t, e) {
12834
- return t.find((a) => h(a.match, e));
15625
+ function P(t, e) {
15626
+ return t.find((a) => _(a.match, e));
12835
15627
  }
12836
- const G = "https://raw.githubusercontent.com/pydantic/genai-prices/main/prices/data.json";
12837
- let g = x, b = Promise.resolve(x), f = null;
12838
- function S(t) {
12839
- t !== null && ("then" in t ? (b = t, t.then((e) => {
15628
+ const S = "https://raw.githubusercontent.com/pydantic/genai-prices/main/prices/data.json";
15629
+ let g = x, w = Promise.resolve(x), b = null;
15630
+ function T(t) {
15631
+ t !== null && ("then" in t ? (w = t, t.then((e) => {
12840
15632
  e !== null && (g = e);
12841
- })) : (b = Promise.resolve(t), g = t));
15633
+ })) : (w = Promise.resolve(t), g = t));
12842
15634
  }
12843
- function C(t) {
12844
- f = t;
15635
+ function A(t) {
15636
+ b = t;
12845
15637
  }
12846
- function Q(t) {
15638
+ function C(t) {
12847
15639
  t({
12848
- onCalc: C,
12849
- remoteDataUrl: G,
12850
- setProviderData: S
15640
+ onCalc: A,
15641
+ remoteDataUrl: S,
15642
+ setProviderData: T
12851
15643
  });
12852
15644
  }
12853
- function N() {
12854
- return b;
15645
+ function z() {
15646
+ return w;
12855
15647
  }
12856
- function O(t, e, a) {
12857
- f?.();
15648
+ function E(t, e, a) {
15649
+ b?.();
12858
15650
  const i = e.toLowerCase().trim(), o = a?.provider ?? B(g, { modelId: i, providerApiUrl: a?.providerApiUrl, providerId: a?.providerId });
12859
15651
  if (!o) return null;
12860
- const r = T(o.models, i);
12861
- if (!r) return null;
12862
- const m = a?.timestamp ?? /* @__PURE__ */ new Date(), s = L(r, m), n = I(t, s);
15652
+ const m = P(o.models, i);
15653
+ if (!m) return null;
15654
+ const r = a?.timestamp ?? /* @__PURE__ */ new Date(), n = M(m, r), s = y(t, n);
12863
15655
  return {
12864
15656
  auto_update_timestamp: void 0,
12865
- model: r,
12866
- model_price: s,
15657
+ model: m,
15658
+ model_price: n,
12867
15659
  provider: o,
12868
- ...n
15660
+ ...s
12869
15661
  };
12870
15662
  }
12871
- function D(t) {
12872
- return f?.(), B(g, t);
15663
+ function N(t) {
15664
+ return b?.(), B(g, t);
12873
15665
  }
12874
- function E(t, e, a) {
15666
+ function V(t, e, a) {
12875
15667
  if (a = a ?? "default", !t.extractors)
12876
15668
  throw new Error("No extraction logic defined for this provider");
12877
- const i = t.extractors.find((n) => n.api_flavor === a);
15669
+ const i = t.extractors.find((s) => s.api_flavor === a);
12878
15670
  if (!i) {
12879
- const n = t.extractors.map((u) => u.api_flavor).join(", ");
12880
- throw new Error(`Unknown apiFlavor '${a}', allowed values: ${n}`);
15671
+ const s = t.extractors.map((u) => u.api_flavor).join(", ");
15672
+ throw new Error(`Unknown apiFlavor '${a}', allowed values: ${s}`);
12881
15673
  }
12882
- if (!k.guard(e))
15674
+ if (!h.guard(e))
12883
15675
  throw new Error(`Expected response data to be a mapping object, got ${l(e)}`);
12884
- const o = q(i.model_path, e, R, !1, []), r = y(i.root), m = q(r, e, k, !0, []), s = {};
12885
- for (const n of i.mappings) {
12886
- const u = q(n.path, m, z, n.required, r);
15676
+ const o = q(i.model_path, e, R, !1, []), m = I(i.root), r = q(m, e, h, !0, []), n = {};
15677
+ for (const s of i.mappings) {
15678
+ const u = q(s.path, r, D, s.required, m);
12887
15679
  if (u !== null) {
12888
- const p = s[n.dest] ?? 0;
12889
- s[n.dest] = p + u;
15680
+ const p = n[s.dest] ?? 0;
15681
+ n[s.dest] = p + u;
12890
15682
  }
12891
15683
  }
12892
- if (!Object.keys(s).length)
15684
+ if (!Object.keys(n).length)
12893
15685
  throw new Error(`No usage information found at ${JSON.stringify(i.root)}`);
12894
- return { model: o, usage: s };
15686
+ return { model: o, usage: n };
12895
15687
  }
12896
15688
  function q(t, e, a, i, o) {
12897
- const [r, ...m] = y(t).reverse();
12898
- if (typeof r != "string")
12899
- throw new Error(`Expected last step of path to be a string, got ${l(r)}`);
12900
- m.reverse();
12901
- let s = e;
12902
- const n = [];
12903
- for (const p of m) {
12904
- if (n.push(p), typeof p == "object")
12905
- if (Array.isArray(s))
12906
- s = A(p, s);
15689
+ const [m, ...r] = I(t).reverse();
15690
+ if (typeof m != "string")
15691
+ throw new Error(`Expected last step of path to be a string, got ${l(m)}`);
15692
+ r.reverse();
15693
+ let n = e;
15694
+ const s = [];
15695
+ for (const p of r) {
15696
+ if (s.push(p), typeof p == "object")
15697
+ if (Array.isArray(n))
15698
+ n = G(p, n);
12907
15699
  else {
12908
15700
  if (i)
12909
- throw new Error(`Expected \`${d(o, n)}\` value to be a mapping, got ${l(s)}`);
15701
+ throw new Error(`Expected \`${d(o, s)}\` value to be a mapping, got ${l(n)}`);
12910
15702
  return null;
12911
15703
  }
12912
- else if (k.guard(s))
12913
- s = s[p];
15704
+ else if (h.guard(n))
15705
+ n = n[p];
12914
15706
  else {
12915
15707
  if (i)
12916
- throw new Error(`Expected \`${d(o, n)}\` value to be a mapping, got ${l(s)}`);
15708
+ throw new Error(`Expected \`${d(o, s)}\` value to be a mapping, got ${l(n)}`);
12917
15709
  return null;
12918
15710
  }
12919
- if (typeof s > "u")
15711
+ if (typeof n > "u")
12920
15712
  if (i) {
12921
- const _ = typeof p == "object" ? "Unable to find item" : "Missing value";
12922
- throw new Error(`${_} at \`${d(o, n)}\``);
15713
+ const k = typeof p == "object" ? "Unable to find item" : "Missing value";
15714
+ throw new Error(`${k} at \`${d(o, s)}\``);
12923
15715
  } else
12924
15716
  return null;
12925
15717
  }
12926
- if (!k.guard(s)) {
15718
+ if (!h.guard(n)) {
12927
15719
  if (i)
12928
- throw new Error(`Expected \`${d(o, n)}\` value to be a mapping, got ${l(s)}`);
15720
+ throw new Error(`Expected \`${d(o, s)}\` value to be a mapping, got ${l(n)}`);
12929
15721
  return null;
12930
15722
  }
12931
- const u = s[r];
15723
+ const u = n[m];
12932
15724
  if (typeof u > "u") {
12933
15725
  if (i)
12934
- throw n.push(r), new Error(`Missing value at \`${d(o, n)}\``);
15726
+ throw s.push(m), new Error(`Missing value at \`${d(o, s)}\``);
12935
15727
  return null;
12936
15728
  }
12937
15729
  if (a.guard(u))
12938
15730
  return u;
12939
15731
  if (i)
12940
- throw n.push(r), new Error(`Expected \`${d(o, n)}\` value to be a ${a.name}, got ${l(u)}`);
15732
+ throw s.push(m), new Error(`Expected \`${d(o, s)}\` value to be a ${a.name}, got ${l(u)}`);
12941
15733
  return null;
12942
15734
  }
12943
- function A(t, e) {
15735
+ function G(t, e) {
12944
15736
  for (const a of e)
12945
- if (k.guard(a)) {
15737
+ if (h.guard(a)) {
12946
15738
  const i = a[t.field];
12947
- if (typeof i == "string" && h(t.match, i))
15739
+ if (typeof i == "string" && _(t.match, i))
12948
15740
  return a;
12949
15741
  }
12950
15742
  }
12951
- function y(t) {
15743
+ function I(t) {
12952
15744
  return Array.isArray(t) ? [...t] : [t];
12953
15745
  }
12954
15746
  function l(t) {
12955
15747
  return t === null ? "null" : Array.isArray(t) ? "array" : typeof t == "object" ? "mapping" : typeof t;
12956
15748
  }
12957
- const k = {
15749
+ const h = {
12958
15750
  guard: (t) => l(t) === "mapping",
12959
15751
  name: "mapping"
12960
15752
  }, R = {
12961
15753
  guard: (t) => typeof t == "string",
12962
15754
  name: "string"
12963
- }, z = {
15755
+ }, D = {
12964
15756
  guard: (t) => typeof t == "number",
12965
15757
  name: "number"
12966
15758
  }, d = (t, e) => [...t.map(v), ...e.map(v)].join("."), v = (t) => typeof t == "string" ? t : JSON.stringify(t);
12967
15759
  export {
12968
- G as REMOTE_DATA_JSON_URL,
12969
- O as calcPrice,
12970
- E as extractUsage,
12971
- D as findProvider,
12972
- Q as updatePrices,
12973
- N as waitForUpdate
15760
+ S as REMOTE_DATA_JSON_URL,
15761
+ E as calcPrice,
15762
+ V as extractUsage,
15763
+ N as findProvider,
15764
+ C as updatePrices,
15765
+ z as waitForUpdate
12974
15766
  };