Repository navigation
Chaos Mode
Dashboard: Chaos Mode (sidebar) →
/dashboard/chaos
API:GET/PUT/api/chaos/config·POST /api/chaos/run(dashboard session) ·POST /api/skills/collect/chaos(API key)
Source:src/lib/chaos/chaosExecutor.ts,src/lib/chaos/chaosConfig.ts
Chaos Mode sends one task to several providers at once — every participating provider
contributes one model instance, and you get all the answers side by side (or chained). It is a
multi-model execution surface, not a routing strategy: your normal /v1/chat/completions
traffic is never affected by it.
Disambiguation — three different things ship with "chaos" in the name:
| Thing | What it is | Where documented |
|---|---|---|
| Chaos Mode | The dashboard page + API described here: fan one task out to many providers (parallel or collaborative). | This guide |
auto/chaos |
Auto-Combo model id: parallel fan-out, one model per provider, one upstream call each. Not fault injection (details). | AUTO-COMBO.md |
| Chaos combo config | A persisted combo with config.chaos.enabled fans out the same way (API-only); judgeModel only picks the final answer, no synthesis call. |
open-sse/services/autoCombo/chaosEngine.ts |
auto/chaos is not a fault-injection or resilience-testing knob. Requesting
model: "auto/chaos" on /v1/chat/completions:
- Builds a panel of one model per provider: the first candidate of each
connected provider, in candidate-pool order, up to 5 members
(
OMNIROUTE_CHAOS_MAX_PANEL, capped at 10) (open-sse/services/autoCombo/virtualFactory.ts). Thechaos-modeweight pack only sets each member'sweight; the fan-out does not read it. - Sends the same request to every panel member in parallel, so one request
costs one upstream call per panel member
(
open-sse/services/autoCombo/chaosEngine.ts, dispatched fromopen-sse/services/combo.ts). - Streams one status line per panel member as it lands: an SSE comment
(
: chaos <index> ok|fail <model>) by default, plus anomni-chaos-partevent (model,index,ok,error) when the request setsstream_options.include_chaos_parts: true. These carry no answer text. - Sends one panel answer as the final OpenAI-style chunk: the first panel
member's (
auto/chaossets it asjudgeModel) when it succeeds, otherwise the last successful member's. The other panel answers are not returned, so you pay for N calls and receive one completion.
-
Open Dashboard → Chaos Mode (
/dashboard/chaos). -
Turn it on — Chaos Mode ships disabled by default (
enabled: falseinsrc/lib/chaos/chaosConfig.ts). While disabled,POST /api/chaos/runanswers400 — "Chaos Mode is not enabled. Enable it in Dashboard → Chaos Mode.". -
Pick the participants and defaults (persisted per instance via the settings store):
Field Meaning Default / limits enabledMaster switch falsedefaultModeparallelorcollaborative(see below)parallelproviderOverridesPer-provider participation ( providerId, optionalmodelId,enabled)empty = every active provider, max 200 systemPromptOverride for the built-in Chaos system prompt optional, max 10 000 chars timeoutMsMax time per model call 120000(5 000–600 000)maxTokensmax_tokensper model call4096(256–128 000) -
Run a test from the page itself — the results panel shows each provider's answer, status and duration.
-
parallel— every model gets the same task simultaneously; you receive all answers independently. -
collaborative— models run in a chain: each one sees the previous model's output and is asked to refine, extend, critique or offer an alternative. The response'ssummaryfield concatenates the successful outputs in chain order (parallel runs have nosummary).
Cookie-authenticated (the management session — see MANAGEMENT-AUTH.md); used by the dashboard page.
Bearer-token variant for external callers. The key must carry the Chaos Mode permission
(chaosModeEnabled), which is off by default — enable it per key in
Dashboard → API Manager → edit key → permissions → Chaos Mode. Same body as above.
curl -X POST http://localhost:20128/api/skills/collect/chaos \
-H "Authorization: Bearer $OMNIROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"task":"Compare approaches to X","mode":"parallel"}'Both endpoints return the same shape:
{
"task": "…",
"mode": "parallel",
"startedAt": "2026-09-01T00:00:00.000Z",
"totalProviders": 3,
"totalResults": 3,
"models": [
{ "providerId": "glm", "providerName": "GLM", "modelId": "glm-4.7",
"status": "success", "content": "…", "durationMs": 3210 }
],
"summary": "…" // collaborative mode only
}-
400 Chaos Mode is not enabled— step 2 above: the global switch is off. -
API key gets rejected on
/api/skills/collect/chaos— the key lacks the per-keychaosModeEnabledpermission (off by default; this is a setting, not an error). -
A provider you expected is missing from the results — check
providerOverrideson the Chaos Mode page (a disabled override excludes it) and whether the provider connection is active.
OmniRoute · Website · npm · Docker Hub
- Setup Guide
- User Guide
- Features
- Quick Start (Docker)
- Electron Desktop App
- Termux (Android)
- PWA Guide
- MCP Server
- A2A Server
- Agent Protocols
- OpenCode Plugin
- Webhooks
- Cloud Agents
- Skills
- Memory
- Evals
- Gamification
- Guardrails
- Compliance
- Error Sanitization
- Public Credentials
- Route Guard Tiers
- Stealth Guide
- CLI Token Auth