RivenGet started

Search docs

Find a page across the Riven documentation

Riven Ultra Router

Live

Alias resolution and failover for every inference request. Turns a stable model name into a healthy pool, on-prem first and cloud second.

Ultra Router sits between the API and the models. Its job is to accept a name your integration will never have to change, and resolve it to something that is actually healthy right now.

Alias resolution#

A model ID in a request is an *alias*, not a machine. riven-core names an intent — balanced quality and speed — and the router decides which concrete model serves it. That indirection is why Riven can upgrade a backend without asking anyone to edit code, and why alias IDs outnumber the 75 live models.

You sendRouter resolves toStability promise
A tier alias such as riven-core or riven-bestWhichever pool currently serves that intent bestThe name and intent are stable; the backend may be upgraded at any time
An exact model ID such as claude-opus-4-7That model, or an error if it is unavailablePinned. Deprecated only with notice

Explicit model picks are never silently rewritten. If a request pins a model, it gets that model or it gets an error — the router will not substitute quietly. When a *generic* alias is upgraded by smart routing, the response says so with an x-riven-smart-route header.

On-prem first#

Candidate pools are ordered with the on-prem fleet ahead of cloud providers. Cloud is overflow and reach, not the default path. This ordering is what makes a sovereign deployment a configuration change rather than a rebuild: disable cloud upstreams and the platform keeps answering from local hardware.

Failover#

  1. Resolve the alias to an ordered candidate list, filtered by the requesting plan.
  2. Attempt the first healthy candidate. Health comes from Telemetry and capacity from the Fleet Scheduler.
  3. On failure or timeout, advance to the next candidate. Retries are bounded so a request fails fast rather than hanging.
  4. If every candidate is exhausted, return 503 UPSTREAMS_EXHAUSTED — see Errors.

Attribution#

Routing is never invisible. Every completion reports the model that actually served it in the response body, plus the serving pool in a header, so traffic remains attributable after the fact.

response headers
x-riven-upstream: onprem-qwen36-a
x-riven-smart-route: riven-best -> riven-pro