anypick-python
Python implementation of anypick. See the project docs for the
full design.
Install (dev)
cd anypick-python
pip install -e ".[dev]"
Use
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):
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
pytest -q
Tests run offline against committed fixtures in tests/fixtures/.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
anypick-0.1.0.tar.gz
(27.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
anypick-0.1.0-py3-none-any.whl
(24.5 kB
view details)
File details
Details for the file anypick-0.1.0.tar.gz.
File metadata
- Download URL: anypick-0.1.0.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a85248bd512260a474104416987974eb13eae9a158ca3a330358572211c0df3
|
|
| MD5 |
bdbbb88e78022e2075e3c973f7d4dacc
|
|
| BLAKE2b-256 |
776316f5ff0f2b5c7ba051b894b7ed0d8d2d7e1db178550cedc6e7b963a8be7a
|
File details
Details for the file anypick-0.1.0-py3-none-any.whl.
File metadata
- Download URL: anypick-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2e1a99b41dfa7c21f8ce860e88b863bc5aa428ad707e020ee33f0b157d6e93b
|
|
| MD5 |
e3a7578a748ec23c46fa85486e655f0a
|
|
| BLAKE2b-256 |
90ae158bea621289d4adca79ee0266b049578b986b2d720dc6c855edb2d3f113
|