llm-catalog-core
Runtime-agnostic core for llm-catalog.
It holds the config schema (shipped as schema.json for editor validation; parity with ai-sdk-catalog 0.10), validation, role resolution, the path-rewriting GatewayTransport, native LiteLLM codegen, and an embedded models.dev price snapshot that fills a model's missing cost by vendor and model id (an explicit cost in the config always wins).
This package knows nothing about any runtime adapter and never touches the filesystem, so installing it pulls in neither Pydantic AI nor LiteLLM.
Use it directly when you only need resolution or codegen.
Otherwise install one of the adapter distributions (llm-catalog-pydantic-ai, llm-catalog-litellm), which depend on this.
The config format is JSON, shared verbatim with ai-sdk-catalog — read the file yourself and hand the parsed mapping to Catalog, which validates it:
import json
from pathlib import Path
from llm_catalog.core import Catalog
config = json.loads(Path("ai-sdk-catalog.json").read_text(encoding="utf-8"))
cat = Catalog(config)
rm = cat.resolve_role("fast") # -> ResolvedModel (no adapter types)
print(rm.kind, rm.vendor, rm.base_url) # "gateway" or "direct"
To keep using YAML, parse it yourself (e.g. yaml.safe_load) and pass the result the same way.
See the repository README for the full picture, the public/private boundary, and the verification notes.
import namespace: llm_catalog.core
Metadata
Release files for llm-catalog-core 0.8.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llm_catalog_core-0.8.5.tar.gz | 29.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_catalog_core-0.8.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 64.9 kB
Release files / llm_catalog_core-0.8.5.tar.gz
| Download URL | llm_catalog_core-0.8.5.tar.gz |
|---|---|
| Size | 29.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e19f81d9a69dd4e0d724eeb50ae3abcdbacd740c9c4a8b15d973b53e4ac73c3
|
|
BLAKE2b-256 checksum How to use checksums |
3b57eee67bda23eb63dd0bbc0a9cc99c8152ee1f1337fd8dcc0f8273e0af01c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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 / llm_catalog_core-0.8.5-py3-none-any.whl
| Download URL | llm_catalog_core-0.8.5-py3-none-any.whl |
|---|---|
| Size | 35.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7179291cfb640dcd70999cede956a55bb227f7af2577dd2722d006fc7c4f1986
|
|
BLAKE2b-256 checksum How to use checksums |
80c2c363b5e242391cb6af461b5c95119ec21429bbb94b2c5c84a58eff35520f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}
|