aicoolies logo
llama-swap logo
llama-swap logo

llama-swap

Hot-swap between local LLM models via OpenAI-compatible API

open sourceupdated Jul 8, 2026

llama-swap is an open-source tool that manages multiple local LLM models behind a single OpenAI-compatible API endpoint. It automatically loads and unloads models on demand, letting developers hot-swap between different models without restarting services. With 3.1K+ GitHub stars, it solves the common pain point of running multiple specialized models on limited hardware.

llama-swap is a transparent HTTP proxy server written in Go that enables automatic hot-swapping between multiple LLM inference servers on a single machine. It works with any OpenAI and Anthropic API compatible backend — llama.cpp, vLLM, Ollama, and others — presenting a unified API endpoint while dynamically loading and unloading models based on incoming requests. When a request arrives with a specific model name, llama-swap checks which upstream server should handle it and automatically starts, stops, or swaps backends as needed.

The project ships as a single binary with zero external dependencies, making deployment remarkably simple across Linux, macOS, Windows, and FreeBSD. Configuration is handled through a single YAML file that maps model names to their corresponding server launch commands and parameters. For basic setups, llama-swap manages one model at a time to conserve GPU memory. Advanced users can leverage the groups feature to run multiple models simultaneously when hardware allows, with configurable memory limits and automatic eviction policies for resource management.

llama-swap is particularly valuable for developers and teams running local AI infrastructure who need access to multiple specialized models but lack the GPU memory to keep them all loaded. Rather than manually stopping and starting servers, llama-swap handles the lifecycle automatically with minimal latency overhead. The project is open-source under the MIT license and provides pre-built binaries for all major platforms. It integrates seamlessly with existing OpenAI-compatible client applications, requiring no code changes on the client side — just point your application at the llama-swap endpoint and reference model names as defined in the configuration.

Pricing

Free and open-source

full pricing breakdown →

Platforms

Self-hosted (cross-platform)

Categories

Tags

Use Cases

Ollama logo

Ollama

Run LLMs locally with one command

Tool for running large language models locally on your machine with a simple CLI interface. Download and run Llama 3, Mistral, Gemma, Phi, Code Llama, and dozens of other open-source models with a single command. Features model management, GPU acceleration (NVIDIA/AMD/Apple Silicon), OpenAI-compatible API server, Modelfile for customization, and multi-model switching. Ideal for offline AI development, privacy-sensitive use cases, and local testing. 120K+ GitHub stars.

Open Source
LocalAI logo

LocalAI

Free, open-source local AI inference engine

LocalAI is an open-source local AI inference engine with 44K+ GitHub stars that runs LLMs, image generation, audio transcription, and embeddings entirely on consumer hardware without GPU requirements. Provides an OpenAI API-compatible REST endpoint as a drop-in replacement, supporting 1000+ models including LLaMA, Mistral, and Phi families. Features include text-to-speech, speech-to-text, function calling, constrained grammar output, and multi-modal capabilities all running locally.

Open Source
Open WebUI logo

Open WebUI

Self-hosted AI platform with ChatGPT-like interface for local and cloud LLMs.

Extensible, self-hosted AI platform with 290M+ Docker pulls and 124K+ GitHub stars. Supports Ollama, OpenAI-compatible APIs, and any Chat Completions backend. Features built-in RAG, multi-user RBAC, voice/video calls, Python function workspace, model builder, and web browsing. Runs entirely offline with enterprise features including SSO and audit logging.

free

Related Tools

computed discovery: shared active categories · kept separate from editor-verified Alternatives

Claude Code logo

Claude Code

Top Pick

Anthropic's agentic coding CLI

Anthropic's agentic CLI coding tool that delegates complex tasks to Claude directly from the terminal. Understands entire codebases via automatic context gathering, edits multiple files, runs shell commands, and manages Git workflows autonomously. Supports CLAUDE.md for persistent project instructions, integrates with VS Code and JetBrains, and uses Claude Opus/Sonnet with extended thinking for complex architectural decisions. Built for terminal-first developers.

paid
Ghostty logo

Ghostty

Top Pick

Fast, native terminal emulator

GPU-accelerated terminal emulator written in Zig by Mitchell Hashimoto (HashiCorp co-founder). Native UI rendering on macOS and Linux. Supports ligatures, true color, Kitty graphics protocol, and splits/tabs. Configurable via a simple key-value file with sensible defaults. Open-source with 20K+ GitHub stars and a focus on correctness, speed, and minimal resource usage. Growing as a modern alternative to iTerm2, Alacritty, and WezTerm.

Open Source
Grok logo

Grok Build

Top Pick

xAI's terminal coding agent with parallel subagents and worktree-aware automation

Grok Build is xAI's terminal-first coding agent for planning, editing, testing, and reviewing code from a local CLI. The early beta exposes subagent controls, worktree mode, headless JSON output, best-of-N parallel attempts, sandbox profiles, and experimental memory. It fits developers comparing Claude Code, Codex, and Gemini CLI for local agentic workflows with deeper parallel execution.

paid
Codex logo

Codex

Top Pick

OpenAI coding agent for app, editor, terminal, and cloud work

Codex is OpenAI's coding agent for software development across the Codex app, editor, terminal, and cloud tasks. It helps write, review, debug, refactor, and automate code, with ChatGPT plan access for managed surfaces and API-key usage for CLI, SDK, and IDE workflows. The open-source CLI and SDK support local repository work, while cloud features add GitHub review, Slack/Linear integrations, worktrees, skills, MCP, and automations.

freemium
Cilium logo

Cilium

eBPF-based networking, security, and observability for Kubernetes

Cilium is a CNCF Graduated, Apache-2.0 project for Kubernetes networking, security, and observability using eBPF. It can replace kube-proxy, enforce identity-aware L3-L7 network policies, and add Hubble flow observability plus Tetragon runtime-security signals. Current source checks support GKE Dataplane V2 using Cilium/eBPF and Azure CNI Powered by Cilium for AKS.

Open Source
OrbStack logo

OrbStack

Fast and lightweight Docker Desktop alternative for macOS

OrbStack is a macOS application that replaces Docker Desktop with lightweight container and Linux VM management. Its docs emphasize fast starts, lower CPU and memory overhead, and native macOS integration with menu bar controls, file sharing, and network access to containers by name, with exact gains depending on workload. Supports Docker, Kubernetes, and full Linux VMs.

freemium

FAQ

What is llama-swap?

llama-swap is an open-source tool that manages multiple local LLM models behind a single OpenAI-compatible API endpoint. It automatically loads and unloads models on demand, letting developers hot-swap between different models without restarting services. With 3.1K+ GitHub stars, it solves the common pain point of running multiple specialized models on limited hardware.

Is llama-swap free?

Yes — llama-swap is open source and free to use. Free and open-source

Is llama-swap open source?

Yes — llama-swap is open source.

What are the best llama-swap alternatives?

The top editor-verified llama-swap alternatives are Ollama, LocalAI, Open WebUI.