@pydantic/genai-prices 0.0.67 → 0.0.69

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
@@ -621,6 +621,51 @@ const G = [
621
621
  }
622
622
  ]
623
623
  },
624
+ {
625
+ id: "claude-sonnet-5",
626
+ name: "Claude Sonnet 5",
627
+ description: "Our most agentic Sonnet model, approaching Opus 4.8 capability at lower cost",
628
+ match: {
629
+ or: [
630
+ {
631
+ starts_with: "claude-sonnet-5"
632
+ },
633
+ {
634
+ starts_with: "claude-sonnet-5.0"
635
+ },
636
+ {
637
+ starts_with: "claude-5-sonnet"
638
+ },
639
+ {
640
+ starts_with: "claude-5.0-sonnet"
641
+ }
642
+ ]
643
+ },
644
+ context_window: 1e6,
645
+ price_comments: "Flat pricing across full 1M context window (no tiered pricing). Introductory pricing ($2/$10 per MTok) applies through 2026-08-31; standard pricing ($3/$15) applies from 2026-09-01. Ref: https://www.anthropic.com/news/claude-sonnet-5",
646
+ prices: [
647
+ {
648
+ prices: {
649
+ input_mtok: 2,
650
+ cache_write_mtok: 2.5,
651
+ cache_read_mtok: 0.2,
652
+ output_mtok: 10
653
+ }
654
+ },
655
+ {
656
+ constraint: {
657
+ start_date: "2026-09-01",
658
+ type: "start_date"
659
+ },
660
+ prices: {
661
+ input_mtok: 3,
662
+ cache_write_mtok: 3.75,
663
+ cache_read_mtok: 0.3,
664
+ output_mtok: 15
665
+ }
666
+ }
667
+ ]
668
+ },
624
669
  {
625
670
  id: "claude-v1",
626
671
  description: "Retired, here to match price sources",
@@ -1058,6 +1103,35 @@ const G = [
1058
1103
  }
1059
1104
  }
1060
1105
  },
1106
+ {
1107
+ id: "global.anthropic.claude-sonnet-5-v1:0",
1108
+ match: {
1109
+ contains: "global.anthropic.claude-sonnet-5"
1110
+ },
1111
+ price_comments: "Flat pricing across full 1M context window (no tiered pricing). Promotional launch pricing ($2/$10 per MTok) through 2026-08-31; standard ($3/$15) from 2026-09-01. Ref: https://aws.amazon.com/bedrock/pricing/",
1112
+ prices: [
1113
+ {
1114
+ prices: {
1115
+ input_mtok: 2,
1116
+ cache_write_mtok: 2.5,
1117
+ cache_read_mtok: 0.2,
1118
+ output_mtok: 10
1119
+ }
1120
+ },
1121
+ {
1122
+ constraint: {
1123
+ start_date: "2026-09-01",
1124
+ type: "start_date"
1125
+ },
1126
+ prices: {
1127
+ input_mtok: 3,
1128
+ cache_write_mtok: 3.75,
1129
+ cache_read_mtok: 0.3,
1130
+ output_mtok: 15
1131
+ }
1132
+ }
1133
+ ]
1134
+ },
1061
1135
  {
1062
1136
  id: "google.gemma-3-12b-it",
1063
1137
  name: "Gemma 3 12B IT",
@@ -1388,6 +1462,30 @@ const G = [
1388
1462
  output_mtok: 0.65
1389
1463
  }
1390
1464
  },
1465
+ {
1466
+ id: "openai.gpt-5.4",
1467
+ name: "GPT-5.4",
1468
+ match: {
1469
+ equals: "openai.gpt-5.4"
1470
+ },
1471
+ prices: {
1472
+ input_mtok: 2.75,
1473
+ cache_read_mtok: 0.275,
1474
+ output_mtok: 16.5
1475
+ }
1476
+ },
1477
+ {
1478
+ id: "openai.gpt-5.5",
1479
+ name: "GPT-5.5",
1480
+ match: {
1481
+ equals: "openai.gpt-5.5"
1482
+ },
1483
+ prices: {
1484
+ input_mtok: 5.5,
1485
+ cache_read_mtok: 0.55,
1486
+ output_mtok: 33
1487
+ }
1488
+ },
1391
1489
  {
1392
1490
  id: "openai.gpt-oss-120b-1:0",
1393
1491
  name: "gpt-oss-120b",
@@ -2015,6 +2113,60 @@ const G = [
2015
2113
  ]
2016
2114
  }
2017
2115
  }
2116
+ },
2117
+ {
2118
+ id: "regional.anthropic.claude-sonnet-5-v1:0",
2119
+ match: {
2120
+ or: [
2121
+ {
2122
+ starts_with: "anthropic.claude-sonnet-5"
2123
+ },
2124
+ {
2125
+ starts_with: "claude-sonnet-5"
2126
+ },
2127
+ {
2128
+ contains: "us.anthropic.claude-sonnet-5"
2129
+ },
2130
+ {
2131
+ contains: "au.anthropic.claude-sonnet-5"
2132
+ },
2133
+ {
2134
+ contains: "apac.anthropic.claude-sonnet-5"
2135
+ },
2136
+ {
2137
+ contains: "eu.anthropic.claude-sonnet-5"
2138
+ },
2139
+ {
2140
+ contains: "us-gov.anthropic.claude-sonnet-5"
2141
+ },
2142
+ {
2143
+ contains: "jp.anthropic.claude-sonnet-5"
2144
+ }
2145
+ ]
2146
+ },
2147
+ price_comments: "Regional/cross-region endpoints carry a 10% premium over global (AWS published only the global promo rate; regional computed as global +10%, per the documented regional premium). Promotional launch pricing through 2026-08-31; standard from 2026-09-01. Ref: https://aws.amazon.com/bedrock/pricing/",
2148
+ prices: [
2149
+ {
2150
+ prices: {
2151
+ input_mtok: 2.2,
2152
+ cache_write_mtok: 2.75,
2153
+ cache_read_mtok: 0.22,
2154
+ output_mtok: 11
2155
+ }
2156
+ },
2157
+ {
2158
+ constraint: {
2159
+ start_date: "2026-09-01",
2160
+ type: "start_date"
2161
+ },
2162
+ prices: {
2163
+ input_mtok: 3.3,
2164
+ cache_write_mtok: 4.125,
2165
+ cache_read_mtok: 0.33,
2166
+ output_mtok: 16.5
2167
+ }
2168
+ }
2169
+ ]
2018
2170
  }
2019
2171
  ]
2020
2172
  },
@@ -3307,6 +3459,20 @@ Compared to other leading proprietary and open-weights models Command A delivers
3307
3459
  output_mtok: 4.4
3308
3460
  }
3309
3461
  },
3462
+ {
3463
+ id: "glm-5p2",
3464
+ name: "GLM-5.2",
3465
+ description: "GLM-5.2 introduces a robust 1M-token context and advanced, multi-effort coding capabilities to significantly enhance performance on long-horizon tasks. Features a new IndexShare architecture and improved MTP layer for greater efficiency. 743B parameter MoE model from Z.ai.",
3466
+ match: {
3467
+ equals: "accounts/fireworks/models/glm-5p2"
3468
+ },
3469
+ context_window: 104e4,
3470
+ prices: {
3471
+ input_mtok: 1.4,
3472
+ cache_read_mtok: 0.14,
3473
+ output_mtok: 4.4
3474
+ }
3475
+ },
3310
3476
  {
3311
3477
  id: "gpt-oss-120b",
3312
3478
  name: "OpenAI gpt-oss-120b",
@@ -3361,6 +3527,20 @@ Compared to other leading proprietary and open-weights models Command A delivers
3361
3527
  output_mtok: 4
3362
3528
  }
3363
3529
  },
3530
+ {
3531
+ id: "kimi-k2p7-code",
3532
+ name: "Kimi K2.7 Code",
3533
+ description: "Kimi K2.7 Code is a coding-focused agentic model built upon Kimi K2.6, delivering substantial improvements on real-world long-horizon coding tasks while reducing thinking tokens by roughly 30% compared to its predecessor.",
3534
+ match: {
3535
+ equals: "accounts/fireworks/models/kimi-k2p7-code"
3536
+ },
3537
+ context_window: 262144,
3538
+ prices: {
3539
+ input_mtok: 0.95,
3540
+ cache_read_mtok: 0.19,
3541
+ output_mtok: 4
3542
+ }
3543
+ },
3364
3544
  {
3365
3545
  id: "llama-v3p1-8b-instruct",
3366
3546
  name: "Llama 3.1 8B Instruct",
@@ -3427,6 +3607,20 @@ Compared to other leading proprietary and open-weights models Command A delivers
3427
3607
  output_mtok: 1.2
3428
3608
  }
3429
3609
  },
3610
+ {
3611
+ id: "nemotron-3-ultra-nvfp4",
3612
+ name: "NVIDIA Nemotron 3 Ultra NVFP4",
3613
+ description: "Frontier-scale LLM from NVIDIA using a hybrid Latent Mixture-of-Experts (LatentMoE) architecture with interleaved Mamba-2 and MoE layers plus select Attention layers. Features 55B active parameters out of 550B total and Multi-Token Prediction layers for faster generation, optimized for complex multi-step agents, long-context analysis, and high-accuracy reasoning over code, math, and science.",
3614
+ match: {
3615
+ equals: "accounts/fireworks/models/nemotron-3-ultra-nvfp4"
3616
+ },
3617
+ context_window: 262e3,
3618
+ prices: {
3619
+ input_mtok: 0.6,
3620
+ cache_read_mtok: 0.12,
3621
+ output_mtok: 2.4
3622
+ }
3623
+ },
3430
3624
  {
3431
3625
  id: "qwen2p5-vl-72b-instruct",
3432
3626
  name: "Qwen2.5-VL 72B Instruct",
@@ -3465,6 +3659,20 @@ Compared to other leading proprietary and open-weights models Command A delivers
3465
3659
  cache_read_mtok: 0.1,
3466
3660
  output_mtok: 3
3467
3661
  }
3662
+ },
3663
+ {
3664
+ id: "qwen3p7-plus",
3665
+ name: "Qwen3.7 Plus",
3666
+ description: "Qwen3.7 Plus is Alibaba's latest flagship closed model, available exclusively through Fireworks AI outside of Alibaba's own infrastructure.",
3667
+ match: {
3668
+ equals: "accounts/fireworks/models/qwen3p7-plus"
3669
+ },
3670
+ context_window: 262144,
3671
+ prices: {
3672
+ input_mtok: 0.4,
3673
+ cache_read_mtok: 0.08,
3674
+ output_mtok: 1.6
3675
+ }
3468
3676
  }
3469
3677
  ]
3470
3678
  },
@@ -8876,6 +9084,65 @@ Compared to other leading proprietary and open-weights models Command A delivers
8876
9084
  ]
8877
9085
  },
8878
9086
  extractors: [
9087
+ {
9088
+ api_flavor: "default",
9089
+ root: "usage",
9090
+ model_path: "model",
9091
+ mappings: [
9092
+ {
9093
+ path: "input_tokens",
9094
+ dest: "input_tokens",
9095
+ required: !0
9096
+ },
9097
+ {
9098
+ path: "cache_creation_input_tokens",
9099
+ dest: "input_tokens",
9100
+ required: !1
9101
+ },
9102
+ {
9103
+ path: "cache_read_input_tokens",
9104
+ dest: "input_tokens",
9105
+ required: !1
9106
+ },
9107
+ {
9108
+ path: "cache_creation_input_tokens",
9109
+ dest: "cache_write_tokens",
9110
+ required: !1
9111
+ },
9112
+ {
9113
+ path: "cache_read_input_tokens",
9114
+ dest: "cache_read_tokens",
9115
+ required: !1
9116
+ },
9117
+ {
9118
+ path: "output_tokens",
9119
+ dest: "output_tokens",
9120
+ required: !0
9121
+ }
9122
+ ]
9123
+ },
9124
+ {
9125
+ api_flavor: "responses",
9126
+ root: "usage",
9127
+ model_path: "model",
9128
+ mappings: [
9129
+ {
9130
+ path: "input_tokens",
9131
+ dest: "input_tokens",
9132
+ required: !0
9133
+ },
9134
+ {
9135
+ path: ["input_tokens_details", "cached_tokens"],
9136
+ dest: "cache_read_tokens",
9137
+ required: !1
9138
+ },
9139
+ {
9140
+ path: "output_tokens",
9141
+ dest: "output_tokens",
9142
+ required: !0
9143
+ }
9144
+ ]
9145
+ },
8879
9146
  {
8880
9147
  api_flavor: "chat",
8881
9148
  root: "usage",
@@ -9106,6 +9373,11 @@ Compared to other leading proprietary and open-weights models Command A delivers
9106
9373
  dest: "input_tokens",
9107
9374
  required: !0
9108
9375
  },
9376
+ {
9377
+ path: ["prompt_tokens_details", "cached_tokens"],
9378
+ dest: "cache_read_tokens",
9379
+ required: !1
9380
+ },
9109
9381
  {
9110
9382
  path: "completion_tokens",
9111
9383
  dest: "output_tokens",
@@ -12572,6 +12844,43 @@ Compared to other leading proprietary and open-weights models Command A delivers
12572
12844
  output_mtok: 15
12573
12845
  }
12574
12846
  },
12847
+ {
12848
+ id: "anthropic/claude-sonnet-5",
12849
+ match: {
12850
+ or: [
12851
+ {
12852
+ equals: "anthropic/claude-sonnet-5"
12853
+ },
12854
+ {
12855
+ equals: "anthropic/claude-sonnet-5:beta"
12856
+ }
12857
+ ]
12858
+ },
12859
+ context_window: 1e6,
12860
+ price_comments: "Flat pricing across full 1M context window (no tiered pricing). Introductory pricing ($2/$10 per MTok) applies through 2026-08-31; standard ($3/$15) from 2026-09-01. OpenRouter mirrors Anthropic first-party pricing; $2/$10 verified live via the OpenRouter API on 2026-06-30. Ref: https://openrouter.ai/anthropic/claude-sonnet-5",
12861
+ prices: [
12862
+ {
12863
+ prices: {
12864
+ input_mtok: 2,
12865
+ cache_write_mtok: 2.5,
12866
+ cache_read_mtok: 0.2,
12867
+ output_mtok: 10
12868
+ }
12869
+ },
12870
+ {
12871
+ constraint: {
12872
+ start_date: "2026-09-01",
12873
+ type: "start_date"
12874
+ },
12875
+ prices: {
12876
+ input_mtok: 3,
12877
+ cache_write_mtok: 3.75,
12878
+ cache_read_mtok: 0.3,
12879
+ output_mtok: 15
12880
+ }
12881
+ }
12882
+ ]
12883
+ },
12575
12884
  {
12576
12885
  id: "anubis-pro-105b-v1",
12577
12886
  name: "Anubis Pro 105B V1",
@@ -14132,7 +14441,14 @@ Compared to other leading proprietary and open-weights models Command A delivers
14132
14441
  id: "google/gemini-3.5-flash",
14133
14442
  name: "Gemini 3.5 Flash",
14134
14443
  match: {
14135
- equals: "google/gemini-3.5-flash"
14444
+ or: [
14445
+ {
14446
+ equals: "google/gemini-3.5-flash"
14447
+ },
14448
+ {
14449
+ regex: "^google/gemini-3\\.5-flash-\\d{8}$"
14450
+ }
14451
+ ]
14136
14452
  },
14137
14453
  prices: {
14138
14454
  input_mtok: 1.5,
@@ -19298,7 +19614,14 @@ Compared to other leading proprietary and open-weights models Command A delivers
19298
19614
  id: "x-ai/grok-4.3",
19299
19615
  name: "Grok 4.3",
19300
19616
  match: {
19301
- equals: "x-ai/grok-4.3"
19617
+ or: [
19618
+ {
19619
+ equals: "x-ai/grok-4.3"
19620
+ },
19621
+ {
19622
+ regex: "^x-ai/grok-4\\.3-\\d{8}$"
19623
+ }
19624
+ ]
19302
19625
  },
19303
19626
  prices: {
19304
19627
  input_mtok: 1.25,
@@ -21505,6 +21828,15 @@ Compared to other leading proprietary and open-weights models Command A delivers
21505
21828
  {
21506
21829
  equals: "grok-4.3"
21507
21830
  },
21831
+ {
21832
+ regex: "^grok-4\\.3-\\d{8}$"
21833
+ },
21834
+ {
21835
+ equals: "x-ai/grok-4.3"
21836
+ },
21837
+ {
21838
+ regex: "^x-ai/grok-4\\.3-\\d{8}$"
21839
+ },
21508
21840
  {
21509
21841
  equals: "grok-4.3-latest"
21510
21842
  },
@@ -22012,7 +22344,7 @@ function j(e, t, i) {
22012
22344
  function H(e) {
22013
22345
  return M?.(), x(k, e);
22014
22346
  }
22015
- function U(e, t, i) {
22347
+ function $(e, t, i) {
22016
22348
  if (i = i ?? "default", !e.extractors)
22017
22349
  throw new Error("No extraction logic defined for this provider");
22018
22350
  const a = e.extractors.find((s) => s.api_flavor === i);
@@ -22105,7 +22437,7 @@ const q = {
22105
22437
  guard: (e) => typeof e == "number",
22106
22438
  name: "number"
22107
22439
  }, h = (e, t) => [...e.map(L), ...t.map(L)].join("."), L = (e) => typeof e == "string" ? e : JSON.stringify(e);
22108
- class $ {
22440
+ class U {
22109
22441
  base;
22110
22442
  tiers;
22111
22443
  constructor(t) {
@@ -22114,9 +22446,9 @@ class $ {
22114
22446
  }
22115
22447
  export {
22116
22448
  R as REMOTE_DATA_JSON_URL,
22117
- $ as TieredPrices,
22449
+ U as TieredPrices,
22118
22450
  j as calcPrice,
22119
- U as extractUsage,
22451
+ $ as extractUsage,
22120
22452
  H as findProvider,
22121
22453
  O as updatePrices,
22122
22454
  K as waitForUpdate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pydantic/genai-prices",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "description": "Calculate prices for calling LLM inference APIs",
5
5
  "author": "Pydantic Team",
6
6
  "type": "module",