@pydantic/genai-prices 0.0.52 → 0.0.54
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/cli.js +610 -301
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +591 -282
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -238,28 +238,6 @@ const I = [
|
|
|
238
238
|
output_mtok: 5
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
|
-
{
|
|
242
|
-
id: "claude-instant-1",
|
|
243
|
-
description: "Retired, here to match price sources",
|
|
244
|
-
match: {
|
|
245
|
-
equals: "claude-instant-1"
|
|
246
|
-
},
|
|
247
|
-
prices: {
|
|
248
|
-
input_mtok: 1.63,
|
|
249
|
-
output_mtok: 55.1
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
id: "claude-instant-1.2",
|
|
254
|
-
description: "Retired, here to match price sources",
|
|
255
|
-
match: {
|
|
256
|
-
equals: "claude-instant-1.2"
|
|
257
|
-
},
|
|
258
|
-
prices: {
|
|
259
|
-
input_mtok: 1.63,
|
|
260
|
-
output_mtok: 5.51
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
241
|
{
|
|
264
242
|
id: "claude-opus-4-0",
|
|
265
243
|
name: "Claude Opus 4",
|
|
@@ -338,6 +316,66 @@ const I = [
|
|
|
338
316
|
output_mtok: 25
|
|
339
317
|
}
|
|
340
318
|
},
|
|
319
|
+
{
|
|
320
|
+
id: "claude-opus-4-6",
|
|
321
|
+
name: "Claude Opus 4.6",
|
|
322
|
+
description: "Our most intelligent model for building agents and coding",
|
|
323
|
+
match: {
|
|
324
|
+
or: [
|
|
325
|
+
{
|
|
326
|
+
starts_with: "claude-opus-4-6"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
starts_with: "claude-opus-4.6"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
starts_with: "claude-4-6-opus"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
starts_with: "claude-4.6-opus"
|
|
336
|
+
}
|
|
337
|
+
]
|
|
338
|
+
},
|
|
339
|
+
context_window: 2e5,
|
|
340
|
+
prices: {
|
|
341
|
+
input_mtok: {
|
|
342
|
+
base: 5,
|
|
343
|
+
tiers: [
|
|
344
|
+
{
|
|
345
|
+
start: 2e5,
|
|
346
|
+
price: 10
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
cache_write_mtok: {
|
|
351
|
+
base: 6.25,
|
|
352
|
+
tiers: [
|
|
353
|
+
{
|
|
354
|
+
start: 2e5,
|
|
355
|
+
price: 12.5
|
|
356
|
+
}
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
cache_read_mtok: {
|
|
360
|
+
base: 0.5,
|
|
361
|
+
tiers: [
|
|
362
|
+
{
|
|
363
|
+
start: 2e5,
|
|
364
|
+
price: 1
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
output_mtok: {
|
|
369
|
+
base: 25,
|
|
370
|
+
tiers: [
|
|
371
|
+
{
|
|
372
|
+
start: 2e5,
|
|
373
|
+
price: 37.5
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
341
379
|
{
|
|
342
380
|
id: "claude-sonnet-4-0",
|
|
343
381
|
name: "Claude Sonnet 4",
|
|
@@ -372,7 +410,7 @@ const I = [
|
|
|
372
410
|
{
|
|
373
411
|
id: "claude-sonnet-4-5",
|
|
374
412
|
name: "Claude Sonnet 4.5",
|
|
375
|
-
description: "
|
|
413
|
+
description: "Our best combination of speed and intelligence",
|
|
376
414
|
match: {
|
|
377
415
|
or: [
|
|
378
416
|
{
|
|
@@ -423,6 +461,60 @@ const I = [
|
|
|
423
461
|
}
|
|
424
462
|
}
|
|
425
463
|
},
|
|
464
|
+
{
|
|
465
|
+
id: "claude-sonnet-4-6",
|
|
466
|
+
name: "Claude Sonnet 4.6",
|
|
467
|
+
description: "Our best combination of speed and intelligence",
|
|
468
|
+
match: {
|
|
469
|
+
or: [
|
|
470
|
+
{
|
|
471
|
+
starts_with: "claude-sonnet-4-6"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
starts_with: "claude-sonnet-4.6"
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
},
|
|
478
|
+
context_window: 1e6,
|
|
479
|
+
prices: {
|
|
480
|
+
input_mtok: {
|
|
481
|
+
base: 3,
|
|
482
|
+
tiers: [
|
|
483
|
+
{
|
|
484
|
+
start: 2e5,
|
|
485
|
+
price: 6
|
|
486
|
+
}
|
|
487
|
+
]
|
|
488
|
+
},
|
|
489
|
+
cache_write_mtok: {
|
|
490
|
+
base: 3.75,
|
|
491
|
+
tiers: [
|
|
492
|
+
{
|
|
493
|
+
start: 2e5,
|
|
494
|
+
price: 7.5
|
|
495
|
+
}
|
|
496
|
+
]
|
|
497
|
+
},
|
|
498
|
+
cache_read_mtok: {
|
|
499
|
+
base: 0.3,
|
|
500
|
+
tiers: [
|
|
501
|
+
{
|
|
502
|
+
start: 2e5,
|
|
503
|
+
price: 0.6
|
|
504
|
+
}
|
|
505
|
+
]
|
|
506
|
+
},
|
|
507
|
+
output_mtok: {
|
|
508
|
+
base: 15,
|
|
509
|
+
tiers: [
|
|
510
|
+
{
|
|
511
|
+
start: 2e5,
|
|
512
|
+
price: 22.5
|
|
513
|
+
}
|
|
514
|
+
]
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
},
|
|
426
518
|
{
|
|
427
519
|
id: "claude-v1",
|
|
428
520
|
description: "Retired, here to match price sources",
|
|
@@ -2172,6 +2264,20 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2172
2264
|
output_mtok: 0.9
|
|
2173
2265
|
}
|
|
2174
2266
|
},
|
|
2267
|
+
{
|
|
2268
|
+
id: "deepseek-v3p2",
|
|
2269
|
+
name: "Deepseek V3.2",
|
|
2270
|
+
description: "Model from Deepseek that harmonizes high computational efficiency with superior reasoning and agent performance. 675B parameter MoE model.",
|
|
2271
|
+
match: {
|
|
2272
|
+
equals: "accounts/fireworks/models/deepseek-v3p2"
|
|
2273
|
+
},
|
|
2274
|
+
context_window: 163840,
|
|
2275
|
+
prices: {
|
|
2276
|
+
input_mtok: 0.56,
|
|
2277
|
+
cache_read_mtok: 0.28,
|
|
2278
|
+
output_mtok: 1.68
|
|
2279
|
+
}
|
|
2280
|
+
},
|
|
2175
2281
|
{
|
|
2176
2282
|
id: "gemma-3-27b-it",
|
|
2177
2283
|
name: "Gemma 3 27B Instruct",
|
|
@@ -2185,6 +2291,61 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2185
2291
|
output_mtok: 0.1
|
|
2186
2292
|
}
|
|
2187
2293
|
},
|
|
2294
|
+
{
|
|
2295
|
+
id: "glm-4p7",
|
|
2296
|
+
name: "GLM-4.7",
|
|
2297
|
+
description: "Next-generation general-purpose model from Z.ai optimized for coding, reasoning, and agentic workflows. 352B parameter MoE model with advanced thinking controls.",
|
|
2298
|
+
match: {
|
|
2299
|
+
equals: "accounts/fireworks/models/glm-4p7"
|
|
2300
|
+
},
|
|
2301
|
+
context_window: 202752,
|
|
2302
|
+
prices: {
|
|
2303
|
+
input_mtok: 0.6,
|
|
2304
|
+
output_mtok: 2.2
|
|
2305
|
+
}
|
|
2306
|
+
},
|
|
2307
|
+
{
|
|
2308
|
+
id: "gpt-oss-120b",
|
|
2309
|
+
name: "OpenAI gpt-oss-120b",
|
|
2310
|
+
description: "OpenAI's open-weight 117B parameter MoE model designed for production, general purpose, high reasoning use-cases. Features powerful reasoning, agentic tasks, and versatile developer use cases.",
|
|
2311
|
+
match: {
|
|
2312
|
+
equals: "accounts/fireworks/models/gpt-oss-120b"
|
|
2313
|
+
},
|
|
2314
|
+
context_window: 131072,
|
|
2315
|
+
prices: {
|
|
2316
|
+
input_mtok: 0.15,
|
|
2317
|
+
cache_read_mtok: 0.07,
|
|
2318
|
+
output_mtok: 0.6
|
|
2319
|
+
}
|
|
2320
|
+
},
|
|
2321
|
+
{
|
|
2322
|
+
id: "gpt-oss-20b",
|
|
2323
|
+
name: "OpenAI gpt-oss-20b",
|
|
2324
|
+
description: "OpenAI's open-weight 21.5B parameter model designed for powerful reasoning, agentic tasks, and versatile developer use cases. Optimized for lower latency and local or specialized tasks.",
|
|
2325
|
+
match: {
|
|
2326
|
+
equals: "accounts/fireworks/models/gpt-oss-20b"
|
|
2327
|
+
},
|
|
2328
|
+
context_window: 131072,
|
|
2329
|
+
prices: {
|
|
2330
|
+
input_mtok: 0.07,
|
|
2331
|
+
cache_read_mtok: 0.04,
|
|
2332
|
+
output_mtok: 0.3
|
|
2333
|
+
}
|
|
2334
|
+
},
|
|
2335
|
+
{
|
|
2336
|
+
id: "kimi-k2p5",
|
|
2337
|
+
name: "Kimi K2.5",
|
|
2338
|
+
description: "Moonshot AI's flagship agentic model. Unifies vision and text, thinking and non-thinking modes, and single-agent and multi-agent execution into one model. 1T parameter MoE model.",
|
|
2339
|
+
match: {
|
|
2340
|
+
equals: "accounts/fireworks/models/kimi-k2p5"
|
|
2341
|
+
},
|
|
2342
|
+
context_window: 262144,
|
|
2343
|
+
prices: {
|
|
2344
|
+
input_mtok: 0.6,
|
|
2345
|
+
cache_read_mtok: 0.1,
|
|
2346
|
+
output_mtok: 3
|
|
2347
|
+
}
|
|
2348
|
+
},
|
|
2188
2349
|
{
|
|
2189
2350
|
id: "llama-v3p1-8b-instruct",
|
|
2190
2351
|
name: "Llama 3.1 8B Instruct",
|
|
@@ -2212,6 +2373,19 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2212
2373
|
output_mtok: 0.88
|
|
2213
2374
|
}
|
|
2214
2375
|
},
|
|
2376
|
+
{
|
|
2377
|
+
id: "minimax-m2p1",
|
|
2378
|
+
name: "MiniMax-M2.1",
|
|
2379
|
+
description: "Built for strong real-world performance across complex, multi-language, and agent-driven workflows. 228B parameter model with robust support for systems, backend, web, mobile, and office-style tasks.",
|
|
2380
|
+
match: {
|
|
2381
|
+
equals: "accounts/fireworks/models/minimax-m2p1"
|
|
2382
|
+
},
|
|
2383
|
+
context_window: 204800,
|
|
2384
|
+
prices: {
|
|
2385
|
+
input_mtok: 0.3,
|
|
2386
|
+
output_mtok: 1.2
|
|
2387
|
+
}
|
|
2388
|
+
},
|
|
2215
2389
|
{
|
|
2216
2390
|
id: "qwen2p5-vl-72b-instruct",
|
|
2217
2391
|
name: "Qwen2.5-VL 72B Instruct",
|
|
@@ -2484,7 +2658,16 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2484
2658
|
contains: "claude-4-opus"
|
|
2485
2659
|
},
|
|
2486
2660
|
{
|
|
2487
|
-
contains: "claude-opus-4"
|
|
2661
|
+
contains: "claude-opus-4@"
|
|
2662
|
+
},
|
|
2663
|
+
{
|
|
2664
|
+
contains: "claude-opus-4-0"
|
|
2665
|
+
},
|
|
2666
|
+
{
|
|
2667
|
+
contains: "claude-opus-4-1"
|
|
2668
|
+
},
|
|
2669
|
+
{
|
|
2670
|
+
equals: "claude-opus-4"
|
|
2488
2671
|
}
|
|
2489
2672
|
]
|
|
2490
2673
|
},
|
|
@@ -2516,6 +2699,64 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2516
2699
|
output_mtok: 15
|
|
2517
2700
|
}
|
|
2518
2701
|
},
|
|
2702
|
+
{
|
|
2703
|
+
id: "claude-opus-4-6",
|
|
2704
|
+
match: {
|
|
2705
|
+
or: [
|
|
2706
|
+
{
|
|
2707
|
+
contains: "claude-4-6-opus"
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
contains: "claude-opus-4-6"
|
|
2711
|
+
},
|
|
2712
|
+
{
|
|
2713
|
+
contains: "claude-4.6-opus"
|
|
2714
|
+
},
|
|
2715
|
+
{
|
|
2716
|
+
contains: "claude-opus-4.6"
|
|
2717
|
+
}
|
|
2718
|
+
]
|
|
2719
|
+
},
|
|
2720
|
+
context_window: 2e5,
|
|
2721
|
+
prices: {
|
|
2722
|
+
input_mtok: {
|
|
2723
|
+
base: 5,
|
|
2724
|
+
tiers: [
|
|
2725
|
+
{
|
|
2726
|
+
start: 2e5,
|
|
2727
|
+
price: 10
|
|
2728
|
+
}
|
|
2729
|
+
]
|
|
2730
|
+
},
|
|
2731
|
+
cache_write_mtok: {
|
|
2732
|
+
base: 6.25,
|
|
2733
|
+
tiers: [
|
|
2734
|
+
{
|
|
2735
|
+
start: 2e5,
|
|
2736
|
+
price: 12.5
|
|
2737
|
+
}
|
|
2738
|
+
]
|
|
2739
|
+
},
|
|
2740
|
+
cache_read_mtok: {
|
|
2741
|
+
base: 0.5,
|
|
2742
|
+
tiers: [
|
|
2743
|
+
{
|
|
2744
|
+
start: 2e5,
|
|
2745
|
+
price: 1
|
|
2746
|
+
}
|
|
2747
|
+
]
|
|
2748
|
+
},
|
|
2749
|
+
output_mtok: {
|
|
2750
|
+
base: 25,
|
|
2751
|
+
tiers: [
|
|
2752
|
+
{
|
|
2753
|
+
start: 2e5,
|
|
2754
|
+
price: 37.5
|
|
2755
|
+
}
|
|
2756
|
+
]
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2759
|
+
},
|
|
2519
2760
|
{
|
|
2520
2761
|
id: "gemini-1.0-pro-vision-001",
|
|
2521
2762
|
name: "gemini 1.0 pro vision",
|
|
@@ -2745,7 +2986,8 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2745
2986
|
prices: {
|
|
2746
2987
|
input_mtok: 0.15,
|
|
2747
2988
|
output_mtok: 0.6
|
|
2748
|
-
}
|
|
2989
|
+
},
|
|
2990
|
+
deprecated: !0
|
|
2749
2991
|
},
|
|
2750
2992
|
{
|
|
2751
2993
|
id: "gemini-2.5-pro",
|
|
@@ -3693,6 +3935,25 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
3693
3935
|
output_mtok: 0.6
|
|
3694
3936
|
}
|
|
3695
3937
|
},
|
|
3938
|
+
{
|
|
3939
|
+
id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
3940
|
+
name: "Qwen3-Coder-480B-A35B-Instruct",
|
|
3941
|
+
match: {
|
|
3942
|
+
or: [
|
|
3943
|
+
{
|
|
3944
|
+
equals: "qwen/qwen3-coder-480b-a35b-instruct"
|
|
3945
|
+
},
|
|
3946
|
+
{
|
|
3947
|
+
equals: "qwen/qwen3-coder-480b-a35b-instruct-fast"
|
|
3948
|
+
}
|
|
3949
|
+
]
|
|
3950
|
+
},
|
|
3951
|
+
context_window: 262144,
|
|
3952
|
+
prices: {
|
|
3953
|
+
input_mtok: 0.45,
|
|
3954
|
+
output_mtok: 1.8
|
|
3955
|
+
}
|
|
3956
|
+
},
|
|
3696
3957
|
{
|
|
3697
3958
|
id: "deepseek-ai/DeepSeek-R1-0528",
|
|
3698
3959
|
name: "DeepSeek-R1-0528",
|
|
@@ -3769,25 +4030,6 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
3769
4030
|
output_mtok: 0.6
|
|
3770
4031
|
}
|
|
3771
4032
|
},
|
|
3772
|
-
{
|
|
3773
|
-
id: "openai/gpt-oss-20b",
|
|
3774
|
-
name: "gpt-oss-20b",
|
|
3775
|
-
match: {
|
|
3776
|
-
or: [
|
|
3777
|
-
{
|
|
3778
|
-
equals: "openai/gpt-oss-20b"
|
|
3779
|
-
},
|
|
3780
|
-
{
|
|
3781
|
-
equals: "openai/gpt-oss-20b-fast"
|
|
3782
|
-
}
|
|
3783
|
-
]
|
|
3784
|
-
},
|
|
3785
|
-
context_window: 131072,
|
|
3786
|
-
prices: {
|
|
3787
|
-
input_mtok: 0.05,
|
|
3788
|
-
output_mtok: 0.2
|
|
3789
|
-
}
|
|
3790
|
-
},
|
|
3791
4033
|
{
|
|
3792
4034
|
id: "zai-org/GLM-4.5",
|
|
3793
4035
|
name: "GLM-4.5",
|
|
@@ -3915,25 +4157,6 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
3915
4157
|
input_mtok: 0.15,
|
|
3916
4158
|
output_mtok: 0.75
|
|
3917
4159
|
}
|
|
3918
|
-
},
|
|
3919
|
-
{
|
|
3920
|
-
id: "openai/gpt-oss-20b",
|
|
3921
|
-
name: "gpt-oss-20b",
|
|
3922
|
-
match: {
|
|
3923
|
-
or: [
|
|
3924
|
-
{
|
|
3925
|
-
equals: "openai/gpt-oss-20b"
|
|
3926
|
-
},
|
|
3927
|
-
{
|
|
3928
|
-
equals: "openai/gpt-oss-20b-fast"
|
|
3929
|
-
}
|
|
3930
|
-
]
|
|
3931
|
-
},
|
|
3932
|
-
context_window: 131072,
|
|
3933
|
-
prices: {
|
|
3934
|
-
input_mtok: 0.1,
|
|
3935
|
-
output_mtok: 0.5
|
|
3936
|
-
}
|
|
3937
4160
|
}
|
|
3938
4161
|
]
|
|
3939
4162
|
},
|
|
@@ -4309,25 +4532,6 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4309
4532
|
input_mtok: 0.3,
|
|
4310
4533
|
output_mtok: 0.3
|
|
4311
4534
|
}
|
|
4312
|
-
},
|
|
4313
|
-
{
|
|
4314
|
-
id: "openai/gpt-oss-20b",
|
|
4315
|
-
name: "gpt-oss-20b",
|
|
4316
|
-
match: {
|
|
4317
|
-
or: [
|
|
4318
|
-
{
|
|
4319
|
-
equals: "openai/gpt-oss-20b"
|
|
4320
|
-
},
|
|
4321
|
-
{
|
|
4322
|
-
equals: "openai/gpt-oss-20b-fast"
|
|
4323
|
-
}
|
|
4324
|
-
]
|
|
4325
|
-
},
|
|
4326
|
-
context_window: 131072,
|
|
4327
|
-
prices: {
|
|
4328
|
-
input_mtok: 0.1,
|
|
4329
|
-
output_mtok: 0.1
|
|
4330
|
-
}
|
|
4331
4535
|
}
|
|
4332
4536
|
]
|
|
4333
4537
|
},
|
|
@@ -4837,25 +5041,6 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4837
5041
|
output_mtok: 0.6
|
|
4838
5042
|
}
|
|
4839
5043
|
},
|
|
4840
|
-
{
|
|
4841
|
-
id: "openai/gpt-oss-20b",
|
|
4842
|
-
name: "gpt-oss-20b",
|
|
4843
|
-
match: {
|
|
4844
|
-
or: [
|
|
4845
|
-
{
|
|
4846
|
-
equals: "openai/gpt-oss-20b"
|
|
4847
|
-
},
|
|
4848
|
-
{
|
|
4849
|
-
equals: "openai/gpt-oss-20b-fast"
|
|
4850
|
-
}
|
|
4851
|
-
]
|
|
4852
|
-
},
|
|
4853
|
-
context_window: 131072,
|
|
4854
|
-
prices: {
|
|
4855
|
-
input_mtok: 0.05,
|
|
4856
|
-
output_mtok: 0.2
|
|
4857
|
-
}
|
|
4858
|
-
},
|
|
4859
5044
|
{
|
|
4860
5045
|
id: "zai-org/GLM-4.5",
|
|
4861
5046
|
name: "GLM-4.5",
|
|
@@ -5326,6 +5511,25 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
5326
5511
|
output_mtok: 0.05
|
|
5327
5512
|
}
|
|
5328
5513
|
},
|
|
5514
|
+
{
|
|
5515
|
+
id: "XiaomiMiMo/MiMo-V2-Flash",
|
|
5516
|
+
name: "MiMo-V2-Flash",
|
|
5517
|
+
match: {
|
|
5518
|
+
or: [
|
|
5519
|
+
{
|
|
5520
|
+
equals: "xiaomimimo/mimo-v2-flash"
|
|
5521
|
+
},
|
|
5522
|
+
{
|
|
5523
|
+
equals: "xiaomimimo/mimo-v2-flash-fast"
|
|
5524
|
+
}
|
|
5525
|
+
]
|
|
5526
|
+
},
|
|
5527
|
+
context_window: 262144,
|
|
5528
|
+
prices: {
|
|
5529
|
+
input_mtok: 0.098,
|
|
5530
|
+
output_mtok: 0.293
|
|
5531
|
+
}
|
|
5532
|
+
},
|
|
5329
5533
|
{
|
|
5330
5534
|
id: "alpindale/WizardLM-2-8x22B",
|
|
5331
5535
|
name: "WizardLM-2-8x22B",
|
|
@@ -5490,17 +5694,36 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
5490
5694
|
match: {
|
|
5491
5695
|
or: [
|
|
5492
5696
|
{
|
|
5493
|
-
equals: "deepseek-ai/deepseek-r1-0528-qwen3-8b"
|
|
5697
|
+
equals: "deepseek-ai/deepseek-r1-0528-qwen3-8b"
|
|
5698
|
+
},
|
|
5699
|
+
{
|
|
5700
|
+
equals: "deepseek-ai/deepseek-r1-0528-qwen3-8b-fast"
|
|
5701
|
+
}
|
|
5702
|
+
]
|
|
5703
|
+
},
|
|
5704
|
+
context_window: 128e3,
|
|
5705
|
+
prices: {
|
|
5706
|
+
input_mtok: 0.048,
|
|
5707
|
+
output_mtok: 0.072
|
|
5708
|
+
}
|
|
5709
|
+
},
|
|
5710
|
+
{
|
|
5711
|
+
id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
|
|
5712
|
+
name: "DeepSeek-R1-Distill-Llama-70B",
|
|
5713
|
+
match: {
|
|
5714
|
+
or: [
|
|
5715
|
+
{
|
|
5716
|
+
equals: "deepseek-ai/deepseek-r1-distill-llama-70b"
|
|
5494
5717
|
},
|
|
5495
5718
|
{
|
|
5496
|
-
equals: "deepseek-ai/deepseek-r1-
|
|
5719
|
+
equals: "deepseek-ai/deepseek-r1-distill-llama-70b-fast"
|
|
5497
5720
|
}
|
|
5498
5721
|
]
|
|
5499
5722
|
},
|
|
5500
|
-
context_window:
|
|
5723
|
+
context_window: 8192,
|
|
5501
5724
|
prices: {
|
|
5502
|
-
input_mtok: 0.
|
|
5503
|
-
output_mtok: 0.
|
|
5725
|
+
input_mtok: 0.64,
|
|
5726
|
+
output_mtok: 0.64
|
|
5504
5727
|
}
|
|
5505
5728
|
},
|
|
5506
5729
|
{
|
|
@@ -5756,25 +5979,6 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
5756
5979
|
output_mtok: 1.84
|
|
5757
5980
|
}
|
|
5758
5981
|
},
|
|
5759
|
-
{
|
|
5760
|
-
id: "moonshotai/Kimi-K2-Instruct-0905",
|
|
5761
|
-
name: "Kimi-K2-Instruct-0905",
|
|
5762
|
-
match: {
|
|
5763
|
-
or: [
|
|
5764
|
-
{
|
|
5765
|
-
equals: "moonshotai/kimi-k2-instruct-0905"
|
|
5766
|
-
},
|
|
5767
|
-
{
|
|
5768
|
-
equals: "moonshotai/kimi-k2-instruct-0905-fast"
|
|
5769
|
-
}
|
|
5770
|
-
]
|
|
5771
|
-
},
|
|
5772
|
-
context_window: 262144,
|
|
5773
|
-
prices: {
|
|
5774
|
-
input_mtok: 0.48,
|
|
5775
|
-
output_mtok: 2
|
|
5776
|
-
}
|
|
5777
|
-
},
|
|
5778
5982
|
{
|
|
5779
5983
|
id: "moonshotai/Kimi-K2-Thinking",
|
|
5780
5984
|
name: "Kimi-K2-Thinking",
|
|
@@ -5813,25 +6017,6 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
5813
6017
|
output_mtok: 0.2
|
|
5814
6018
|
}
|
|
5815
6019
|
},
|
|
5816
|
-
{
|
|
5817
|
-
id: "openai/gpt-oss-20b",
|
|
5818
|
-
name: "gpt-oss-20b",
|
|
5819
|
-
match: {
|
|
5820
|
-
or: [
|
|
5821
|
-
{
|
|
5822
|
-
equals: "openai/gpt-oss-20b"
|
|
5823
|
-
},
|
|
5824
|
-
{
|
|
5825
|
-
equals: "openai/gpt-oss-20b-fast"
|
|
5826
|
-
}
|
|
5827
|
-
]
|
|
5828
|
-
},
|
|
5829
|
-
context_window: 131072,
|
|
5830
|
-
prices: {
|
|
5831
|
-
input_mtok: 0.032,
|
|
5832
|
-
output_mtok: 0.12
|
|
5833
|
-
}
|
|
5834
|
-
},
|
|
5835
6020
|
{
|
|
5836
6021
|
id: "zai-org/AutoGLM-Phone-9B-Multilingual",
|
|
5837
6022
|
name: "AutoGLM-Phone-9B-Multilingual",
|
|
@@ -6383,25 +6568,6 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
6383
6568
|
input_mtok: 0.1,
|
|
6384
6569
|
output_mtok: 0.4
|
|
6385
6570
|
}
|
|
6386
|
-
},
|
|
6387
|
-
{
|
|
6388
|
-
id: "openai/gpt-oss-20b",
|
|
6389
|
-
name: "gpt-oss-20b",
|
|
6390
|
-
match: {
|
|
6391
|
-
or: [
|
|
6392
|
-
{
|
|
6393
|
-
equals: "openai/gpt-oss-20b"
|
|
6394
|
-
},
|
|
6395
|
-
{
|
|
6396
|
-
equals: "openai/gpt-oss-20b-fast"
|
|
6397
|
-
}
|
|
6398
|
-
]
|
|
6399
|
-
},
|
|
6400
|
-
context_window: 131072,
|
|
6401
|
-
prices: {
|
|
6402
|
-
input_mtok: 0.05,
|
|
6403
|
-
output_mtok: 0.2
|
|
6404
|
-
}
|
|
6405
6571
|
}
|
|
6406
6572
|
]
|
|
6407
6573
|
},
|
|
@@ -6474,6 +6640,25 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
6474
6640
|
output_mtok: 1.01
|
|
6475
6641
|
}
|
|
6476
6642
|
},
|
|
6643
|
+
{
|
|
6644
|
+
id: "Qwen/Qwen3-32B",
|
|
6645
|
+
name: "Qwen3-32B",
|
|
6646
|
+
match: {
|
|
6647
|
+
or: [
|
|
6648
|
+
{
|
|
6649
|
+
equals: "qwen/qwen3-32b"
|
|
6650
|
+
},
|
|
6651
|
+
{
|
|
6652
|
+
equals: "qwen/qwen3-32b-fast"
|
|
6653
|
+
}
|
|
6654
|
+
]
|
|
6655
|
+
},
|
|
6656
|
+
context_window: 32768,
|
|
6657
|
+
prices: {
|
|
6658
|
+
input_mtok: 0.09,
|
|
6659
|
+
output_mtok: 0.25
|
|
6660
|
+
}
|
|
6661
|
+
},
|
|
6477
6662
|
{
|
|
6478
6663
|
id: "Qwen/Qwen3-Coder-30B-A3B-Instruct",
|
|
6479
6664
|
name: "Qwen3-Coder-30B-A3B-Instruct",
|
|
@@ -6492,6 +6677,82 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
6492
6677
|
input_mtok: 0.07,
|
|
6493
6678
|
output_mtok: 0.26
|
|
6494
6679
|
}
|
|
6680
|
+
},
|
|
6681
|
+
{
|
|
6682
|
+
id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
|
|
6683
|
+
name: "DeepSeek-R1-Distill-Llama-70B",
|
|
6684
|
+
match: {
|
|
6685
|
+
or: [
|
|
6686
|
+
{
|
|
6687
|
+
equals: "deepseek-ai/deepseek-r1-distill-llama-70b"
|
|
6688
|
+
},
|
|
6689
|
+
{
|
|
6690
|
+
equals: "deepseek-ai/deepseek-r1-distill-llama-70b-fast"
|
|
6691
|
+
}
|
|
6692
|
+
]
|
|
6693
|
+
},
|
|
6694
|
+
context_window: 131072,
|
|
6695
|
+
prices: {
|
|
6696
|
+
input_mtok: 0.74,
|
|
6697
|
+
output_mtok: 0.74
|
|
6698
|
+
}
|
|
6699
|
+
},
|
|
6700
|
+
{
|
|
6701
|
+
id: "meta-llama/Llama-3.1-8B-Instruct",
|
|
6702
|
+
name: "Llama-3.1-8B-Instruct",
|
|
6703
|
+
match: {
|
|
6704
|
+
or: [
|
|
6705
|
+
{
|
|
6706
|
+
equals: "meta-llama/llama-3.1-8b-instruct"
|
|
6707
|
+
},
|
|
6708
|
+
{
|
|
6709
|
+
equals: "meta-llama/llama-3.1-8b-instruct-fast"
|
|
6710
|
+
}
|
|
6711
|
+
]
|
|
6712
|
+
},
|
|
6713
|
+
context_window: 131072,
|
|
6714
|
+
prices: {
|
|
6715
|
+
input_mtok: 0.11,
|
|
6716
|
+
output_mtok: 0.11
|
|
6717
|
+
}
|
|
6718
|
+
},
|
|
6719
|
+
{
|
|
6720
|
+
id: "meta-llama/Llama-3.3-70B-Instruct",
|
|
6721
|
+
name: "Llama-3.3-70B-Instruct",
|
|
6722
|
+
match: {
|
|
6723
|
+
or: [
|
|
6724
|
+
{
|
|
6725
|
+
equals: "meta-llama/llama-3.3-70b-instruct"
|
|
6726
|
+
},
|
|
6727
|
+
{
|
|
6728
|
+
equals: "meta-llama/llama-3.3-70b-instruct-fast"
|
|
6729
|
+
}
|
|
6730
|
+
]
|
|
6731
|
+
},
|
|
6732
|
+
context_window: 131072,
|
|
6733
|
+
prices: {
|
|
6734
|
+
input_mtok: 0.74,
|
|
6735
|
+
output_mtok: 0.74
|
|
6736
|
+
}
|
|
6737
|
+
},
|
|
6738
|
+
{
|
|
6739
|
+
id: "openai/gpt-oss-120b",
|
|
6740
|
+
name: "gpt-oss-120b",
|
|
6741
|
+
match: {
|
|
6742
|
+
or: [
|
|
6743
|
+
{
|
|
6744
|
+
equals: "openai/gpt-oss-120b"
|
|
6745
|
+
},
|
|
6746
|
+
{
|
|
6747
|
+
equals: "openai/gpt-oss-120b-fast"
|
|
6748
|
+
}
|
|
6749
|
+
]
|
|
6750
|
+
},
|
|
6751
|
+
context_window: 131072,
|
|
6752
|
+
prices: {
|
|
6753
|
+
input_mtok: 0.09,
|
|
6754
|
+
output_mtok: 0.47
|
|
6755
|
+
}
|
|
6495
6756
|
}
|
|
6496
6757
|
]
|
|
6497
6758
|
},
|
|
@@ -7408,25 +7669,6 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
7408
7669
|
output_mtok: 0.6
|
|
7409
7670
|
}
|
|
7410
7671
|
},
|
|
7411
|
-
{
|
|
7412
|
-
id: "openai/gpt-oss-20b",
|
|
7413
|
-
name: "gpt-oss-20b",
|
|
7414
|
-
match: {
|
|
7415
|
-
or: [
|
|
7416
|
-
{
|
|
7417
|
-
equals: "openai/gpt-oss-20b"
|
|
7418
|
-
},
|
|
7419
|
-
{
|
|
7420
|
-
equals: "openai/gpt-oss-20b-fast"
|
|
7421
|
-
}
|
|
7422
|
-
]
|
|
7423
|
-
},
|
|
7424
|
-
context_window: 131072,
|
|
7425
|
-
prices: {
|
|
7426
|
-
input_mtok: 0.05,
|
|
7427
|
-
output_mtok: 0.2
|
|
7428
|
-
}
|
|
7429
|
-
},
|
|
7430
7672
|
{
|
|
7431
7673
|
id: "zai-org/GLM-4.5-Air-FP8",
|
|
7432
7674
|
name: "GLM-4.5-Air-FP8",
|
|
@@ -7727,7 +7969,8 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
7727
7969
|
prices: {
|
|
7728
7970
|
input_mtok: 0.25,
|
|
7729
7971
|
output_mtok: 0.25
|
|
7730
|
-
}
|
|
7972
|
+
},
|
|
7973
|
+
deprecated: !0
|
|
7731
7974
|
},
|
|
7732
7975
|
{
|
|
7733
7976
|
id: "mixtral-8x22b-instruct",
|
|
@@ -8989,6 +9232,12 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
8989
9232
|
{
|
|
8990
9233
|
equals: "gpt-5.1-codex"
|
|
8991
9234
|
},
|
|
9235
|
+
{
|
|
9236
|
+
equals: "gpt-5.1-codex-max"
|
|
9237
|
+
},
|
|
9238
|
+
{
|
|
9239
|
+
equals: "gpt-5.1-chat"
|
|
9240
|
+
},
|
|
8992
9241
|
{
|
|
8993
9242
|
equals: "gpt-5.1-chat-latest"
|
|
8994
9243
|
},
|
|
@@ -9001,6 +9250,12 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
9001
9250
|
{
|
|
9002
9251
|
equals: "gpt-5-1-codex"
|
|
9003
9252
|
},
|
|
9253
|
+
{
|
|
9254
|
+
equals: "gpt-5-1-codex-max"
|
|
9255
|
+
},
|
|
9256
|
+
{
|
|
9257
|
+
equals: "gpt-5-1-chat"
|
|
9258
|
+
},
|
|
9004
9259
|
{
|
|
9005
9260
|
equals: "gpt-5-1-chat-latest"
|
|
9006
9261
|
}
|
|
@@ -9057,6 +9312,15 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
9057
9312
|
{
|
|
9058
9313
|
equals: "gpt-5-2-2025-12-11"
|
|
9059
9314
|
},
|
|
9315
|
+
{
|
|
9316
|
+
equals: "gpt-5.2-chat"
|
|
9317
|
+
},
|
|
9318
|
+
{
|
|
9319
|
+
equals: "gpt-5.2-chat-latest"
|
|
9320
|
+
},
|
|
9321
|
+
{
|
|
9322
|
+
equals: "gpt-5-2-chat"
|
|
9323
|
+
},
|
|
9060
9324
|
{
|
|
9061
9325
|
equals: "gpt-5-2-chat-latest"
|
|
9062
9326
|
},
|
|
@@ -9840,6 +10104,57 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
9840
10104
|
output_mtok: 25
|
|
9841
10105
|
}
|
|
9842
10106
|
},
|
|
10107
|
+
{
|
|
10108
|
+
id: "anthropic/claude-opus-4.6",
|
|
10109
|
+
match: {
|
|
10110
|
+
or: [
|
|
10111
|
+
{
|
|
10112
|
+
equals: "anthropic/claude-opus-4.6"
|
|
10113
|
+
},
|
|
10114
|
+
{
|
|
10115
|
+
equals: "anthropic/claude-opus-4.6:beta"
|
|
10116
|
+
}
|
|
10117
|
+
]
|
|
10118
|
+
},
|
|
10119
|
+
prices: {
|
|
10120
|
+
input_mtok: {
|
|
10121
|
+
base: 5,
|
|
10122
|
+
tiers: [
|
|
10123
|
+
{
|
|
10124
|
+
start: 2e5,
|
|
10125
|
+
price: 10
|
|
10126
|
+
}
|
|
10127
|
+
]
|
|
10128
|
+
},
|
|
10129
|
+
cache_write_mtok: {
|
|
10130
|
+
base: 6.25,
|
|
10131
|
+
tiers: [
|
|
10132
|
+
{
|
|
10133
|
+
start: 2e5,
|
|
10134
|
+
price: 12.5
|
|
10135
|
+
}
|
|
10136
|
+
]
|
|
10137
|
+
},
|
|
10138
|
+
cache_read_mtok: {
|
|
10139
|
+
base: 0.5,
|
|
10140
|
+
tiers: [
|
|
10141
|
+
{
|
|
10142
|
+
start: 2e5,
|
|
10143
|
+
price: 1
|
|
10144
|
+
}
|
|
10145
|
+
]
|
|
10146
|
+
},
|
|
10147
|
+
output_mtok: {
|
|
10148
|
+
base: 25,
|
|
10149
|
+
tiers: [
|
|
10150
|
+
{
|
|
10151
|
+
start: 2e5,
|
|
10152
|
+
price: 37.5
|
|
10153
|
+
}
|
|
10154
|
+
]
|
|
10155
|
+
}
|
|
10156
|
+
}
|
|
10157
|
+
},
|
|
9843
10158
|
{
|
|
9844
10159
|
id: "anthropic/claude-sonnet-4.5",
|
|
9845
10160
|
match: {
|
|
@@ -14981,10 +15296,10 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
14981
15296
|
prices: {}
|
|
14982
15297
|
},
|
|
14983
15298
|
{
|
|
14984
|
-
id: "qwen/qwen3-max
|
|
14985
|
-
name: "Qwen 3 Max
|
|
15299
|
+
id: "qwen/qwen3-max",
|
|
15300
|
+
name: "Qwen 3 Max",
|
|
14986
15301
|
match: {
|
|
14987
|
-
equals: "qwen/qwen3-max
|
|
15302
|
+
equals: "qwen/qwen3-max"
|
|
14988
15303
|
},
|
|
14989
15304
|
prices: {
|
|
14990
15305
|
input_mtok: 1.2,
|
|
@@ -15814,24 +16129,6 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
15814
16129
|
}
|
|
15815
16130
|
],
|
|
15816
16131
|
models: [
|
|
15817
|
-
{
|
|
15818
|
-
id: "BGE-M3",
|
|
15819
|
-
name: "BGE-M3",
|
|
15820
|
-
match: {
|
|
15821
|
-
or: [
|
|
15822
|
-
{
|
|
15823
|
-
equals: "BGE-M3"
|
|
15824
|
-
},
|
|
15825
|
-
{
|
|
15826
|
-
equals: "bge-m3"
|
|
15827
|
-
}
|
|
15828
|
-
]
|
|
15829
|
-
},
|
|
15830
|
-
context_window: 8192,
|
|
15831
|
-
prices: {
|
|
15832
|
-
input_mtok: 0.01
|
|
15833
|
-
}
|
|
15834
|
-
},
|
|
15835
16132
|
{
|
|
15836
16133
|
id: "DeepSeek-R1-Distill-Llama-70B",
|
|
15837
16134
|
name: "DeepSeek-R1-Distill-Llama-70B",
|
|
@@ -16071,6 +16368,17 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
16071
16368
|
input_mtok: 0.01
|
|
16072
16369
|
}
|
|
16073
16370
|
},
|
|
16371
|
+
{
|
|
16372
|
+
id: "bge-m3",
|
|
16373
|
+
name: "bge-m3",
|
|
16374
|
+
match: {
|
|
16375
|
+
equals: "bge-m3"
|
|
16376
|
+
},
|
|
16377
|
+
context_window: 8192,
|
|
16378
|
+
prices: {
|
|
16379
|
+
input_mtok: 0.01
|
|
16380
|
+
}
|
|
16381
|
+
},
|
|
16074
16382
|
{
|
|
16075
16383
|
id: "bge-multilingual-gemma2",
|
|
16076
16384
|
name: "bge-multilingual-gemma2",
|
|
@@ -17088,7 +17396,8 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
17088
17396
|
prices: {
|
|
17089
17397
|
input_mtok: 2,
|
|
17090
17398
|
output_mtok: 10
|
|
17091
|
-
}
|
|
17399
|
+
},
|
|
17400
|
+
deprecated: !0
|
|
17092
17401
|
},
|
|
17093
17402
|
{
|
|
17094
17403
|
id: "grok-2-vision-1212",
|
|
@@ -17350,52 +17659,52 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
17350
17659
|
]
|
|
17351
17660
|
}
|
|
17352
17661
|
];
|
|
17353
|
-
function
|
|
17354
|
-
if (
|
|
17355
|
-
let a =
|
|
17356
|
-
for (const o of
|
|
17662
|
+
function y(e, t, i) {
|
|
17663
|
+
if (t <= 0) return 0;
|
|
17664
|
+
let a = e.base;
|
|
17665
|
+
for (const o of e.tiers)
|
|
17357
17666
|
i > o.start && (a = o.price);
|
|
17358
|
-
return a *
|
|
17667
|
+
return a * t / 1e6;
|
|
17359
17668
|
}
|
|
17360
|
-
function l(
|
|
17361
|
-
return
|
|
17669
|
+
function l(e, t, i, a) {
|
|
17670
|
+
return e === void 0 || t === void 0 ? 0 : typeof e == "number" ? e * t / 1e6 : y(e, t, a);
|
|
17362
17671
|
}
|
|
17363
|
-
function Q(
|
|
17672
|
+
function Q(e, t) {
|
|
17364
17673
|
let i = 0, a = 0;
|
|
17365
|
-
const o =
|
|
17366
|
-
let u =
|
|
17674
|
+
const o = e.input_tokens ?? 0, s = e.cache_read_tokens ?? 0, m = e.cache_write_tokens ?? 0, n = e.cache_audio_read_tokens ?? 0, r = e.output_audio_tokens ?? 0;
|
|
17675
|
+
let u = e.input_audio_tokens ?? 0;
|
|
17367
17676
|
if (u -= n, u < 0)
|
|
17368
17677
|
throw new Error("cache_audio_read_tokens cannot be greater than input_audio_tokens");
|
|
17369
|
-
let p =
|
|
17678
|
+
let p = e.input_tokens ?? 0;
|
|
17370
17679
|
if (p -= s, p -= m, p -= u, p < 0)
|
|
17371
17680
|
throw new Error("Uncached text input tokens cannot be negative");
|
|
17372
17681
|
let c = s;
|
|
17373
17682
|
if (c -= n, c < 0)
|
|
17374
17683
|
throw new Error("cache_audio_read_tokens cannot be greater than cache_read_tokens");
|
|
17375
|
-
i += l(
|
|
17376
|
-
let _ =
|
|
17684
|
+
i += l(t.input_mtok, p, "input_mtok", o), i += l(t.cache_read_mtok, c, "cache_read_mtok", o), i += l(t.cache_write_mtok, m, "cache_write_mtok", o), i += l(t.input_audio_mtok, u, "input_audio_mtok", o), i += l(t.cache_audio_read_mtok, n, "cache_audio_read_mtok", o);
|
|
17685
|
+
let _ = e.output_tokens ?? 0;
|
|
17377
17686
|
if (_ -= r, _ < 0)
|
|
17378
17687
|
throw new Error("output_audio_tokens cannot be greater than output_tokens");
|
|
17379
|
-
a += l(
|
|
17688
|
+
a += l(t.output_mtok, _, "output_mtok", o), a += l(t.output_audio_mtok, e.output_audio_tokens, "output_audio_mtok", o);
|
|
17380
17689
|
let x = i + a;
|
|
17381
|
-
return
|
|
17690
|
+
return t.requests_kcount !== void 0 && (x += t.requests_kcount / 1e3), {
|
|
17382
17691
|
input_price: i,
|
|
17383
17692
|
output_price: a,
|
|
17384
17693
|
total_price: x
|
|
17385
17694
|
};
|
|
17386
17695
|
}
|
|
17387
|
-
function T(
|
|
17388
|
-
if (!Array.isArray(
|
|
17389
|
-
return
|
|
17390
|
-
for (let i =
|
|
17391
|
-
const a =
|
|
17696
|
+
function T(e, t) {
|
|
17697
|
+
if (!Array.isArray(e.prices))
|
|
17698
|
+
return e.prices;
|
|
17699
|
+
for (let i = e.prices.length - 1; i >= 0; i--) {
|
|
17700
|
+
const a = e.prices[i], o = a.constraint;
|
|
17392
17701
|
if (o === void 0)
|
|
17393
17702
|
return a.prices;
|
|
17394
17703
|
if (o.type === "start_date") {
|
|
17395
|
-
if (
|
|
17704
|
+
if (t >= new Date(o.start_date))
|
|
17396
17705
|
return a.prices;
|
|
17397
17706
|
} else {
|
|
17398
|
-
const s =
|
|
17707
|
+
const s = t.toISOString().slice(11, 19), m = o.start_time, n = o.end_time;
|
|
17399
17708
|
if (n < m) {
|
|
17400
17709
|
if (s >= m || s < n)
|
|
17401
17710
|
return a.prices;
|
|
@@ -17403,53 +17712,53 @@ function T(t, e) {
|
|
|
17403
17712
|
return a.prices;
|
|
17404
17713
|
}
|
|
17405
17714
|
}
|
|
17406
|
-
return
|
|
17715
|
+
return e.prices[0].prices;
|
|
17407
17716
|
}
|
|
17408
|
-
function g(
|
|
17409
|
-
return "or" in
|
|
17717
|
+
function g(e, t) {
|
|
17718
|
+
return "or" in e ? e.or.some((i) => g(i, t)) : "and" in e ? e.and.every((i) => g(i, t)) : "equals" in e ? t === e.equals : "starts_with" in e ? t.startsWith(e.starts_with) : "ends_with" in e ? t.endsWith(e.ends_with) : "contains" in e ? t.includes(e.contains) : "regex" in e ? new RegExp(e.regex).test(t) : !1;
|
|
17410
17719
|
}
|
|
17411
|
-
function P(
|
|
17412
|
-
const i =
|
|
17413
|
-
return a ||
|
|
17720
|
+
function P(e, t) {
|
|
17721
|
+
const i = t.toLowerCase().trim(), a = e.find((o) => o.id === i);
|
|
17722
|
+
return a || e.find((o) => o.provider_match && g(o.provider_match, i));
|
|
17414
17723
|
}
|
|
17415
|
-
function b(
|
|
17724
|
+
function b(e, { modelId: t, providerApiUrl: i, providerId: a }) {
|
|
17416
17725
|
if (a) {
|
|
17417
|
-
const o = P(
|
|
17726
|
+
const o = P(e, a);
|
|
17418
17727
|
if (o || a.toLowerCase() !== "litellm")
|
|
17419
17728
|
return o;
|
|
17420
17729
|
}
|
|
17421
17730
|
if (i)
|
|
17422
|
-
return
|
|
17423
|
-
if (
|
|
17424
|
-
return
|
|
17731
|
+
return e.find((o) => new RegExp(o.api_pattern).test(i));
|
|
17732
|
+
if (t)
|
|
17733
|
+
return e.find((o) => o.model_match && g(o.model_match, t));
|
|
17425
17734
|
}
|
|
17426
|
-
function S(
|
|
17427
|
-
return
|
|
17735
|
+
function S(e, t) {
|
|
17736
|
+
return e.find((i) => g(i.match, t));
|
|
17428
17737
|
}
|
|
17429
|
-
function M(
|
|
17430
|
-
const a = S(
|
|
17738
|
+
function M(e, t, i) {
|
|
17739
|
+
const a = S(e.models, t);
|
|
17431
17740
|
if (a) return a;
|
|
17432
|
-
if (
|
|
17433
|
-
for (const o of
|
|
17741
|
+
if (e.fallback_model_providers && i)
|
|
17742
|
+
for (const o of e.fallback_model_providers) {
|
|
17434
17743
|
const s = i.find((m) => m.id === o);
|
|
17435
17744
|
if (s) {
|
|
17436
|
-
const m = M(s,
|
|
17745
|
+
const m = M(s, t);
|
|
17437
17746
|
if (m) return m;
|
|
17438
17747
|
}
|
|
17439
17748
|
}
|
|
17440
17749
|
}
|
|
17441
17750
|
const A = "https://raw.githubusercontent.com/pydantic/genai-prices/main/prices/data.json";
|
|
17442
17751
|
let h = I, f = Promise.resolve(I), v = null;
|
|
17443
|
-
function G(
|
|
17444
|
-
|
|
17445
|
-
|
|
17446
|
-
})) : (f = Promise.resolve(
|
|
17752
|
+
function G(e) {
|
|
17753
|
+
e !== null && ("then" in e ? (f = e, e.then((t) => {
|
|
17754
|
+
t !== null && (h = t);
|
|
17755
|
+
})) : (f = Promise.resolve(e), h = e));
|
|
17447
17756
|
}
|
|
17448
|
-
function R(
|
|
17449
|
-
v =
|
|
17757
|
+
function R(e) {
|
|
17758
|
+
v = e;
|
|
17450
17759
|
}
|
|
17451
|
-
function N(
|
|
17452
|
-
|
|
17760
|
+
function N(e) {
|
|
17761
|
+
e({
|
|
17453
17762
|
onCalc: R,
|
|
17454
17763
|
remoteDataUrl: A,
|
|
17455
17764
|
setProviderData: G
|
|
@@ -17458,9 +17767,9 @@ function N(t) {
|
|
|
17458
17767
|
function V() {
|
|
17459
17768
|
return f;
|
|
17460
17769
|
}
|
|
17461
|
-
function E(
|
|
17770
|
+
function E(e, t, i) {
|
|
17462
17771
|
v?.();
|
|
17463
|
-
let a =
|
|
17772
|
+
let a = t.toLowerCase().trim(), o = i?.providerId;
|
|
17464
17773
|
if (o && o.toLowerCase() === "litellm" && a.includes("/")) {
|
|
17465
17774
|
const p = a.indexOf("/"), c = a.slice(0, p), _ = a.slice(p + 1);
|
|
17466
17775
|
c && _ && b(h, { providerId: c }) && (o = c, a = _);
|
|
@@ -17469,7 +17778,7 @@ function E(t, e, i) {
|
|
|
17469
17778
|
if (!s) return null;
|
|
17470
17779
|
const m = M(s, a, h);
|
|
17471
17780
|
if (!m) return null;
|
|
17472
|
-
const n = i?.timestamp ?? /* @__PURE__ */ new Date(), r = T(m, n), u = Q(
|
|
17781
|
+
const n = i?.timestamp ?? /* @__PURE__ */ new Date(), r = T(m, n), u = Q(e, r);
|
|
17473
17782
|
return {
|
|
17474
17783
|
auto_update_timestamp: void 0,
|
|
17475
17784
|
model: m,
|
|
@@ -17478,20 +17787,20 @@ function E(t, e, i) {
|
|
|
17478
17787
|
...u
|
|
17479
17788
|
};
|
|
17480
17789
|
}
|
|
17481
|
-
function O(
|
|
17482
|
-
return v?.(), b(h,
|
|
17790
|
+
function O(e) {
|
|
17791
|
+
return v?.(), b(h, e);
|
|
17483
17792
|
}
|
|
17484
|
-
function F(
|
|
17485
|
-
if (i = i ?? "default", !
|
|
17793
|
+
function F(e, t, i) {
|
|
17794
|
+
if (i = i ?? "default", !e.extractors)
|
|
17486
17795
|
throw new Error("No extraction logic defined for this provider");
|
|
17487
|
-
const a =
|
|
17796
|
+
const a = e.extractors.find((r) => r.api_flavor === i);
|
|
17488
17797
|
if (!a) {
|
|
17489
|
-
const r =
|
|
17798
|
+
const r = e.extractors.map((u) => u.api_flavor).join(", ");
|
|
17490
17799
|
throw new Error(`Unknown apiFlavor '${i}', allowed values: ${r}`);
|
|
17491
17800
|
}
|
|
17492
|
-
if (!q.guard(
|
|
17493
|
-
throw new Error(`Expected response data to be a mapping object, got ${d(
|
|
17494
|
-
const o = w(a.model_path,
|
|
17801
|
+
if (!q.guard(t))
|
|
17802
|
+
throw new Error(`Expected response data to be a mapping object, got ${d(t)}`);
|
|
17803
|
+
const o = w(a.model_path, t, C, !1, []), s = L(a.root), m = w(s, t, q, !0, []), n = {};
|
|
17495
17804
|
for (const r of a.mappings) {
|
|
17496
17805
|
const u = w(r.path, m, z, r.required, s);
|
|
17497
17806
|
if (u !== null) {
|
|
@@ -17503,12 +17812,12 @@ function F(t, e, i) {
|
|
|
17503
17812
|
throw new Error(`No usage information found at ${JSON.stringify(a.root)}`);
|
|
17504
17813
|
return { model: o, usage: n };
|
|
17505
17814
|
}
|
|
17506
|
-
function w(
|
|
17507
|
-
const [s, ...m] =
|
|
17815
|
+
function w(e, t, i, a, o) {
|
|
17816
|
+
const [s, ...m] = L(e).reverse();
|
|
17508
17817
|
if (typeof s != "string")
|
|
17509
17818
|
throw new Error(`Expected last step of path to be a string, got ${d(s)}`);
|
|
17510
17819
|
m.reverse();
|
|
17511
|
-
let n =
|
|
17820
|
+
let n = t;
|
|
17512
17821
|
const r = [];
|
|
17513
17822
|
for (const p of m) {
|
|
17514
17823
|
if (r.push(p), typeof p == "object")
|
|
@@ -17550,35 +17859,35 @@ function w(t, e, i, a, o) {
|
|
|
17550
17859
|
throw r.push(s), new Error(`Expected \`${k(o, r)}\` value to be a ${i.name}, got ${d(u)}`);
|
|
17551
17860
|
return null;
|
|
17552
17861
|
}
|
|
17553
|
-
function D(
|
|
17554
|
-
for (const i of
|
|
17862
|
+
function D(e, t) {
|
|
17863
|
+
for (const i of t)
|
|
17555
17864
|
if (q.guard(i)) {
|
|
17556
|
-
const a = i[
|
|
17557
|
-
if (typeof a == "string" && g(
|
|
17865
|
+
const a = i[e.field];
|
|
17866
|
+
if (typeof a == "string" && g(e.match, a))
|
|
17558
17867
|
return i;
|
|
17559
17868
|
}
|
|
17560
17869
|
}
|
|
17561
|
-
function
|
|
17562
|
-
return Array.isArray(
|
|
17870
|
+
function L(e) {
|
|
17871
|
+
return Array.isArray(e) ? [...e] : [e];
|
|
17563
17872
|
}
|
|
17564
|
-
function d(
|
|
17565
|
-
return
|
|
17873
|
+
function d(e) {
|
|
17874
|
+
return e === null ? "null" : Array.isArray(e) ? "array" : typeof e == "object" ? "mapping" : typeof e;
|
|
17566
17875
|
}
|
|
17567
17876
|
const q = {
|
|
17568
|
-
guard: (
|
|
17877
|
+
guard: (e) => d(e) === "mapping",
|
|
17569
17878
|
name: "mapping"
|
|
17570
17879
|
}, C = {
|
|
17571
|
-
guard: (
|
|
17880
|
+
guard: (e) => typeof e == "string",
|
|
17572
17881
|
name: "string"
|
|
17573
17882
|
}, z = {
|
|
17574
|
-
guard: (
|
|
17883
|
+
guard: (e) => typeof e == "number",
|
|
17575
17884
|
name: "number"
|
|
17576
|
-
}, k = (
|
|
17885
|
+
}, k = (e, t) => [...e.map(B), ...t.map(B)].join("."), B = (e) => typeof e == "string" ? e : JSON.stringify(e);
|
|
17577
17886
|
class j {
|
|
17578
17887
|
base;
|
|
17579
17888
|
tiers;
|
|
17580
|
-
constructor(
|
|
17581
|
-
this.base =
|
|
17889
|
+
constructor(t) {
|
|
17890
|
+
this.base = t.base, this.tiers = [...t.tiers].sort((i, a) => i.start - a.start);
|
|
17582
17891
|
}
|
|
17583
17892
|
}
|
|
17584
17893
|
export {
|