Skip to main content

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.

Sieve Demo

Installation

pip install sievellm

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

  1. Analyzes your prompt for complexity signals
  2. Routes to the cheapest model that can handle it
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sievellm-0.2.0.tar.gz (64.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sievellm-0.2.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file sievellm-0.2.0.tar.gz.

File metadata

  • Download URL: sievellm-0.2.0.tar.gz
  • Upload date:
  • Size: 64.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for sievellm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 34a0d893ea1bfb2f3a9f634706e59d4397a17931db9890dfff15b8c69c3697d3
MD5 eb7a12d8de0718b9f309cbe9d4277a9e
BLAKE2b-256 94675d7b9badd1fcd513a01b885bfcd0cb41efbee098ac29eea065a2bdde792c

See more details on using hashes here.

File details

Details for the file sievellm-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sievellm-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for sievellm-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91095ff43efac8efd387f04c9196886a9f4baed1c60f19207803d31b6a11e257
MD5 08fa8e6e986fb2f532cf127811cc0d4d
BLAKE2b-256 cf0d2b4522b82931e74ffc9140ef740ee29ac47f5c9e01fb096da8dab25940b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page