GoModel: Deploy an Open-Source AI Gateway in Front of 30+ Providers
GoModel is an open-source AI gateway written in Go, with OpenAI-compatible and Anthropic-compatible APIs. This guide covers the supported providers, Docker and script quick starts, first API calls, SDK base URLs, caching, budgets, guardrails, failover, and which features belong to GoModel Pro.
View 1 referenceAllow the functional cookie to save your likes. Privacy details
What is GoModel?
GoModel is an open-source AI gateway and control plane written in Go. It exposes an OpenAI-compatible API at /v1 and an Anthropic-compatible API at /v1/messages, then routes requests to more than 30 model providers. The official repository positions it as a self-hosted alternative to LiteLLM and Portkey.
The gateway consolidates the plumbing that teams otherwise rebuild per provider: unified request formats, cost tracking, caching, budgets, rate limits, failover and audit logs. You point an application at one local endpoint and change providers through configuration instead of rewriting client code.
What the project claims
The README calls GoModel the fastest and most resource-efficient AI gateway and links self-reproducible benchmarks. Those are publisher-supplied figures, so treat them as a starting point and run your own load test before making an infrastructure decision.
Which providers does GoModel support?
GoModel supports a broad list including OpenAI, Anthropic, Google Gemini, xAI, Cohere, Vertex AI, DeepSeek, Groq, Fireworks AI, Together AI, OpenRouter, Mistral AI, Azure OpenAI, Amazon Bedrock, Ollama, SGLang, vLLM, llm-d, MiniMax, Alibaba Cloud Model Studio, GitHub Copilot and ElevenLabs. The full per-provider feature matrix lives in the official docs.
| Category | Examples |
|---|---|
| Frontier APIs | OpenAI, Anthropic, Gemini, xAI, Cohere |
| Cloud hosted | Vertex AI, Azure OpenAI, Amazon Bedrock, Oracle |
| Open model runtimes | Ollama, vLLM, SGLang, llm-d |
| Aggregators | OpenRouter, Together AI, Fireworks AI, Eden AI |
| Non-chat | ElevenLabs audio, GitHub Copilot, Codex backend |
Provider availability still depends on your own accounts and API keys. The gateway normalizes access; it does not grant access.
How do I install and start GoModel?
The quickest path is a single Docker command; script installers exist for macOS, Linux and Windows. The README also provides a Docker Compose stack with Redis, PostgreSQL, MongoDB and Adminer for local development. The Compose stack also provides an admin panel for inspecting stored data.
docker run --rm -p 8080:8080 -v gomodel_data:/app/data enterpilot/gomodel
curl -fsSL https://gomodel.enterpilot.io/install.sh | sh
# OPENAI_API_KEY="your-openai-key" gomodel
irm https://gomodel.enterpilot.io/install.ps1 | iex
Open http://localhost:8080/admin/dashboard to add a provider. Configuration resolves in this order: built-in defaults, config.yaml, .env, then exported environment variables, with each source overriding the previous one.
How do I make my first API call?
After adding a provider, send a standard Responses-style request to the local endpoint. The model identifier follows the provider's own naming, so gpt-5-chat-latest works once OpenAI is configured. The request format matches what your client already sends, so no adapter layer is needed. Responses stream normally through the gateway.
curl http://localhost:8080/v1/responses -H "Content-Type: application/json" -d '{"model":"gpt-5-chat-latest","input":"Hello!"}'
To use the Anthropic-compatible surface, post to /v1/messages instead. The same dashboard keys work on both surfaces, which is useful when a codebase already depends on Anthropic's SDK types.
Do official SDKs work unchanged?
Yes. GoModel accepts two compatible formats, so SDKs work by changing only the base URL. OpenAI SDK clients point at http://localhost:8080/v1. Anthropic SDK clients point at http://localhost:8080, because the SDK appends /v1/messages itself. Base URLs are the only change required.
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="local-key")
print(client.responses.create(model="gpt-5-chat-latest", input="Hello!").output_text)
This is the main reason to adopt a gateway: migration is a configuration change rather than a rewrite of every provider call. It is the main compatibility win for existing codebases.
What governance features does GoModel provide?
GoModel bundles caching, cost tracking, budgets, rate limits, virtual models, session keeping, failover, labelling, user paths, model access control, an MCP gateway, a passthrough API, audio and image APIs, guardrails, plugins, workflows and observability. Each feature is documented in the repository.
| Need | Feature |
|---|---|
| Cut repeat spend | Exact and semantic response caching |
| _control costs | Per-request cost estimates, budgets, usage API |
| Avoid provider outages | Automatic failover with retries and circuit breakers |
| Stable model names | Virtual models with aliases and load balancing |
| Enforce policy | Guardrails, plugins and versioned workflows |
| Debug traffic | Prometheus metrics, OpenTelemetry traces, live request logs |
Virtual models deserve attention: they let an application send a stable alias while the gateway resolves it to a concrete provider model. Switching providers then requires no client change at all.
Caveats on budgets
The docs are explicit that budgets are soft limits. Concurrent and in-flight requests can overshoot a spent limit, so a hard cap at the provider account level is still advisable.
What is GoModel Pro?
GoModel Pro is a commercial build with the same gateway, configuration and dashboard, plus licensed extensions: prompt compression, intelligent routing that classifies requests as easy or hard, and OIDC single sign-on with PKCE for the dashboard. The core gateway remains open source.
| Feature | Open source | Pro |
|---|---|---|
| Multi-provider routing | Yes | Yes |
| Caching and cost tracking | Yes | Yes |
| Guardrails and workflows | Yes | Yes |
| Prompt compression | No | Yes |
| Intelligent routing | No | Yes |
| OIDC single sign-on | No | Yes |
If your main need is a unified endpoint and usage visibility, the open build is enough. Pro matters when token reduction and automated model tier selection are worth paying for.
How does GoModel compare with LiteLLM?
The README names LiteLLM and Portkey as alternatives and argues that GoModel is faster, leaner and more actively maintained. Those are the project's own claims rather than independent findings. Both aim to solve the same problem, but implementation language and backing services differ, which affects deployment footprint.
| Dimension | GoModel | LiteLLM |
|---|---|---|
| Implementation language | Go | Python |
| API surfaces | OpenAI and Anthropic | OpenAI-compatible |
| Backing stores | Redis, PostgreSQL, MongoDB | Varies by deployment |
| Benchmark source | Publisher's self-reproducible suite | Project's own suite |
Run both against your own traffic pattern. A gateway sits in the critical path, so measured latency and memory use on your workload outweigh feature-list length.
Frequently asked questions about GoModel
These questions clarify what GoModel is not, how it handles streaming and native provider APIs, and what happens during an outage. The answers reflect the project's own README and docs, which are the authoritative source for current behavior. That keeps the scope of each answer clear.
Is GoModel a model?
No. It is a gateway and control plane that forwards requests to models hosted elsewhere. It does not train or host its own weights.
Does it support streaming?
Yes. Streaming responses are part of the gateway contract, and the project documents SSE handling across chat completions and Responses API endpoints.
Can I keep provider-native APIs?
Yes. The passthrough API exposes provider-native endpoints under /p/{provider}/... with GoModel authentication and tracking applied.
What happens when a provider goes down?
Failover reroutes to backup providers, with retries and circuit breakers. You configure the backup chain in the dashboard or in configuration.