metergraph-core 0.9.2__tar.gz → 0.9.3__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.
- {metergraph_core-0.9.2/src/metergraph_core.egg-info → metergraph_core-0.9.3}/PKG-INFO +13 -8
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/README.md +12 -7
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/pyproject.toml +1 -1
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/loader.py +43 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3/src/metergraph_core.egg-info}/PKG-INFO +13 -8
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/MANIFEST.in +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/setup.cfg +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/__init__.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/billing.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/calls.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/catalog.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/catalog_delta.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/catalogs.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/data/models.yaml +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/data/prices.yaml +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/data/sources.yaml +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/extractors.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/families.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/models.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/providers/__init__.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/providers/anthropic.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/providers/google.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/refresh.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/reliability.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/responses.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/retrieval.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core/sources.py +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core.egg-info/SOURCES.txt +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core.egg-info/dependency_links.txt +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core.egg-info/requires.txt +0 -0
- {metergraph_core-0.9.2 → metergraph_core-0.9.3}/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.9.
|
|
3
|
+
Version: 0.9.3
|
|
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,13 +61,18 @@ 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
|
-
Azure Foundry pricing requires
|
|
65
|
-
and Azure resource region.
|
|
66
|
-
|
|
67
|
-
`
|
|
68
|
-
|
|
69
|
-
deployment
|
|
70
|
-
the
|
|
64
|
+
Azure Foundry pricing requires a caller-declared deployment mapping with its
|
|
65
|
+
underlying model version, SKU, and Azure resource region. Pass those facts to
|
|
66
|
+
`price_foundry_deployment()` as
|
|
67
|
+
`identity={"deployment": "my-deployment", "model": "gpt-6-luna",
|
|
68
|
+
"version": "2026-09-22", "sku": "GlobalStandard", "region": "eastus"}`,
|
|
69
|
+
with `requested_deployment="my-deployment"` from the request and token usage.
|
|
70
|
+
The method checks the declared SKU and requires the requested deployment to
|
|
71
|
+
match the mapping before applying the verified catalog rate. It does not
|
|
72
|
+
independently verify the deployment configuration with Azure. A generic
|
|
73
|
+
`provider="azure"` call stays unpriced because its deployment type is unknown.
|
|
74
|
+
Batch and cache-write usage remain partial where the catalog lacks a matching
|
|
75
|
+
rate.
|
|
71
76
|
|
|
72
77
|
Served OpenAI `priority`/`fast` and Vertex `priority` calls use model-specific
|
|
73
78
|
catalog rates where verified. Priority coverage starts on November 22, 2026.
|
|
@@ -31,13 +31,18 @@ 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
|
-
Azure Foundry pricing requires
|
|
35
|
-
and Azure resource region.
|
|
36
|
-
|
|
37
|
-
`
|
|
38
|
-
|
|
39
|
-
deployment
|
|
40
|
-
the
|
|
34
|
+
Azure Foundry pricing requires a caller-declared deployment mapping with its
|
|
35
|
+
underlying model version, SKU, and Azure resource region. Pass those facts to
|
|
36
|
+
`price_foundry_deployment()` as
|
|
37
|
+
`identity={"deployment": "my-deployment", "model": "gpt-6-luna",
|
|
38
|
+
"version": "2026-09-22", "sku": "GlobalStandard", "region": "eastus"}`,
|
|
39
|
+
with `requested_deployment="my-deployment"` from the request and token usage.
|
|
40
|
+
The method checks the declared SKU and requires the requested deployment to
|
|
41
|
+
match the mapping before applying the verified catalog rate. It does not
|
|
42
|
+
independently verify the deployment configuration with Azure. A generic
|
|
43
|
+
`provider="azure"` call stays unpriced because its deployment type is unknown.
|
|
44
|
+
Batch and cache-write usage remain partial where the catalog lacks a matching
|
|
45
|
+
rate.
|
|
41
46
|
|
|
42
47
|
Served OpenAI `priority`/`fast` and Vertex `priority` calls use model-specific
|
|
43
48
|
catalog rates where verified. Priority coverage starts on November 22, 2026.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "metergraph-core"
|
|
3
|
-
version = "0.9.
|
|
3
|
+
version = "0.9.3"
|
|
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"
|
|
@@ -285,6 +285,49 @@ class LoadedCatalog:
|
|
|
285
285
|
)
|
|
286
286
|
return _cost_result(resolved, at=when, usage=usage, missing=missing)
|
|
287
287
|
|
|
288
|
+
def price_foundry_deployment(
|
|
289
|
+
self,
|
|
290
|
+
*,
|
|
291
|
+
identity: Mapping[str, Any] | None,
|
|
292
|
+
requested_deployment: Any,
|
|
293
|
+
at: Any,
|
|
294
|
+
usage: ModelUsage,
|
|
295
|
+
) -> CostResult:
|
|
296
|
+
"""Price a caller-declared Foundry mapping only for its requested deployment."""
|
|
297
|
+
when = _coerce_datetime(at)
|
|
298
|
+
|
|
299
|
+
def unpriced(reason: str) -> CostResult:
|
|
300
|
+
return CostResult(
|
|
301
|
+
None, None, None, "unpriced", (reason,), effective_at=when
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
if not isinstance(identity, Mapping):
|
|
305
|
+
return unpriced("foundry_deployment_unmapped")
|
|
306
|
+
if identity.get("sku") != "GlobalStandard":
|
|
307
|
+
return unpriced("foundry_sku_unsupported")
|
|
308
|
+
deployment = identity.get("deployment")
|
|
309
|
+
model = identity.get("model")
|
|
310
|
+
version = identity.get("version")
|
|
311
|
+
region = identity.get("region")
|
|
312
|
+
if (
|
|
313
|
+
not all(
|
|
314
|
+
isinstance(value, str) and value.strip()
|
|
315
|
+
for value in (deployment, model, version, region)
|
|
316
|
+
)
|
|
317
|
+
or not isinstance(requested_deployment, str)
|
|
318
|
+
or not requested_deployment.strip()
|
|
319
|
+
):
|
|
320
|
+
return unpriced("foundry_identity_incomplete")
|
|
321
|
+
if requested_deployment != deployment:
|
|
322
|
+
return unpriced("foundry_deployment_mismatch")
|
|
323
|
+
return self.calculate_cost(
|
|
324
|
+
model=f"{model.strip()}@{version.strip()}",
|
|
325
|
+
channel="azure-foundry-global-standard",
|
|
326
|
+
region=region.strip().lower(),
|
|
327
|
+
at=when,
|
|
328
|
+
usage=usage,
|
|
329
|
+
)
|
|
330
|
+
|
|
288
331
|
def price_retrieval(
|
|
289
332
|
self,
|
|
290
333
|
*,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: metergraph-core
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.3
|
|
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,13 +61,18 @@ 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
|
-
Azure Foundry pricing requires
|
|
65
|
-
and Azure resource region.
|
|
66
|
-
|
|
67
|
-
`
|
|
68
|
-
|
|
69
|
-
deployment
|
|
70
|
-
the
|
|
64
|
+
Azure Foundry pricing requires a caller-declared deployment mapping with its
|
|
65
|
+
underlying model version, SKU, and Azure resource region. Pass those facts to
|
|
66
|
+
`price_foundry_deployment()` as
|
|
67
|
+
`identity={"deployment": "my-deployment", "model": "gpt-6-luna",
|
|
68
|
+
"version": "2026-09-22", "sku": "GlobalStandard", "region": "eastus"}`,
|
|
69
|
+
with `requested_deployment="my-deployment"` from the request and token usage.
|
|
70
|
+
The method checks the declared SKU and requires the requested deployment to
|
|
71
|
+
match the mapping before applying the verified catalog rate. It does not
|
|
72
|
+
independently verify the deployment configuration with Azure. A generic
|
|
73
|
+
`provider="azure"` call stays unpriced because its deployment type is unknown.
|
|
74
|
+
Batch and cache-write usage remain partial where the catalog lacks a matching
|
|
75
|
+
rate.
|
|
71
76
|
|
|
72
77
|
Served OpenAI `priority`/`fast` and Vertex `priority` calls use model-specific
|
|
73
78
|
catalog rates where verified. Priority coverage starts on November 22, 2026.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{metergraph_core-0.9.2 → metergraph_core-0.9.3}/src/metergraph_core.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|