Metadata-Version: 2.4
Name: ai-llm-router
Version: 0.1.0
Summary: Intelligent routing of LLM API calls across multiple providers with automatic fallbacks, cost optimization, and monitoring
Home-page: https://github.com/llm-router/llm-router
Author: LLM Router Team
Author-email: Sherin Joseph <sherin.joseph2217@gmail.com>
Maintainer-email: Sherin Joseph <sherin.joseph2217@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/Sherin-SEF-AI/llm-router
Project-URL: Documentation, https://github.com/Sherin-SEF-AI/llm-router#readme
Project-URL: Repository, https://github.com/Sherin-SEF-AI/llm-router
Project-URL: Issues, https://github.com/Sherin-SEF-AI/llm-router/issues
Project-URL: Changelog, https://github.com/Sherin-SEF-AI/llm-router/blob/main/CHANGELOG.md
Project-URL: Bug Tracker, https://github.com/Sherin-SEF-AI/llm-router/issues
Project-URL: LinkedIn, https://www.linkedin.com/in/sherin-roy-deepmost/
Keywords: llm,ai,router,openai,anthropic,api,fallback,cost-optimization
Classifier: Development Status :: 4 - Beta
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.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.8.0
Requires-Dist: openai>=1.0.0
Requires-Dist: anthropic>=0.7.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: redis>=4.0.0
Requires-Dist: prometheus-client>=0.16.0
Requires-Dist: click>=8.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: tenacity>=8.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# AI LLM Router

Intelligent routing of LLM API calls across multiple providers with automatic fallbacks, cost optimization, caching, health monitoring, and retry logic.

## Features

- **Multi-Provider Support**: OpenAI, Anthropic, and extensible for other providers
- **Intelligent Routing**: Priority-based, cost-optimized, and round-robin strategies
- **Automatic Fallbacks**: Seamless failover between providers
- **Cost Optimization**: Track and optimize API usage costs
- **Caching**: Redis-based response caching for improved performance
- **Health Monitoring**: Real-time provider health checks
- **Retry Logic**: Configurable retry mechanisms with exponential backoff
- **Async Support**: Full async/await support for high-performance applications
- **Streaming**: Support for streaming responses
- **CLI Interface**: Command-line tool for easy integration
- **Metrics**: Prometheus-compatible metrics collection

## Installation

```bash
pip install ai-llm-router
```

## Quick Start

```python
from llm_router import LLMRouter, RouterConfig
from llm_router.providers import OpenAIProvider, AnthropicProvider

# Configure providers
config = RouterConfig(
    providers=[
        OpenAIProvider(api_key="your-openai-key"),
        AnthropicProvider(api_key="your-anthropic-key")
    ],
    strategy="priority"
)

# Create router
router = LLMRouter(config)

# Make a request
response = await router.chat_completion(
    messages=[{"role": "user", "content": "Hello, world!"}],
    model="gpt-4"
)
```

## CLI Usage

After installation, you can use the CLI:

```bash
ai-llm-router chat --provider openai --model gpt-4 --message "Hello, world!"
```

## Documentation

For detailed documentation, examples, and API reference, visit our [GitHub repository](https://github.com/Sherin-SEF-AI/llm-router).

## Author

**Sherin Joseph** - [LinkedIn](https://www.linkedin.com/in/sherin-roy-deepmost/)

## License

MIT License - see [LICENSE](LICENSE) file for details. 
