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

Gateway-agnostic core for llm-catalog. It holds the config schema (shipped as schema.json for editor validation), 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("llm-catalog.json").read_text(encoding="utf-8"))
cat = Catalog(config)
rm = cat.resolve_role("fast")   # -> ResolvedModel (no adapter types)
print(rm.backend, rm.slug, rm.base_url)

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.3.0.tar.gz (16.9 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.3.0-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_catalog_core-0.3.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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.3.0.tar.gz
Algorithm Hash digest
SHA256 d3fd1c6b569cd081eb0421cb73f56a929a207cb460b7443a3f9d194abdd5077d
MD5 2b5cd3537a367f65200dec0e7592f849
BLAKE2b-256 9147fe3d42cc9be74eea9cdccef0b062257731d771723aaa5d817314afb5e3d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llm_catalog_core-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71863ba0e14d390e527b4ac4ec58e5ee72101cb362f4673647f96f79c96757df
MD5 ea2b0fc2ca3f67e7637bccc98c26c982
BLAKE2b-256 8955208f163a1719acd86b09fb804b3730963626b7b2e9a5f7683b54f438cdfd

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