aria-router sits in front of one or more aria-engine instances and routes requests to the right model based on request metadata (model slug, quant, capability). Ship it standalone or embed the FFI shared library.
Install
Fetch the latest release for your platform:https://ariacompute.cn/api/download/router-latest.
Configure
Provide a routing config that lists each backend engine and the models it serves:router.yaml
Run
http://<host>:9090/v1/chat/completions and set the model field to a slug listed in the config. aria-router forwards the request to the matching backend.
Embed with libaria-router_ffi
Each release shipslibaria-router_ffi-<platform>.{so,dylib,dll} and a C header. Link it from any language with a C ABI.
router.c
When to use aria-router vs aria-engine directly
- Single model, single process: run
aria-engine serveand point clients at it. - Multiple models on one host: run one
aria-engineper model and putaria-routerin front so clients pick a model by slug. - Multi-host, multi-tenant: use
aria-routeras the ingress and configure per-backend health checks and weights.