The name reads as "empty LLM": mt is the author's initials, and it also
sounds like "empty".
mtllm is a tiny LLM proxy in Go, a much lighter take on LiteLLM. It serves
both the OpenAI Chat Completions API (/v1/chat/completions) and the
Anthropic Messages API (/v1/messages), and routes each request to an
OpenAI-compatible or Anthropic provider named in one config.yml. It also
passes OpenAI Embeddings (/v1/embeddings) through to OpenAI-compatible
providers. When the client's format and the provider's differ, it translates
requests, responses and streams; when they match, it passes the body through
with only the model rewritten. It serves chat and embeddings only: a request
that asks for tools gets a 400 tool calls are not supported. It is one
static binary with no database, UI, retries or fallbacks.
Write a config.yml (full reference in docs/configuration.md):
client_keys:
- ${MTLLM_CLIENT_KEY}
providers:
openrouter:
api_key: ${OPENROUTER_API_KEY}
models:
sonnet: openrouter/anthropic/claude-sonnet-4.5Run it with Docker:
docker build -t mtllm .
docker run --rm -p 8080:8080 \
-v "$PWD/config.yml:/app/config.yml:ro" \
-e MTLLM_CLIENT_KEY -e OPENROUTER_API_KEY \
mtllmOr with Go (1.27 or newer):
go run . -config config.ymlCheck it:
curl -s localhost:8080/health
curl -s localhost:8080/v1/chat/completions \
-H "Authorization: Bearer $MTLLM_CLIENT_KEY" -H 'Content-Type: application/json' \
-d '{"model":"sonnet","messages":[{"role":"user","content":"Hi"}]}'- Configuration:
config.yml, presets, aliases, auth - Translation: what maps between OpenAI and Anthropic
- Known issues