Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseCode / SDK · ActionableHacker News AI→ original

GoModel, a Go-based gateway, handles a request in 2.3 ms versus LiteLLM's 79 ms

When an application calls several LLM providers, switching logic and cost tracking spread across the codebase. GoModel is an open-source gateway written in Go that takes this over, and the only change in your SDK is the base URL. According to the authors' measurements, the gateway adds a median of 2.32 ms per request, versus 79.16 ms for LiteLLM. Peak memory is 82.5 MB versus 2322 MB. The gain is most noticeable under heavy traffic and on weak machines.

AI-processed from Hacker News AI; edited by Hamidun News
GoModel, a Go-based gateway, handles a request in 2.3 ms versus LiteLLM's 79 ms
Source: Hacker News AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHacker News AI ↗
Editor-in-Chief
Key metric #1A single binary, a 19 MB image, a built-in admin panel, and SQLite that needs no setup
Key metric #239 providers, including Ollama and vLLM, plus automatic failover
Key metric #3The benchmark was run by the authors themselves, and LiteLLM supports more providers

While an application uses a single LLM provider, things are simple. Then a second one gets added in case the first goes down. A third appears because it is cheaper for simple tasks.

Finance asks how much each feature costs, and after a night-time incident nobody can explain why requests went to the wrong place. The logic for switching, accounting, and fallbacks quietly spreads through the code. This is what AI gateways are for: a layer between the application and the providers that takes these tasks over.

The best-known open-source gateway of this kind is LiteLLM. Now it has a competitor: GoModel, written in Go, which its author presented on Hacker News. The headline number is the median latency.

This is the gateway's own overhead per request: half of the requests pass through GoModel in less than 2.32 ms, while in the same test LiteLLM's median was 79.16 ms.

This is not the model's response time, only the time a request spends inside the layer.

What GoModel is and how to connect it

The gateway sits between your application and the model providers. It exposes an API compatible with OpenAI and Anthropic, so in existing code you usually only need to change the base URL. The OpenAI SDK, the Anthropic SDK, and ordinary HTTP clients keep working as before.

Behind the gateway you can connect 39 providers: OpenAI, Anthropic, Gemini and Vertex AI, Azure OpenAI, Bedrock, Groq, xAI, DeepSeek, and local models via Ollama, vLLM, SGLang, and llama.cpp. Any other OpenAI-compatible backend can be added as a separate instance. A single provider can have several keys, rotated in a round-robin fashion.

One convenient detail: you can publish a stable name such as smart-chat and change the model behind it through configuration, without touching the application code. Switching vendors stops being a separate project.

Everything runs as a single binary or a 19 MB Docker image with a built-in admin panel. There is a Docker Compose setup and a Helm chart for Kubernetes. Storage starts with SQLite, which needs no configuration, and moves to PostgreSQL or MongoDB as traffic grows.

What the gateway does with requests

Each request goes through authentication, and then a suitable "workflow" is applied to it. A workflow is a set of rules: whether to enable caching, auditing, usage tracking, budgets, guardrails, and fallbacks. Rules can be set for a provider, a model, or a specific user path, and the most specific scope wins. Workflow versions are immutable, so for any request you can see which policy processed it.

The main features, in plain terms:

  • Caching. An exact match returns a repeated request straight from the gateway, without calling the provider and without paying for it. The semantic cache looks for similar prompts through Qdrant, pgvector, Pinecone, or Weaviate.
  • Fallback. The gateway retries with a delay, opens a circuit breaker after a series of errors, and switches to the next model or provider, skipping overloaded routes.
  • Money. Tokens and cost are counted per request and tied to a team, a tenant, or a label. Budgets and limits trigger before the request is sent. Data goes to Prometheus.
  • Audit. The log keeps the route, the guardrail versions, and every attempt to reach a provider. An incident with an unclear fallback can be analyzed after the fact.

Numbers and caveats

The authors' main argument is lightness. In a December benchmark on a single AWS machine, GoModel showed a median latency of 2.32 ms versus 79.16 ms for LiteLLM (a difference of roughly 34 times). It handled 4,350 requests per second versus 134, used no more than 82.5 MB of memory versus 2,322 MB, and cold-started in 1.06 s versus 49.45 s.

These numbers need to be taken with care. The benchmark was prepared by the authors themselves, although they describe it as reproducible. The gateway's latency is per-request overhead, while generation by a cloud model takes seconds. So on an ordinary chatbot with moderate traffic, a user will not notice a 77 ms difference. The gain is real where request volume is high, the machine is small, and the model responds quickly: for example, a local model on a laptop or an edge device, where the gateway runs nearby.

The authors themselves acknowledge that LiteLLM supports more providers. For rare backends, this may be the decisive factor.

Open source and the paid version

The core is released under MIT. Version 0.2.0 already includes guardrail plugins, OpenTelemetry tracing, editable prices, and prompt-cache visibility. Plans for 0.3.0 include a strengthened MCP proxy, a reworked passthrough, native Gemini API input, and switching to another model in the middle of streaming.

The commercial GoModel Pro adds prompt compression (on agent traffic, 2–20% fewer input tokens), OIDC SSO login, quota templates, intelligent routing, and egress proxy pools, some of which are in beta. The license is issued per company, the price is discussed on a call, and there is a 21-day free trial.

What to do about it

If you are building a product on several providers and are tired of home-grown wrappers, it is worth running GoModel locally and sending your own traffic through it. Changing the base URL is enough. Check three things on your own models and load: real latency, coverage of the providers you need, and audit quality. If LiteLLM suits you in terms of providers and speed, there is no urgent reason to switch.

Story

Key Questions Answered

What GoModel is and how to connect it?

The gateway sits between your application and the model providers. It exposes an API compatible with OpenAI and Anthropic, so in existing code you usually only need to change the base URL. The OpenAI SDK, the Anthropic SDK, and ordinary HTTP clients keep working as before. Behind the gateway you can connect 39 providers: OpenAI, Anthropic, Gemini and Vertex AI, Azure OpenAI, Bedrock, Groq, xAI, DeepSeek, and local models via Ollama, vLLM, SGLang, and llama.cpp.

What the gateway does with requests?

Each request goes through authentication, and then a suitable "workflow" is applied to it. A workflow is a set of rules: whether to enable caching, auditing, usage tracking, budgets, guardrails, and fallbacks. Rules can be set for a provider, a model, or a specific user path, and the most specific scope wins. Workflow versions are immutable, so for any request you can see which policy processed it. The main features, in plain terms: Caching.

What are the key details on Numbers and caveats?

The authors' main argument is lightness. In a December benchmark on a single AWS machine, GoModel showed a median latency of 2.32 ms versus 79.16 ms for LiteLLM (a difference of roughly 34 times). It handled 4,350 requests per second versus 134, used no more than 82.5 MB of memory versus 2,322 MB, and cold-started in 1.06 s versus 49.45 s. These numbers need to be taken with care. The benchmark was prepared by the authors themselves, although they describe it as reproducible.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — GoModel, a Go-based gateway, handles a request in 2.3 ms versus LiteLLM's 79 ms https://news.hamidun.com/en/news/18902/gomodel-a-go-based-gateway-handles-a-request-in-2-3-ms-versu

What do you think?
Loading comments…