Metadata-Version: 2.4
Name: llm-catalog-litellm
Version: 0.2.0
Summary: LiteLLM CustomLLM plugin for llm-catalog: drive a catalog.yaml through LiteLLM, in-process or via the proxy config.yaml.
Keywords: llm,catalog,litellm,gateway,proxy
Author: Shinsuke Mori
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Dist: llm-catalog-core>=0.1,<0.2
Requires-Dist: litellm>=1.90.0
Requires-Dist: httpx>=0.27
Requires-Python: >=3.10
Project-URL: Homepage, https://github.com/sincekmori/llm-catalog
Project-URL: Repository, https://github.com/sincekmori/llm-catalog
Project-URL: Issues, https://github.com/sincekmori/llm-catalog/issues
Project-URL: Changelog, https://github.com/sincekmori/llm-catalog/blob/main/packages/llm-catalog-litellm/CHANGELOG.md
Description-Content-Type: text/markdown

# llm-catalog-litellm

[LiteLLM](https://docs.litellm.ai) `CustomLLM` plugin for [llm-catalog](https://github.com/sincekmori/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.

```python
from llm_catalog.litellm import register

register()   # reads catalog.yaml (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 `catalog.yaml` itself, so the proxy `config.yaml` never needs gateway details in `litellm_params`, sidestepping LiteLLM issue #18216.

See the [repository README](https://github.com/sincekmori/llm-catalog) 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`
