Skip to content

optillm

OpenAI-compatible proxy that adds reasoning techniques like MOA and MCTS to any LLM

Permissive (OSI) · Apache-2.0 AI-native

Listed by , founder & editor

86

Health

Thriving

Overview

Stars

4,343

Last commit

8 days ago

Nov 2026

Repository age

2 years

since Aug 2024

Latest version

v0.4.1

Nov 2026

Contributors

–

8 active in 90 days

Releases

15

last 12 months

Language

Python

OptiLLM is an inference proxy that speaks the OpenAI API. You send requests to it instead of your provider, and it applies one of more than 20 techniques at inference time. These include best-of-N, mixture of agents (MOA), MCTS, PlanSearch and CePO. No training or fine-tuning is involved.

You choose a technique by prefixing the model name, for example moa-gpt-4o-mini. It works with any OpenAI-compatible endpoint and supports providers such as OpenAI, Anthropic, Google and Cerebras. Over 100 more models are reachable through LiteLLM. It also has a built-in local inference server. You install it with pip, run it from source, or use Docker images in full, proxy-only and offline variants.

It is written in Python and licensed under Apache-2.0. It is not a replacement for one named commercial product. It fits as a self-hosted layer in front of hosted model APIs, and it can stand in for gateway-style tooling that only forwards requests.

Who it's for

ML engineers working on math and code reasoning

You can test techniques like MCTS or PlanSearch against your existing model by changing the model name.

Skip if: You need a plain gateway for routing, budgets and key management without extra inference passes.

Teams running local or small models

Extra compute at inference time can raise accuracy of a small model without fine-tuning.

Skip if: Latency and token cost matter more than accuracy on hard reasoning tasks.

Researchers comparing inference-time methods

More than 20 techniques sit behind one OpenAI-style API, so benchmarks are easy to repeat.

Skip if: You want to implement your own technique from scratch in a different framework.

The problem it solves

Models often fail on multi-step math, coding and logic problems, and fine-tuning is costly. OptiLLM lets you spend more compute at request time instead. You keep your current model and client code.

Strengths

  • Works with any OpenAI-compatible endpoint, so client code needs only a new base URL
  • More than 20 techniques, from best-of-N to MCTS and MOA
  • Supports OpenAI, Anthropic, Google, Cerebras and 100+ models via LiteLLM
  • Docker images in full, proxy-only and offline variants
  • Apache-2.0 license with 15 releases in the last year

Trade-offs

  • Most techniques make several model calls, which raises latency and token cost
  • Gains are reported on reasoning tasks, not on every kind of prompt
  • It is an optimizer, not a full gateway with team budgets or key management

Self-host optillm

Self-hostable
Yes
Docker Compose
The repository ships a Compose file

Quick start

pip install optillm
export OPENAI_API_KEY="your-key-here"
optillm

From the project's own install instructions. Check the docs for production settings.

Frequently asked questions

Is OptiLLM free?

Yes. It is licensed under Apache-2.0. You still pay your model provider for the API calls it makes.

Can I self-host it?

Yes. Install it with pip, run it from source, or use the Docker image on port 8000.

How do I pick a technique?

Prefix the model name with the technique, such as moa-gpt-4o-mini, when you call the proxy.

Which providers does it support?

OpenAI, Anthropic, Google and Cerebras, plus any OpenAI-compatible endpoint. More than 100 models are available through LiteLLM.

Similar tools in LLM gateways and routers

webchat2api

LLM gateways and routers

398 83 6 months ago Slowing MIT

WindsurfAPI

LLM gateways and routers

3.2k 628 today Thriving MIT

octopus

LLM gateways and routers

2.8k 447 yesterday Thriving AGPL-3.0

aisix

LLM gateways and routers

235 45 today Thriving Apache-2.0

antirion

LLM gateways and routers

432 19 25 days ago Slowing Apache-2.0

ai-gateway

LLM gateways and routers

2.4k 483 today Thriving Apache-2.0