Skip to main content

llm-catalog-pydantic-ai

Pydantic AI adapter for llm-catalog. It turns a role in your catalog config (ai-sdk-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("ai-sdk-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.1.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.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_catalog_pydantic_ai-0.5.1.tar.gz
  • Upload date:
  • Size: 9.0 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_pydantic_ai-0.5.1.tar.gz
Algorithm Hash digest
SHA256 330961681e0cd6192a9467af26974d01d1e6020263df9cd70e2480543a9f7cff
MD5 4c9d0ecc9154d1bd7ecc848a0f8cbfa7
BLAKE2b-256 2836cbd7895a8508ce05048a716311e449c8c747f7a957c2e7e80a899bbe43f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llm_catalog_pydantic_ai-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 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_pydantic_ai-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a6371678db08614b25a1a691590db846787ef2828ffebfb6a1e2c50b97e22849
MD5 a3f769792043561677cca184c4928bf1
BLAKE2b-256 75656b2c239ce4cab05577a3edfc7aa4ac01b9ce874fe67708ea7e442552a023

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