Jorge Turbica / blog · Blog ← All articles ES · Leer en español
AI

Repo of the day: Bifrost, a Go AI gateway with failover and semantic caching

Open source Go gateway that puts 23+ LLM providers behind an OpenAI API, with fallbacks, load balancing and Prometheus metrics, compared with LiteLLM.

More than 23 LLM providers behind a single OpenAI-compatible API, with failover, load balancing and semantic caching, in one Go binary: that's Bifrost, from Maxim, which showed up on GitHub's daily Go Trending page on October 15, 2026. If you run LLM traffic, the problem it tackles will be familiar: every provider has its own SDK, limits and outages, and retry logic ends up duplicated in every service.

What it is

According to its README, Bifrost unifies OpenAI, Anthropic, AWS Bedrock, Google Vertex, Azure, Mistral, Ollama, Groq and others behind one OpenAI-compatible API. What it adds:

  • Automatic fallbacks across providers and models.
  • Load balancing across multiple keys and providers.
  • Semantic caching of responses by similarity, to cut cost and latency.
  • MCP, so models can use external tools.
  • Governance: virtual keys, usage limits and budgets per team or customer.
  • Observability: native Prometheus metrics, distributed tracing and logs.
  • Plugins as middleware for analytics or custom logic.

It works as an HTTP gateway or as a Go SDK, and has drop-in integrations for the OpenAI, Anthropic, Bedrock, Google GenAI, LiteLLM and LangChain SDKs. The license is Apache-2.0.

How to use it

The README suggests starting it with zero config and configuring it later from its web UI on port 8080:

bash
# Install and run locally
npx -y @maximhq/bifrost

# Or with Docker
docker run -p 8080:8080 maximhq/bifrost

# First call, OpenAI-compatible
curl -X POST http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello, Bifrost!"}]
  }'

For production there's a Kubernetes deployment guide in its docs. The idea is to change only your clients' base URL so they go through the gateway.

What I like and what I don't

I like that the solution is a single Go binary with a familiar surface (the OpenAI API) and Prometheus metrics out of the box. Having one place to measure errors, latency and cost per provider is worth more than any new SDK. The README shows reasonable signs of maturity: Codecov coverage, CodSpeed benchmarks and Docker Hub image pulls.

What gives me pause:

  • A gateway is a new single point of failure on the critical path; deploy it with replicas and test what happens when it goes down.
  • Every provider key flows through it, so it's a sensitive component.
  • Semantic caching can return an answer that's "close" but wrong; I wouldn't enable it where accuracy matters.
  • The README presents adaptive load balancing, clustering, guardrails and advanced governance as part of paid enterprise deployments. Before designing around them, check what's in the open version.

Bifrost vs LiteLLM

LiteLLM is the reference in this space, with about 61.4k stars, and Bifrost itself ships an integration with its SDK.

BifrostLiteLLM
Providers23+100+
FormHTTP gateway or Go SDKPython SDK or proxy (AI Gateway)
Fallbacks and load balancingYesYes (router with retries and fallback)
Budgets and virtual keysYesYes, with spend tracking per project and user
ObservabilityNative Prometheus, tracing and logsCallbacks to Langfuse, MLflow, Lunary and others
Paid featuresClustering, guardrails, advanced governanceEnterprise features under a commercial license

When to pick which: LiteLLM if you want the broadest provider catalog, your stack is Python or the in-process SDK is enough; Bifrost if you prefer a Go binary with Prometheus metrics built in and plan to run it as one more platform component. And if you only use one or two providers, handling failover in the client is still an option with no new moving parts.

Sources

Jorge Turbica

Software Engineer and SRE. I write about the real challenges I run into in production.

See portfolio ↗