Research CommonsResearch Commons
llm-rotate/Installation

Installation

Install llm-rotate and its bundled provider SDKs.

llm-rotate is published to PyPI and ships with the vendor SDKs it needs (openai, anthropic, google-genai, google-auth) as direct dependencies — you don't install those separately.

Requirements

  • Python 3.10+ (tested on 3.10, 3.11, and 3.12)
  • An API key for at least one supported provider

Install

pip install llm-rotate

Optional extras

The base install gives you the full core: unified chat(), key rotation, fallback, and Google multimodal. Everything below is opt-in — install an extra only when you want that capability. The core API surface is identical whether or not you install them.

# Redis-backed distributed state — share key health across workers/processes
pip install "llm-rotate[redis]"
 
# OpenTelemetry spans + metrics (no-op until installed)
pip install "llm-rotate[otel]"
 
# AWS Bedrock provider (Converse API)
pip install "llm-rotate[bedrock]"
 
# YAML config files for configure_from_file()
pip install "llm-rotate[yaml]"
 
# Read-only monitoring control server (powers the dashboard)
pip install "llm-rotate[server]"

You can combine them, e.g. pip install "llm-rotate[redis,server]".

Azure OpenAI needs no extra

The azure_openai provider rides on the core openai dependency, so it works out of the box with the base install — see Providers.

Development install

To work on the package itself, clone the repo and install in editable mode with the dev extras:

git clone https://github.com/Research-Commons/llm-rotate
cd llm-rotate
python -m pip install -e ".[dev]"

The dev extras pull in the test, lint, and type-check toolchain. CI runs:

ruff check .
ruff format --check .
mypy src/ --strict
pytest --ignore=tests/e2e --cov=llm_rotate --cov-fail-under=90

Verify

import llm_rotate
print(llm_rotate.__version__)

Once installed, head to the Quickstart.