Chimera is a multi-model deliberation engine that orchestrates large language models (LLMs) across a directed acyclic graph (DAG) of stages. It employs a 3‑tier provider architecture:
deepseek-foreman).opencode-go, zai-glm).ollama-cloud, openrouter) with cost‑optimized routing.Competitive differentiators:
0241610)jsonschema.validate() ensures every aggregated output conforms; failed stages trigger re‑iteration. (commit f488ef2)wait_messages and trigger fields control multi‑step reasoning within a single stage. (commit 2b6d5d1)Note: Google Gemini and Anthropic Claude are classified as external PAYG (direct API billing), distinct from the internal foreman tier.
The deliberation engine is implemented as a DAG where each node is a stage. The lifecycle follows a closed‑loop iteration:
+-----------+ +---------+ +-------------+ +-------+ +--------+
|Dispatcher|----->| Workers |----->| Aggregator |----->| Audit |----->| Refine |
+-----------+ +---------+ +-------------+ +-------+ +--------+
| |
+---- _RE_ITERATION_SIGNAL -----------------------------------+
Dispatcher parses the DAG definition, resolves model routing per stage, and fans out to worker nodes.
Workers execute model calls in parallel waves via asyncio.create_task. (commit 469eec4)
Aggregator collects results, merges according to stage schema, and passes to Audit.
Audit runs jsonschema.validate(aggregated_output, stage_schema); on failure it emits _RE_ITERATION_SIGNAL back to Dispatcher.
Refine adjusts prompt parameters (temperature, max_tokens) before the next iteration.
The model catalog contains 36 models across 9 providers. Each model is scored on 32 hierarchical category axes (0–100) for capability, latency, cost, and availability. (commit 85a3a11)
Pre‑defined deliberation patterns:
(commit 0241610)
Effectiveness is calculated as quality / (cost ^ sensitivity).
Sensitivity (0–1) is configurable per request. Default sensitivity = 0.5. (commit b7cca8d)
Each model in the catalog has an enabled: true/false flag. Disabled models are excluded from routing. (commit 5dadfc9)
Chimera fetches models.dev/api.json from each provider and caches locally for 5 minutes. New models are added automatically. (commit caca56b)
CHIMERA_MAX_TIMEOUT)X-Chimera-Timeout overrides per request (clamped to admin ceiling)(commit 0241610)
Primary API is REST (see §5). A MCP (Model Context Protocol) server is also available via stdio. (commit a2ae192)
json_schema strict mode is used at the model provider level (when supported). Chimera enforces mechanical jsonschema.validate() after aggregation. (commit f488ef2)
Note: The output_schema field is required for strict mode validation; if omitted, only free-form output is allowed without mechanical validation.
Stages can define wait_messages (list of messages to inject before model answers) and trigger (a Python regex pattern evaluated against the aggregated text output).
Example: {"wait_messages": ["Think step by step."], "trigger": ".*therefore.*"}. (commit 413979b)
416 tests, 61 integration skips (due to provider unavailability). (commit f488ef2)
| Provider | Tier | Models |
|---|---|---|
| deepseek-foreman | PAYG Foreman | deepseek-v4-pro, deepseek-v4-flash |
| opencode-go | Prepaid Worker Bucket | deepseek-v4-pro, deepseek-v4-flash |
| zai-glm | Prepaid Worker Bucket | glm-5.2 |
| minimax | Prepaid Worker Bucket | MiniMax-M3 |
| kimi-for-coding | Prepaid Worker Bucket | kimi-k2.7 |
| xai-oauth | Prepaid Worker Bucket | grok-4.5 |
| ollama-cloud | Backup / Overflow | various open‑source |
| openrouter | Backup / Overflow | 31+ models incl. GPT‑5.6 family, Claude Opus 4.8, Gemini 3.1 Pro |
| Google Gemini | External PAYG | gemini‑3.1‑pro, gemini‑3.1‑flash |
| Anthropic Claude | External PAYG | claude‑opus‑4.8, claude‑sonnet‑4.5 |
All provider entries validated as of July 2026. (commit 85a3a11)
| Method | Path | Description |
|---|---|---|
| POST | /v1/deliberate | Execute a deliberation job. Accepts JSON: formation, overrides, output_schema (required for strict mode), dag (only allowed when allow_custom_dag=true). (commit 0241610) |
| GET | /health | Returns status and model catalog freshness. (commit 1d32721) |
| GET | /v1/models | List all models with current enabled/disabled, costs, quality scores. (commit 85a3a11) |
| GET | /v1/formations | List available formations and their DAG definitions. (commit 0241610) |
| GET | /v1/trace/{request_id} | Retrieve full trace of a completed deliberation (stages, timings, outputs). (commit 1bf73ea) |
| WS | /ws/trace/{request_id} | Stream trace updates in real‑time. (commit a2ae192) |
Note on allow_custom_dag: When this parameter is true, the request may supply a custom dag object; otherwise only predefined formations are permitted.
b785711)1bf73ea)text/event-stream. (commit 1bf73ea)b785711)0241610)b785711)b785711)