Plan model fallback chains from capability, cost, and health data. Python port of @mukundakatta/model-fallback-planner.
Project description
model-fallback-planner-py
Plan model fallback chains from capability, cost, and health data. Pure Python, zero deps. Python port of @mukundakatta/model-fallback-planner.
pip install model-fallback-planner-py
from model_fallback_planner import plan_fallbacks, choose_fallback
models = [
{"name": "claude-sonnet", "capabilities": ["chat", "tools"], "cost": 3, "priority": 5, "healthy": True},
{"name": "claude-haiku", "capabilities": ["chat", "tools"], "cost": 1, "priority": 3, "healthy": True},
{"name": "gpt-5", "capabilities": ["chat"], "cost": 5, "priority": 8, "healthy": True},
]
choose_fallback(models, capabilities=["tools"], max_cost=4)
# FallbackChoice(model={...claude-sonnet...}, chain=[...claude-sonnet, claude-haiku])
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file model_fallback_planner_py-0.1.0.tar.gz.
File metadata
- Download URL: model_fallback_planner_py-0.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3fa8bb344589c7c3f95a228c54ccfb88ab5f16e61adb282be6a2c30e5a75883
|
|
| MD5 |
dcf66f7e1dcc75174df110359cbd828f
|
|
| BLAKE2b-256 |
9f173bd67b632cab73f8ba1906e3929e86df126150509e70e69ab8444817a42e
|
File details
Details for the file model_fallback_planner_py-0.1.0-py3-none-any.whl.
File metadata
- Download URL: model_fallback_planner_py-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63c5ae84f320b2040913896e3a55f07ce911fa781b4711ede4601ba670d329d2
|
|
| MD5 |
f6d7fcc375418d902949d3b12075beb2
|
|
| BLAKE2b-256 |
14c52ac6ff3dcb1bdbb505ff8bbcf24de363a19bdf289d2af62768fc630b38d2
|