Metadata-Version: 2.4
Name: routerview
Version: 0.1.0
Summary: TUI for browsing and comparing models from OpenRouter's Models API
Author-email: Bastian Pätzold <paetzoldbastian@gmail.com>
Maintainer-email: Bastian Pätzold <paetzoldbastian@gmail.com>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://github.com/ptzld/routerview
Project-URL: Repository, https://github.com/ptzld/routerview
Keywords: llm,openrouter,terminal,tui,benchmark
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
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: Programming Language :: Python :: 3.15
Classifier: Topic :: Software Development
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: platformdirs<5,>=3.6
Requires-Dist: textual<9,>=8.2
Provides-Extra: dev
Requires-Dist: build<2,>=1.2; extra == "dev"
Requires-Dist: ruff<1,>=0.12; extra == "dev"
Requires-Dist: twine<7,>=5.1; extra == "dev"
Dynamic: license-file

# RouterView

[![CI](https://github.com/ptzld/routerview/actions/workflows/ci.yml/badge.svg)](https://github.com/ptzld/routerview/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/routerview.svg)](https://pypi.org/project/routerview)
[![Supported Versions](https://img.shields.io/pypi/pyversions/routerview.svg)](https://pypi.org/project/routerview)
[![Downloads](https://static.pepy.tech/badge/routerview/month)](https://pepy.tech/project/routerview)

**RouterView** is a terminal user interface for browsing models from [OpenRouter](https://openrouter.ai/)'s [Models API](https://openrouter.ai/docs/guides/overview/models/). It
visualizes model pricing, capabilities, and benchmark scores with interactive filtering and
sorting.

The main motivation is to make cost-efficient models easy to find. You can customize how input
and output token costs are weighted, then customize how that combined cost is weighed against
model intelligence.

> [!WARNING]
> This project is entirely vibe-coded, without even looking at a single line of code myself. It served for testing and setting up [OpenCode](https://github.com/anomalyco/opencode/). Seems to work fine, though.

---

## ✨ Features

- Browse OpenRouter model pricing, capabilities, and benchmark scores in a terminal UI
- Filter and sort models by provider, price, context size, modality, and benchmark score
- Compare models using configurable blended-cost and cost-efficiency weights
- Select recommended model IDs through a small public Python API
- Cache model data for fast startup and offline use

---

## 🚀 Quick Start

```console
pip install routerview
routerview
```

---

## 🐍 Python API

The public functions return OpenRouter model ID strings.

Find the model with the best cost efficiency using custom input/output and cost/intelligence
ratios:

```python
from routerview import get_efficient_model

model_id = get_efficient_model(
    cost_in_out_ratio=1 / 3,
    cost_intelligence_ratio=1 / 10,
)
```

Find the model with the highest intelligence score:

```python
from routerview import get_intelligent_model

model_id = get_intelligent_model()
```

Find the model with the highest agentic score:

```python
from routerview import get_agent_model

model_id = get_agent_model()
```

Find the model with the highest coding score:

```python
from routerview import get_coding_model

model_id = get_coding_model()
```

Find the model with the highest Design Arena Elo:

```python
from routerview import get_elo_model

model_id = get_elo_model()
```

---

## 🔑 OpenRouter Authentication

The Models API accepts anonymous requests. RouterView uses `OPENROUTER_API_KEY` automatically when
it is set. Otherwise, RouterView connects without authentication. Run `routerview --no-key` to
ignore the environment variable explicitly. The public Python functions accept
`use_api_key=False` for the same behavior.

---

## 📄 License

**RouterView** is licensed under the BSD-3-Clause License.

---

## 👤 Author

Bastian Pätzold – <paetzoldbastian@gmail.com>
