🔀 llm-failover-router
Resilient Multi-Provider LLM Fallback Router for High-Availability AI Applications.
📌 Why llm-failover-router?
When LLM APIs experience outages, rate-limits (HTTP 429), or network timeouts, your application crashes or hangs.
llm-failover-router provides a zero-overhead, multi-provider fallback strategy:
If Provider A (e.g., DeepSeek) fails or times out, it seamlessly switches to Provider B (OpenAI) or Provider C (Local Ollama) in milliseconds!
⚡ Quick Start
pip install llm-failover-router
Usage Example:
from llm_failover_router import LLMRouter, ProviderConfig
# Configure providers with priority order
router = LLMRouter(
providers=[
ProviderConfig(name="deepseek", api_key="sk-...", model="deepseek-chat"),
ProviderConfig(name="openai", api_key="sk-...", model="gpt-4o-mini"),
ProviderConfig(name="ollama", endpoint="http://localhost:11434", model="llama3"),
],
timeout_seconds=5.0
)
# Executes primary provider; automatically falls back if API fails!
response = router.generate("Explain quantum computing in simple terms.")
print(f"Provider Used: {response.provider_used}")
print(f"Content: {response.content}")
👤 Author
Mohamed Shaban (محمد شعبان العتماني) — Applied AI Engineer
🌐 Website: msalatmani.org | 📧 Email: msalatmani@gmail.com
Metadata
Release files for llm-failover-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 |
|---|---|---|---|---|
| llm_failover_router-0.1.0.tar.gz | 3.7 kB | Without provenance | Details for llm_failover_router-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_failover_router-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for llm_failover_router-0.1.0-py3-none-any.whl |
Total release size: 7.6 kB
Release files / llm_failover_router-0.1.0.tar.gz
| Download URL | llm_failover_router-0.1.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aff96fe03bd8179816448f1e435bcd1ff7425d2e4335af0e7ed86f8732400b70
|
|
BLAKE2b-256 checksum How to use checksums |
34db456ea95c3e0868b279a6074cf574b801ac241a5e3a401da8be5cf6fd51d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / llm_failover_router-0.1.0-py3-none-any.whl
| Download URL | llm_failover_router-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3686c85e6b5a5e46298063c09892d1f8cdc86486738fbadacb52c0e1cfe5905a
|
|
BLAKE2b-256 checksum How to use checksums |
6f62fca277b27193d5ee6fb28f652e78aec2eb6358f4508e144c7c207ef67e94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for llm-failover-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.
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.