For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
ModelsChatRankingsDocs
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
  • Overview
    • Quickstart
    • Principles
    • Models
    • Stripe Projects
    • FAQ
    • Report Feedback
  • Models & Routing
    • Model Fallbacks
    • Provider Selection
    • Auto Exacto
    • Private Models
  • Features
    • Workspaces
    • Presets
    • Response Caching
    • Tool Calling
      • Overview
      • Web Search
      • Web Fetch
      • Datetime
      • Image Generation
      • Apply Patch
      • Fusion
    • Structured Outputs
    • Message Transforms
    • Zero Completion Insurance
    • ZDR
    • App Attribution
    • Service Tiers
    • Sovereign AI
    • Router Metadata
    • Input & Output Logging
LogoLogo
ModelsChatRankingsDocs
On this page
  • Quick start
  • When does the model invoke it?
  • Parameters
  • What the tool returns
  • Judge degradation
  • Hard failures
  • Web tools
  • Recursion protection
  • Related
FeaturesServer Tools

Fusion

Beta

Multi-model deliberation as a server tool

Was this page helpful?
Previous

Plugins

Extend model capabilities with OpenRouter plugins
Next
Built with
Beta

Server tools are currently in beta. The API and behavior may change.

The openrouter:fusion server tool gives any model access to multi-model deliberation. When your model decides a prompt benefits from multiple perspectives, it invokes this tool — a panel of models answers in parallel, a judge compares their responses, and the structured analysis comes back to your model for the final answer.

This is the same pipeline behind the openrouter/fusion model alias and the fusion plugin. Using the server tool directly gives you the most control: choose your own outer model, combine it with other tools, and configure the panel and judge independently.

Quick start

1const response = await fetch('https://openrouter.ai/api/v1/chat/completions', {
2 method: 'POST',
3 headers: {
4 Authorization: 'Bearer {{API_KEY_REF}}',
5 'Content-Type': 'application/json',
6 },
7 body: JSON.stringify({
8 model: '{{MODEL}}',
9 messages: [
10 {
11 role: 'user',
12 content: 'Survey the strongest arguments for and against a carbon tax. Where do experts disagree?',
13 },
14 ],
15 tools: [
16 { type: 'openrouter:fusion' },
17 ],
18 }),
19});
20
21const data = await response.json();
22console.log(data.choices[0].message.content);

When does the model invoke it?

The tool’s description tells the model to call openrouter:fusion only when a task genuinely benefits from multiple perspectives — research questions, multi-domain critique, “compare and contrast” prompts, or anything where being wrong is expensive. Simple tactical prompts won’t trigger it.

To force fusion on every request, set tool_choice: "required". See Forcing fusion on every request.

Parameters

Pass an optional parameters object on the tool entry to override defaults:

1{
2 "tools": [
3 {
4 "type": "openrouter:fusion",
5 "parameters": {
6 "analysis_models": [
7 "~google/gemini-flash-latest",
8 "deepseek/deepseek-v3.2",
9 "~moonshotai/kimi-latest"
10 ],
11 "model": "~anthropic/claude-opus-latest"
12 }
13 }
14 ]
15}
FieldDefaultDescription
analysis_modelsQuality preset (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest)Models that form the panel. Each runs in parallel with openrouter:web_search and openrouter:web_fetch enabled. 1–8 models allowed.
modelYour outer modelThe judge that produces the structured analysis JSON. Defaults to the same model handling your request.
max_tool_calls8Max tool-calling steps each panel model and the judge may take in their openrouter:web_search / openrouter:web_fetch loop before they must return text. Range 1–16.
max_completion_tokensProvider defaultMax output tokens (including reasoning) per inner panel/judge call. Keeps reasoning-heavy models from exhausting their budget before producing visible text.
reasoningProvider defaultReasoning config forwarded to the panel and judge calls — an object with optional effort and max_tokens.
temperatureProvider defaultSampling temperature (0–2) forwarded to the panel and judge calls.

What the tool returns

On success, the tool result contains the structured analysis and the raw panel responses:

1{
2 "status": "ok",
3 "analysis": {
4 "consensus": ["Points all or most panel models agreed on"],
5 "contradictions": [
6 { "topic": "...", "stances": [{ "model": "...", "stance": "..." }] }
7 ],
8 "partial_coverage": [
9 { "models": ["..."], "point": "Only some models covered this" }
10 ],
11 "unique_insights": [
12 { "model": "...", "insight": "Something only one model raised" }
13 ],
14 "blind_spots": ["Topics no panel model addressed"]
15 },
16 "responses": [
17 { "model": "anthropic/claude-opus-4.5", "content": "..." },
18 { "model": "openai/gpt-4.1", "content": "..." },
19 { "model": "google/gemini-2.5-pro", "content": "..." }
20 ]
21}

When some panel models error but at least one succeeds, the result still has status: "ok" and adds a failed_models array describing which ones failed and why.

Judge degradation

If the panel succeeds but the judge fails — an upstream error, an empty completion, or output that isn’t valid analysis JSON — the tool does not error. It returns status: "ok" with the raw panel responses and simply omits analysis. Your model can still write the final answer from the panel responses:

1{
2 "status": "ok",
3 "responses": [
4 { "model": "anthropic/claude-opus-4.5", "content": "..." }
5 ]
6}

Hard failures

The tool only returns status: "error" when it can’t produce any useful output. In that case it includes a typed failure_reason:

1{
2 "status": "error",
3 "error": "all panel models failed",
4 "failure_reason": "all_panels_failed"
5}
ReasonMeaning
all_panels_failedEvery panel model returned an error.
insufficient_creditsEvery panel model failed and at least one was due to insufficient credits.
rate_limitedEvery panel model failed and at least one was rate-limited.
fusion_invocation_cappedFusion was already invoked earlier in the same turn; a second call is rejected.
unexpected_errorAn unexpected error interrupted the fusion run.

The calling model can fall back to answering without the analysis whenever fusion fails or degrades.

Web tools

openrouter:web_search and openrouter:web_fetch are enabled on both the panel and the judge calls, so models can pull fresh sources while they answer and analyze. The judge compares the panel responses rather than merging them: it treats what all or most models agree on as higher-confidence consensus, surfaces contradictions, preserves unique insights from individual models, and flags blind spots none of them addressed. The outer model writes the final answer from that analysis — so the result isn’t a simple majority vote.

Recursion protection

Inner fusion calls carry an x-openrouter-fusion-depth header. Panel and judge models cannot recursively invoke openrouter:fusion — the plugin refuses to inject the tool a second time, keeping deliberation bounded to a single level.

Related

  • Fusion Router (openrouter/fusion)
  • Fusion plugin
  • Web Search server tool
  • Web Fetch server tool
  • /labs/fusion — interactive playground