Sovereign AI Gateway Architecture: Identity, Routing, Metering, Governance & Audit
A sovereign AI gateway sits between every user surface, autonomous agent, and model endpoint so no prompt bypasses identity, cost attribution, or policy gates. In Riven, every Chat, Relay, API, MCP, and Computer call traverses one control plane that routes on-prem-first across Qwen 3.6-35B, Nemotron-3-Puzzle-75B and Bonsai-27B with governed failover across 72 cloud models.
Why direct SDK calls break down in multi-team production
Embedding raw vendor API keys inside microservices and agent scripts creates immediate blind spots: finance cannot attribute token spend by tenant or department, security cannot enforce Principal-Wall boundaries, and engineering must rewrite application code whenever a provider rate-limits or deprecates a checkpoint.
Centralizing traffic behind an OpenAI-compatible sovereign control plane turns model selection, rate limits, fallback order, and compliance logging into declarative infrastructure policy.
- Layer 1 — Identity & Principal Walls: bind every virtual key and session token to an explicit organization, suite, and role.
- Layer 2 — On-Prem-First Routing: resolve 7 semantic lanes (Auto, Spark, Bolt, Nova, Atlas, Research and Apex) against sovereign GPUs first, failing over cleanly across 9 cloud providers.
- Layer 3 & 4 — Real-Time Metering & Pricing Brain: meter exact prompt, cached, and completion tokens against the $3.00/1M base rate x lane multiplier (or vendor list rate when pinned).
- Layer 5, 6 & 7 — Governance, Append-Only Audit & Replay: enforce Propose-Approve-Act-Audit and Gate G2 holds on external side effects while recording verifiable execution receipts.
Balancing latency, reasoning depth, and blended fleet cost
Not every request needs a heavyweight reasoning model. High-frequency classification, search extraction, and telemetry summarization belong on low-latency Spark or Bolt lanes (2x multiplier), while complex multi-file architecture and financial diligence step up to Atlas (8x) or Apex (12x).
Routing both interactive humans and background Cortex routines through the same fleet keeps sovereign GPU utilization high and blended inference cost predictable.
Seven architectural layers of the Riven Control substrate
| Layer | Responsibility | Production Enforcement |
|---|---|---|
| 1. Identity | Org, tenant, and agent attribution | Scoped virtual keys + Principal-Wall headers |
| 2. Routing | Latency- and health-aware model dispatch | 3 on-prem fleet models + 72 cloud fallback models |
| 3. Metering | Exact token & tool-step accounting | Per-request prompt, cached, and completion ledger |
| 4. Billing | Plan allowances & pay-as-you-go settlement | Pro $15/mo, Team $25/seat, API $3.00/1M base x lane |
| 5. Governance | Side-effect safety & outbound holds | Propose-Approve-Act-Audit + Gate G2 approval |
| 6. Audit | Tamper-evident operational trail | Dual-mirrored append-only decision & usage logs |
| 7. Replay | Regression & incident verification | Trace correlation across Control, Cortex, and Computer |
Frequently asked questions
Is the Riven gateway drop-in compatible with existing OpenAI SDK code?
Yes. Point base_url at the Riven API endpoint and pass a Riven virtual key; standard chat completions, streaming, tool calling, and structured outputs work without rewriting client logic.
What happens if an on-prem GPU node is saturated or undergoing maintenance?
Riven Ultra Router automatically shifts excess traffic to healthy sibling replicas or approved cloud fallback providers within policy boundaries.
Can enterprise customers run the gateway on their own infrastructure?
Yes. Riven supports dedicated single-tenant cloud cells as well as self-hosted deployments on customer-owned GPU clusters.
More in learn
Sources and read dates
- Riven docs - Riven API, OpenAI-compatible gateway (read 2026-11-26)
- Riven docs - Riven Ultra Router, alias resolution and failover (read 2026-11-26)
- Riven docs - On-Prem AI Fleet, the three fleet models and routing order (read 2026-11-26)
- Riven docs - Cloud Fallback, 72 cloud models across nine providers (read 2026-11-26)
- Riven docs - Riven Pricing Brain, base rate and tier multipliers (read 2026-11-26)
- Riven docs - Riven Trust, data handling and retention commitments (read 2026-11-26)