any-llm-sdk
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, uses official provider SDKs for compatibility, and solves a real pain point for multi-provider LLM applications. Low install friction and permissive licensing make it a straightforward addition. Install it if you need to support multiple LLM providers or want the flexibility to switch between them without code changes.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Python 3.11 or newer required; API keys for chosen providers must be set as environment variables or passed directly.
- Low install friction with a pure-Python wheel and seven runtime dependencies.
- Active maintenance with a release 3 days old and 2153 repository stars.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions; you must include a copy of the license and note any modifications.
last release 2026-08-11 (3 days) · last repo commit 2026-08-14 · 2,153 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 157,653 downloads/mo, #10,748 on PyPI
Alternatives
Verify before relying
pip install 'any-llm-sdk[mistral]'
from any_llm import completion
import os
os.environ['MISTRAL_API_KEY'] = 'your-key'
response = completion(
model='mistral-small-latest',
provider='mistral',
messages=[{'role': 'user', 'content': 'Hello!'}]
)
print(response.choices[0].message.content)- Whether all listed providers (Azure/Microsoft Foundry, Mistral, Ollama, etc.) are equally well-maintained and tested.
- Performance characteristics and latency overhead of the unified interface compared to direct provider SDKs.
- Streaming and tool-use feature parity across all supported providers.
What it is and what it does
any-llm-sdk is a Python wrapper that abstracts away the differences between multiple LLM provider APIs—OpenAI, Anthropic, Mistral, Ollama, and others—into a single, consistent interface. Instead of learning and maintaining separate code paths for each provider, you call the same `completion()` function and change only the provider and model name strings to switch between them. It leverages each provider's official SDK under the hood, so compatibility is tied directly to those libraries.
The package offers two usage patterns: stateless direct functions for scripts and notebooks, and a reusable `AnyLLM` class for production applications that need connection pooling and multiple requests. It supports streaming, the OpenAI-style Responses API, and tool calling where providers implement them. The main dependencies are pydantic, openai, anthropic, rich, httpx, and typing_extensions, making it lightweight for a multi-provider abstraction.
Use it for
- Switch LLM providers in production without rewriting application code—useful when costs, availability, or performance favor a different provider.
- Build multi-provider fallback logic: try one provider, fall back to another if it fails or is unavailable.
- Prototype and experiment with different LLM models and providers in notebooks without changing imports.
- Migrate from LiteLLM to a library that uses official SDKs directly, preserving existing API keys and environment variables.
- Support multiple LLM backends in a single application, letting users or deployments choose their preferred provider.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, uses official provider SDKs for compatibility, and solves a real pain point for multi-provider LLM applications. Low install friction and permissive licensing make it a straightforward addition. Install it if you need to support multiple LLM providers or want the flexibility to switch between them without code changes.
Install
any-llm-sdk on PyPI
Before you install
Low install friction with a pure-Python wheel and seven runtime dependencies. Active maintenance with a release 3 days old and 2153 repository stars. Requires Python 3.11 or newer.
Python 3.11 or newer required; API keys for chosen providers must be set as environment variables or passed directly.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions; you must include a copy of the license and note any modifications.
Quickstart
pip install 'any-llm-sdk[mistral]'
from any_llm import completion
import os
os.environ['MISTRAL_API_KEY'] = 'your-key'
response = completion(
model='mistral-small-latest',
provider='mistral',
messages=[{'role': 'user', 'content': 'Hello!'}]
)
print(response.choices[0].message.content)
Verify before relying
- Whether all listed providers (Azure/Microsoft Foundry, Mistral, Ollama, etc.) are equally well-maintained and tested.
- Performance characteristics and latency overhead of the unified interface compared to direct provider SDKs.
- Streaming and tool-use feature parity across all supported providers.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packagespydanticopenaiopenresponses-typesanthropicrichhttpxtyping_extensions |
| Maintenance | Actively maintained 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 157,653 / month, #10,748 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: any_llm_sdk-1.25.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “switch between llm providers”
- any-llm-sdkProvides a unified Python interface to communicate with multiple LLM…
- llama-index-llms-openai-likeProvides a thin wrapper to use OpenAI-compatible APIs (including…
- llama-index-llms-litellmIntegrates LiteLLM with LlamaIndex to provide unified access to…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also litellm-enterprise · chatlas · unclecode-litellm · llama-index-llms-litellm · genai-prices · openrouter · astra-assistants · anthropic · fhlmi