metergraph-core 0.2.33__tar.gz → 0.2.34__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.33/src/metergraph_core.egg-info → metergraph_core-0.2.34}/PKG-INFO +5 -1
  2. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/README.md +4 -0
  3. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/pyproject.toml +1 -1
  4. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/src/metergraph_core/data/models.yaml +15 -1
  5. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/src/metergraph_core/models.py +21 -5
  6. {metergraph_core-0.2.33 → metergraph_core-0.2.34/src/metergraph_core.egg-info}/PKG-INFO +5 -1
  7. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/MANIFEST.in +0 -0
  8. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/setup.cfg +0 -0
  9. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/src/metergraph_core/__init__.py +0 -0
  10. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/src/metergraph_core/billing.py +0 -0
  11. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/src/metergraph_core/catalog.py +0 -0
  12. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/src/metergraph_core/data/prices.yaml +0 -0
  13. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/src/metergraph_core/loader.py +0 -0
  14. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/src/metergraph_core/retrieval.py +0 -0
  15. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/src/metergraph_core.egg-info/SOURCES.txt +0 -0
  16. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/src/metergraph_core.egg-info/dependency_links.txt +0 -0
  17. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/src/metergraph_core.egg-info/requires.txt +0 -0
  18. {metergraph_core-0.2.33 → metergraph_core-0.2.34}/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.33
3
+ Version: 0.2.34
4
4
  Summary: Reusable MeterGraph catalog and deterministic billing engine
5
5
  License-Expression: Apache-2.0
6
6
  Requires-Python: >=3.10
@@ -172,3 +172,7 @@ they never rewrite historical prices in place. Either data change increments
172
172
  its own declared version and produces a patch release of `metergraph-core`.
173
173
  Software and data versions remain separate because they have different
174
174
  lifecycles.
175
+
176
+ The model registry version is an ISO date. When more than one registry ships on
177
+ the same date, append a positive revision such as `2026-09-25.2` so consumers
178
+ can distinguish the policies while pricing validation still uses that date.
@@ -160,3 +160,7 @@ they never rewrite historical prices in place. Either data change increments
160
160
  its own declared version and produces a patch release of `metergraph-core`.
161
161
  Software and data versions remain separate because they have different
162
162
  lifecycles.
163
+
164
+ The model registry version is an ISO date. When more than one registry ships on
165
+ the same date, append a positive revision such as `2026-09-25.2` so consumers
166
+ can distinguish the policies while pricing validation still uses that date.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "metergraph-core"
3
- version = "0.2.33"
3
+ version = "0.2.34"
4
4
  description = "Reusable MeterGraph catalog and deterministic billing engine"
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -1,4 +1,4 @@
1
- version: '2026-09-25'
1
+ version: '2026-09-25.2'
2
2
  models:
3
3
  - canonical_id: openai/gpt-5.6-sol
4
4
  display_name: GPT-5.6 Sol
@@ -631,6 +631,20 @@ offer_groups:
631
631
  - default:deepseek/deepseek-v4-pro
632
632
  - default:deepseek/deepseek-v4-flash
633
633
  - default:minimax/minimax-m3
634
+ - default:anthropic/claude-fable-5
635
+ - default:anthropic/claude-fable-5.1
636
+ - default:google/gemini-3.8-flash
637
+ - default:google/gemini-3.7-flash
638
+ - default:google/gemini-3.5-flash
639
+ - default:google/gemini-3.5-flash-lite
640
+ - default:google/gemini-3.1-flash-lite
641
+ - default:google/gemma-4-31b-it
642
+ - default:google/gemma-4-26b-a4b-it
643
+ - default:moonshotai/kimi-k2.5
644
+ - default:xai/grok-4.1-fast-reasoning
645
+ - default:xai/grok-4.1-fast-non-reasoning
646
+ - default:mistral/ministral-14b
647
+ - default:nvidia/nemotron-3-super-120b-a12b
634
648
  - id: fireworks
635
649
  credential: FIREWORKS_API_KEY
636
650
  routes:
@@ -152,14 +152,30 @@ def _unique_text_list(value: Any, field: str) -> tuple[str, ...]:
152
152
  return items
153
153
 
154
154
 
155
+ def _registry_version_date(version: str) -> date:
156
+ date_value, separator, revision = version.partition(".")
157
+ try:
158
+ parsed = date.fromisoformat(date_value)
159
+ except ValueError as exc:
160
+ raise ModelRegistryError(
161
+ "models document version must be an ISO date, optionally followed by .N"
162
+ ) from exc
163
+ if separator and (
164
+ not revision.isascii()
165
+ or not revision.isdecimal()
166
+ or revision.startswith("0")
167
+ ):
168
+ raise ModelRegistryError(
169
+ "models document version must be an ISO date, optionally followed by .N"
170
+ )
171
+ return parsed
172
+
173
+
155
174
  def parse_model_registry(document: Any) -> ModelRegistry:
156
175
  """Parse and freeze one versioned model-registry document."""
157
176
  root = _mapping(document, "models document")
158
177
  version = _text(root.get("version"), "models document version")
159
- try:
160
- date.fromisoformat(version)
161
- except ValueError as exc:
162
- raise ModelRegistryError("models document version must be an ISO date") from exc
178
+ _registry_version_date(version)
163
179
 
164
180
  models: dict[str, ModelDefinition] = {}
165
181
  routes: dict[str, ModelRoute] = {}
@@ -354,7 +370,7 @@ def validate_model_registry(
354
370
  ) -> None:
355
371
  """Require every execution route to resolve in the pricing catalog."""
356
372
  validation_time = datetime.combine(
357
- date.fromisoformat(registry.version), time.min, tzinfo=timezone.utc
373
+ _registry_version_date(registry.version), time.min, tzinfo=timezone.utc
358
374
  )
359
375
  catalog_models = {
360
376
  entry.get("canonical_id"): entry
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: metergraph-core
3
- Version: 0.2.33
3
+ Version: 0.2.34
4
4
  Summary: Reusable MeterGraph catalog and deterministic billing engine
5
5
  License-Expression: Apache-2.0
6
6
  Requires-Python: >=3.10
@@ -172,3 +172,7 @@ they never rewrite historical prices in place. Either data change increments
172
172
  its own declared version and produces a patch release of `metergraph-core`.
173
173
  Software and data versions remain separate because they have different
174
174
  lifecycles.
175
+
176
+ The model registry version is an ISO date. When more than one registry ships on
177
+ the same date, append a positive revision such as `2026-09-25.2` so consumers
178
+ can distinguish the policies while pricing validation still uses that date.