Skip to main content

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

Metadata

Release files for model-fallback-planner-py 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for model-fallback-planner-py 0.1.0
File Size Uploaded Provenance Actions
model_fallback_planner_py-0.1.0.tar.gz 3.2 kB Without provenance Details for model_fallback_planner_py-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for model-fallback-planner-py 0.1.0
File Interpreter ABI Platform Actions
model_fallback_planner_py-0.1.0-py3-none-any.whl Python 3 none any Details for model_fallback_planner_py-0.1.0-py3-none-any.whl

Total release size: 6.5 kB

Release files / model_fallback_planner_py-0.1.0.tar.gz

Download URL model_fallback_planner_py-0.1.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d3fa8bb344589c7c3f95a228c54ccfb88ab5f16e61adb282be6a2c30e5a75883
BLAKE2b-256 checksum
How to use checksums
9f173bd67b632cab73f8ba1906e3929e86df126150509e70e69ab8444817a42e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / model_fallback_planner_py-0.1.0-py3-none-any.whl

Download URL model_fallback_planner_py-0.1.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63c5ae84f320b2040913896e3a55f07ce911fa781b4711ede4601ba670d329d2
BLAKE2b-256 checksum
How to use checksums
14c52ac6ff3dcb1bdbb505ff8bbcf24de363a19bdf289d2af62768fc630b38d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for model-fallback-planner-py 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page