Skip to main content

llm-catalog-litellm

LiteLLM CustomLLM plugin for llm-catalog. One implementation serves both in-process use and the central proxy.

For in-process use, call register() once to wire the handler into LiteLLM.

from llm_catalog.litellm import register

register()  # reads ai-sdk-catalog.json (LLM_CATALOG_CONFIG or default path)

import litellm

resp = litellm.completion(
    model="examplegw/fast",
    messages=[{"role": "user", "content": "hi"}],
)

For the proxy, reference llm_catalog.litellm.handler from config.yaml's custom_provider_map (no register() call needed).

The handler resolves each model from ai-sdk-catalog.json itself (the JSON config shared verbatim with — and named after — ai-sdk-catalog; the legacy llm-catalog.json remains a deprecated fallback), so the proxy config never needs gateway details in litellm_params, sidestepping LiteLLM issue #18216.

Requires Python 3.12–3.14: LiteLLM declares requires-python <3.15, and this adapter mirrors that cap until LiteLLM lifts it. LiteLLM is built on httpx and requires openai<3, while llm-catalog-pydantic-ai and llm-catalog-ai-sdk need openai>=3 (the httpx2 line), so install this adapter in its own environment rather than alongside those two.

See the repository README for the proxy operations guide and the verification notes (§9), including whether LiteLLM honours a custom httpx client (the route-1/route-2 decision in §6.2).

import namespace: llm_catalog.litellm

Metadata

Release files for llm-catalog-litellm 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-catalog-litellm 0.8.0
File Size Uploaded
llm_catalog_litellm-0.8.0.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-catalog-litellm 0.8.0
File Interpreter ABI Platform
llm_catalog_litellm-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.8 kB

Release files / llm_catalog_litellm-0.8.0.tar.gz

Download URL llm_catalog_litellm-0.8.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c60c02a104919669253999c39d45179c86e86559a20d1b9a864beef3f754a031
BLAKE2b-256 checksum
How to use checksums
8cc1c15a48f845e684760577d29b4cf0b53785efbfbeb9f4c27eff24dbec9436
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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}

Release files / llm_catalog_litellm-0.8.0-py3-none-any.whl

Download URL llm_catalog_litellm-0.8.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f6e7be9eda6d52e979019ace56493d97c6b4f0c0eb44935214acbb23695f235
BLAKE2b-256 checksum
How to use checksums
b27780ba0d6069ca97f6351c3f6a0997ce1ef4eda915b9a4c22d263c0109a0e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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}

Release history Release notifications | RSS feed

0.8.1

2 release files

This release

0.8.0 This release

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page