SiftGate
Health Pass
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 657 GitHub stars
Code Warn
- process.env — Environment variable access in .github/workflows/ci.yml
- fs module — File system access in .github/workflows/ci.yml
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Self-hosted AI gateway for enterprise AI governance: scoped keys and policy, metadata-only audit, budgets and chargeback, smart routing and failover for apps, coding agents and MCP tools.
Self-Hosted AI Gateway for Enterprise AI Governance
One control point for every AI call your company makes. Provider keys stay on your servers, access follows policy, spend is budgeted and charged back, and every request leaves an audit trail without storing prompts or responses.
Current release: v2.14.0 (availability: signed release assets and successful release workflow)
Quickstart · Enterprise overview · Security brief · 30-minute PoC · Production · Enterprise support
English · 简体中文 · 繁體中文 · 日本語 · 한국어 · ไทย · Español
| 0 prompts or responses stored by default |
4 policy scopes: workspace, team, namespace, key |
50+ provider metadata profiles |
7 Dashboard and docs languages |
Signed release assets with Sigstore provenance |
SiftGate is an MIT-licensed AI gateway that you run on your own
infrastructure. Business apps, coding agents such as Claude Code, Codex and
Cursor, SDKs and MCP tools send requests to SiftGate instead of calling AI
providers directly. SiftGate decides who may call which model, which provider
key is used, what the request may cost, and what evidence is kept, before the
request leaves your network.
Why Enterprises Put A Gateway In Front Of AI
AI adoption usually starts with a few provider keys. At company scale it turns
into a governance problem:
| What breaks as AI use grows | What SiftGate changes |
|---|---|
| Shadow AI and key sprawl. Engineers paste provider keys into editors, agents and MCP tools. Nobody can say who uses which model, and offboarding cannot revoke access. | Provider keys stay inside the gateway. Teams and people get scoped, revocable Gateway API keys limited to approved endpoints, modalities, nodes and models. |
| Security review blocks rollout. Security and legal teams worry that a new proxy becomes a store of prompts, source code and customer data. | Metadata-only by default: no prompts, responses, raw headers, source code, diffs, tool payloads, media bytes or resolved secrets are stored unless an operator explicitly enables it. |
| Spend arrives as one unexplained bill. Costs cannot be attributed to teams or projects, and rotating keys breaks provider prompt caches. | Budgets at global, namespace, team and key scope, workspace price books, chargeback exports, and cache-aware credential pools that keep cache locality across keys. |
| One provider outage stops everyone. Rate limits and incidents halt work, and nobody can explain why traffic moved. | Fallback chains, circuit breakers and per-key credential failover, with a route explanation for every request. |
Four Governance Pillars
1. Access and policy. One ingress for OpenAI- and Anthropic-compatible
chat, embeddings, rerank, media, Batch and MCP tool traffic, routed to any
configured provider, including Gemini, Bedrock and Azure. Permissions are the
intersection of Gateway API key, Team and Policy Namespace rules, and an empty
intersection fails closed. Per-key model pools route an exact chat model across
approved nodes. The Dashboard has authentication on by default, fixed
admin/operator/viewer roles, Workspaces, invitations and optional OIDC.
2. Data protection and audit. Call logs, route traces, sessions, MCP calls,
batch jobs and guardrail findings record metadata, not content. The optional
local guardrails plugin redacts or blocks PII, secrets, prompt injection and
policy matches, and records findings as metadata. Management actions go to a
hash-chained audit log, and configuration changes are versioned with
validation-first rollback. Full Gateway API keys are shown once; provider
secrets never appear in Dashboard APIs, logs or exports.
3. Cost control. Daily token and cost budgets at global, namespace, team
and key scope reject over-budget requests with budget_exceeded. Workspace
price books, admission previews, a cost report, chargeback CSV/JSON exports,
anomaly evidence and cache-savings reporting show where money goes. Cache-aware
credential pools reduce duplicated prompt-cache warmup across parallel keys.
4. Reliability and operations. Smart routing with compatibility filters,
fallback chains, circuit breakers and credential cooldowns. Route Explanation
shows which candidates were selected, skipped or rejected and why. Start on
SQLite, then move to PostgreSQL, optional Redis, Docker, Kubernetes or Helm,
OIDC, log sinks and OpenTelemetry. Customer release kits are signed with
Sigstore provenance, and the optional host Operator applies upgrades only from
reviewed, approved plans.
Read the enterprise overview for the full
governance model, or hand the security and compliance brief
to your security reviewers.
The Dashboard follows the same structure. Its sidebar groups work into
Access & Policy, Agents & Tools, Models & Routing, Cost Control
and Audit & Operations, with previews and evaluation tools in a collapsed
Labs group. Related pages appear as tabs inside each section, and every
existing URL still works. The Governance Overview opens with the posture a
reviewer asks about first: data protection, access control, spend guardrail
and runtime health. See the Dashboard guide.
See It In A 30-Minute Evaluation
Each scenario below is part of the PoC playbook, which
scripts the full demo with pass criteria.
Govern a coding agent with a scoped key. Create a Gateway API key in the
Dashboard, render an Agent Profile, and point the tool at SiftGate. The
engineer's machine never holds a provider key, and coding-auto maps to
policy-respecting smart routing.
ANTHROPIC_BASE_URL=http://localhost:2099
ANTHROPIC_AUTH_TOKEN=<SIFTGATE_GATEWAY_API_KEY>
ANTHROPIC_MODEL=coding-auto
Pool provider keys without losing prompt cache. Several upstream keys live
inside one logical node. cache_aware keeps a session on the key that already
holds its provider prompt cache and moves to another key on 429, 5xx or
timeouts.
nodes:
- id: enterprise-anthropic
name: "Enterprise Anthropic"
protocol: messages
base_url: "https://api.anthropic.com"
endpoint: "/v1/messages"
auth_type: x-api-key
credentials:
- id: primary
api_key: "${env:ANTHROPIC_POOL_KEY_PRIMARY}"
- id: backup
api_key: "${env:ANTHROPIC_POOL_KEY_BACKUP}"
credential_pool:
enabled: true
strategy: cache_aware
sticky_by: agent_session
cooldown_ms: 60000
retry_on_status: [429, 500, 502, 503, 504]
Credential ids appear in logs; secret values never do.
Explain any request without storing it. Every response carries anx-siftgate-request-id header. Open /route-decisions/<request-id> in the
Dashboard to see the selected and rejected candidates, policy filters,
credential hit, cache effect, fallback reason, latency and cost estimate. The
prompt and response were never written to disk.
What Each Team Gets
| Role | What SiftGate gives them |
|---|---|
| CTO and platform owner | One provider-neutral entry point for apps, agents and tools; switch or mix providers without client changes. |
| CISO and security review | Metadata-only defaults, provider-key isolation, fail-closed Dashboard auth, RBAC and OIDC, hash-chained audit, signed releases. |
| Finance and FinOps | Budgets at global, namespace, team and key scope, chargeback exports by team and project, cost and cache-savings evidence. |
| Engineering and SRE | OpenAI- and Anthropic-compatible endpoints, automatic failover, route explanations, alerts to Feishu, WeCom, Telegram or webhooks. |
Architecture
flowchart LR
subgraph Clients["Company AI clients"]
App["Business apps and SDKs"]
Agent["Coding agents"]
MCP["MCP clients"]
Batch["Batch jobs"]
end
subgraph Gateway["SiftGate, inside your network"]
Auth["Gateway API keys"]
Policy["Workspace, team, namespace policy"]
Route["Smart router and compatibility filter"]
Creds["Provider credential pools<br/>cache-aware affinity, rotation, cooldown"]
Cost["Budgets, pricing, cost evidence"]
Observe["Metadata logs, route explanations, audit"]
Dashboard["Governance Dashboard"]
end
subgraph Providers["Upstream AI providers"]
Direct["Direct model APIs"]
Cloud["Cloud AI platforms"]
Local["Self-hosted models"]
Media["Image, audio, video providers"]
end
App --> Auth
Agent --> Auth
MCP --> Auth
Batch --> Auth
Auth --> Policy --> Route --> Creds --> Cost
Cost --> Direct
Cost --> Cloud
Cost --> Local
Cost --> Media
Creds --> Observe
Route --> Observe
Dashboard --> Policy
Dashboard --> Observe
By default SiftGate stores operational metadata: request id, selected node and
model, credential id and retry count, latency, status, token usage, cost
estimate, policy labels, fallback reason, cache evidence and route explanation.
It does not store prompts, responses, raw provider headers, provider keys,
tool payloads, media bytes, hidden reasoning text or resolved secrets unless a
feature is explicitly configured to retain content.
The open-source gateway is complete on its own. AI requests never need to pass
through a hosted service, and no control plane is required.
From PoC To Production
| Stage | Recommended setup |
|---|---|
| PoC | Customer install kit with Docker, SQLite and a one-time activation code, or the source quick start below. |
| Pilot team | Docker Compose, Dashboard-managed Gateway API keys, Policy Namespaces, budgets, alert connectors, log retention. |
| Production | PostgreSQL, optional Redis shared state, OIDC, secret references, log sinks, OpenTelemetry, Kubernetes or Helm, validation-first config rollout. |
| Multi-instance | Load balancer, shared PostgreSQL, Redis-backed rate limits, circuit state and cache, health checks, controlled rollout. |
See Production, Kubernetes and Helm
and signed release verification.
Quick Start
For a versioned, persistent Docker installation, use the
customer install kit (中文).
Source availability does not mean the newest image is already published.
To run from source:
git clone https://github.com/seanbabalala/SiftGate.git
cd SiftGate
# Select Node >=22.13.0 <23 using .nvmrc (nvm install && nvm use when available).
npm run runtime:check
npm install
cd frontend && npm install && cd ..
cp gateway.config.example.yaml gateway.config.yaml
cp .env.example .env
npm run build
# Configure dashboard.password (or OIDC) in the private YAML before this step.
npm start
SiftGate loads .env automatically. Example provider nodes use secret
references such as ${env:OPENAI_API_KEY}, so the Dashboard starts before
provider keys are filled in. A source installation needs dashboard.password
or OIDC configured first: a plaintext password is hashed on startup, and
missing credentials fail closed with no generated password in logs. The
customer kit uses a one-time activation code instead; follow the documentation
shipped with your kit version.
| Surface | URL |
|---|---|
| Dashboard | http://localhost:2099/dashboard |
| OpenAPI | http://localhost:2099/docs |
| Gateway | http://localhost:2099 |
Add one upstream node, create a Gateway API key in the Dashboard, then send a
request:
curl http://localhost:2099/v1/chat/completions \
-H "content-type: application/json" \
-H "authorization: Bearer ${SIFTGATE_API_KEY}" \
-d '{
"model": "auto",
"messages": [{"role": "user", "content": "Explain SiftGate in one sentence."}]
}'
For a container-first path, use Docker Quickstart.
Gateway API surfaceExisting clients move behind the gateway by changing the base URL and key.
| Endpoint | Purpose |
|---|---|
POST /v1/chat/completions |
OpenAI Chat Completions-compatible ingress |
POST /v1/responses |
OpenAI Responses-compatible ingress |
POST /v1/messages |
Anthropic Messages-compatible ingress |
POST /v1/embeddings |
Embedding routing |
POST /v1/rerank |
Rerank routing |
POST /v1/images/generations |
Image generation |
POST /v1/images/edits |
Image edits with JSON or multipart pass-through |
POST /v1/images/variations |
Image variations |
POST /v1/audio/transcriptions |
Audio transcription |
POST /v1/audio/translations |
Audio translation |
POST /v1/audio/speech |
Text-to-speech |
POST /v1/videos/generations |
Experimental async video generation preview |
POST /v1/batches |
OpenAI-compatible Batch API proxy |
WS /v1/realtime |
Experimental Realtime pass-through, disabled by default |
GET /v1/models |
OpenAI-compatible model list and gateway aliases |
POST /v1/feedback |
Metadata-only route feedback |
Interactive OpenAPI documentation is served at GET /docs.
| Family | Examples |
|---|---|
| Direct model APIs | OpenAI, Anthropic, Google Gemini / Vertex, Mistral, DeepSeek, xAI, Cohere, AI21 Labs |
| China providers | Qwen / DashScope, Baidu Qianfan, Volcengine Ark / Doubao, Zhipu GLM, Moonshot / Kimi, MiniMax, Tencent Hunyuan, 01.AI |
| Aggregators | OpenRouter, Hugging Face Inference Providers, Replicate, Together AI, Fireworks AI, NVIDIA NIM, GitHub Models |
| Cloud platforms | AWS Bedrock, Azure OpenAI, Cloudflare Workers AI, IBM watsonx.ai, Databricks Mosaic AI |
| Media generation | fal.ai, Stability AI, Black Forest Labs, Ideogram, Luma AI, Runway, Pika |
| Speech, audio, embedding, rerank | ElevenLabs, Deepgram, AssemblyAI, Cartesia, Speechmatics, Voyage AI, Jina AI |
| Local and self-hosted | Ollama, vLLM, LM Studio, llama.cpp server, TGI, SGLang, Xinference, Baseten, Lepton AI, Modal, RunPod, Predibase, Lamini |
| Hosted compatible inference | DeepInfra, Nebius AI Studio, Novita AI, FriendliAI |
Catalog data is operational guidance, not a billing authority. Local node
pricing, models_pricing and catalog.override.yaml remain the
operator-controlled source of truth. Live provider evidence is tracked in the
Provider Smoke Matrix.
SiftGate is built for governing AI traffic your company owns: provider keys,
agent access, MCP tools, policy, budgets, route evidence and metadata-only
audit in one self-hosted system.
| If your main job is | Consider |
|---|---|
| Governing company-owned AI traffic across apps, agents and tools | SiftGate |
| Public API resale, prepaid wallets or reseller billing | One API or New API |
| The lightest cost-first model router for one agent or app | Manifest |
| A developer-centric multi-provider proxy | LiteLLM Proxy |
SiftGate is not an API resale platform, billing wallet, hosted prompt store,
workflow engine, model marketplace or mandatory SaaS control plane, and it does
not turn third-party catalog prices into billing truth. It builds on ideas from
Manifest, One API, New API and LiteLLM, and we are grateful for their public
work. The full capability matrix, acknowledgements and committed benchmark
evidence are in Comparison and
Performance.
Documentation
| If you are | Start here |
|---|---|
| Deciding whether to adopt | Enterprise overview (中文), Comparison |
| Reviewing security and compliance | Security and compliance brief (中文), Security, Publication security |
| Running an evaluation | PoC playbook (中文), Quickstart, Dashboard |
| Operating the platform | Production, Kubernetes and Helm, Customer install, Operator observability |
| Connecting agents and tools | Coding Agent Gateway, MCP Tool Gateway, Agent + MCP demo |
| Managing cost | Cost and chargeback platform, Billing loop |
| Building on SiftGate | API reference, Architecture, SDKs, Plugins |
The documentation home lists every guide, and the
engineering baseline records the verification scope of the
current release.
Enterprise Support
SiftGate runs without any hosted service. If your team needs help with
deployment, provider onboarding, a security review or a guided PoC, contact the
maintainer on Telegram: @seanbbuu. Provider
credentials, policy, billing and compliance stay under your operational
control.
Contributing
The public repository tracks source, examples, docs, tests and deployment
manifests only. Local runtime config, databases, catalog sync cache and
private notes are ignored. Before opening a PR, run:
npm run public:check
npm run docs:check
npm run build
cd frontend && npm test && npm run build
Release branches also run the broader matrix in the
Release Checklist. Maintainers publishing images
follow the formal image release runbook
(中文) and its state gate.
| Resource | Link |
|---|---|
| Contributing | CONTRIBUTING.md |
| Security policy | SECURITY.md |
| Code of conduct | CODE_OF_CONDUCT.md |
| Changelog | CHANGELOG.md |
| License | MIT |
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found