Skip to content

Select language

Current language: English

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 An Auto-Combo model id with fault-injection scoring weights, for resilience testing. Nothing to configure. AUTO-COMBO.md
Chaos combo config A persisted combo with config.chaos.enabled fans out to a panel with an optional judge model (API-only). open-sse/services/autoCombo/chaosEngine.ts
  1. Open Dashboard → Chaos Mode (/dashboard/chaos).

  2. Turn it on — Chaos Mode ships disabled by default (enabled: false in src/lib/chaos/chaosConfig.ts). While disabled, POST /api/chaos/run answers 400 — "Chaos Mode is not enabled. Enable it in Dashboard → Chaos Mode.".

  3. Pick the participants and defaults (persisted per instance via the settings store):

    Field Meaning Default / limits
    enabled Master switch false
    defaultMode parallel or collaborative (see below) parallel
    providerOverrides Per-provider participation (providerId, optional modelId, enabled) empty = every active provider, max 200
    systemPrompt Override for the built-in Chaos system prompt optional, max 10 000 chars
    timeoutMs Max time per model call 120000 (5 000–600 000)
    maxTokens max_tokens per model call 4096 (256–128 000)
  4. 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’s summary field concatenates the successful outputs in chain order (parallel runs have no summary).

Cookie-authenticated (the management session — see MANAGEMENT-AUTH.md); used by the dashboard page.

// body
{
"task": "Compare approaches to X", // required
"providers": ["glm", "kimi"], // optional filter
"mode": "parallel", // optional — overrides defaultMode
"systemPrompt": "…", // optional override
"maxTokens": 4096 // optional override
}

POST /api/skills/collect/chaos — API key

Section titled “POST /api/skills/collect/chaos — API key”

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.

Terminal window
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-key chaosModeEnabled permission (off by default; this is a setting, not an error).
  • A provider you expected is missing from the results — check providerOverrides on the Chaos Mode page (a disabled override excludes it) and whether the provider connection is active.

undefined (a58000c7685f)

HagiCode

HagiCode is an agentic coding workspace. Rich, convenient UI interactions make planning, agent execution, and project work approachable and easy to navigate, creating an engaging development experience.

Explore an engaging development experience through rich, convenient UI interactions.

Visit HagiCodeRead the documentation
  • SmartOpenSpec workflows turn intent into an executable path, from proposal to design, tasks, and a shipped change.
  • EfficientMulti-agent execution keeps research, implementation, and review moving in parallel, across several repositories and the Agent CLIs you already use.
  • InterestingRich, convenient UI interactions make planning, agent execution, and project work approachable and easy to navigate.

Download for Windows

Get it from Microsoft StoreAll downloads

Turn ideas into shipped software.

HagiCode is an agentic coding workspace. OpenSpec workflows plan the change, multi-agent execution carries it out, and Hero Scenario makes the long run visible, so ideas become shipped software.

Smart
OpenSpec workflows turn intent into a path from proposal to shipped change.
Efficient
Multi-agent execution runs research, build, and review in parallel.
Fun
Rich UI interactions make planning, agent work, and projects easier to follow.