Sievellm
Smart AI router — automatically routes to the right model.
🚧 Early Development — Works, feedback welcome!
Stop overpaying for AI. Sievellm uses AI to detect query complexity and routes simple questions to cheap models, complex ones to capable models — saving you 40-80% on API costs.
Why Sievellm?
| LiteLLM | Sievellm | |
|---|---|---|
| Setup | Docker, Postgres, YAML | pip install sievellm |
| Routing | Manual rules you configure | AI auto-detects complexity |
| Code | Proxy server + config | One line: route("question") |
Installation
pip install sievellm
Quick Start
from sieve import route
# Simple query → automatically routes to cheap model (gpt-4o-mini)
response = route("What is 2+2?")
print(response) # 4
print(f"Model: {response.model_used}") # gpt-4o-mini
print(f"Cost: ${response.cost_usd:.6f}") # ~$0.000007
# Complex query → automatically routes to capable model (gpt-4-turbo)
response = route("Explain the trade-offs between microservices and monoliths")
print(f"Model: {response.model_used}") # gpt-4-turbo
Setup
export OPENAI_API_KEY="sk-..."
How It Works
- AI Classification — Uses GPT-4o-mini to rate query complexity (costs ~$0.00001)
- Smart Routing — Routes to cheap/mid/expensive tier based on complexity
- Cost Tracking — Returns actual cost per request
Options
from sieve import Router
router = Router(
smart_routing=True, # AI-powered (default) or keyword-based
force_tier="cheap", # Force a specific tier (optional)
)
Roadmap
- AI-powered complexity detection
- Anthropic Claude support
- Multi-provider routing (cheapest across OpenAI + Anthropic + Google)
- Streaming responses
- Budget limits & alerts
License
MIT
Metadata
Release files for sievellm 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sievellm-0.3.0.tar.gz | 42.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sievellm-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.1 kB
Release files / sievellm-0.3.0.tar.gz
| Download URL | sievellm-0.3.0.tar.gz |
|---|---|
| Size | 42.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e921ab84fdd7da29a94d17e6ae789d3df3b6eeae2ab74fec6b9ef2d8f91abcb
|
|
BLAKE2b-256 checksum How to use checksums |
3d8441ab1b4352aa5f7e2f95ae3c8bfd77382b4a5e06c7a1467372da3340351c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / sievellm-0.3.0-py3-none-any.whl
| Download URL | sievellm-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4935ac830d2e3604e338876ba8a8f8051b5c456790805b4ab2ceced65fef376d
|
|
BLAKE2b-256 checksum How to use checksums |
ac6ce825c1924b091225bd4b879e8c35bf92ee499a8428c1261e23578d4166e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|