One interface for every LLM. One Best Answer.

Ask one model, compare many, or synthesize one cross-checked answer.

LLMSwap is an open-source Python SDK, CLI, and local Arena for working directly with OpenAI, Anthropic, Gemini, Cohere, Perplexity, IBM watsonx, Groq, Ollama, xAI, and Sarvam through one interface. Bring your own provider keys and keep control of model selection and routing.

New in 5.7.0: Best Answer

Best Answer generates two to five independent responses and synthesizes one decision-ready result. Agreement, disagreements, cautions, token usage, latency, and the judge model remain visible.

llmswap --provider openai best \
  "Which rollout plan has the lowest operational risk?"

Same-provider synthesis is the privacy-aware default. Sharing candidate output with a different provider is blocked until explicitly enabled. Model agreement is a cross-check signal, not a guarantee of truth.

What you can do

Ask

Use any configured provider from the same Python API or CLI.

Compare

Review selected models side by side in the local browser Arena.

Synthesize

Turn independent drafts into one Best Answer without hiding disagreement.

Connect

Use function calling and trusted local stdio MCP servers.

Diagnose

Check installation, credentials, models, provider SDKs, and MCP readiness.

Control

Use direct provider accounts, fallback, optional caching, and usage visibility.

Quick install

# pip
python -m pip install llmswap

# Homebrew
brew tap llmswap/tap
brew install llmswap

# Verify the installation
llmswap --version
llmswap doctor

Set one provider key and ask:

export OPENAI_API_KEY="your-key"
llmswap --provider openai ask "Explain this proposal in plain language"

For the local Arena:

python -m pip install "llmswap[web]"
llmswap web

Supported providers

Provider Default model
OpenAI gpt-5.6
Anthropic claude-sonnet-5
Gemini gemini-3.6-flash
Cohere command-a-plus-05-2026
Perplexity sonar-pro
IBM watsonx ibm/granite-4-h-small
Groq openai/gpt-oss-120b
Ollama qwen3.5:9b
xAI grok-4.5
Sarvam sarvam-105b

Model defaults were audited on August 3, 2026. Explicit provider model IDs are passed through, while provider availability and account access remain controlled by the provider.

Start here


Copyright © 2026 LLMSwap. Distributed under the MIT license.

This site uses Just the Docs, a documentation theme for Jekyll.