Skip to main content

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.13), 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-ai-sdk, 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.

GatewayTransport comes in two flavours with identical behaviour, because vendor SDKs are split between httpx and its continuation httpx2:

  • llm_catalog.core.transport (also re-exported from llm_catalog.core) for httpx clients, e.g. LiteLLM.
  • llm_catalog.core.transport2 for httpx2 clients (openai>=3, anthropic>=1, Pydantic AI, the AI SDK for Python); install the optional dependency with pip install "llm-catalog-core[httpx2]".

Build one for a resolved model with GatewayTransport.for_model(inner, rm).

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.10.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-catalog-core 0.10.7
File Size Uploaded Provenance Actions
llm_catalog_core-0.10.7.tar.gz 33.2 kB Without provenance Details for llm_catalog_core-0.10.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llm-catalog-core 0.10.7
File Interpreter ABI Platform Actions
llm_catalog_core-0.10.7-py3-none-any.whl Python 3 none any Details for llm_catalog_core-0.10.7-py3-none-any.whl

Total release size: 73.3 kB

Release files / llm_catalog_core-0.10.7.tar.gz

Download URL llm_catalog_core-0.10.7.tar.gz
Size 33.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bc12174bfeaf8ba5bc5924e70392af614038eea3bc0f1062624aff8e9d65a425
BLAKE2b-256 checksum
How to use checksums
a2057fdb28f34fdd34f64bbf2ac8cda7c24cb5fe50d7fef06714962c55f6ecb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","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.10.7-py3-none-any.whl

Download URL llm_catalog_core-0.10.7-py3-none-any.whl
Size 40.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b032b6325fafcbeff2387b2cbc6bf200eb4a7d808ebb27372cfd21491e98104
BLAKE2b-256 checksum
How to use checksums
26a6edec956fbc868af19dad42d047b8e9f02fc5cf41639be4872acd15a5ef39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for llm-catalog-core 0.10.7

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page