Skip to main content

llm-catalog-pydantic-ai

Pydantic AI adapter for llm-catalog. It turns a role in your catalog config (llm-catalog.json, shared verbatim with ai-sdk-catalog) into a native Pydantic AI Model — a gateway model is routed through your gateway via the core GatewayTransport, a direct model calls the vendor's own endpoint (anthropic / openai / openai-compatible / google).

import json
from pathlib import Path

from pydantic_ai import Agent
from llm_catalog.pydantic_ai import PydanticAICatalog

config = json.loads(Path("llm-catalog.json").read_text(encoding="utf-8"))
cat = PydanticAICatalog(config)  # validates the config itself
agent = Agent(cat.model_for_role("fast"))

Installing this package does not pull in litellm. The distributions are deliberately split so a Pydantic AI user's lockfile never references it.

See the repository README for the full picture and the verification notes (§9), including the google-genai / custom-httpx-client caveat.

import namespace: llm_catalog.pydantic_ai

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_pydantic_ai-0.5.0.tar.gz (9.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_pydantic_ai-0.5.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file llm_catalog_pydantic_ai-0.5.0.tar.gz.

File metadata

  • Download URL: llm_catalog_pydantic_ai-0.5.0.tar.gz
  • Upload date:
  • Size: 9.0 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_pydantic_ai-0.5.0.tar.gz
Algorithm Hash digest
SHA256 1ca570d8a0a6dc4d987b158327f6c72e3e3b9805fbe809a6e01202be8af916bc
MD5 c81b48cacf61202d39f297a02d9cf60a
BLAKE2b-256 0dc38308daf7d5235bc4036b44503d894a33b8985d9aa14a9ca2bef09d9aeb5e

See more details on using hashes here.

File details

Details for the file llm_catalog_pydantic_ai-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: llm_catalog_pydantic_ai-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 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_pydantic_ai-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad5cb6ee0375c0461986f701cb4c238cbdd7abfb559185338d1472b5b2eaa1cf
MD5 794b66eba8baf02fd14d1a8fb38dd4df
BLAKE2b-256 d206b2afeafce0bc59818657e6f2bb5148b54c7606e4f8ac0939519c94ea442d

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