This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.3 instead.
Reason given by maintainers: Superseded by 0.1.1
MizanBench — open LLM cost simulator
Estimate what your LLM workload actually costs — and what smarter routing would save — before you spend a dollar. MizanBench models three strategies over your real traffic numbers:
- Single model — everything to one model (your baseline)
- Mix — static traffic split across models
- Cascade — cheap model tries first, unresolved requests escalate
MizanBench's cascade accounting is deliberately honest: a request that escalates past a cheap tier still pays for that tier's attempt, exactly as real routers bill. The savings it reports are conservative, not marketing numbers.
Quickstart
pip install pyyaml
PYTHONPATH=src python -m mizanbench.cli simulate examples/workload.yaml
# (after `pip install -e .`: just `mizanbench simulate examples/workload.yaml`)
Output for the bundled example (a 20k-requests/day support assistant):
scenario monthly per-request vs baseline
-----------------------------------------------------------------------------
all frontier (GPT-5.6 Sol) $9,900.00 $0.02 baseline
all mid-tier (Claude Sonnet 5) $3,540.00 $0.005900 -64.2%
70/30 mix (Flash + Sonnet 5) $1,580.70 $0.002635 -84.0%
cascade nano -> small -> frontier $1,285.35 $0.002142 -87.0%
List the pricing catalog:
PYTHONPATH=src python -m mizanbench.cli models
Describe your own workload
Copy examples/workload.yaml and edit:
workload:
requests_per_day: 20000
avg_input_tokens: 1200
avg_output_tokens: 350
days: 30
scenarios:
- name: "baseline"
type: single
model: gpt-5.6-sol
baseline: true
- name: "cascade"
type: cascade
tiers:
- { model: gpt-5.4-nano, resolve_rate: 0.65 } # fraction resolved here
- { model: gemini-2.5-flash, resolve_rate: 0.80 } # of what escalated
- { model: claude-opus-4.8 } # final tier takes the rest
resolve_rate is the honest knob: it is the fraction of requests the tier
successfully terminates. Measure it from your own eval data — an
optimistic guess here produces optimistic savings.
Pricing catalog
src/mizanbench/data/pricing.yaml ships with prices as of 2026-07-27 (USD
per 1M tokens) for OpenAI, Anthropic, Google, DeepSeek, Groq, and Together
models. Prices change often:
- override with your own file:
mizanbench -p my-pricing.yaml simulate ... - or better, send a PR updating the catalog — it's the easiest first
contribution to this project, and the
as_offield keeps us honest.
Use as a library
from mizanbench import PricingCatalog, Workload, simulate_cascade
catalog = PricingCatalog.load()
w = Workload(requests_per_day=20000, avg_input_tokens=1200, avg_output_tokens=350)
result = simulate_cascade(catalog, w, [
{"model": "gpt-5.4-nano", "resolve_rate": 0.65},
{"model": "claude-sonnet-5"},
])
print(result.monthly_cost, result.per_request_cost)
Tests
PYTHONPATH=src python -m unittest discover -s tests # stdlib, no deps
# or: pytest
Roadmap
- Benchmark harness: measured (not assumed) resolve rates per model/task.
- Latency modeling alongside cost.
- Web calculator UI.
License
Apache-2.0 — see LICENSE.
Metadata
Release files for mizanbench 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| mizanbench-0.1.0.tar.gz | 14.3 kB | With provenance | Details for mizanbench-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mizanbench-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mizanbench-0.1.0-py3-none-any.whl |
Total release size: 27.3 kB
Release files / mizanbench-0.1.0.tar.gz
| Download URL | mizanbench-0.1.0.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
397d464d25452a2d7732d60e9447a2b0fdbd48abc4448e8402f6f06ac46e4973
|
|
BLAKE2b-256 checksum How to use checksums |
7b467416268f4a8a23bf1f1dc49c8155749668accf2df4900d573f18035db433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.
Transparency logRelease files / mizanbench-0.1.0-py3-none-any.whl
| Download URL | mizanbench-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58b7926fa3f89db2d8219babe64e6b9594d0878b6a509567a32e113474c81003
|
|
BLAKE2b-256 checksum How to use checksums |
a2c39c96aa0ca3830eff2f52aba6be2c8e4bd7252c0df14f0f99c2f809df4313
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.
Transparency logSecurity for mizanbench 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mizanbench-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.