How the OmniRoute Fusion Combo Routing Strategy Works: Parallel LLM Aggregation Explained
The Fusion combo routing strategy fans out requests to multiple LLMs in parallel, then uses a judge model to synthesize a single high-quality answer from the panel's responses.
The Fusion combo routing strategy is OmniRoute's most sophisticated approach to improving response quality by leveraging collective intelligence across multiple models. Unlike single-model routing, this strategy consults a diverse panel of LLMs and distills their outputs into a unified, authoritative response. According to the OmniRoute source code in open-sse/services/fusion.ts, the implementation balances answer quality against latency through configurable quorum mechanisms and strict resource safety caps.
Architecture of the Fusion Combo Routing Strategy
Parallel Fan-Out to the Model Panel
When handleFusionChat receives a request, it immediately fans out the prompt to every model defined in the combo's panel. The function strips tool-related metadata from the request body—setting stream: false—to ensure compatibility across diverse model APIs.
In open-sse/services/fusion.ts (lines 15-16), the system constructs a panelBody for distribution:
const panelBody = { ...body, stream: false };
Each panel member receives this body through a timeout-wrapped execution via withTimeout (lines 79-80). This concurrent dispatch ensures all models begin processing simultaneously, maximizing the probability of diverse reasoning paths while minimizing wall-clock latency.
Quorum-Based Response Collection
Rather than waiting for every panel member to respond, the strategy employs a quorum-grace collection mechanism. The collectPanel function tracks settled promises and triggers a grace period once a configurable minimum threshold (minPanel) of successful responses arrives.
When ok >= cfg.minPanel (lines 14-15), a stragglerGraceMs timer begins. This timer caps the penalty of slow "straggler" models by proceeding with whatever responses have accumulated after the grace period expires. A hard upper bound called panelHardTimeoutMs (defaulting to 90 seconds) guarantees the request cannot hang indefinitely.
Response Processing and Judge Synthesis
Extracting and Validating Panel Answers
Once responses arrive, the system sanitizes them through extractPanelText (lines 55-96 in open-sse/services/fusion.ts). This utility normalizes outputs across OpenAI, Claude, Gemini, and Responses API formats, returning plain text strings. Empty or unparsable answers are recorded as failures and excluded from synthesis.
Judge Model Synthesis
If multiple valid answers exist, the strategy invokes a judge model to perform the final synthesis. The buildJudgePrompt function (lines 22-41) constructs a detailed directive asking the judge to:
- Analyze consensus and contradictions across panel responses
- Identify potential blind spots or hallucinations
- Produce a single authoritative answer that corrects individual model errors
The system appends this as a synthetic user turn using appendUserTurn (lines 4-15), then routes the assembled conversation to the designated judgeModel (lines 88-90). If no explicit judge is configured, the strategy defaults to the first panel member.
Graceful Degradation Paths
The Fusion combo routing strategy implements robust fallback logic in handleFusionChat (lines 38-50):
- Zero successful answers: Returns a 503 error with per-model failure reasons for debugging
- Exactly one successful answer: Returns that answer directly, bypassing judge overhead unless explicitly configured otherwise
Tool Handling and Safety Mechanisms
Bypassing Fusion for Tool-Bearing Requests
When the original request includes tool definitions and tool_choice is not "none", Fusion short-circuits its synthesis pipeline. The isToolBearingRequest function (lines 50-54) detects this condition and routes the request directly to the judge model (or first panel member) to preserve tool-calling integrity. This prevents the synthesis step from interfering with structured tool outputs.
if (isToolBearingRequest(clientRequestBody)) {
// No panel synthesis – the judge receives the original body unchanged
return handleSingleModel(clientRequestBody, combo.judgeModel);
}
Resource Limits and Timeouts
To prevent resource exhaustion, the strategy enforces strict safety caps early in the execution (lines 90-103):
- Maximum panel size (
maxPanel, default 40): Rejects combos attempting to fan out to more than 40 models, preventing memory exhaustion - Hard timeout (
panelHardTimeoutMs, default 90,000ms): Absolute ceiling on total request duration - Minimum panel threshold (
minPanel): Configurable quorum count that triggers the grace period
Configuration and Usage Example
Configure the Fusion combo routing strategy by defining a combo with fusionTuning parameters:
import { handleFusionChat } from '@/open-sse/services/fusion.ts';
const combo = {
name: 'advanced-fusion',
models: ['gpt-4o', 'claude-3.5-sonnet', 'gemini-1.5-pro', 'command-r-plus'],
judgeModel: 'gpt-4o-mini',
fusionTuning: {
minPanel: 2, // Proceed after 2 successes
stragglerGraceMs: 5000, // Wait 5s for stragglers
panelHardTimeoutMs: 60000, // 60s absolute limit
maxPanel: 25 // Reject if panel exceeds 25
}
};
await handleFusionChat({
body: clientRequestBody,
models: combo.models,
handleSingleModel,
log: comboLogger,
comboName: combo.name,
judgeModel: combo.judgeModel,
tuning: combo.fusionTuning,
});
Summary
- The Fusion combo routing strategy fans out requests to multiple models simultaneously in
open-sse/services/fusion.ts, then synthesizes responses through a dedicated judge model. - Quorum-grace collection uses
minPanelandstragglerGraceMsto balance response quality against latency, avoiding waits for slow panel members. - Graceful degradation handles edge cases ranging from total panel failure (503 error) to single-success shortcuts that bypass the judge.
- Tool-bearing requests bypass the synthesis layer entirely via
isToolBearingRequestto maintain API compatibility. - Safety mechanisms including
maxPanel(default 40) andpanelHardTimeoutMs(default 90s) prevent resource exhaustion during high-load scenarios.
Frequently Asked Questions
What happens if all panel models fail to respond?
If zero panel members return valid answers, handleFusionChat returns a 503 Service Unavailable error (lines 38-42). The response includes detailed per-model failure reasons captured during the fan-out phase, enabling operators to diagnose whether failures stem from model timeouts, parsing errors, or API unavailability.
How does the Fusion strategy handle requests that include tool definitions?
When isToolBearingRequest detects tools in the request body (lines 50-54), the strategy skips panel synthesis entirely. Instead, it routes the request directly to the judge model (or first panel member if no judge is specified) to ensure tool-calling schemas remain intact. This short-circuit occurs at lines 69-75 in open-sse/services/fusion.ts.
What is the purpose of the straggler grace period?
The stragglerGraceMs parameter prevents slow models from disproportionately impacting latency. Once collectPanel receives minPanel successful responses (line 14), the grace timer starts. The system proceeds with synthesis after this timer expires, ignoring any pending slow responses. This mechanism ensures predictable latency without sacrificing the quorum required for quality synthesis.
How does the judge model handle conflicting answers from the panel?
The judge receives a synthetic prompt constructed by buildJudgePrompt (lines 22-41) that explicitly instructs it to analyze consensus, contradictions, and blind spots across all panel outputs. The prompt requires the judge to produce a single authoritative answer that resolves discrepancies, effectively performing an ensemble correction step that improves upon any individual panel member's response.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →