About this project
Unified LLM Engine is a Python library that abstracts interactions with multiple large language model (LLM) providers including OpenAI, Anthropic, Gemini, Azure, AWS Bedrock, and Ollama. It offers a unified interface so developers can switch or combine providers without changing code. Key features include automatic provider fallbacks when one fails, real-time cost and token usage tracking, intelligent response caching to reduce redundant calls, streaming support for real-time output, and async-first design for high performance. The engine routes requests intelligently based on model availability, load, and configured preferences. Users can initialize the engine with environment variables for API keys and optionally enable caching or set default models. Cost summaries are available per model and aggregated across sessions. The architecture separates core routing logic from individual provider implementations, making it extensible. Examples and tests are included, and the project follows MIT licensing. Ideal for applications requiring resilience, cost control, or multi-provider flexibility in LLM integrations.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.