⚡ New — Kimi K3 is live: bring your own Moonshot key →
Documentation

Migrate from LiteLLM

← All migration guides

Gatewayone-line swap

Drop the self-hosted proxy, or add BharatRouter as a model in your LiteLLM config.

The change

Before — LiteLLM

# self-hosted LiteLLM proxy
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:4000",
    api_key="sk-litellm-...",
)

After — BharatRouter

# managed — no proxy to run
from openai import OpenAI

client = OpenAI(
    base_url="https://api.bharatrouter.com/v1",
    api_key="br-...",
)

What maps to what

LiteLLMBharatRouter
model_list in config.yamlThe hosted catalog + BYOK for your own providers
router_settings / fallbacksSaved Collections + circuit-breaker failover
context_window_fallbacksFailover chain steps (config adapter on the roadmap)
Self-managed Postgres + RedisFully managed — nothing to host

What you gain

  • No proxy to run, patch or scale; routing, budgets and failover are managed.
  • India residency + INR billing without building it yourself.

Watch out for

  • Want to keep LiteLLM? Add BharatRouter as an openai/… model with a br-… key and your base_url set to the gateway.
  • LiteLLM's YAML fallbacks don't import yet — rebuild them as a Collection.

Stuck on a migration? Email [email protected], see the FAQ, or keep your accounts and rates with BYOK.