Skip to content

Best PicksGPU

Best LLM Gateways for Local AI in 2026

The best free, self-hosted LLM gateways for local AI in 2026: LiteLLM, llama-swap, Bifrost and Portkey's AI Gateway, compared on what they do, how they run and which home or small-office setup each one suits.

By , Buying Guides & Peripherals Editor

4 min read

Best LLM Gateways for Local AI in 2026

The picks are based on each project's GitHub README and documentation, read on 2 December 2026. Speed claims made by the projects themselves are labelled as their own.

An LLM gateway gives every app on your network one OpenAI-compatible address and one list of model names, wherever the models actually run. That's useful once you have more than one model server, such as Ollama on a gaming PC, LM Studio on a laptop and llama.cpp on a second GPU box, or when you want to stop pasting server addresses into every chat app and coding tool. All four picks below have free, open source versions you can host yourself.

Quick picks

Pick

Best for

Runs as

Licence

LiteLLM

Most people with several model servers

Python proxy, default port 4000 in its docs

Open source core; some enterprise features under a commercial licence

llama-swap

One GPU PC with more models than VRAM

Single Go binary

MIT

Bifrost

A fast single-binary gateway with a web UI

Go; npx or Docker, port 8080

Apache 2.0

Portkey AI Gateway

Node.js users who want guardrails and routing rules

Node.js; npx, port 8787

MIT

1. LiteLLM: best all-rounder

LiteLLM describes itself as an open source AI gateway that calls over 100 LLM providers in the OpenAI format. Its proxy server is the most complete option here for home and small-office setups. It has named prefixes for local servers (ollama_chat/ for Ollama and lm_studio/ for LM Studio) and load balancing across several deployments of the same model. Routing strategies include the default simple-shuffle, least-busy and latency-based-routing, and the config also covers fallbacks, retries and priority order.

That makes it a good fit for spreading one model across two GPU PCs, or for keeping a smaller machine as a backup. A master key protects the proxy. Per-user virtual keys, spend tracking and the Admin UI need a PostgreSQL database, which is extra work for a single-user home lab.

Choose it if: you have two or more model servers or PCs, or want local and cloud models behind one address. Our LiteLLM setup guide walks through a config.

2. llama-swap: best for one GPU PC

llama-swap isn't a routing gateway in the same sense. It loads and unloads models on demand, which is what most single-GPU home setups actually need. When a request names a model, it starts the right server and replaces whatever was running. Its README says it works with any OpenAI- and Anthropic-compatible server and is best supported with llama.cpp's llama-server. It also lists vLLM, stable-diffusion.cpp and ComfyUI among the servers it can switch between.

It is one Go binary with one config file. Features include ttl to unload idle models and free VRAM, a matrix option for running chosen models together, API keys, a web UI with a playground and logs, and a /metrics endpoint with GPU metrics. Docker images are listed for NVIDIA CUDA 12, CUDA 13 and Vulkan.

Choose it if: you have one PC whose graphics card can't hold all your models at once. See how to hot-swap local LLMs with llama-swap and our LiteLLM vs llama-swap comparison.

3. Bifrost: best single-binary gateway with a web UI

Maxim's Bifrost is an AI gateway written in Go. Its README describes it as high-performance and says it unifies 23 or more providers, including Ollama, behind one OpenAI-compatible API. You can start it with npx -y @maximhq/bifrost or docker run -p 8080:8080 maximhq/bifrost and configure it in a built-in web interface at http://localhost:8080; the README says it needs zero configuration to deploy. The README lists automatic fallbacks, load balancing, semantic caching, virtual keys with usage tracking and rate limits, and Prometheus metrics.

Some features are reserved for paid enterprise deployments. The README names adaptive load balancing, clustering, guardrails and an MCP gateway. The open source version is still enough for a home setup that wants a point-and-click gateway.

Choose it if: you want a gateway you can set up from a browser and would rather not run a Python service.

4. Portkey AI Gateway: best for routing rules and guardrails

Portkey's open source AI Gateway runs with npx @portkey-ai/gateway, which needs Node.js. According to its README, the API then runs at http://localhost:8787/v1, with a console at /public/. The README lists automatic retries, fallbacks, load balancing, conditional routing and guardrails, and its provider table includes Ollama. The project says the gateway has a tiny footprint and under 1ms of added latency. Those are Portkey's own figures, not independent results.

It is built mainly for app developers and also comes as a hosted service. Portkey's README says its core enterprise gateway is being merged into the open source project with a 2.0 release that was still in pre-release when we checked. Expect the feature list to change.

Choose it if: you build your own local AI apps and want request routing rules or guardrails in the gateway.

Which should you pick?

  • One gaming or AI PC, many models: llama-swap.

  • Two or more PCs or model servers: LiteLLM, optionally with llama-swap running on each GPU box.

  • You want a web UI and no Python: Bifrost.

  • You're writing your own app and want routing rules: Portkey AI Gateway.

None of these gateways splits a single large model across several graphics cards or PCs. For that, see running a local LLM on two GPUs or pooling GPUs across PCs with GPUStack. If you're still choosing the model server itself, see our best local LLM server software.

The bottom line

LiteLLM is the best LLM gateway for most local AI setups with more than one model server: it is free, supports Ollama and LM Studio by name, and load-balances one model across several GPU PCs with fallbacks. If you have one PC with more models than VRAM, llama-swap is the better tool because it loads and unloads models for you. Bifrost suits people who want a Go gateway with a web UI, and Portkey's AI Gateway suits developers who want routing rules and guardrails. Forge PC hasn't tested these tools, so check each project's current docs before you rely on it.

Sources

  1. 01LiteLLM, GitHub README
  2. 02LiteLLM docs, Proxy load balancing
  3. 03LiteLLM docs, Virtual keys
  4. 04mostlygeek, llama-swap GitHub README
  5. 05Maxim, Bifrost GitHub README
  6. 06Portkey, AI Gateway GitHub README

About the author

Hannah Vance

Buying Guides & Peripherals Editor

Hannah edits Forge PC's buying guides and component roundups across gaming monitors, mechanical keyboards, mice, cases and power supplies. She specialises in OLED and Mini-LED panel characteristics, low-latency wireless peripherals, acoustic damping and value-for-money component selection for UK PC builders.

More from Hannah Vance

Read next

How to Use DLSS Ray Reconstruction in PC Games

How-To

How to Use DLSS Ray Reconstruction in PC Games

DLSS Ray Reconstruction replaces a game's ray tracing denoisers with an NVIDIA AI model for cleaner reflections and lighting, and it works on every GeForce RTX card. Here's what it does, which cards support it, how to switch it on, how to get the newer model through the NVIDIA app and when it's worth using.

Marcus Thorne5 min

How to Fix THREAD_STUCK_IN_DEVICE_DRIVER on Windows 11

How-To

How to Fix THREAD_STUCK_IN_DEVICE_DRIVER on Windows 11

Windows crashed with THREAD_STUCK_IN_DEVICE_DRIVER, often mid-game? Microsoft says this stop code frequently comes down to the graphics card or its driver. Here's how to confirm which driver is involved, then fix it in a sensible order: undo recent changes, remove GPU tuning, clean-install the driver and check power, heat and seating.

Marcus Thorne5 min

Best Ways to Type Without a Keyboard in Windows 11 (2026)

Best Picks

Best Ways to Type Without a Keyboard in Windows 11 (2026)

Keyboard dead or missing? Windows 11 has five built-in ways to enter text without one. We rank the On-Screen Keyboard, voice access, voice typing, the touch keyboard and the handwriting panel by what each needs and who it suits best.

Hannah Vance4 min