metergraph-core 0.8.30__tar.gz → 0.8.31__tar.gz

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.
Files changed (31) hide show
  1. {metergraph_core-0.8.30/src/metergraph_core.egg-info → metergraph_core-0.8.31}/PKG-INFO +6 -1
  2. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/README.md +5 -0
  3. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/pyproject.toml +1 -1
  4. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/calls.py +14 -2
  5. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/catalog.py +25 -1
  6. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/data/prices.yaml +257 -16
  7. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/loader.py +15 -0
  8. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/responses.py +2 -1
  9. {metergraph_core-0.8.30 → metergraph_core-0.8.31/src/metergraph_core.egg-info}/PKG-INFO +6 -1
  10. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/MANIFEST.in +0 -0
  11. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/setup.cfg +0 -0
  12. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/__init__.py +0 -0
  13. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/billing.py +0 -0
  14. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/catalog_delta.py +0 -0
  15. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/catalogs.py +0 -0
  16. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/data/models.yaml +0 -0
  17. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/data/sources.yaml +0 -0
  18. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/extractors.py +0 -0
  19. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/families.py +0 -0
  20. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/models.py +0 -0
  21. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/providers/__init__.py +0 -0
  22. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/providers/anthropic.py +0 -0
  23. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/providers/google.py +0 -0
  24. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/refresh.py +0 -0
  25. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/reliability.py +0 -0
  26. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/retrieval.py +0 -0
  27. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core/sources.py +0 -0
  28. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core.egg-info/SOURCES.txt +0 -0
  29. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core.egg-info/dependency_links.txt +0 -0
  30. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core.egg-info/requires.txt +0 -0
  31. {metergraph_core-0.8.30 → metergraph_core-0.8.31}/src/metergraph_core.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: metergraph-core
3
- Version: 0.8.30
3
+ Version: 0.8.31
4
4
  Summary: Open, effective-dated LLM pricing catalog and deterministic cost calculator for popular models across major providers and gateways, including OpenAI, Anthropic, Google Gemini, AWS Bedrock, OpenRouter, Vercel AI Gateway, and more.
5
5
  Author: Metergraph
6
6
  License-Expression: Apache-2.0
@@ -61,6 +61,11 @@ The result identifies the applied model and price. Check `status` before using
61
61
  its cost as a complete total: missing usage or unsupported rates can make a
62
62
  result `partial` or `unpriced`.
63
63
 
64
+ Served OpenAI `priority`/`fast` and Vertex `priority` calls use model-specific
65
+ catalog rates where verified. Priority coverage starts on November 22, 2026.
66
+ Requested Priority that falls back to standard uses standard pricing. Search
67
+ fees are priced separately from the token tier.
68
+
64
69
  ## Choose the API for your input
65
70
 
66
71
  | You have… | Start with… |
@@ -31,6 +31,11 @@ The result identifies the applied model and price. Check `status` before using
31
31
  its cost as a complete total: missing usage or unsupported rates can make a
32
32
  result `partial` or `unpriced`.
33
33
 
34
+ Served OpenAI `priority`/`fast` and Vertex `priority` calls use model-specific
35
+ catalog rates where verified. Priority coverage starts on November 22, 2026.
36
+ Requested Priority that falls back to standard uses standard pricing. Search
37
+ fees are priced separately from the token tier.
38
+
34
39
  ## Choose the API for your input
35
40
 
36
41
  | You have… | Start with… |
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "metergraph-core"
3
- version = "0.8.30"
3
+ version = "0.8.31"
4
4
  description = "Open, effective-dated LLM pricing catalog and deterministic cost calculator for popular models across major providers and gateways, including OpenAI, Anthropic, Google Gemini, AWS Bedrock, OpenRouter, Vercel AI Gateway, and more."
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -117,6 +117,17 @@ def compose_call_cost(
117
117
  resolved_channel = token_cost.price.pricing_channel if token_cost.price else (channel or direct_channel_for_provider(provider))
118
118
  publisher = token_cost.publisher or normalize_provider(provider or '')
119
119
  missing = list(token_cost.missing_dimensions)
120
+ fee_operation = token_cost.price.rules.get('uncaptured_fee_operation') if token_cost.price else None
121
+ if fee_operation and 'uncaptured_fees' in token_cost.reasons and any(
122
+ item.operation == fee_operation and type(item.units) is int and item.units >= 0
123
+ for item in retrieval
124
+ ):
125
+ fee = catalog.price_retrieval(channel=resolved_channel, operation=fee_operation,
126
+ units=next(item.units for item in retrieval if item.operation == fee_operation),
127
+ at=token_cost.effective_at, region=region)
128
+ if fee.status == 'priced':
129
+ reasons = tuple(reason for reason in token_cost.reasons if reason != 'uncaptured_fees')
130
+ token_cost = replace(token_cost, reasons=reasons, status='partial' if reasons or missing else 'priced')
120
131
  token_basis = ('exact' if token_cost.status == 'priced' else
121
132
  'fallback_estimate' if token_cost.cost_usd is not None else 'unknown')
122
133
  # Retrieval rates are USD. Do not add them to a different currency.
@@ -285,7 +296,7 @@ def price_call_from_record(
285
296
  if agent:
286
297
  channel = 'perplexity-agent-api'
287
298
  tier = row.get('service_tier')
288
- if token_cost is None or token_cost.effective_at is None or agent or identity_changed or tier == 'flex':
299
+ if token_cost is None or token_cost.effective_at is None or agent or identity_changed or tier in ('flex', 'priority', 'fast'):
289
300
  values = {key: row.get(key) for key in ('input_tokens', 'output_tokens', 'cache_read_tokens',
290
301
  'cache_write_tokens', 'cache_write_5m_tokens', 'cache_write_1h_tokens')}
291
302
  def cost(**usage):
@@ -305,7 +316,8 @@ def price_call_from_record(
305
316
  token_cost = replace(token_cost, status='partial',
306
317
  missing_dimensions=tuple(dict.fromkeys((*token_cost.missing_dimensions, 'incomplete_usage'))))
307
318
  flex_priced = tier == 'flex' and _supports_flex(token_cost.price)
308
- if tier is not None and tier not in ('standard', 'default', 'auto', 'batch') and not flex_priced:
319
+ priority_priced = tier in ('priority', 'fast') and 'unsupported_service_tier' not in token_cost.reasons
320
+ if tier is not None and tier not in ('standard', 'default', 'auto', 'batch') and not (flex_priced or priority_priced):
309
321
  token_cost = replace(token_cost, status='partial',
310
322
  missing_dimensions=tuple(dict.fromkeys((*token_cost.missing_dimensions, 'service_tier'))))
311
323
  model = token_cost.canonical_model or row.get('model')
@@ -543,6 +543,17 @@ def _supports_flex(price: Price | None) -> bool:
543
543
  )
544
544
 
545
545
 
546
+ def _priority_rates(price: Price | None, at: datetime) -> Mapping[str, Any] | None:
547
+ if price is None or (price.publisher, price.pricing_channel) not in {
548
+ ("openai", "openai-api"), ("google", "google-vertex-ai"),
549
+ }:
550
+ return None
551
+ rates = price.rules.get("priority")
552
+ if not isinstance(rates, Mapping) or at < _coerce_datetime(rates["effective_from"]):
553
+ return None
554
+ return rates
555
+
556
+
546
557
  def _price_tokens(
547
558
  price: Price,
548
559
  rules: Mapping[str, Any],
@@ -614,7 +625,20 @@ def _price_tokens(
614
625
  "google-api", "google-vertex-ai",
615
626
  }
616
627
  openai_flex = flex and price.publisher == "openai" and price.pricing_channel == "openai-api"
617
- if service_tier not in (None, "standard", "default", "standard_only", "auto", "on_demand", "batch") and not (google_flex or openai_flex):
628
+ priority = service_tier in ("priority", "fast")
629
+ priority_rates = _priority_rates(price, at) if priority and not batch else None
630
+ if priority_rates is not None:
631
+ limit = priority_rates.get("max_input_tokens")
632
+ if limit is not None and input_count > limit:
633
+ priority_rates = None
634
+ else:
635
+ input_rate, output_rate, cache_read_rate, cache_write_5m_rate, cache_write_1h_rate = (
636
+ _decimal(priority_rates.get(key)) for key in (
637
+ "input_per_mtok", "output_per_mtok", "cache_read_per_mtok",
638
+ "cache_write_5m_per_mtok", "cache_write_1h_per_mtok",
639
+ )
640
+ )
641
+ if service_tier not in (None, "standard", "default", "standard_only", "auto", "on_demand", "batch") and not (google_flex or openai_flex or priority_rates is not None):
618
642
  reasons.append("unsupported_service_tier")
619
643
  if google_flex:
620
644
  # Google publishes Flex at half the standard token rates, including cache reads.
@@ -6,9 +6,9 @@
6
6
  #
7
7
  # Community updates welcome: add an alias or price entry with its provider
8
8
  # source_url and open a PR. CI validates structure and date overlaps.
9
- version: "2026-11-20"
9
+ version: "2026-11-22"
10
10
  currency: USD
11
- pricing_verified_at: "2026-11-20"
11
+ pricing_verified_at: "2026-11-22"
12
12
  models:
13
13
  - canonical_id: openai/gpt-6-sol
14
14
  publisher: openai
@@ -48,7 +48,17 @@ models:
48
48
  batch_output_per_mtok: 5.00
49
49
  rules:
50
50
  input_includes_cache_read: true
51
- long_context: {threshold: 272000, input_multiplier: 2, output_multiplier: 1.5}
51
+ long_context:
52
+ threshold: 272000
53
+ input_multiplier: 2
54
+ output_multiplier: 1.5
55
+ priority:
56
+ effective_from: '2026-11-22'
57
+ input_per_mtok: 4.0
58
+ output_per_mtok: 20.0
59
+ cache_read_per_mtok: 0.4
60
+ cache_write_5m_per_mtok: 5.0
61
+ cache_write_1h_per_mtok: 10.0
52
62
  source_url: https://developers.openai.com/api/docs/models/gpt-6-sol
53
63
  - channel: vercel-ai-gateway
54
64
  region: global
@@ -142,7 +152,17 @@ models:
142
152
  batch_output_per_mtok: 0.25
143
153
  rules:
144
154
  input_includes_cache_read: true
145
- long_context: {threshold: 272000, input_multiplier: 2, output_multiplier: 1.5}
155
+ long_context:
156
+ threshold: 272000
157
+ input_multiplier: 2
158
+ output_multiplier: 1.5
159
+ priority:
160
+ effective_from: '2026-11-22'
161
+ input_per_mtok: 0.2
162
+ output_per_mtok: 1.0
163
+ cache_read_per_mtok: 0.02
164
+ cache_write_5m_per_mtok: 0.25
165
+ cache_write_1h_per_mtok: 0.5
146
166
  source_url: https://developers.openai.com/api/docs/models/gpt-6-luna
147
167
  - channel: vercel-ai-gateway
148
168
  region: global
@@ -236,7 +256,17 @@ models:
236
256
  batch_output_per_mtok: 25.00
237
257
  rules:
238
258
  input_includes_cache_read: true
239
- long_context: {threshold: 272000, input_multiplier: 2, output_multiplier: 1.5}
259
+ long_context:
260
+ threshold: 272000
261
+ input_multiplier: 2
262
+ output_multiplier: 1.5
263
+ priority:
264
+ effective_from: '2026-11-22'
265
+ input_per_mtok: 20.0
266
+ output_per_mtok: 100.0
267
+ cache_read_per_mtok: 2.0
268
+ cache_write_5m_per_mtok: 25.0
269
+ cache_write_1h_per_mtok: 50.0
240
270
  source_url: https://developers.openai.com/api/docs/models/gpt-6-astra
241
271
  - channel: vercel-ai-gateway
242
272
  region: global
@@ -341,7 +371,17 @@ models:
341
371
  batch_input_per_mtok: 1.00
342
372
  batch_output_per_mtok: 5.00
343
373
  rules:
344
- long_context: {threshold: 272000, input_multiplier: 2, output_multiplier: 1.5}
374
+ long_context:
375
+ threshold: 272000
376
+ input_multiplier: 2
377
+ output_multiplier: 1.5
378
+ priority:
379
+ effective_from: '2026-11-22'
380
+ input_per_mtok: 4.0
381
+ output_per_mtok: 20.0
382
+ cache_read_per_mtok: 0.2
383
+ cache_write_5m_per_mtok: 5.0
384
+ cache_write_1h_per_mtok: 10.0
345
385
  source_url: https://developers.openai.com/api/docs/models/gpt-6.1-sol
346
386
  # The 5m field stores AWS's unsplit cache-write rate.
347
387
  - channel: aws-bedrock-geo
@@ -426,7 +466,17 @@ models:
426
466
  rules:
427
467
  input_includes_cache_read: true
428
468
  input_includes_cache_write: true
429
- long_context: {threshold: 272000, input_multiplier: 2, output_multiplier: 1.5}
469
+ long_context:
470
+ threshold: 272000
471
+ input_multiplier: 2
472
+ output_multiplier: 1.5
473
+ priority:
474
+ effective_from: '2026-11-22'
475
+ input_per_mtok: 2.0
476
+ output_per_mtok: 10.0
477
+ cache_read_per_mtok: 0.1
478
+ cache_write_5m_per_mtok: 2.5
479
+ cache_write_1h_per_mtok: 5.0
430
480
  source_url: https://developers.openai.com/api/docs/models/gpt-6.1-terra
431
481
  - channel: openrouter-api
432
482
  region: global
@@ -481,7 +531,17 @@ models:
481
531
  rules:
482
532
  input_includes_cache_read: true
483
533
  input_includes_cache_write: true
484
- long_context: {threshold: 272000, input_multiplier: 2, output_multiplier: 1.5}
534
+ long_context:
535
+ threshold: 272000
536
+ input_multiplier: 2
537
+ output_multiplier: 1.5
538
+ priority:
539
+ effective_from: '2026-11-22'
540
+ input_per_mtok: 4.0
541
+ output_per_mtok: 20.0
542
+ cache_read_per_mtok: 0.2
543
+ cache_write_5m_per_mtok: 5.0
544
+ cache_write_1h_per_mtok: 10.0
485
545
  source_url: https://developers.openai.com/api/docs/models/gpt-6.2-sol
486
546
  - channel: vercel-ai-gateway
487
547
  region: global
@@ -525,7 +585,17 @@ models:
525
585
  rules:
526
586
  input_includes_cache_read: true
527
587
  input_includes_cache_write: true
528
- long_context: {threshold: 272000, input_multiplier: 2, output_multiplier: 1.5}
588
+ long_context:
589
+ threshold: 272000
590
+ input_multiplier: 2
591
+ output_multiplier: 1.5
592
+ priority:
593
+ effective_from: '2026-11-22'
594
+ input_per_mtok: 16.0
595
+ output_per_mtok: 80.0
596
+ cache_read_per_mtok: 0.8
597
+ cache_write_5m_per_mtok: 20.0
598
+ cache_write_1h_per_mtok: 40.0
529
599
  source_url: https://developers.openai.com/api/docs/models/gpt-6.2-astra
530
600
  - channel: vercel-ai-gateway
531
601
  region: global
@@ -593,7 +663,17 @@ models:
593
663
  batch_output_per_mtok: 10.00
594
664
  rules:
595
665
  input_includes_cache_read: true
596
- long_context: {threshold: 272000, input_multiplier: 2, output_multiplier: 1.5}
666
+ long_context:
667
+ threshold: 272000
668
+ input_multiplier: 2
669
+ output_multiplier: 1.5
670
+ priority:
671
+ effective_from: '2026-11-22'
672
+ input_per_mtok: 8.0
673
+ output_per_mtok: 40.0
674
+ cache_read_per_mtok: 0.8
675
+ cache_write_5m_per_mtok: 10.0
676
+ cache_write_1h_per_mtok: 20.0
597
677
  source_url: https://developers.openai.com/api/docs/models/gpt-5.6-sol
598
678
  - channel: vercel-ai-gateway
599
679
  region: global
@@ -702,7 +782,17 @@ models:
702
782
  batch_output_per_mtok: 6.00
703
783
  rules:
704
784
  input_includes_cache_read: true
705
- long_context: {threshold: 272000, input_multiplier: 2, output_multiplier: 1.5}
785
+ long_context:
786
+ threshold: 272000
787
+ input_multiplier: 2
788
+ output_multiplier: 1.5
789
+ priority:
790
+ effective_from: '2026-11-22'
791
+ input_per_mtok: 4.0
792
+ output_per_mtok: 24.0
793
+ cache_read_per_mtok: 0.4
794
+ cache_write_5m_per_mtok: 5.0
795
+ cache_write_1h_per_mtok: 10.0
706
796
  source_url: https://developers.openai.com/api/docs/pricing
707
797
  - channel: vercel-ai-gateway
708
798
  region: global
@@ -786,7 +876,17 @@ models:
786
876
  batch_output_per_mtok: 0.60
787
877
  rules:
788
878
  input_includes_cache_read: true
789
- long_context: {threshold: 272000, input_multiplier: 2, output_multiplier: 1.5}
879
+ long_context:
880
+ threshold: 272000
881
+ input_multiplier: 2
882
+ output_multiplier: 1.5
883
+ priority:
884
+ effective_from: '2026-11-22'
885
+ input_per_mtok: 0.4
886
+ output_per_mtok: 2.4
887
+ cache_read_per_mtok: 0.04
888
+ cache_write_5m_per_mtok: 0.5
889
+ cache_write_1h_per_mtok: 1.0
790
890
  source_url: https://developers.openai.com/api/docs/pricing
791
891
  - channel: vercel-ai-gateway
792
892
  region: global
@@ -863,6 +963,11 @@ models:
863
963
  batch_output_per_mtok: 2.25
864
964
  rules:
865
965
  input_includes_cache_read: true
966
+ priority:
967
+ effective_from: '2026-11-22'
968
+ input_per_mtok: 1.5
969
+ output_per_mtok: 9.0
970
+ cache_read_per_mtok: 0.15
866
971
  source_url: https://developers.openai.com/api/docs/models/gpt-5.4-mini
867
972
  - channel: vercel-ai-gateway
868
973
  region: global
@@ -908,7 +1013,16 @@ models:
908
1013
  batch_output_per_mtok: 7.50
909
1014
  rules:
910
1015
  input_includes_cache_read: true
911
- long_context: {threshold: 272000, input_multiplier: 2, output_multiplier: 1.5}
1016
+ long_context:
1017
+ threshold: 272000
1018
+ input_multiplier: 2
1019
+ output_multiplier: 1.5
1020
+ priority:
1021
+ effective_from: '2026-11-22'
1022
+ input_per_mtok: 5.0
1023
+ output_per_mtok: 30.0
1024
+ cache_read_per_mtok: 0.5
1025
+ max_input_tokens: 272000
912
1026
  source_url: https://developers.openai.com/api/docs/models/gpt-5.4
913
1027
 
914
1028
  - channel: vercel-ai-gateway
@@ -1021,6 +1135,11 @@ models:
1021
1135
  batch_output_per_mtok: 0.30
1022
1136
  rules:
1023
1137
  input_includes_cache_read: true
1138
+ priority:
1139
+ effective_from: '2026-11-22'
1140
+ input_per_mtok: 0.25
1141
+ output_per_mtok: 1.0
1142
+ cache_read_per_mtok: 0.125
1024
1143
  source_url: https://developers.openai.com/api/docs/models/gpt-4o-mini
1025
1144
  - channel: vercel-ai-gateway
1026
1145
  region: global
@@ -1078,6 +1197,11 @@ models:
1078
1197
  batch_output_per_mtok: 5.00
1079
1198
  rules:
1080
1199
  input_includes_cache_read: true
1200
+ priority:
1201
+ effective_from: '2026-11-22'
1202
+ input_per_mtok: 4.25
1203
+ output_per_mtok: 17.0
1204
+ cache_read_per_mtok: 2.125
1081
1205
  source_url: https://developers.openai.com/api/docs/models/gpt-4o
1082
1206
  - channel: vercel-ai-gateway
1083
1207
  region: global
@@ -1123,6 +1247,11 @@ models:
1123
1247
  batch_output_per_mtok: 4.00
1124
1248
  rules:
1125
1249
  input_includes_cache_read: true
1250
+ priority:
1251
+ effective_from: '2026-11-22'
1252
+ input_per_mtok: 3.5
1253
+ output_per_mtok: 14.0
1254
+ cache_read_per_mtok: 0.875
1126
1255
  source_url: https://developers.openai.com/api/docs/models/gpt-4.1
1127
1256
 
1128
1257
  - channel: vercel-ai-gateway
@@ -1166,6 +1295,11 @@ models:
1166
1295
  batch_output_per_mtok: 0.80
1167
1296
  rules:
1168
1297
  input_includes_cache_read: true
1298
+ priority:
1299
+ effective_from: '2026-11-22'
1300
+ input_per_mtok: 0.7
1301
+ output_per_mtok: 2.8
1302
+ cache_read_per_mtok: 0.175
1169
1303
  source_url: https://developers.openai.com/api/docs/models/gpt-4.1-mini
1170
1304
  - channel: vercel-ai-gateway
1171
1305
  region: global
@@ -1254,6 +1388,11 @@ models:
1254
1388
  batch_output_per_mtok: 7.00
1255
1389
  rules:
1256
1390
  input_includes_cache_read: true
1391
+ priority:
1392
+ effective_from: '2026-11-22'
1393
+ input_per_mtok: 3.5
1394
+ output_per_mtok: 28.0
1395
+ cache_read_per_mtok: 0.35
1257
1396
  source_url: https://developers.openai.com/api/docs/models/gpt-5.2
1258
1397
  - channel: vercel-ai-gateway
1259
1398
  region: global
@@ -2203,7 +2342,15 @@ models:
2203
2342
  batch_input_per_mtok: 1.00
2204
2343
  batch_output_per_mtok: 6.00
2205
2344
  rules:
2206
- long_context: {threshold: 200000, input_multiplier: 2, output_multiplier: 1.5}
2345
+ long_context:
2346
+ threshold: 200000
2347
+ input_multiplier: 2
2348
+ output_multiplier: 1.5
2349
+ priority:
2350
+ effective_from: '2026-11-22'
2351
+ input_per_mtok: 3.6
2352
+ output_per_mtok: 21.6
2353
+ cache_read_per_mtok: 0.36
2207
2354
  source_url: https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing
2208
2355
  - channel: vercel-ai-gateway
2209
2356
  region: global
@@ -2241,6 +2388,12 @@ models:
2241
2388
  batch_input_per_mtok: 1.00
2242
2389
  batch_output_per_mtok: 5.00
2243
2390
  batch_cache_read_per_mtok: 0.05
2391
+ rules:
2392
+ priority:
2393
+ effective_from: '2026-11-22'
2394
+ input_per_mtok: 3.6
2395
+ output_per_mtok: 18.0
2396
+ cache_read_per_mtok: 0.18
2244
2397
  source_url: https://cloud.google.com/model-garden/pricing
2245
2398
  - channel: google-vertex-ai
2246
2399
  region: global
@@ -2251,6 +2404,12 @@ models:
2251
2404
  batch_input_per_mtok: 2.00
2252
2405
  batch_output_per_mtok: 10.00
2253
2406
  batch_cache_read_per_mtok: 0.10
2407
+ rules:
2408
+ priority:
2409
+ effective_from: '2026-11-22'
2410
+ input_per_mtok: 7.2
2411
+ output_per_mtok: 36.0
2412
+ cache_read_per_mtok: 0.36
2254
2413
  source_url: https://cloud.google.com/model-garden/pricing
2255
2414
  - channel: google-api
2256
2415
  region: global
@@ -2360,6 +2519,12 @@ models:
2360
2519
  cache_read_per_mtok: 0.15
2361
2520
  batch_input_per_mtok: 0.75
2362
2521
  batch_output_per_mtok: 4.50
2522
+ rules:
2523
+ priority:
2524
+ effective_from: '2026-11-22'
2525
+ input_per_mtok: 2.7
2526
+ output_per_mtok: 16.2
2527
+ cache_read_per_mtok: 0.27
2363
2528
  source_url: https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing
2364
2529
 
2365
2530
  # Direct API only: no Vertex rate is published for this model.
@@ -3331,7 +3496,13 @@ models:
3331
3496
  cache_read_per_mtok: 0.025
3332
3497
  batch_input_per_mtok: 0.125
3333
3498
  batch_output_per_mtok: 1.00
3334
- rules: {input_includes_cache_read: true}
3499
+ rules:
3500
+ input_includes_cache_read: true
3501
+ priority:
3502
+ effective_from: '2026-11-22'
3503
+ input_per_mtok: 0.45
3504
+ output_per_mtok: 3.6
3505
+ cache_read_per_mtok: 0.045
3335
3506
  source_url: https://developers.openai.com/api/docs/models/gpt-5-mini
3336
3507
  - channel: vercel-ai-gateway
3337
3508
  region: global
@@ -3425,6 +3596,12 @@ models:
3425
3596
  input_per_mtok: 0.75
3426
3597
  output_per_mtok: 3.75
3427
3598
  cache_read_per_mtok: 0.075
3599
+ rules:
3600
+ priority:
3601
+ effective_from: '2026-11-22'
3602
+ input_per_mtok: 1.35
3603
+ output_per_mtok: 6.75
3604
+ cache_read_per_mtok: 0.135
3428
3605
  source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing
3429
3606
  - channel: google-vertex-ai
3430
3607
  region: global
@@ -3432,6 +3609,12 @@ models:
3432
3609
  input_per_mtok: 1.50
3433
3610
  output_per_mtok: 7.50
3434
3611
  cache_read_per_mtok: 0.15
3612
+ rules:
3613
+ priority:
3614
+ effective_from: '2026-11-22'
3615
+ input_per_mtok: 2.7
3616
+ output_per_mtok: 13.5
3617
+ cache_read_per_mtok: 0.27
3435
3618
  source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing
3436
3619
  - channel: google-api
3437
3620
  region: global
@@ -3524,6 +3707,12 @@ models:
3524
3707
  input_per_mtok: 0.75
3525
3708
  output_per_mtok: 3.75
3526
3709
  cache_read_per_mtok: 0.075
3710
+ rules:
3711
+ priority:
3712
+ effective_from: '2026-11-22'
3713
+ input_per_mtok: 1.35
3714
+ output_per_mtok: 6.75
3715
+ cache_read_per_mtok: 0.135
3527
3716
  source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing
3528
3717
  - channel: google-vertex-ai
3529
3718
  region: global
@@ -3531,6 +3720,12 @@ models:
3531
3720
  input_per_mtok: 1.50
3532
3721
  output_per_mtok: 7.50
3533
3722
  cache_read_per_mtok: 0.15
3723
+ rules:
3724
+ priority:
3725
+ effective_from: '2026-11-22'
3726
+ input_per_mtok: 2.7
3727
+ output_per_mtok: 13.5
3728
+ cache_read_per_mtok: 0.27
3534
3729
  source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing
3535
3730
  - channel: vercel-ai-gateway
3536
3731
  region: global
@@ -3596,6 +3791,12 @@ models:
3596
3791
  input_per_mtok: 0.75
3597
3792
  output_per_mtok: 3.75
3598
3793
  cache_read_per_mtok: 0.075
3794
+ rules:
3795
+ priority:
3796
+ effective_from: '2026-11-22'
3797
+ input_per_mtok: 1.35
3798
+ output_per_mtok: 6.75
3799
+ cache_read_per_mtok: 0.135
3599
3800
  source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing
3600
3801
  - channel: google-vertex-ai
3601
3802
  region: global
@@ -3603,6 +3804,12 @@ models:
3603
3804
  input_per_mtok: 1.50
3604
3805
  output_per_mtok: 7.50
3605
3806
  cache_read_per_mtok: 0.15
3807
+ rules:
3808
+ priority:
3809
+ effective_from: '2026-11-22'
3810
+ input_per_mtok: 2.7
3811
+ output_per_mtok: 13.5
3812
+ cache_read_per_mtok: 0.27
3606
3813
  source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing
3607
3814
  # The gateway publishes no end date for this rate. Google's direct rate
3608
3815
  # doubles on 2027-01-01; if the gateway follows, this row needs an
@@ -6174,6 +6381,12 @@ models:
6174
6381
  cache_read_per_mtok: 0.125
6175
6382
  batch_input_per_mtok: 0.625
6176
6383
  batch_output_per_mtok: 5
6384
+ rules:
6385
+ priority:
6386
+ effective_from: '2026-11-22'
6387
+ input_per_mtok: 2.5
6388
+ output_per_mtok: 20.0
6389
+ cache_read_per_mtok: 0.25
6177
6390
  source_url: https://developers.openai.com/api/docs/models/gpt-5
6178
6391
  - channel: vercel-ai-gateway
6179
6392
  region: global
@@ -6308,7 +6521,16 @@ models:
6308
6521
  batch_input_per_mtok: 2.5
6309
6522
  batch_output_per_mtok: 15
6310
6523
  rules:
6311
- long_context: {threshold: 272000, input_multiplier: 2, output_multiplier: 1.5}
6524
+ long_context:
6525
+ threshold: 272000
6526
+ input_multiplier: 2
6527
+ output_multiplier: 1.5
6528
+ priority:
6529
+ effective_from: '2026-11-22'
6530
+ input_per_mtok: 12.5
6531
+ output_per_mtok: 75.0
6532
+ cache_read_per_mtok: 1.25
6533
+ max_input_tokens: 272000
6312
6534
  source_url: https://developers.openai.com/api/docs/models/gpt-5.5
6313
6535
  - channel: vercel-ai-gateway
6314
6536
  region: global
@@ -12848,6 +13070,12 @@ models:
12848
13070
  batch_input_per_mtok: 0.625
12849
13071
  batch_output_per_mtok: 5
12850
13072
  batch_cache_read_per_mtok: 0.0625
13073
+ rules:
13074
+ priority:
13075
+ effective_from: '2026-11-22'
13076
+ input_per_mtok: 2.5
13077
+ output_per_mtok: 20.0
13078
+ cache_read_per_mtok: 0.25
12851
13079
  source_url: https://developers.openai.com/api/docs/models/gpt-5.1
12852
13080
  - channel: vercel-ai-gateway
12853
13081
  region: global
@@ -13005,6 +13233,12 @@ models:
13005
13233
  batch_input_per_mtok: 1
13006
13234
  batch_output_per_mtok: 4
13007
13235
  batch_cache_read_per_mtok: 0.25
13236
+ rules:
13237
+ priority:
13238
+ effective_from: '2026-11-22'
13239
+ input_per_mtok: 3.5
13240
+ output_per_mtok: 14.0
13241
+ cache_read_per_mtok: 0.875
13008
13242
  source_url: https://developers.openai.com/api/docs/models/o3
13009
13243
  - channel: vercel-ai-gateway
13010
13244
  region: global
@@ -13224,6 +13458,7 @@ models:
13224
13458
  cache_read_per_mtok: 0.125
13225
13459
  rules:
13226
13460
  uncaptured_fees: true
13461
+ uncaptured_fee_operation: web_search
13227
13462
  source_url: https://developers.openai.com/api/docs/pricing
13228
13463
 
13229
13464
  - canonical_id: openai/gpt-5-codex
@@ -13977,6 +14212,12 @@ models:
13977
14212
  batch_input_per_mtok: 0.75
13978
14213
  batch_output_per_mtok: 3.75
13979
14214
  batch_cache_read_per_mtok: 0.0375
14215
+ rules:
14216
+ priority:
14217
+ effective_from: '2026-11-22'
14218
+ input_per_mtok: 2.7
14219
+ output_per_mtok: 13.5
14220
+ cache_read_per_mtok: 0.135
13980
14221
  source_url: https://cloud.google.com/model-garden/pricing
13981
14222
  - channel: google-api
13982
14223
  region: global
@@ -473,6 +473,21 @@ def parse_catalog(
473
473
  f"{canonical}: invalid batch_cache_write_1h_per_mtok "
474
474
  f"{batch_cache_write_1h!r}"
475
475
  )
476
+ priority = (price.get("rules") or {}).get("priority")
477
+ if priority is not None:
478
+ if not isinstance(priority, Mapping):
479
+ raise CatalogError(f"{canonical}: priority rates must be a mapping")
480
+ _date(priority.get("effective_from"), field="priority.effective_from", model=canonical)
481
+ for field in ("input_per_mtok", "output_per_mtok", "cache_read_per_mtok",
482
+ "cache_write_5m_per_mtok", "cache_write_1h_per_mtok"):
483
+ if field not in priority and field not in ("input_per_mtok", "output_per_mtok"):
484
+ continue
485
+ value = _decimal(priority.get(field))
486
+ if value is None or not value.is_finite() or value < 0:
487
+ raise CatalogError(f"{canonical}: invalid priority {field}")
488
+ limit = priority.get("max_input_tokens")
489
+ if limit is not None and (type(limit) is not int or limit <= 0):
490
+ raise CatalogError(f"{canonical}: invalid priority max_input_tokens")
476
491
  prices.append(
477
492
  Price(
478
493
  id=f"{canonical}:{channel}:{region}:{_id_date(effective_from)}",
@@ -351,7 +351,8 @@ def cost_from_response(
351
351
  if facts.input_includes_cache:
352
352
  usage["input_tokens"] = _native_input_tokens(usage, cost)
353
353
  result = cost(**usage)
354
- if tier is None or tier in _STANDARD_TIERS or batch or (tier == "flex" and _supports_flex(result.price)) or result.status == "unpriced":
354
+ priority_priced = tier in ("priority", "fast") and "unsupported_service_tier" not in result.reasons
355
+ if tier is None or tier in _STANDARD_TIERS or batch or (tier == "flex" and _supports_flex(result.price)) or priority_priced or result.status == "unpriced":
355
356
  return result
356
357
  return replace(
357
358
  result,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: metergraph-core
3
- Version: 0.8.30
3
+ Version: 0.8.31
4
4
  Summary: Open, effective-dated LLM pricing catalog and deterministic cost calculator for popular models across major providers and gateways, including OpenAI, Anthropic, Google Gemini, AWS Bedrock, OpenRouter, Vercel AI Gateway, and more.
5
5
  Author: Metergraph
6
6
  License-Expression: Apache-2.0
@@ -61,6 +61,11 @@ The result identifies the applied model and price. Check `status` before using
61
61
  its cost as a complete total: missing usage or unsupported rates can make a
62
62
  result `partial` or `unpriced`.
63
63
 
64
+ Served OpenAI `priority`/`fast` and Vertex `priority` calls use model-specific
65
+ catalog rates where verified. Priority coverage starts on November 22, 2026.
66
+ Requested Priority that falls back to standard uses standard pricing. Search
67
+ fees are priced separately from the token tier.
68
+
64
69
  ## Choose the API for your input
65
70
 
66
71
  | You have… | Start with… |