Metadata-Version: 2.4
Name: model-fallback-planner-py
Version: 0.1.0
Summary: Plan model fallback chains from capability, cost, and health data. Python port of @mukundakatta/model-fallback-planner.
Project-URL: Homepage, https://github.com/MukundaKatta/model-fallback-planner-py
Project-URL: Issues, https://github.com/MukundaKatta/model-fallback-planner-py/issues
Project-URL: Source, https://github.com/MukundaKatta/model-fallback-planner-py
Project-URL: JS sibling, https://www.npmjs.com/package/@mukundakatta/model-fallback-planner
Author-email: Mukunda Katta <mukunda.vjcs6@gmail.com>
License: MIT
License-File: LICENSE
Keywords: fallback,llm,models,reliability,routing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# 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`](https://www.npmjs.com/package/@mukundakatta/model-fallback-planner).

```bash
pip install model-fallback-planner-py
```

```python
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
