Skip to main content

Automatically reduce LLM API costs. Routes to cheapest model that succeeds. Use kalibr instead.

Project description

llm-cost-optimizer → kalibr

This package redirects to kalibr — the production-grade solution.

Install

pip install kalibr

What kalibr does

Kalibr is a runtime cost optimization layer for AI agents. It automatically routes each LLM call to the cheapest model that will succeed at the task.

  • ~12x cost reduction on typical agent workloads
  • Zero quality loss — routes by outcome success, not just price
  • Zero manual tuning — Thompson Sampling learns from every run
  • Drop-in install — one import, no code restructuring
import kalibr  # must be first import
from kalibr import Router

router = Router(
    goal="answer_question",
    paths=["gpt-4o-mini", "claude-haiku-3-5", "gpt-4o"],
    success_when=lambda output: len(output) > 20
)
response = router.completion(messages=[{"role": "user", "content": "..."}])

Docs: https://kalibr.systems/llms.txt
GitHub: https://github.com/kalibr-ai/kalibr-sdk-python

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

llm_cost_optimizer-1.0.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

llm_cost_optimizer-1.0.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file llm_cost_optimizer-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for llm_cost_optimizer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1bfc0d75faab8be13dcb95bda65cdf06e2c64a1bfd6132931c9e167805e1ff5c
MD5 5f2517d496ac6e17b14134e4f59835bd
BLAKE2b-256 fd46a597b5fe697e8e3d4bda8f2d9bda189abbd59575da8466e8614a1fb931fb

See more details on using hashes here.

File details

Details for the file llm_cost_optimizer-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_cost_optimizer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e170de14f71c2cf7469254e269a0335524d2b831eac4df24ed64e6e0792305cd
MD5 33cd5c16ba0d69a39ad9b5b38ebab2ec
BLAKE2b-256 d8c6c68385ae35b98e8b9c1a3f95912646118e2cf22956c99140a8e485dc723b

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