Archived. This service moved into zetaoss/bob as
/aigate.
A simple Go-based AI proxy gateway. It centralizes AI model calls and routes requests to multiple providers such as Gemini and Ollama under a single /v1 API.
GET /healthzGET /v1/models(enabled models)GET /v1/models?all(available models from providers, withenabledflag)GET /v1/models/{provider}(enabled models for one provider)GET /v1/models/{provider}?all(available models for one provider, withenabledflag)POST /v1/chat/completions
server:
port: 8080
logLevel: info
validateModelsOnStartup: true
fallback:
rounds: 2
perAttemptTimeout: 30s
models:
# format: {provider}/{model}
- gemini/gemini-2.5-flash
- ollama/gemma4:31b
providers:
gemini:
apiKey: YOUR_GEMINI_API_KEY
ollama:
apiKey: YOUR_OLLAMA_API_KEYProvider endpoints are fixed in code for gemini and ollama.
server.port defaults to 8080 when omitted.
server.logLevel supports debug, info, error (default: info).
Use debug to print upstream provider request/response logs.
The gateway loads each provider's available model list once during startup and keeps it in memory for /v1/models?all.
server.validateModelsOnStartup verifies each configured model against that startup model list (default: true).
models uses {provider}/{model} and splits on the first /, so model ids containing / are supported.
model omission is always allowed and routes by configured model order.
When model is specified, fallback is always allowed within the resolved model chain.
fallback.rounds controls how many full passes of the resolved model chain are attempted (default: 2).
fallback.perAttemptTimeout is per-attempt HTTP timeout.
curl http://localhost:8080/v1/models?allcurl -X POST http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gemini/gemini-2.5-flash","messages":[{"role":"user","content":"Hello"}]}'