Metadata-Version: 2.4
Name: llm-unorouter
Version: 0.1
Summary: LLM plugin for models hosted by UnoRouter
Author: 0-don
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/0-don/llm-unorouter
Project-URL: Changelog, https://github.com/0-don/llm-unorouter/releases
Project-URL: Issues, https://github.com/0-don/llm-unorouter/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: llm>=0.27.1
Requires-Dist: httpx
Requires-Dist: openai>=1.57.0

# llm-unorouter

[LLM](https://llm.datasette.io/) plugin for models hosted by [UnoRouter](https://unorouter.com), an open-source OpenAI-compatible gateway serving 200+ models (Claude, GPT, Gemini, DeepSeek, Kimi, GLM, Qwen and more) behind a single API key. Models with a `:free` suffix cost nothing.

## Installation

Install this plugin in the same environment as LLM:

```bash
llm install llm-unorouter
```

## Configuration

Create an API key at [unorouter.com/token](https://unorouter.com/token) (sign up with Discord or GitHub, no card required), then set it:

```bash
llm keys set unorouter
# paste your key
```

You can also set it as the `UNOROUTER_KEY` environment variable.

## Usage

Run a prompt against a free model:

```bash
llm -m unorouter/deepseek-v4-flash:free "Three fun names for a pet pelican"
```

List all available models:

```bash
llm unorouter models
```

Only the free ones:

```bash
llm unorouter models --free
```

Refresh the cached model list:

```bash
llm unorouter refresh
```

All models also work with `llm chat`, schemas-capable models with `llm --schema`, and async usage via the Python API.

Free models run on shared pools with a light per-model rate limit (about 1 request per minute per model); rotate between free models or use paid models for higher throughput.

## Development

```bash
cd llm-unorouter
python -m venv venv && source venv/bin/activate
pip install -e '.[dev]'
pytest
```
