Skip to content

AD-25 Add OpenRouter Fusion support for multi-model deliberation #42

@Finfinder

Description

@Finfinder

Objective

Integrate OpenRouter Fusion to enable multi-model deliberation where the agent sends queries to multiple models and synthesizes their responses.

Context

OpenRouter Fusion is a server-side tool that enables multi-model deliberation. When invoked, it sends the same prompt to multiple models (the panel), analyzes their responses for consensus, contradictions, and unique insights, then synthesizes a final answer using a judge model. This improves response quality for complex queries by leveraging diverse model perspectives.

Scope

  • Add Fusion configuration to Settings Service: enable/disable flag, panel models list, judge model selection
  • Implement Fusion adapter in Model Gateway that uses openrouter/fusion model alias
  • Support Fusion plugin configuration with custom analysis_models and model (judge) parameters
  • Handle Fusion response format: extract analysis.consensus, analysis.contradictions, analysis.unique_insights, and individual responses
  • Add Fusion toggle in Chat tab UI for user control
  • Implement fallback to single-model mode when Fusion is disabled or fails
  • Document Fusion usage and configuration in docs/model-gateway.md

Fusion API Details

  • Model alias: openrouter/fusion
  • Plugin configuration:
    {
      "model": "openrouter/fusion",
      "plugins": [{
        "id": "fusion",
        "analysis_models": ["~anthropic/claude-opus-latest", "~openai/gpt-latest"],
        "model": "~openai/gpt-latest"
      }]
    }
  • Response includes structured analysis with consensus, contradictions, and raw panel responses

Rationale

Multi-model deliberation can significantly improve answer quality for complex queries by aggregating diverse model perspectives. Fusion provides this capability server-side without requiring client-side orchestration.

Benefits

  • Higher quality responses for complex/ambiguous queries
  • Automatic detection of model disagreements and blind spots
  • Transparent synthesis showing which models contributed which insights
  • Configurable panel composition for different use cases

Definition of Done

  • Fusion configuration exists in Settings Service with panel models and judge model options
  • Model Gateway adapter supports openrouter/fusion with plugin configuration
  • Chat tab UI includes Fusion toggle control
  • Fusion responses are properly parsed and displayed
  • Fallback to single-model mode works when Fusion is disabled or fails
  • Documentation in docs/model-gateway.md covers Fusion configuration and usage

Milestone

1.0 Stabilize MVP

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:mediumMedium priority issue.roadmapTopic roadmap or larger direction of work.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions