Metadata-Version: 2.4
Name: anypick
Version: 0.1.0
Summary: Select LLMs using filters across capabilities, prices and benchmarks
Author: Giuseppe Della Vedova
License-Expression: MIT
Project-URL: Homepage, https://github.com/gi-dellav/anypick
Project-URL: Repository, https://github.com/gi-dellav/anypick
Project-URL: Issues, https://github.com/gi-dellav/anypick/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Dynamic: license-file

# anypick-python

<p>
  <a href="https://pypi.org/project/anypick/"><img src="https://img.shields.io/pypi/v/anypick" alt="PyPI version"></a>
  <a href="https://pypi.org/project/anypick/"><img src="https://img.shields.io/pypi/pyversions/anypick" alt="Python versions"></a>
</p>

Python implementation of `anypick`. See the project [docs](../docs) for the
full design.

## Install (dev)

```bash
cd anypick-python
pip install -e ".[dev]"
```

## Use

```python
import os
from anypick import anypick, ModelFilters, BenchmarkThreshold

sel = anypick(
    filters=ModelFilters(
        max_prompt_price=2e-6,
        min_context_length=128_000,
        requires_tools=True,
        min_benchmarks=[BenchmarkThreshold(task_type="coding", min=60)],
    ),
    strategy="cheapest_with_floor",
    openrouter_api_key=os.environ["OPENROUTER_API_KEY"],
)
print(sel.model.id, sel.prompt_price, sel.score.score)
```

## Use — Vercel AI Gateway (models only)

The Vercel AI Gateway exposes a model catalog but no benchmark feed, so pair it
with a price-only strategy (`cheapest`):

```python
import os
from anypick import anypick, ModelFilters

sel = anypick(
    filters=ModelFilters(
        max_prompt_price=2e-6,
        min_context_length=128_000,
        requires_tools=True,
    ),
    strategy="cheapest",
    obtainer="vercel",
    vercel_api_key=os.environ.get("VERCEL_AI_GATEWAY_API_KEY"),  # optional
)
print(sel.model.id, sel.prompt_price)
```

## Test

```bash
pytest -q
```

Tests run offline against committed fixtures in `tests/fixtures/`.
