Loading OmniRoute...
Quick Start in README.
npm install -g omniroute omniroute
and API base URL is .
pnpm install -g omniroute pnpm approve-builds -g # Select all packages β approve omniroute
pnpm users: is required to enable native build scripts for and .
yay -S omniroute-bin systemctl --user enable --now omniroute.service
AUR package installs OmniRoute and provides a systemd user service.
cp .env.example .env npm install PORT=20128 DASHBOARD_PORT=20129 NEXT_PUBLIC_BASE_URL=http://localhost:20129 npm run dev
Docker Guide for complete Docker setup including Compose profiles and Caddy HTTPS.
| , API and dashboard on same port) | |
Base URL: http://localhost:20128/v1 API Key: [copy from Endpoint page] Model: if/kimi-k2-thinking (or any provider/model prefix)
omniroute --mcp
# 1. Start MCP server omniroute --mcp # 2. From your MCP client, call: omniroute_get_health # Should return system health omniroute_list_combos # Should return active combos # 3. Or run the full E2E suite: npm run test:protocols:e2e
Claude Code:
claude mcp add-server omniroute --type http --url http://localhost:20128/api/mcp/stream
Cursor / Cline:
{
"mcpServers": {
"omniroute": {
"command": "omniroute",
"args": ["--mcp"],
"env": {}
}
}
}
Full MCP documentation: MCP Server README β 37 tools, IDE configs, Python/TS/Go clients.
curl http://localhost:20128/.well-known/agent.json
curl -X POST http://localhost:20128/a2a \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":"quickstart","method":"message/send","params":{"skill":"quota-management","messages":[{"role":"user","content":"Give me a short quota summary."}]}}'
Full A2A documentation: A2A Server README β JSON-RPC 2.0, skills, streaming, task lifecycle.
, , and other per-layer timeout vars still work and override the shared baseline.
), OmniRoute derives the outbound header from the resolved fetch timeout so provider-side read timeouts stay aligned with your env configuration.
set conservative and, when is left on , only forwards client-provided markers.
| disables it) | ||
or |
proxy forwarding from API port to dashboard port | |
| disables it) |
Note: For streaming requests, only covers connection setup / waiting for the first upstream response. Once the stream is active, OmniRoute will only abort on an actual stall () or Undici body inactivity ().
PORT=20128 DASHBOARD_PORT=20129 omniroute # API: http://localhost:20128/v1 # Dashboard: http://localhost:20129
. Save this block as :
# Template file for 'omniroute'
pkgname=omniroute
version=3.4.1
revision=1
hostmakedepends="nodejs python3 make"
depends="openssl"
short_desc="Universal AI gateway with smart routing for multiple LLM providers"
maintainer="zenobit <zenobit@disroot.org>"
license="MIT"
homepage="https://github.com/diegosouzapw/OmniRoute"
distfiles="https://github.com/diegosouzapw/OmniRoute/archive/refs/tags/v${version}.tar.gz"
checksum=009400afee90a9f32599d8fe734145cfd84098140b7287990183dde45ae2245b
system_accounts="_omniroute"
omniroute_homedir="/var/lib/omniroute"
export NODE_ENV=production
export npm_config_engine_strict=false
export npm_config_loglevel=error
export npm_config_fund=false
export npm_config_audit=false
do_build() {
local _gyp_arch
case "$XBPS_TARGET_MACHINE" in
aarch64*) _gyp_arch=arm64 ;;
armv7*|armv6*) _gyp_arch=arm ;;
i686*) _gyp_arch=ia32 ;;
*) _gyp_arch=x64 ;;
esac
NODE_ENV=development npm ci --ignore-scripts
npm run build
cp -r .next/static .next/standalone/.next/static
[ -d public ] && cp -r public .next/standalone/public || true
local _node_gyp=/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
(cd node_modules/better-sqlite3 && node "$_node_gyp" rebuild --arch="$_gyp_arch")
local _bs3_release=.next/standalone/node_modules/better-sqlite3/build/Release
mkdir -p "$_bs3_release"
cp node_modules/better-sqlite3/build/Release/better_sqlite3.node "$_bs3_release/"
rm -rf .next/standalone/node_modules/@img
for _mod in pino-abstract-transport split2 process-warning; do
cp -r "node_modules/$_mod" .next/standalone/node_modules/
done
}
do_check() {
npm run test:unit
}
do_install() {
vmkdir usr/lib/omniroute/.next
vcopy .next/standalone/. usr/lib/omniroute/.next/standalone
for _d in \
.next/standalone/.next/server/app/dashboard \
.next/standalone/.next/server/app/dashboard/settings \
.next/standalone/.next/server/app/dashboard/providers; do
touch "${DESTDIR}/usr/lib/omniroute/${_d}/.keep"
done
cat > "${WRKDIR}/omniroute" <<'EOF'
#!/bin/sh
export PORT="${PORT:-20128}"
export DATA_DIR="${DATA_DIR:-${XDG_DATA_HOME:-${HOME}/.local/share}/omniroute}"
export APP_LOG_TO_FILE="${APP_LOG_TO_FILE:-false}"
mkdir -p "${DATA_DIR}"
exec node /usr/lib/omniroute/.next/standalone/server.js "$@"
EOF
vbin "${WRKDIR}/omniroute"
}
post_install() {
vlicense LICENSE
}
keeps your DB and configurations in . |
|
| erases all configurations, keys, and databases. |
UNINSTALL.md.