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

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_catalog_pydantic_ai-0.5.2.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","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.2.tar.gz
Algorithm Hash digest
SHA256 b4a16d95ba5a250865c2b343223b2703c68d932a5fecaf89dcee70635e703298
MD5 5b5f747ac8abc88e3578be6a931c1b58
BLAKE2b-256 c7929ebca9084d7e2cf1e91a3ba95aa7eab493866d3d703b79de66eda05650d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llm_catalog_pydantic_ai-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4c22c2b65d7dac49e5de59af83b3c7387c045abd43920354394b37655b599cf4
MD5 c8faa06f44260bd2d112d1ac4fd8903b
BLAKE2b-256 175eb4b2239c72b0d53e473d0d4f45f4ebb944b9ce66b1eb0210009fa232754f

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