GoModel
A high-performance AI gateway written in Go providing a unified OpenAI-compatible API for OpenAI, Anthropic, Gemini, Groq, xAI, Ollama, and more.
At a Glance
About GoModel
GoModel is an open-source, high-performance AI gateway written in Go that provides a unified OpenAI-compatible API across multiple LLM providers including OpenAI, Anthropic, Gemini, Groq, xAI, Azure OpenAI, Oracle, Ollama, and OpenRouter. It serves as a LiteLLM alternative with built-in observability, guardrails, streaming support, and a two-layer response caching system. Deployable via Docker in seconds, GoModel automatically detects available providers based on supplied credentials and exposes a consistent API surface for all of them.
- Unified OpenAI-Compatible API: Route requests to any supported provider using a single consistent API endpoint, eliminating provider-specific SDK changes.
- Multi-Provider Support: Supports OpenAI, Anthropic, Gemini, Groq, xAI, Azure OpenAI, Oracle, Ollama, OpenRouter, and Z.ai with chat completions, embeddings, files, and batch operations.
- Two-Layer Response Cache: Exact-match caching via Redis for sub-millisecond repeated request handling, plus semantic caching using vector search (Qdrant, pgvector, Pinecone, Weaviate) for ~60–70% hit rates on similar queries.
- Observability & Metrics: Built-in Prometheus metrics endpoint, audit logging, usage analytics dashboard, and per-model usage breakdowns via admin API.
- Guardrails Pipeline: Configurable guardrails for request and response filtering before output reaches the client.
- Provider-Native Passthrough: Pass requests directly to upstream providers via
/p/{provider}/...routes for full native API access. - Flexible Storage Backends: Supports SQLite, PostgreSQL, and MongoDB for usage logs, audit trails, and batch metadata.
- Easy Deployment: Deploy with a single
docker runcommand; configure entirely via environment variables or an optionalconfig.yaml. - Admin Dashboard: Built-in web UI for monitoring token usage, estimated costs, model analytics, and audit conversation threads.
- Streaming Support: Full streaming support for chat completions across all compatible providers.
Community Discussions
Be the first to start a conversation about GoModel
Share your experience with GoModel, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
Fully free and open-source under the MIT License. Self-host with no cost.
- Unified OpenAI-compatible API
- Multi-provider LLM routing
- Two-layer response caching
- Prometheus metrics
- Audit logging
Capabilities
Key Features
- Unified OpenAI-compatible API
- Multi-provider LLM routing
- Exact-match response caching
- Semantic response caching
- Prometheus metrics
- Audit logging
- Usage analytics dashboard
- Guardrails pipeline
- Provider-native passthrough routes
- Streaming support
- Batch operations
- File upload/management
- Text embeddings
- SQLite/PostgreSQL/MongoDB storage backends
- Admin dashboard UI
- Swagger UI
- Docker deployment
- Environment variable configuration
