Skip to main content

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.

Sieve Demo

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

  1. AI Classification — Uses GPT-4o-mini to rate query complexity (costs ~$0.00001)
  2. Smart Routing — Routes to cheap/mid/expensive tier based on complexity
  3. 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)

Source distribution for sievellm 0.3.0
File Size Uploaded
sievellm-0.3.0.tar.gz 42.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sievellm 0.3.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page