Lattice
Skip to content

RouteLLM

librarySelf-hostedgithub.com

RouteLLM is a self-hosted library in the Routing & Gateways layer of the AI stack. Learned router that cuts cost by matching difficulty to model size.

By Facts verifiedmethod

Licence
Apache-2.0
Language
Python
Cost
free
Owned by
ML PlatformApplied Engineering

Use RouteLLM when

Cutting cost by matching query difficulty to model size, with a learned router.

Skip RouteLLM when

You cannot evaluate the quality you would be trading away.

Decides which model answers, and what it costs. See every routing tool.

Badge this entry
Lattice badge: RouteLLM verified 2026-09
[![RouteLLM on Lattice: verified 2026-09](https://lattice.kunjshah.in/routing-gateways/routellm/badge.svg)](https://lattice.kunjshah.in/routing-gateways/routellm)

Rules of thumb

  • Route on measured quality, not on price alone. A cheaper model that fails your eval set is not cheaper.
  • A gateway is in the request path, so it adds latency to every call. Measure that overhead before you add policy to it.
  • Fallbacks that switch models silently change your output. Log which model answered every request, or you cannot debug quality.

Quick answers

Is RouteLLM open source?
Yes. RouteLLM is open source under the Apache-2.0 licence. It is free to use.
What are the alternatives to RouteLLM?
The closest alternatives to RouteLLM are Martian and Not Diamond.

Ask an AI about this page

Opens the assistant with this page’s link and a question already filled in.

Compared in

Reading on routing

Alternatives to RouteLLM

Listed as an alternative to

  • Martian
  • Not Diamond

Also in routing

  • LiteLLM
  • Portkey
  • Cloudflare AI Gateway
  • OpenRouter
  • Martian
  • Envoy AI Gateway
  • Bifrost
  • Not Diamond
  • TrueFoundry