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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_catalog_core-0.8.3.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_catalog_core-0.8.3-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file llm_catalog_core-0.8.3.tar.gz.

File metadata

  • Download URL: llm_catalog_core-0.8.3.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}

File hashes

Hashes for llm_catalog_core-0.8.3.tar.gz
Algorithm Hash digest
SHA256 bc2f5a3026aeb47df5525bd58a65179f199b3f86ba92e1796431baa3fb4ff8c6
MD5 45575f58ca09f2ac81e679d69e5b324a
BLAKE2b-256 e0ddd18bdc0fefcaa86d24f6eb573c5d02c461050be9cc1d70b920d5f7d0c551

See more details on using hashes here.

File details

Details for the file llm_catalog_core-0.8.3-py3-none-any.whl.

File metadata

  • Download URL: llm_catalog_core-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}

File hashes

Hashes for llm_catalog_core-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e68e7ed4eea5c48d936408607088c7b1626a0890599fecbdf0faa4a1453b66b4
MD5 2e0eeeb5fcf4a9d533a07359c725a90a
BLAKE2b-256 cf55dad09f3c6a24cfc5954d7b6d7397a6ecffcd830787f3cbb343a8a8f6887e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.3 This release

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page