Skip to main content

Debate Mode

Send each request to 3 different model families in parallel, then synthesize the best answer with an arbitrator model.

Debate mode is designed for high-stakes decisions where accuracy matters more than cost. It leverages diverse reasoning from multiple model families to produce a single, high-quality response.

  • 3 panelist models from distinct families (e.g. GPT, Claude, Gemini) run in parallel
  • 1 arbitrator model evaluates all responses and synthesizes the best answer
  • Automatic family selection — panelists are chosen to ensure genuinely different reasoning approaches

~4× cost per request

Debate mode runs 3 panelist models + 1 arbitrator per request. Best suited for critical queries where accuracy outweighs cost considerations. Streaming is not supported — responses are returned as a complete message.

How to Activate Debate Mode

There are three ways to enable debate mode, depending on your use case:

1. Per-request flag (API / SDK)
Add debate: true to your request body to enable debate for a single request.
javascript
import Agentlify from 'agentlify';

const client = new Agentlify({ apiKey: 'your-api-key' });

const response = await client.chat.completions.create({
  model: 'router/your-router-id',
  messages: [
    { role: 'user', content: 'Analyze the trade-offs of microservices vs monolith...' }
  ],
  debate: true  // Enable debate for this request
});

console.log(response.choices[0].message.content);
// Metadata includes debate details:
// response.metadata.debateMetadata.panelists
// response.metadata.debateMetadata.arbitratorModel
1b. Panel flag — see all responses unfiltered
Add panel: true to skip the arbitrator entirely. All 3 panelist responses are returned in a single message, each labelled with its model name, separated by horizontal rules.
javascript
const response = await client.chat.completions.create({
  model: 'router/your-router-id',
  messages: [
    { role: 'user', content: 'Explain the CAP theorem...' }
  ],
  panel: true  // Returns all 3 responses in one message, no arbitration
});

// response.choices[0].message.content will look like:
//
// **gpt-5**
//
// The CAP theorem states...
//
// ---
//
// **claude-sonnet-4-5**
//
// CAP stands for Consistency, Availability...
//
// ---
//
// **gemini-2-flash**
//
// In distributed systems...

Panel mode costs ~3× per request (no arbitrator). Useful when you want to compare model perspectives directly, or feed all responses into your own downstream logic. The response is standard OpenAI-compatible — a single choices[0].message.content string so existing SDK code requires no changes.

2. Global toggle on router
Enable debate mode for all requests to a specific router via the dashboard.
  1. Go to Dashboard → Routers
  2. Select your router and click Edit
  3. Find the Debate Mode section and toggle it on
  4. Save changes — all requests to this router will now use debate mode

Users can opt out per-request by sending debate: false in their request.

3. Preset router endpoint
Use the built-in /debate preset which comes pre-configured with debate mode enabled.
javascript
const response = await client.chat.completions.create({
  model: 'router/debate',  // Use the debate preset
  messages: [
    { role: 'user', content: 'Your question here...' }
  ]
});

How It Works

1

Panelist Selection

3 models are selected from your router's fallback list, ensuring each comes from a distinct model family. Family detection strips variant suffixes (e.g. gpt-5 and gpt-5-mini are the same family).

2

Parallel Execution

All 3 panelists receive the same request and run in parallel. The system requires at least 2 successful responses to proceed.

3

Arbitration

An arbitrator model receives all panelist responses and synthesizes the best possible answer, combining the strongest insights from each.

4

Response

The arbitrator's response is returned in the standard OpenAI-compatible format. Metadata includes details about which models were used as panelists and as the arbitrator.

Response Shape

Both modes return a standard OpenAI-compatible response. The _meta field carries mode-specific detail about cost, tokens, and which models ran.

debate: true — arbitrated response
model is the arbitrator's ID. _meta.debate lists all panelists and per-model cost.
json
{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "model": "anthropic:claude-opus-4-5",   // arbitrator
  "choices": [{ "message": { "role": "assistant", "content": "..." } }],
  "usage": { "total_tokens": 4821 },
  "_meta": {
    "modelUsed": "anthropic:claude-opus-4-5",
    "routerMode": "debate",
    "cost": 0.034210,
    "tokensUsed": 4821,
    "latency": 8342,
    "debate": {
      "arbitrator": "anthropic:claude-opus-4-5",
      "panelists": [
        { "model": "openai:gpt-5",            "tokens": 1204, "cost": 0.009632, "latencyMs": 3201, "success": true },
        { "model": "google:gemini-2-pro",     "tokens": 987,  "cost": 0.004935, "latencyMs": 2876, "success": true },
        { "model": "meta:llama-4-maverick",   "tokens": 1108, "cost": 0.002216, "latencyMs": 3540, "success": true }
      ],
      "totalTokens": 4821,
      "totalCost": 0.034210
    }
  }
}
panel: true — raw panel response
model is literally "panel". _meta.panel lists each model that contributed.
json
{
  "id": "panel-1740657123456",
  "object": "chat.completion",
  "model": "panel",
  "choices": [{
    "message": {
      "role": "assistant",
      "content": "**openai:gpt-5**\n\nThe CAP theorem states...\n\n---\n\n**google:gemini-2-pro**\n\nCAP stands for...\n\n---\n\n**meta:llama-4-maverick**\n\nIn distributed systems..."
    }
  }],
  "usage": { "total_tokens": 3299 },
  "_meta": {
    "modelUsed": "panel",
    "routerMode": "panel",
    "cost": 0.016783,
    "tokensUsed": 3299,
    "latency": 4120,
    "panel": {
      "models": [
        { "model": "openai:gpt-5",          "tokens": 1204, "cost": 0.009632, "latencyMs": 3201, "success": true },
        { "model": "google:gemini-2-pro",   "tokens": 987,  "cost": 0.004935, "latencyMs": 2876, "success": true },
        { "model": "meta:llama-4-maverick", "tokens": 1108, "cost": 0.002216, "latencyMs": 3540, "success": true }
      ],
      "totalTokens": 3299,
      "totalCost": 0.016783
    }
  }
}

Requirements

  • At least 3 fallback models must be configured on the router, ideally from different model families
  • Streaming is automatically disabled — debate mode requires all panelist responses before the arbitrator can run
  • Sufficient credits — billing reserves ~4× the normal cost estimate for debate requests

Debate Node in Agent Designer

You can also use debate mode as a node in the agent workflow designer. The Debate node sends the current workflow input to 3 distinct-family models and returns the arbitrated result.

Node config options:

  • System Prompt — optional prompt sent to all panelist models
  • Arbitrator Prompt — custom instructions for the arbitrator
  • Write Output to State Key — optionally store the result in workflow state