# GoModel

> A high-performance AI gateway written in Go providing a unified OpenAI-compatible API for OpenAI, Anthropic, Gemini, Groq, xAI, Ollama, and more.

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 run` command; configure entirely via environment variables or an optional `config.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.*

## 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

## Integrations
OpenAI, Anthropic, Google Gemini, Groq, xAI (Grok), Azure OpenAI, Oracle OCI Generative AI, Ollama, OpenRouter, Z.ai, Redis, Qdrant, pgvector, Pinecone, Weaviate, PostgreSQL, MongoDB, Prometheus

## Platforms
WEB, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
v0.1.19

## Links
- Website: https://gomodel.enterpilot.io/
- Documentation: https://gomodel.enterpilot.io/docs
- Repository: https://github.com/ENTERPILOT/GOModel
- EveryDev.ai: https://www.everydev.ai/tools/gomodel
