The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
AI Gateway (aig)
Self-hosted, OpenAI-wire-compatible AI gateway that calls model providers directly, with a custom enrichment layer with first-class Iran/Persian support.
Architecture
Customer ──► AI Gateway (FastAPI) ──► model provider ──► OpenRouter / local vLLM / RAG
AI Gateway handles: enrichment pipeline (datetime, calendar, system prompt, tool packs), auth caching, audit logging, Telegram alerts. the provider handles: provider routing, fallback, budgets, virtual keys, spend tracking.
Prerequisites
- Docker & Docker Compose v2
- Python 3.12 + uv
- Postgres 16 (external for prod; bundled in dev compose)
Quick Start
Dev mode: the gateway itself is not containerised right now — the
aigservice is commented out ofdocker-compose.yml/docker-compose.dev.ymlso it can be edited and restarted freely. It runs on the host withuvicorn --reload; only its dependencies (Postgres, Redis, MinIO, Prometheus) stay in Docker and publish their ports onlocalhost.
# 1. Clone and install
git clone <repo>
cd ai-gateway
uv sync --dev
# 2. Configure
cp .env.example .env
cp .env.example .env
# Edit both files — at minimum set passwords and API keys.
# Leave the in-cluster host names (db, redis, minio) as they are:
# `make dev` overrides them with localhost equivalents at run time.
# 3. Start the dependencies
make up
# 4. Migrate + seed (catalog, free models, admin user) — idempotent
make bootstrap
# 5. Run the gateway with hot-reload
make dev
# 6. Verify (in another terminal)
curl http://localhost:8000/healthz # → {"status":"ok"}
curl http://localhost:8000/readyz # → {"status":"ok"} once the DB and catalog are up
One-shot equivalents that do all of the above: scripts/win/run-dev.bat (Windows)
or scripts/sh/run-dev.sh (Linux/macOS). To bring the gateway back into Docker,
uncomment the aig service in both compose files and use make up-prod.
Admin UI
the provider's built-in admin UI is available at https://openrouter.ai/api/v1/ui once the stack is up. See Operations — Admin UI for login, roles, and security notes.
Development
make install # install deps (uv sync --dev)
make dev # run the gateway on the host with hot-reload (:8000)
make bootstrap # migrations + all seeds
make lint # ruff
make typecheck # mypy
make test # pytest
make coverage # with HTML report at htmlcov/
make ci # all gates
Admin CLI
uv run aig-admin --help
uv run aig-admin team list
uv run aig-admin profile create --id iran-default --file profiles/iran-default.json
Docs
- Downloads last month
- 310