metergraph-core 0.2.38__tar.gz → 0.2.41__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 (18) hide show
  1. {metergraph_core-0.2.38/src/metergraph_core.egg-info → metergraph_core-0.2.41}/PKG-INFO +1 -1
  2. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/pyproject.toml +1 -1
  3. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/src/metergraph_core/billing.py +6 -2
  4. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/src/metergraph_core/data/models.yaml +40 -1
  5. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/src/metergraph_core/data/prices.yaml +119 -2
  6. {metergraph_core-0.2.38 → metergraph_core-0.2.41/src/metergraph_core.egg-info}/PKG-INFO +1 -1
  7. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/MANIFEST.in +0 -0
  8. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/README.md +0 -0
  9. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/setup.cfg +0 -0
  10. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/src/metergraph_core/__init__.py +0 -0
  11. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/src/metergraph_core/catalog.py +0 -0
  12. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/src/metergraph_core/loader.py +0 -0
  13. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/src/metergraph_core/models.py +0 -0
  14. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/src/metergraph_core/retrieval.py +0 -0
  15. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/src/metergraph_core.egg-info/SOURCES.txt +0 -0
  16. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/src/metergraph_core.egg-info/dependency_links.txt +0 -0
  17. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/src/metergraph_core.egg-info/requires.txt +0 -0
  18. {metergraph_core-0.2.38 → metergraph_core-0.2.41}/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.2.38
3
+ Version: 0.2.41
4
4
  Summary: Reusable MeterGraph catalog and deterministic billing engine
5
5
  License-Expression: Apache-2.0
6
6
  Requires-Python: >=3.10
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "metergraph-core"
3
- version = "0.2.38"
3
+ version = "0.2.41"
4
4
  description = "Reusable MeterGraph catalog and deterministic billing engine"
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -34,7 +34,11 @@ class _QualifiedSource:
34
34
  # the per-request and per-query charges a token rate cannot express. Portkey was
35
35
  # checked across a 46,241-call export: its figure matches published rates for
36
36
  # Anthropic, xAI and Perplexity to the cent, and for OpenAI once the per-search
37
- # charge is counted -- 20,590 of 20,590 rows, exactly.
37
+ # charge is counted -- 20,590 of 20,590 rows, exactly. Anthropic's calls come
38
+ # back in the Messages API shape, which the relay reports as `messages`; before
39
+ # that endpoint was listed here every Anthropic call fell back to the catalog,
40
+ # and a model the catalog did not know yet (Opus 5.5, 2,154 calls in one
41
+ # customer's week) was stored at $0 with the gateway's figure sitting unused.
38
42
  _QUALIFIED_SOURCES = (
39
43
  _QualifiedSource(
40
44
  gateway="openrouter",
@@ -46,7 +50,7 @@ _QUALIFIED_SOURCES = (
46
50
  ),
47
51
  _QualifiedSource(
48
52
  gateway="portkey",
49
- endpoints=frozenset({"chat.completions", "responses"}),
53
+ endpoints=frozenset({"chat.completions", "responses", "messages"}),
50
54
  cost_source="portkey.cost",
51
55
  ),
52
56
  )
@@ -1,4 +1,4 @@
1
- version: '2026-09-26'
1
+ version: '2026-09-29'
2
2
  models:
3
3
  - canonical_id: openai/gpt-5.6-sol
4
4
  display_name: GPT-5.6 Sol
@@ -416,6 +416,39 @@ models:
416
416
  pricing_channel: vercel-ai-gateway
417
417
  execution_profiles:
418
418
  - default
419
+ - canonical_id: deepseek/deepseek-v4.1-flash
420
+ display_name: DeepSeek V4.1 Flash
421
+ publisher: deepseek
422
+ routes:
423
+ - key: default:deepseek/deepseek-v4.1-flash
424
+ id: deepseek/deepseek-v4.1-flash
425
+ provider: vercel
426
+ model_id: deepseek/deepseek-v4.1-flash
427
+ pricing_channel: vercel-ai-gateway
428
+ execution_profiles:
429
+ - default
430
+ - canonical_id: alibaba/qwen3.8-flash
431
+ display_name: Qwen 3.8 Flash
432
+ publisher: alibaba
433
+ routes:
434
+ - key: default:alibaba/qwen3.8-flash
435
+ id: alibaba/qwen3.8-flash
436
+ provider: vercel
437
+ model_id: alibaba/qwen3.8-flash
438
+ pricing_channel: vercel-ai-gateway
439
+ execution_profiles:
440
+ - default
441
+ - canonical_id: inception/mercury-2.5
442
+ display_name: Mercury 2.5
443
+ publisher: inception
444
+ routes:
445
+ - key: default:inception/mercury-2.5
446
+ id: inception/mercury-2.5
447
+ provider: vercel
448
+ model_id: inception/mercury-2.5
449
+ pricing_channel: vercel-ai-gateway
450
+ execution_profiles:
451
+ - default
419
452
  - canonical_id: openai/gpt-5.4-mini
420
453
  display_name: GPT-5.4 Mini
421
454
  publisher: openai
@@ -593,6 +626,9 @@ execution_profiles:
593
626
  - default:mistral/ministral-14b
594
627
  - default:nvidia/nemotron-3-super-120b-a12b
595
628
  - default:zai/glm-5.3-flash
629
+ - default:deepseek/deepseek-v4.1-flash
630
+ - default:alibaba/qwen3.8-flash
631
+ - default:inception/mercury-2.5
596
632
  - default:openai/gpt-5.4-mini
597
633
  - default:openai/gpt-5.4-nano
598
634
  - default:anthropic/claude-opus-4.8
@@ -658,6 +694,9 @@ offer_groups:
658
694
  - default:mistral/ministral-14b
659
695
  - default:nvidia/nemotron-3-super-120b-a12b
660
696
  - default:zai/glm-5.3-flash
697
+ - default:deepseek/deepseek-v4.1-flash
698
+ - default:alibaba/qwen3.8-flash
699
+ - default:inception/mercury-2.5
661
700
  - id: fireworks
662
701
  credential: FIREWORKS_API_KEY
663
702
  routes:
@@ -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-09-28"
9
+ version: "2026-09-29"
10
10
  currency: USD
11
- pricing_verified_at: "2026-09-28"
11
+ pricing_verified_at: "2026-09-29"
12
12
  models:
13
13
  - canonical_id: openai/gpt-6-sol
14
14
  publisher: openai
@@ -871,6 +871,38 @@ models:
871
871
  cache_read_per_mtok: 0.5
872
872
  cache_write_5m_per_mtok: 6.25
873
873
  source_url: https://ai-gateway.vercel.sh/v1/models
874
+ - canonical_id: anthropic/claude-sonnet-5.5
875
+ publisher: anthropic
876
+ aliases:
877
+ - {provider: anthropic, alias: claude-sonnet-5-5, channel: anthropic-api}
878
+ - {provider: anthropic, alias: anthropic/claude-sonnet-5-5, channel: anthropic-api}
879
+ - {provider: litellm, alias: claude-sonnet-5-5, channel: anthropic-api}
880
+ - {provider: unknown, alias: claude-sonnet-5-5, channel: anthropic-api}
881
+ - provider: anthropic
882
+ alias: anthropic/claude-sonnet-5.5
883
+ channel: vercel-ai-gateway
884
+ rules: {input_includes_cache_read: true, input_includes_cache_write: true}
885
+ prices:
886
+ - channel: anthropic-api
887
+ region: global
888
+ effective_from: "2026-09-28"
889
+ input_per_mtok: 2.00
890
+ output_per_mtok: 10.00
891
+ cache_read_per_mtok: 0.20
892
+ cache_write_5m_per_mtok: 2.50
893
+ cache_write_1h_per_mtok: 4.00
894
+ batch_input_per_mtok: 1.00
895
+ batch_output_per_mtok: 5.00
896
+ source_url: https://platform.claude.com/docs/en/about-claude/pricing
897
+ - channel: vercel-ai-gateway
898
+ region: global
899
+ effective_from: "2026-09-28"
900
+ input_per_mtok: 2.00
901
+ output_per_mtok: 10.00
902
+ cache_read_per_mtok: 0.20
903
+ cache_write_5m_per_mtok: 2.50
904
+ source_url: https://ai-gateway.vercel.sh/v1/models
905
+
874
906
  - canonical_id: anthropic/claude-sonnet-5
875
907
  publisher: anthropic
876
908
  aliases:
@@ -1758,6 +1790,7 @@ models:
1758
1790
  - canonical_id: google/gemini-3.6-flash
1759
1791
  publisher: google
1760
1792
  aliases:
1793
+ - {provider: vertex-ai, alias: gemini-3.6-flash, channel: google-vertex-ai}
1761
1794
  - {provider: google, alias: gemini-3.6-flash, channel: google-api}
1762
1795
  - {provider: google, alias: google/models/gemini-3.6-flash, channel: google-api}
1763
1796
  - {provider: google, alias: models/gemini-3.6-flash, channel: google-api}
@@ -1770,6 +1803,23 @@ models:
1770
1803
  channel: vercel-ai-gateway
1771
1804
  rules: {input_includes_cache_read: true}
1772
1805
  prices:
1806
+ # Vertex lists the direct API's introductory rate, and the same
1807
+ # 2027-01-01 increase.
1808
+ - channel: google-vertex-ai
1809
+ region: global
1810
+ effective_from: "2026-08-20"
1811
+ effective_to: "2027-01-01"
1812
+ input_per_mtok: 0.75
1813
+ output_per_mtok: 3.75
1814
+ cache_read_per_mtok: 0.075
1815
+ source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing
1816
+ - channel: google-vertex-ai
1817
+ region: global
1818
+ effective_from: "2027-01-01"
1819
+ input_per_mtok: 1.50
1820
+ output_per_mtok: 7.50
1821
+ cache_read_per_mtok: 0.15
1822
+ source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing
1773
1823
  - channel: google-api
1774
1824
  region: global
1775
1825
  effective_from: "2026-07-21"
@@ -1813,6 +1863,7 @@ models:
1813
1863
  - canonical_id: google/gemini-3.7-flash
1814
1864
  publisher: google
1815
1865
  aliases:
1866
+ - {provider: vertex-ai, alias: gemini-3.7-flash, channel: google-vertex-ai}
1816
1867
  - {provider: litellm, alias: gemini-3.7-flash, channel: google-api}
1817
1868
  - {provider: litellm, alias: models/gemini-3.7-flash, channel: google-api}
1818
1869
  - {provider: unknown, alias: gemini-3.7-flash, channel: google-api}
@@ -1825,6 +1876,23 @@ models:
1825
1876
  - {provider: google, alias: google/models/gemini-3.7-flash, channel: google-api}
1826
1877
  - {provider: google, alias: models/gemini-3.7-flash, channel: google-api}
1827
1878
  prices:
1879
+ # Vertex lists the direct API's introductory rate, and the same
1880
+ # 2027-01-01 increase.
1881
+ - channel: google-vertex-ai
1882
+ region: global
1883
+ effective_from: "2026-08-18"
1884
+ effective_to: "2027-01-01"
1885
+ input_per_mtok: 0.75
1886
+ output_per_mtok: 3.75
1887
+ cache_read_per_mtok: 0.075
1888
+ source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing
1889
+ - channel: google-vertex-ai
1890
+ region: global
1891
+ effective_from: "2027-01-01"
1892
+ input_per_mtok: 1.50
1893
+ output_per_mtok: 7.50
1894
+ cache_read_per_mtok: 0.15
1895
+ source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing
1828
1896
  - channel: vercel-ai-gateway
1829
1897
  region: global
1830
1898
  effective_from: "2026-08-25"
@@ -1843,6 +1911,7 @@ models:
1843
1911
  - canonical_id: google/gemini-3.8-flash
1844
1912
  publisher: google
1845
1913
  aliases:
1914
+ - {provider: vertex-ai, alias: gemini-3.8-flash, channel: google-vertex-ai}
1846
1915
  - {provider: google, alias: gemini-3.8-flash, channel: google-api}
1847
1916
  - {provider: google, alias: models/gemini-3.8-flash, channel: google-api}
1848
1917
  - {provider: google, alias: gemini-flash-latest, channel: google-api}
@@ -1862,6 +1931,23 @@ models:
1862
1931
  channel: vercel-ai-gateway
1863
1932
  rules: {input_includes_cache_read: true}
1864
1933
  prices:
1934
+ # Vertex lists the direct API's introductory rate, and the same
1935
+ # 2027-01-01 increase.
1936
+ - channel: google-vertex-ai
1937
+ region: global
1938
+ effective_from: "2026-09-01"
1939
+ effective_to: "2027-01-01"
1940
+ input_per_mtok: 0.75
1941
+ output_per_mtok: 3.75
1942
+ cache_read_per_mtok: 0.075
1943
+ source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing
1944
+ - channel: google-vertex-ai
1945
+ region: global
1946
+ effective_from: "2027-01-01"
1947
+ input_per_mtok: 1.50
1948
+ output_per_mtok: 7.50
1949
+ cache_read_per_mtok: 0.15
1950
+ source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing
1865
1951
  # The gateway publishes no end date for this rate. Google's direct rate
1866
1952
  # doubles on 2027-01-01; if the gateway follows, this row needs an
1867
1953
  # `effective_to` and a successor then.
@@ -2507,6 +2593,37 @@ models:
2507
2593
  output_per_mtok: 6.0
2508
2594
  cache_read_per_mtok: 0.25
2509
2595
  source_url: https://ai-gateway.vercel.sh/v1/models
2596
+ - canonical_id: alibaba/qwen3.8-flash
2597
+ publisher: alibaba
2598
+ aliases:
2599
+ - provider: alibaba
2600
+ alias: alibaba/qwen3.8-flash
2601
+ channel: vercel-ai-gateway
2602
+ rules: {input_includes_cache_read: true, input_includes_cache_write: true}
2603
+ prices:
2604
+ - channel: vercel-ai-gateway
2605
+ region: global
2606
+ effective_from: "2026-08-26"
2607
+ input_per_mtok: 0.15
2608
+ output_per_mtok: 0.47
2609
+ cache_read_per_mtok: 0.016
2610
+ cache_write_5m_per_mtok: 0.20
2611
+ source_url: https://ai-gateway.vercel.sh/v1/models
2612
+ - canonical_id: inception/mercury-2.5
2613
+ publisher: inception
2614
+ aliases:
2615
+ - provider: inception
2616
+ alias: inception/mercury-2.5
2617
+ channel: vercel-ai-gateway
2618
+ rules: {input_includes_cache_read: true}
2619
+ prices:
2620
+ - channel: vercel-ai-gateway
2621
+ region: global
2622
+ effective_from: "2026-09-08"
2623
+ input_per_mtok: 0.04
2624
+ output_per_mtok: 0.15
2625
+ cache_read_per_mtok: 0.004
2626
+ source_url: https://ai-gateway.vercel.sh/v1/models
2510
2627
  - canonical_id: amazon/nova-2-lite
2511
2628
  publisher: amazon
2512
2629
  aliases:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: metergraph-core
3
- Version: 0.2.38
3
+ Version: 0.2.41
4
4
  Summary: Reusable MeterGraph catalog and deterministic billing engine
5
5
  License-Expression: Apache-2.0
6
6
  Requires-Python: >=3.10