metergraph-core 0.2.33__tar.gz → 0.2.35__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.35}/PKG-INFO +5 -1
  2. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/README.md +4 -0
  3. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/pyproject.toml +1 -1
  4. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/src/metergraph_core/data/models.yaml +28 -1
  5. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/src/metergraph_core/models.py +21 -5
  6. {metergraph_core-0.2.33 → metergraph_core-0.2.35/src/metergraph_core.egg-info}/PKG-INFO +5 -1
  7. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/MANIFEST.in +0 -0
  8. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/setup.cfg +0 -0
  9. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/src/metergraph_core/__init__.py +0 -0
  10. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/src/metergraph_core/billing.py +0 -0
  11. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/src/metergraph_core/catalog.py +0 -0
  12. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/src/metergraph_core/data/prices.yaml +0 -0
  13. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/src/metergraph_core/loader.py +0 -0
  14. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/src/metergraph_core/retrieval.py +0 -0
  15. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/src/metergraph_core.egg-info/SOURCES.txt +0 -0
  16. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/src/metergraph_core.egg-info/dependency_links.txt +0 -0
  17. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/src/metergraph_core.egg-info/requires.txt +0 -0
  18. {metergraph_core-0.2.33 → metergraph_core-0.2.35}/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.35
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.35"
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-26'
2
2
  models:
3
3
  - canonical_id: openai/gpt-5.6-sol
4
4
  display_name: GPT-5.6 Sol
@@ -405,6 +405,17 @@ models:
405
405
  pricing_channel: vercel-ai-gateway
406
406
  execution_profiles:
407
407
  - default
408
+ - canonical_id: zai/glm-5.3-flash
409
+ display_name: GLM 5.3 Flash
410
+ publisher: zai
411
+ routes:
412
+ - key: default:zai/glm-5.3-flash
413
+ id: zai/glm-5.3-flash
414
+ provider: vercel
415
+ model_id: zai/glm-5.3-flash
416
+ pricing_channel: vercel-ai-gateway
417
+ execution_profiles:
418
+ - default
408
419
  - canonical_id: openai/gpt-5.4-mini
409
420
  display_name: GPT-5.4 Mini
410
421
  publisher: openai
@@ -581,6 +592,7 @@ execution_profiles:
581
592
  - default:xai/grok-4.1-fast-non-reasoning
582
593
  - default:mistral/ministral-14b
583
594
  - default:nvidia/nemotron-3-super-120b-a12b
595
+ - default:zai/glm-5.3-flash
584
596
  - default:openai/gpt-5.4-mini
585
597
  - default:openai/gpt-5.4-nano
586
598
  - default:anthropic/claude-opus-4.8
@@ -631,6 +643,21 @@ offer_groups:
631
643
  - default:deepseek/deepseek-v4-pro
632
644
  - default:deepseek/deepseek-v4-flash
633
645
  - default:minimax/minimax-m3
646
+ - default:anthropic/claude-fable-5
647
+ - default:anthropic/claude-fable-5.1
648
+ - default:google/gemini-3.8-flash
649
+ - default:google/gemini-3.7-flash
650
+ - default:google/gemini-3.5-flash
651
+ - default:google/gemini-3.5-flash-lite
652
+ - default:google/gemini-3.1-flash-lite
653
+ - default:google/gemma-4-31b-it
654
+ - default:google/gemma-4-26b-a4b-it
655
+ - default:moonshotai/kimi-k2.5
656
+ - default:xai/grok-4.1-fast-reasoning
657
+ - default:xai/grok-4.1-fast-non-reasoning
658
+ - default:mistral/ministral-14b
659
+ - default:nvidia/nemotron-3-super-120b-a12b
660
+ - default:zai/glm-5.3-flash
634
661
  - id: fireworks
635
662
  credential: FIREWORKS_API_KEY
636
663
  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.35
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.