@pydantic/genai-prices 0.0.62 → 0.0.64

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
@@ -421,6 +421,35 @@ const Q = [
421
421
  output_mtok: 25
422
422
  }
423
423
  },
424
+ {
425
+ id: "claude-opus-4-8",
426
+ name: "Claude Opus 4.8",
427
+ description: "Our most capable model for complex reasoning and agentic coding",
428
+ match: {
429
+ or: [
430
+ {
431
+ starts_with: "claude-opus-4-8"
432
+ },
433
+ {
434
+ starts_with: "claude-opus-4.8"
435
+ },
436
+ {
437
+ starts_with: "claude-4-8-opus"
438
+ },
439
+ {
440
+ starts_with: "claude-4.8-opus"
441
+ }
442
+ ]
443
+ },
444
+ context_window: 1e6,
445
+ price_comments: "Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing",
446
+ prices: {
447
+ input_mtok: 5,
448
+ cache_write_mtok: 6.25,
449
+ cache_read_mtok: 0.5,
450
+ output_mtok: 25
451
+ }
452
+ },
424
453
  {
425
454
  id: "claude-sonnet-4-0",
426
455
  name: "Claude Sonnet 4",
@@ -896,6 +925,18 @@ const Q = [
896
925
  output_mtok: 25
897
926
  }
898
927
  },
928
+ {
929
+ id: "global.anthropic.claude-opus-4-8-v1:0",
930
+ match: {
931
+ contains: "global.anthropic.claude-opus-4-8"
932
+ },
933
+ prices: {
934
+ input_mtok: 5,
935
+ cache_write_mtok: 6.25,
936
+ cache_read_mtok: 0.5,
937
+ output_mtok: 25
938
+ }
939
+ },
899
940
  {
900
941
  id: "global.anthropic.claude-sonnet-4-20250514-v1:0",
901
942
  match: {
@@ -964,6 +1005,39 @@ const Q = [
964
1005
  }
965
1006
  }
966
1007
  },
1008
+ {
1009
+ id: "google.gemma-3-12b-it",
1010
+ name: "Gemma 3 12B IT",
1011
+ match: {
1012
+ contains: "google.gemma-3-12b-it"
1013
+ },
1014
+ prices: {
1015
+ input_mtok: 0.09,
1016
+ output_mtok: 0.29
1017
+ }
1018
+ },
1019
+ {
1020
+ id: "google.gemma-3-27b-it",
1021
+ name: "Gemma 3 27B IT",
1022
+ match: {
1023
+ contains: "google.gemma-3-27b-it"
1024
+ },
1025
+ prices: {
1026
+ input_mtok: 0.23,
1027
+ output_mtok: 0.38
1028
+ }
1029
+ },
1030
+ {
1031
+ id: "google.gemma-3-4b-it",
1032
+ name: "Gemma 3 4B IT",
1033
+ match: {
1034
+ contains: "google.gemma-3-4b-it"
1035
+ },
1036
+ prices: {
1037
+ input_mtok: 0.04,
1038
+ output_mtok: 0.08
1039
+ }
1040
+ },
967
1041
  {
968
1042
  id: "meta.llama3-1-70b-instruct-v1:0",
969
1043
  name: "Llama 3.1 70B Instruct",
@@ -1085,6 +1159,61 @@ const Q = [
1085
1159
  output_mtok: 0.66
1086
1160
  }
1087
1161
  },
1162
+ {
1163
+ id: "mistral.devstral-2-123b",
1164
+ name: "Devstral 2 123B",
1165
+ match: {
1166
+ contains: "mistral.devstral-2-123b"
1167
+ },
1168
+ prices: {
1169
+ input_mtok: 0.4,
1170
+ output_mtok: 2
1171
+ }
1172
+ },
1173
+ {
1174
+ id: "mistral.magistral-small-2509",
1175
+ name: "Magistral Small 2509",
1176
+ match: {
1177
+ contains: "mistral.magistral-small-2509"
1178
+ },
1179
+ prices: {
1180
+ input_mtok: 0.5,
1181
+ output_mtok: 1.5
1182
+ }
1183
+ },
1184
+ {
1185
+ id: "mistral.ministral-3-14b-instruct",
1186
+ name: "Ministral 14B 3.0",
1187
+ match: {
1188
+ contains: "mistral.ministral-3-14b-instruct"
1189
+ },
1190
+ prices: {
1191
+ input_mtok: 0.2,
1192
+ output_mtok: 0.2
1193
+ }
1194
+ },
1195
+ {
1196
+ id: "mistral.ministral-3-3b-instruct",
1197
+ name: "Ministral 3B 3.0",
1198
+ match: {
1199
+ contains: "mistral.ministral-3-3b-instruct"
1200
+ },
1201
+ prices: {
1202
+ input_mtok: 0.1,
1203
+ output_mtok: 0.1
1204
+ }
1205
+ },
1206
+ {
1207
+ id: "mistral.ministral-3-8b-instruct",
1208
+ name: "Ministral 8B 3.0",
1209
+ match: {
1210
+ contains: "mistral.ministral-3-8b-instruct"
1211
+ },
1212
+ prices: {
1213
+ input_mtok: 0.15,
1214
+ output_mtok: 0.15
1215
+ }
1216
+ },
1088
1217
  {
1089
1218
  id: "mistral.mistral-7b-instruct-v0:2",
1090
1219
  name: "Mistral 7B Instruct",
@@ -1107,6 +1236,17 @@ const Q = [
1107
1236
  output_mtok: 12
1108
1237
  }
1109
1238
  },
1239
+ {
1240
+ id: "mistral.mistral-large-3-675b-instruct",
1241
+ name: "Mistral Large 3",
1242
+ match: {
1243
+ contains: "mistral.mistral-large-3-675b-instruct"
1244
+ },
1245
+ prices: {
1246
+ input_mtok: 0.5,
1247
+ output_mtok: 1.5
1248
+ }
1249
+ },
1110
1250
  {
1111
1251
  id: "mistral.mistral-small-2402-v1:0",
1112
1252
  name: "Mistral Small (24.02)",
@@ -1140,6 +1280,28 @@ const Q = [
1140
1280
  output_mtok: 6
1141
1281
  }
1142
1282
  },
1283
+ {
1284
+ id: "mistral.voxtral-mini-3b-2507",
1285
+ name: "Voxtral Mini 3B 2507",
1286
+ match: {
1287
+ contains: "mistral.voxtral-mini-3b-2507"
1288
+ },
1289
+ prices: {
1290
+ input_mtok: 0.04,
1291
+ output_mtok: 0.04
1292
+ }
1293
+ },
1294
+ {
1295
+ id: "mistral.voxtral-small-24b-2507",
1296
+ name: "Voxtral Small 24B 2507",
1297
+ match: {
1298
+ contains: "mistral.voxtral-small-24b-2507"
1299
+ },
1300
+ prices: {
1301
+ input_mtok: 0.1,
1302
+ output_mtok: 0.3
1303
+ }
1304
+ },
1143
1305
  {
1144
1306
  id: "nvidia.nemotron-nano-3-30b:0",
1145
1307
  name: "Nemotron 3 Nano 30B",
@@ -1573,6 +1735,37 @@ const Q = [
1573
1735
  output_mtok: 27.5
1574
1736
  }
1575
1737
  },
1738
+ {
1739
+ id: "regional.anthropic.claude-opus-4-8-v1:0",
1740
+ match: {
1741
+ or: [
1742
+ {
1743
+ starts_with: "anthropic.claude-opus-4-8"
1744
+ },
1745
+ {
1746
+ starts_with: "claude-opus-4-8"
1747
+ },
1748
+ {
1749
+ contains: "us.anthropic.claude-opus-4-8"
1750
+ },
1751
+ {
1752
+ contains: "au.anthropic.claude-opus-4-8"
1753
+ },
1754
+ {
1755
+ contains: "eu.anthropic.claude-opus-4-8"
1756
+ },
1757
+ {
1758
+ contains: "jp.anthropic.claude-opus-4-8"
1759
+ }
1760
+ ]
1761
+ },
1762
+ prices: {
1763
+ input_mtok: 5.5,
1764
+ cache_write_mtok: 6.875,
1765
+ cache_read_mtok: 0.55,
1766
+ output_mtok: 27.5
1767
+ }
1768
+ },
1576
1769
  {
1577
1770
  id: "regional.anthropic.claude-sonnet-4-20250514-v1:0",
1578
1771
  match: {
@@ -2560,12 +2753,258 @@ Compared to other leading proprietary and open-weights models Command A delivers
2560
2753
  ]
2561
2754
  },
2562
2755
  context_window: 1e6,
2563
- price_comments: "Standard (non-promotional) pricing. DeepSeek is offering a temporary 75% promotional discount that is not reflected here.",
2756
+ prices: {
2757
+ input_mtok: 0.435,
2758
+ cache_read_mtok: 3625e-6,
2759
+ output_mtok: 0.87
2760
+ }
2761
+ }
2762
+ ]
2763
+ },
2764
+ {
2765
+ id: "doubleword",
2766
+ name: "Doubleword",
2767
+ pricing_urls: ["https://docs.doubleword.ai/inference-api/models"],
2768
+ api_pattern: "https://api\\.doubleword\\.ai",
2769
+ price_comments: "Doubleword publishes Realtime, Async, and Batch prices. This provider currently encodes only Realtime pricing.",
2770
+ extractors: [
2771
+ {
2772
+ api_flavor: "chat",
2773
+ root: "usage",
2774
+ model_path: "model",
2775
+ mappings: [
2776
+ {
2777
+ path: "prompt_tokens",
2778
+ dest: "input_tokens",
2779
+ required: !0
2780
+ },
2781
+ {
2782
+ path: ["prompt_tokens_details", "cached_tokens"],
2783
+ dest: "cache_read_tokens",
2784
+ required: !1
2785
+ },
2786
+ {
2787
+ path: ["prompt_tokens_details", "cache_write_tokens"],
2788
+ dest: "cache_write_tokens",
2789
+ required: !1
2790
+ },
2791
+ {
2792
+ path: "completion_tokens",
2793
+ dest: "output_tokens",
2794
+ required: !0
2795
+ }
2796
+ ]
2797
+ },
2798
+ {
2799
+ api_flavor: "responses",
2800
+ root: "usage",
2801
+ model_path: "model",
2802
+ mappings: [
2803
+ {
2804
+ path: "input_tokens",
2805
+ dest: "input_tokens",
2806
+ required: !0
2807
+ },
2808
+ {
2809
+ path: ["input_tokens_details", "cached_tokens"],
2810
+ dest: "cache_read_tokens",
2811
+ required: !1
2812
+ },
2813
+ {
2814
+ path: "output_tokens",
2815
+ dest: "output_tokens",
2816
+ required: !0
2817
+ }
2818
+ ]
2819
+ },
2820
+ {
2821
+ api_flavor: "embeddings",
2822
+ root: "usage",
2823
+ model_path: "model",
2824
+ mappings: [
2825
+ {
2826
+ path: "prompt_tokens",
2827
+ dest: "input_tokens",
2828
+ required: !0
2829
+ }
2830
+ ]
2831
+ }
2832
+ ],
2833
+ models: [
2834
+ {
2835
+ id: "Qwen/Qwen3-14B-FP8",
2836
+ name: "Qwen3 14B",
2837
+ match: {
2838
+ equals: "Qwen/Qwen3-14B-FP8"
2839
+ },
2840
+ prices: {
2841
+ input_mtok: 0.05,
2842
+ output_mtok: 0.6
2843
+ }
2844
+ },
2845
+ {
2846
+ id: "Qwen/Qwen3-Embedding-8B",
2847
+ name: "Qwen3 Embedding 8B",
2848
+ match: {
2849
+ equals: "Qwen/Qwen3-Embedding-8B"
2850
+ },
2851
+ prices: {
2852
+ input_mtok: 0.04
2853
+ }
2854
+ },
2855
+ {
2856
+ id: "Qwen/Qwen3-VL-235B-A22B-Instruct-FP8",
2857
+ name: "Qwen3 VL 235B A22B Instruct",
2858
+ match: {
2859
+ equals: "Qwen/Qwen3-VL-235B-A22B-Instruct-FP8"
2860
+ },
2861
+ prices: {
2862
+ input_mtok: 0.6,
2863
+ output_mtok: 1.2
2864
+ }
2865
+ },
2866
+ {
2867
+ id: "Qwen/Qwen3-VL-30B-A3B-Instruct-FP8",
2868
+ name: "Qwen3 VL 30B A3B Instruct",
2869
+ match: {
2870
+ equals: "Qwen/Qwen3-VL-30B-A3B-Instruct-FP8"
2871
+ },
2872
+ prices: {
2873
+ input_mtok: 0.16,
2874
+ output_mtok: 0.8
2875
+ }
2876
+ },
2877
+ {
2878
+ id: "Qwen/Qwen3.5-35B-A3B-FP8",
2879
+ name: "Qwen3.5 35B A3B",
2880
+ match: {
2881
+ equals: "Qwen/Qwen3.5-35B-A3B-FP8"
2882
+ },
2883
+ prices: {
2884
+ input_mtok: 0.25,
2885
+ output_mtok: 2
2886
+ }
2887
+ },
2888
+ {
2889
+ id: "Qwen/Qwen3.5-397B-A17B",
2890
+ name: "Qwen3.5 397B A17B",
2891
+ match: {
2892
+ equals: "Qwen/Qwen3.5-397B-A17B"
2893
+ },
2894
+ prices: {
2895
+ input_mtok: 0.6,
2896
+ output_mtok: 3.6
2897
+ }
2898
+ },
2899
+ {
2900
+ id: "Qwen/Qwen3.5-9B",
2901
+ name: "Qwen3.5 9B",
2902
+ match: {
2903
+ equals: "Qwen/Qwen3.5-9B"
2904
+ },
2905
+ prices: {
2906
+ input_mtok: 0.08,
2907
+ output_mtok: 0.7
2908
+ }
2909
+ },
2910
+ {
2911
+ id: "Qwen/Qwen3.6-35B-A3B-FP8",
2912
+ name: "Qwen3.6 35B A3B",
2913
+ match: {
2914
+ equals: "Qwen/Qwen3.6-35B-A3B-FP8"
2915
+ },
2916
+ prices: {
2917
+ input_mtok: 0.25,
2918
+ output_mtok: 2
2919
+ }
2920
+ },
2921
+ {
2922
+ id: "deepseek-ai/DeepSeek-V4-Flash",
2923
+ name: "DeepSeek V4 Flash",
2924
+ match: {
2925
+ equals: "deepseek-ai/DeepSeek-V4-Flash"
2926
+ },
2927
+ prices: {
2928
+ input_mtok: 0.14,
2929
+ output_mtok: 0.28
2930
+ }
2931
+ },
2932
+ {
2933
+ id: "deepseek-ai/DeepSeek-V4-Pro",
2934
+ name: "DeepSeek V4 Pro",
2935
+ match: {
2936
+ equals: "deepseek-ai/DeepSeek-V4-Pro"
2937
+ },
2564
2938
  prices: {
2565
2939
  input_mtok: 1.74,
2566
- cache_read_mtok: 0.0145,
2567
2940
  output_mtok: 3.48
2568
2941
  }
2942
+ },
2943
+ {
2944
+ id: "google/gemma-4-31B-it",
2945
+ name: "Gemma 4 31B IT",
2946
+ match: {
2947
+ equals: "google/gemma-4-31B-it"
2948
+ },
2949
+ prices: {
2950
+ input_mtok: 0.14,
2951
+ output_mtok: 0.4
2952
+ }
2953
+ },
2954
+ {
2955
+ id: "mistralai/Devstral-2-123B-Instruct-2512",
2956
+ name: "Devstral 2 123B Instruct 2512",
2957
+ match: {
2958
+ equals: "mistralai/Devstral-2-123B-Instruct-2512"
2959
+ },
2960
+ prices: {
2961
+ input_mtok: 0.4,
2962
+ output_mtok: 2
2963
+ }
2964
+ },
2965
+ {
2966
+ id: "moonshotai/Kimi-K2.6",
2967
+ name: "Kimi K2.6",
2968
+ match: {
2969
+ equals: "moonshotai/Kimi-K2.6"
2970
+ },
2971
+ prices: {
2972
+ input_mtok: 0.95,
2973
+ output_mtok: 4
2974
+ }
2975
+ },
2976
+ {
2977
+ id: "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4",
2978
+ name: "Nemotron 3 Super 120B A12B",
2979
+ match: {
2980
+ equals: "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4"
2981
+ },
2982
+ prices: {
2983
+ input_mtok: 0.3,
2984
+ output_mtok: 0.75
2985
+ }
2986
+ },
2987
+ {
2988
+ id: "openai/gpt-oss-20b",
2989
+ name: "GPT OSS 20B",
2990
+ match: {
2991
+ equals: "openai/gpt-oss-20b"
2992
+ },
2993
+ prices: {
2994
+ input_mtok: 0.04,
2995
+ output_mtok: 0.3
2996
+ }
2997
+ },
2998
+ {
2999
+ id: "zai-org/GLM-5.1-FP8",
3000
+ name: "GLM 5.1",
3001
+ match: {
3002
+ equals: "zai-org/GLM-5.1-FP8"
3003
+ },
3004
+ prices: {
3005
+ input_mtok: 1.4,
3006
+ output_mtok: 4.4
3007
+ }
2569
3008
  }
2570
3009
  ]
2571
3010
  },
@@ -3154,6 +3593,33 @@ Compared to other leading proprietary and open-weights models Command A delivers
3154
3593
  output_mtok: 25
3155
3594
  }
3156
3595
  },
3596
+ {
3597
+ id: "claude-opus-4-8",
3598
+ match: {
3599
+ or: [
3600
+ {
3601
+ contains: "claude-4-8-opus"
3602
+ },
3603
+ {
3604
+ contains: "claude-opus-4-8"
3605
+ },
3606
+ {
3607
+ contains: "claude-4.8-opus"
3608
+ },
3609
+ {
3610
+ contains: "claude-opus-4.8"
3611
+ }
3612
+ ]
3613
+ },
3614
+ context_window: 1e6,
3615
+ price_comments: "Flat pricing across full 1M context window. Ref: https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models",
3616
+ prices: {
3617
+ input_mtok: 5,
3618
+ cache_write_mtok: 6.25,
3619
+ cache_read_mtok: 0.5,
3620
+ output_mtok: 25
3621
+ }
3622
+ },
3157
3623
  {
3158
3624
  id: "gemini-1.0-pro-vision-001",
3159
3625
  name: "gemini 1.0 pro vision",
@@ -11084,6 +11550,27 @@ Compared to other leading proprietary and open-weights models Command A delivers
11084
11550
  output_mtok: 25
11085
11551
  }
11086
11552
  },
11553
+ {
11554
+ id: "anthropic/claude-opus-4.8",
11555
+ match: {
11556
+ or: [
11557
+ {
11558
+ equals: "anthropic/claude-opus-4.8"
11559
+ },
11560
+ {
11561
+ equals: "anthropic/claude-opus-4.8:beta"
11562
+ }
11563
+ ]
11564
+ },
11565
+ context_window: 1e6,
11566
+ price_comments: "Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing",
11567
+ prices: {
11568
+ input_mtok: 5,
11569
+ cache_write_mtok: 6.25,
11570
+ cache_read_mtok: 0.5,
11571
+ output_mtok: 25
11572
+ }
11573
+ },
11087
11574
  {
11088
11575
  id: "anthropic/claude-sonnet-4.5",
11089
11576
  match: {
@@ -18760,7 +19247,7 @@ function D(t) {
18760
19247
  function N(t) {
18761
19248
  I = t;
18762
19249
  }
18763
- function F(t) {
19250
+ function O(t) {
18764
19251
  t({
18765
19252
  onCalc: N,
18766
19253
  remoteDataUrl: C,
@@ -18803,9 +19290,9 @@ function $(t, e, i) {
18803
19290
  }
18804
19291
  if (!q.guard(e))
18805
19292
  throw new Error(`Expected response data to be a mapping object, got ${_(e)}`);
18806
- const o = v(a.model_path, e, V, !1, []), r = T(a.root), m = v(r, e, q, !0, []), n = {};
19293
+ const o = v(a.model_path, e, E, !1, []), r = T(a.root), m = v(r, e, q, !0, []), n = {};
18807
19294
  for (const s of a.mappings) {
18808
- const p = v(s.path, m, O, s.required, r);
19295
+ const p = v(s.path, m, F, s.required, r);
18809
19296
  if (p !== null) {
18810
19297
  const u = n[s.dest] ?? 0;
18811
19298
  n[s.dest] = u + p;
@@ -18825,7 +19312,7 @@ function v(t, e, i, a, o) {
18825
19312
  for (const u of m) {
18826
19313
  if (s.push(u), typeof u == "object")
18827
19314
  if (Array.isArray(n))
18828
- n = E(u, n);
19315
+ n = V(u, n);
18829
19316
  else {
18830
19317
  if (a)
18831
19318
  throw new Error(`Expected \`${k(o, s)}\` value to be a mapping, got ${_(n)}`);
@@ -18862,7 +19349,7 @@ function v(t, e, i, a, o) {
18862
19349
  throw s.push(r), new Error(`Expected \`${k(o, s)}\` value to be a ${i.name}, got ${_(p)}`);
18863
19350
  return null;
18864
19351
  }
18865
- function E(t, e) {
19352
+ function V(t, e) {
18866
19353
  for (const i of e)
18867
19354
  if (q.guard(i)) {
18868
19355
  const a = i[t.field];
@@ -18879,10 +19366,10 @@ function _(t) {
18879
19366
  const q = {
18880
19367
  guard: (t) => _(t) === "mapping",
18881
19368
  name: "mapping"
18882
- }, V = {
19369
+ }, E = {
18883
19370
  guard: (t) => typeof t == "string",
18884
19371
  name: "string"
18885
- }, O = {
19372
+ }, F = {
18886
19373
  guard: (t) => typeof t == "number",
18887
19374
  name: "number"
18888
19375
  }, k = (t, e) => [...t.map(L), ...e.map(L)].join("."), L = (t) => typeof t == "string" ? t : JSON.stringify(t);
@@ -18899,6 +19386,6 @@ export {
18899
19386
  j as calcPrice,
18900
19387
  $ as extractUsage,
18901
19388
  H as findProvider,
18902
- F as updatePrices,
19389
+ O as updatePrices,
18903
19390
  K as waitForUpdate
18904
19391
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pydantic/genai-prices",
3
- "version": "0.0.62",
3
+ "version": "0.0.64",
4
4
  "description": "Calculate prices for calling LLM inference APIs",
5
5
  "author": "Pydantic Team",
6
6
  "type": "module",