Skip to main content

Gateway-agnostic core for llm-catalog: config schema, resolver, GatewayTransport, and LiteLLM codegen. Knows nothing about any runtime adapter.

Project description

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.7), validation, role resolution, the path-rewriting GatewayTransport, and native LiteLLM codegen.

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

Project details


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.5.1.tar.gz (23.3 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.5.1-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_catalog_core-0.5.1.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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.5.1.tar.gz
Algorithm Hash digest
SHA256 5e081ee33247278eb22d551a35441a0675781b6e9ecfc9c1b763d2240ad16d47
MD5 02ebea69057ad2fca823bd6e630436bd
BLAKE2b-256 0c156daad6c9d5fa7d237bc0227a8ddf67fefa14c2df761c803ecb8bb85b64fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llm_catalog_core-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 30.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c267b4e1e12d3b3a4d1ff5832effd6e5beb2f068e08944a2ab1b2468fe1b45d
MD5 9e11927d5f89cac6885ee00f9d257600
BLAKE2b-256 a94cac219465f52b9732e8f89ef257d0af5d76a728a97d9b848823e272d98577

See more details on using hashes here.

Supported by

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