tau-router
Two Tau extensions for spending across several LLM accounts on a budget:
- router picks the model for each request from a profile: an ordered list,
best first. It moves down a rung when a provider's budget runs low or a model is
rate-limited, and back up when the block clears. A model you pick with
/modelis pinned until you resume routing. - planner gives the model a
delegatetool. Each part of a job runs as a sub-agent on its own model, with its own budget slice and a shell command that says when it's done. A failed check is retried once, one rung up.
Status: 0.1.0, working toward 1.0 (see ROADMAP.md). It works on Tau 0.13.0.
Spend is tracked per process, so two Tau instances don't yet see each other's
spending; 0.2 fixes that.
Install and load
pip install ffwf-tau # Tau 0.13.0 or later, from PyPI
pip install ffwf-tau-router # into the same environment as Tau
tau $(tau-router ext-args) # loads router and planner
Tau 0.13 loads extensions only from files, so tau-router ext-args prints a
-e <path> for each installed module. Nothing is copied into ~/.tau. The
package also declares tau.extensions entry points, which Tau will read once
john/tau #35 lands. Then tau alone finds the extensions, and you enable them in
config.
/plan <goal> is a prompt template that ships in the package. Tau 0.13 reads
templates only from its prompt directories (john/tau #39). Until #39 lands, link
it in yourself if you want it:
ln -s "$(tau-router prompt-dir)/plan.md" ~/.tau/prompts/plan.md
delegate works without the template. Asking for delegation in plain words is
enough.
Configure
The router reads extensions.router in Tau's config.json:
"router": {
"profiles": {"budget": ["claude-haiku-5-5", "mistral-small", "nemotron-super"],
"free-only": ["nemotron-super", "flash-lite"]},
"profile": "budget",
"budgets": {"anthropic": {"cost": 3.00, "period": "month", "anchor_day": 8},
"mistral": {"cost": 5.00, "period": "month", "anchor_day": 1},
"cerebras": {"cost": 15.00, "period": "once"}},
"currency": "$"
}
- Profile names are model names from
models. The router prices each call with that model'scostblock, the prices per million tokens. - A budget is a cap on what this router spends with a provider in each period:
day,monthfromanchor_day(the day of the month it resets, 1–31, in UTC; default 1; in a month too short for it, the last day), oroncesincesince. Your other tools share these accounts, so the cap is an allowance, not a balance. costamounts are in whatever currency your prices are written in.currencyis only the display symbol, and nothing is converted.- A model with no
costblock is unpriced. You can pin it by hand, but the router won't route to it under a budget.
Other keys:
| key | default | what it does |
|---|---|---|
tier |
the first rung | the highest rung the router may use |
persona_cost |
none | a cap on all spending together |
reserve_cost |
0.002 | the headroom a priced rung needs to be chosen |
mode |
"auto" |
"agent" adds select_model, so the model chooses its own rung |
hold_seconds |
60 | how long a refused model is held when the refusal has no Retry-After |
ledger |
<tau home>/ext-state/tau-router.jsonl |
where spending is recorded |
Config keys from before 0.1 (usd, persona_usd, reserve_usd) are refused,
with a message naming each key's new name.
Commands and tools
| what it does | |
|---|---|
/budget |
spend per provider against its cap, the profile's rungs and why any is blocked, and planner slices |
/models |
every configured model by provider, with its price and profile rungs |
/profile [name] |
list profiles, or switch, which also resumes routing after a pin |
/tier [rung] |
show or set the highest rung |
budget_status (tool) |
the same as /budget, as JSON for the model |
delegate (tool) |
run one part as a budgeted sub-agent (planner) |
In the TUI, the status strip shows router: <model> [provider] · <profile or pinned> <spent>/<cap> <period>.
Tests
pip install -e '.[dev]' && pytest. The tests run the extensions against a fake
Tau api and ctx with scripted turns. No model is called. experiments/ holds
the live runs, results (FINDINGS.md) and a sandbox for trying it
(TEST-DRIVE.md).
License
MIT.
Metadata
Release files for ffwf-tau-router 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 |
|---|---|---|---|---|
| ffwf_tau_router-0.1.0.tar.gz | 21.8 kB | With provenance | Details for ffwf_tau_router-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ffwf_tau_router-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ffwf_tau_router-0.1.0-py3-none-any.whl |
Total release size: 41.5 kB
Release files / ffwf_tau_router-0.1.0.tar.gz
| Download URL | ffwf_tau_router-0.1.0.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82966673ce2f1c8a931559124ea9041fe5e9e4a25f4b3a406d6ec437d7101052
|
|
BLAKE2b-256 checksum How to use checksums |
19267dcebaf12280e0bea62004fe437219449a5fe64e66a9da69f562cb0fd0e7
|
| 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 Oct 19, 2026.
Transparency logRelease files / ffwf_tau_router-0.1.0-py3-none-any.whl
| Download URL | ffwf_tau_router-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
05ee8517ca455b8abd572178c8d866e53111dc0a9f3ddde16b9a59142ceb62d5
|
|
BLAKE2b-256 checksum How to use checksums |
6ebede03df9ab6290f2a3bf29c6fb9d31ad8a3c1e7389e500f24e368802b89dd
|
| 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 Oct 19, 2026.
Transparency logSecurity for ffwf-tau-router 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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ffwf_tau_router-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 Oct 19, 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.