ModelSpend
Open-source cost control for private projects and small teams — your OpenAI, Anthropic, Google, and xAI keys.
Tag spend, hard budgets before the call, model="auto" routing, and optional shadow evals that learn which cheaper models are safe from your real traffic.
What you get
ModelSpend sits in front of agents and code that already speak OpenAI-compatible APIs. Built because private projects still need a bill with project names on it.
/v1/chat/completions on localhost (or a small shared server with a token). Point any agent at it with model="auto".
Try shadow
Install editable, turn on a capped shadow sample (default $5 / month ceiling), use your tools as usual, then ask what you would save. Shadow stays off until you enable it.
git clone https://github.com/rmencke2/modelspend.git
cd modelspend
python3 -m venv .venv && source .venv/bin/activate
python -m pip install --upgrade pip && pip install -e .
modelspend shadow set --rate 0.05 --budget 5
modelspend shadow on
# ... use your tools through ModelSpend ...
modelspend savings
No keys yet? modelspend preview "Classify this ticket" --catalog synthetic --assume-keys still works for a dry routing preview.