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 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

  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.1.0.tar.gz (63.8 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.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

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

Hashes for sievellm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 601267bd79a7fd5a4e9f8b31d98e36dd90b8b61830f84dde857e4e50df678efa
MD5 11ab0667e80e09bc185c765cf33adb8a
BLAKE2b-256 a822e4cc6c348ba24778dfd8a19c1539cf5cfd3151beddcfa42b2f67ea3364a4

See more details on using hashes here.

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

Hashes for sievellm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6cd18400d033bb8d4e1b97cc802a84fcb50d5d4cd55788570e74bc3010fc8548
MD5 9db844afd2f56088053c0868aed9357d
BLAKE2b-256 0cbd5fd8309ac40adefb18cbc48020fac9229c17526d183b82f143f39294d0e7

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