Any-LLM

Any-LLM

★ 3.8 🔖 1200 saves 💰 Free GitHub

Any-LLM is an open-source Python library from Mozilla AI with 2,200+ stars on GitHub that lets you talk to any LLM provider — OpenAI, Anthropic, Mistral, Ollama and more — through one single, unified interface.

Overview

Every LLM provider ships its own SDK, request format and quirks, so switching models usually means rewriting integration code and re-testing everything downstream. Any-LLM, under very active development in 2026, removes that coupling: write your completion calls once against its unified API, then switch between OpenAI, Anthropic, Azure and Microsoft Foundry, Mistral, local Ollama models and other providers by configuration rather than code changes. The library targets Python 3.11+, is published on PyPI as any-llm-sdk, and is documented on Mozilla AI’s docs site. Because it comes from Mozilla’s AI team, the emphasis is on openness and portability — no lock-in to a single vendor’s ecosystem, and a clean abstraction that treats frontier APIs and self-hosted open models as interchangeable backends. For teams that benchmark models against each other or hedge against provider outages and pricing changes, that portability is the entire point.

Key Features

  • One interface, many providers – OpenAI, Anthropic, Azure, Mistral, Ollama and more behind a single API.
  • Swap by configuration – change models or providers without rewriting application code.
  • Local and cloud equal – treat self-hosted open models and hosted APIs as interchangeable backends.
  • PyPI package – install any-llm-sdk for Python 3.11 and later.
  • Mozilla AI project – open governance, full documentation and active test suites.
  • Apache 2.0 licensed – free for commercial and open-source use alike.

💳 Pricing

Any-LLM is free and open source under the Apache License 2.0. You only pay the underlying providers for whatever API usage you route through it; the library itself has no paid tier.

Who Is It For

Python developers and AI platform teams who build on multiple LLM providers and want model portability — for benchmarking, cost control, fallback routing or avoiding vendor lock-in.

🚀 Visit Any-LLM Official Site

🚩 Report an issue