Sign inSign up

lemoelink/l3mcore

By lemoelink

•Updated about 2 months ago

Lightweight, highly compatible intelligent routing proxy for OpenAI and Ollama models.

Image
Machine learning & AI
0

2.3K

lemoelink/l3mcore repository overview

⁠l3mcore – Light Easy Mix Of Experts

l3mcore is a lightweight, open-source Mixture of Experts (MoE) intelligent routing proxy. It acts as a drop-in replacement for OpenAI and Ollama APIs, routing each request to the most suitable LLM expert based on semantic understanding of the input.

⁠Features

  • OpenAI & Ollama compatible API – Any client that speaks either protocol works out of the box (Open WebUI, Continue, LangChain, LibreChat, OpenAI SDK, etc.)
  • Real-time token streaming – Low-latency token-to-token streaming via Server-Sent Events (SSE) and ndjson
  • vLLM & OpenAI-compatible support – Connect local or remote vLLM, TGI, LocalAI, or Ollama instances natively
  • Semantic hybrid router – Multi-signal scoring (embeddings + keywords + fuzzy matching) with softmax normalization
  • Multi-backend expert dispatch – Route to Ollama, OpenAI, Anthropic, Gemini (via LiteLLM), local ONNX, or local GGUF models
  • Circuit Breaker & Silent self-correction – Automatic failover and fast circuit tripping for degraded backends
  • Hot-reload – Edit experts.json or config.json and changes apply without restart
  • Rate limiting – Sliding-window per-IP rate limiter (configurable)
  • Security headers & Sanitization – XSS protection, nosniff, DENY framing, prompt injection and canary detection
  • CORS support – Configurable cross-origin resource sharing
  • Health endpoints – System status and expert backend health probes

⁠Available Image Tags

Image TagAcceleration / BaseDescription
latest, cpu, 1.0.0, 1.0.0-cpuCPU (Debian Slim)Default / Recommended. Minimal footprint with maximum portability and compatibility across servers, desktops, and edge devices.
debianCPU (Debian Bullseye)Identical to the default CPU build but includes standard OS libraries, utilities, and debugging tools.
cuda, 1.0.0-cudaNVIDIA GPU (CUDA 12.1.1)Built on NVIDIA CUDA runtime. Use this if running local GGUF/llama.cpp fallback models with GPU acceleration inside the container. Requires --gpus all.
rocm, 1.0.0-rocmAMD GPU (ROCm 6.1.2)Enables GPU acceleration on supported AMD Radeon and Instinct hardware via HIP. Requires passing GPU devices (--device=/dev/kfd --device=/dev/dri).
bundle, 1.0.0-bundleCPUl3mcore + Open WebUI. Runs both the routing proxy and the Open WebUI chat frontend pre-wired in a single container. Ports 8080 (Web UI) and 11435 (API).
ollama, 1.0.0-ollamaCPUl3mcore + Ollama. Runs the Ollama model engine and the l3mcore intelligent router together. Ports 11434 (Ollama) and 11435 (l3mcore).
all-in-one, 1.0.0-all-in-oneCPUComplete AI Stack. Open WebUI (frontend) + l3mcore (intelligent router) + Ollama (model execution). Everything working out of the box in a single docker run.

⁠Quick Start with Docker

⁠1. Standalone Routing Proxy (Default)
docker run -d \
  --name l3mcore \
  -p 11435:11435 \
  -v $(pwd)/config:/app/config \
  -v $(pwd)/models:/app/models \
  -v $(pwd)/data:/app/data \
  lemoelink/l3mcore:latest
⁠2. l3mcore + Open WebUI Bundle
docker run -d \
  --name l3mcore-bundle \
  -p 3000:8080 \
  -p 11435:11435 \
  -v $(pwd)/config:/app/lemoe/config \
  -v open-webui-data:/app/backend/data \
  lemoelink/l3mcore:bundle

Open WebUI will be available at http://localhost:3000.

⁠3. l3mcore + Ollama Bundle
docker run -d \
  --name l3mcore-ollama \
  -p 11434:11434 \
  -p 11435:11435 \
  -v $(pwd)/config:/app/config \
  -v ollama-models:/root/.ollama \
  lemoelink/l3mcore:ollama
⁠4. Complete All-in-One Stack (Open WebUI + l3mcore + Ollama)
docker run -d \
  --name l3mcore-all-in-one \
  -p 3000:8080 \
  -p 11435:11435 \
  -v $(pwd)/config:/app/lemoe/config \
  -v open-webui-data:/app/backend/data \
  -v ollama-models:/root/.ollama \
  lemoelink/l3mcore:all-in-one

Access the complete private AI ecosystem directly at http://localhost:3000.

⁠5. NVIDIA GPU Acceleration (CUDA)
docker run -d \
  --name l3mcore-cuda \
  --gpus all \
  -p 11435:11435 \
  -v $(pwd)/config:/app/config \
  -v $(pwd)/models:/app/models \
  -v $(pwd)/data:/app/data \
  lemoelink/l3mcore:cuda

⁠Docker Compose

Save the following as docker-compose.yml:

version: '3.8'

services:
  l3mcore:
    image: lemoelink/l3mcore:latest
    container_name: l3mcore
    ports:
      - "11435:11435"
    volumes:
      - ./config:/app/config
      - ./models:/app/models
      - ./data:/app/data
    restart: unless-stopped

Start the service:

docker compose up -d

⁠Environment Variables

VariableDefaultDescription
LEMOE_HOST0.0.0.0Bind address
LEMOE_PORT11435Bind port
LEMOE_WORKERS1Gunicorn workers

Tag summary

Content type

Image

Digest

sha256:8275f5426…

Size

416.9 MB

Last updated

about 2 months ago

docker pull lemoelink/l3mcore