Smart AI router — filters requests to the right model, saving 40-80% on costs
Project description
Sieve
Smart AI router — filters requests to the right model.
🚧 Early Development — Works, but evolving. Feedback welcome!
Stop overpaying for AI. Sieve automatically routes simple queries to cheap models and complex ones to capable models, saving you 40-80% on API costs.
Installation
pip install sieve-ai
Quick Start
from sieve import route
# Simple query → routes to cheap model
response = route("What is 2+2?")
print(response) # 4
print(f"Cost: ${response.cost_usd:.6f}") # ~$0.000001
# Complex query → routes to capable model
response = route("Analyze the trade-offs between microservices and monoliths")
print(f"Cost: ${response.cost_usd:.4f}") # ~$0.02
Setup
Set your OpenAI API key:
export OPENAI_API_KEY="sk-..."
How It Works
- Analyzes your prompt for complexity signals
- Routes to the cheapest model that can handle it
- Tracks actual cost per request
Try It
git clone https://github.com/krymsnax/sieve
cd sieve
pip install -e .
python3 chat.py
Roadmap
- Anthropic Claude support
- Streaming responses
- Budget limits
- ML-based complexity detection
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file sievellm-0.1.0.tar.gz.
File metadata
- Download URL: sievellm-0.1.0.tar.gz
- Upload date:
- Size: 63.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
601267bd79a7fd5a4e9f8b31d98e36dd90b8b61830f84dde857e4e50df678efa
|
|
| MD5 |
11ab0667e80e09bc185c765cf33adb8a
|
|
| BLAKE2b-256 |
a822e4cc6c348ba24778dfd8a19c1539cf5cfd3151beddcfa42b2f67ea3364a4
|
File details
Details for the file sievellm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sievellm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cd18400d033bb8d4e1b97cc802a84fcb50d5d4cd55788570e74bc3010fc8548
|
|
| MD5 |
9db844afd2f56088053c0868aed9357d
|
|
| BLAKE2b-256 |
0cbd5fd8309ac40adefb18cbc48020fac9229c17526d183b82f143f39294d0e7
|