model-metadata-central
Typed registry of LLM model metadata for Python — context windows, pricing, provider routing.
pip install model-metadata-central
Usage
Full registry
from model_metadata_central import get_all_models, get_all_providers
models = get_all_models()
for model in models:
print(f"{model['model_name']}: {model['context_window']} context")
Look up a single model
from model_metadata_central import get_model
model = get_model("gpt-4o")
if model:
print(model["context_window"]) # 128000
print(model["cost_per_million_tokens"]) # {"input": 5, "output": 15}
Filter by provider
from model_metadata_central import get_models_by_provider
anthropic = get_models_by_provider("anthropic")
openrouter = get_models_by_provider("openrouter")
Provider routing
from model_metadata_central import get_provider_model_id, get_provider
# Get the model ID for a specific provider
openai_id = get_provider_model_id("gpt-4o", "openai") # "gpt-4o"
orouter_id = get_provider_model_id("gpt-4o", "openrouter") # "openai/gpt-4o"
# Get provider config
provider = get_provider("openai")
print(provider["base_url"]) # "https://api.openai.com/v1"
print(provider["auth_type"]) # "api_key"
Named model constants
from model_metadata_central import GPT_4_O, CLAUDE_OPUS_4_7
# Fully typed dict — bundlers exclude the rest
print(GPT_4_O["context_window"])
API
| Function | Returns | Description |
|---|---|---|
get_model(id) |
dict | None |
Lookup by model_id |
get_all_models() |
list[dict] |
All models |
get_models_by_provider(provider_id) |
list[dict] |
Filter by provider |
get_model_on_provider(provider_id, provider_model_id=None) |
dict | None |
Find model on a specific provider |
get_provider(id) |
dict | None |
Provider config |
get_all_providers() |
list[dict] |
All providers |
get_provider_model_id(model_id, provider_id) |
str | None |
Provider-specific model ID |
Data
- Registry pre-compiled from
models/*.yamlat install/build time - 73 models across 18 providers
- Prices are in USD per 1,000,000 tokens
Schema
Matches the JSON Schema definitions in the repo root.
Metadata
Release files for model-metadata-central 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| model_metadata_central-0.5.0.tar.gz | 65.2 kB | Without provenance | Details for model_metadata_central-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| model_metadata_central-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for model_metadata_central-0.5.0-py3-none-any.whl |
Total release size: 88.3 kB
Release files / model_metadata_central-0.5.0.tar.gz
| Download URL | model_metadata_central-0.5.0.tar.gz |
|---|---|
| Size | 65.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6b9b05290cf3eefae4b7ceeb0af2712b42989838204fc2ad71394408756c8c0
|
|
BLAKE2b-256 checksum How to use checksums |
31bad736c56e2835fc6cff882d302c9dbdea39a7a880ed41e89e49756788f1a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.16 {"installer":{"name":"uv","version":"0.12.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / model_metadata_central-0.5.0-py3-none-any.whl
| Download URL | model_metadata_central-0.5.0-py3-none-any.whl |
|---|---|
| Size | 23.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04773e142ee641829a039e07c28ea219015c417062b25e4dc329b578bf164cd7
|
|
BLAKE2b-256 checksum How to use checksums |
756302b2f722d6bf89d812bf90b192a695f43000d1a7410ce455690899dcfa6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.16 {"installer":{"name":"uv","version":"0.12.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for model-metadata-central 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.