Riven

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

LayerResponsibilityProduction Enforcement
1. IdentityOrg, tenant, and agent attributionScoped virtual keys + Principal-Wall headers
2. RoutingLatency- and health-aware model dispatch3 on-prem fleet models + 72 cloud fallback models
3. MeteringExact token & tool-step accountingPer-request prompt, cached, and completion ledger
4. BillingPlan allowances & pay-as-you-go settlementPro $15/mo, Team $25/seat, API $3.00/1M base x lane
5. GovernanceSide-effect safety & outbound holdsPropose-Approve-Act-Audit + Gate G2 approval
6. AuditTamper-evident operational trailDual-mirrored append-only decision & usage logs
7. ReplayRegression & incident verificationTrace 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

Related reading