> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ModelFusions SDK Reference

> SDK reference for the ModelFusions API, available in Node.js and Python.

## ModelFusions

### List ModelFusions

Returns Model Fusions in the caller's workspace, ordered newest first. Supports cursor pagination, key search, preset filtering, and enabled-state filtering.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.model_fusions.list()

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.modelFusions.list();

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "limit": Optional[int],
    "starting_after": Optional[str],
    "ending_before": Optional[str],
    "search": Optional[str],
    "preset": List[Literal["MODEL_FUSION_PRESET_GENERAL", "MODEL_FUSION_PRESET_QUALITY", "MODEL_FUSION_PRESET_BUDGET", "MODEL_FUSION_PRESET_CODE", "MODEL_FUSION_PRESET_SAFETY"]],  # optional
    "enabled": Optional[bool],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  limit?: number;
  startingAfter?: string;
  endingBefore?: string;
  search?: string;
  preset?: ("MODEL_FUSION_PRESET_GENERAL" | "MODEL_FUSION_PRESET_QUALITY" | "MODEL_FUSION_PRESET_BUDGET" | "MODEL_FUSION_PRESET_CODE" | "MODEL_FUSION_PRESET_SAFETY")[];
  enabled?: boolean;
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "object": str,
    "data": [{
        "model_fusion_id": str,
        "key": str,
        "model_ref": str,
        "panel_models": List[str],
        "judge_model": str,
        "synthesis_mode": Literal["MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS", "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL"],
        "preset": Literal["MODEL_FUSION_PRESET_GENERAL", "MODEL_FUSION_PRESET_QUALITY", "MODEL_FUSION_PRESET_BUDGET", "MODEL_FUSION_PRESET_CODE", "MODEL_FUSION_PRESET_SAFETY"],
        "orchestrator_model": Optional[str],
        "web_tools": bool,
        "max_tool_calls": int,
        "feed_raw_to_synth": bool,
        "enabled": bool,
        "created_at": str,
        "updated_at": str,
    }],
    "has_more": bool,
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  object: string;
  data: {
    modelFusionId: string;
    key: string;
    modelRef: string;
    panelModels: string[];
    judgeModel: string;
    synthesisMode: "MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS" | "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL";
    preset: "MODEL_FUSION_PRESET_GENERAL" | "MODEL_FUSION_PRESET_QUALITY" | "MODEL_FUSION_PRESET_BUDGET" | "MODEL_FUSION_PRESET_CODE" | "MODEL_FUSION_PRESET_SAFETY";
    orchestratorModel?: string;
    webTools: boolean;
    maxToolCalls: number;
    feedRawToSynth: boolean;
    enabled: boolean;
    createdAt: Date;
    updatedAt: Date;
  }[];
  hasMore: boolean;
}
```

### Create a ModelFusion

Creates a workspace Model Fusion virtual model. The key becomes the stable model identifier used by gateway requests.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.model_fusions.create(key="<key>", panel_models=["openai/gpt-6-astra", "openai/gpt-5.6-luna"], judge_model="openai/gpt-6-luna", synthesis_mode="MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL", preset="MODEL_FUSION_PRESET_GENERAL")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.modelFusions.create({
    key: "<key>",
    panelModels: ["openai/gpt-6-astra", "openai/gpt-5.6-luna"],
    judgeModel: "openai/gpt-6-luna",
    synthesisMode: "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL",
    preset: "MODEL_FUSION_PRESET_GENERAL",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "key": str,  # required
    "panel_models": List[str],  # required
    "judge_model": str,  # required
    "synthesis_mode": Literal["MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS", "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL"],  # required
    "preset": Literal["MODEL_FUSION_PRESET_GENERAL", "MODEL_FUSION_PRESET_QUALITY", "MODEL_FUSION_PRESET_BUDGET", "MODEL_FUSION_PRESET_CODE", "MODEL_FUSION_PRESET_SAFETY"],  # required
    "orchestrator_model": Optional[str],
    "web_tools": Optional[bool],
    "max_tool_calls": Optional[int],
    "feed_raw_to_synth": Optional[bool],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  key: string;  // required
  panelModels: string[];  // required
  judgeModel: string;  // required
  synthesisMode: "MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS" | "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL";  // required
  preset: "MODEL_FUSION_PRESET_GENERAL" | "MODEL_FUSION_PRESET_QUALITY" | "MODEL_FUSION_PRESET_BUDGET" | "MODEL_FUSION_PRESET_CODE" | "MODEL_FUSION_PRESET_SAFETY";  // required
  orchestratorModel?: string;
  webTools?: boolean;
  maxToolCalls?: number;
  feedRawToSynth?: boolean;
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "model_fusion": {
        "model_fusion_id": str,
        "key": str,
        "model_ref": str,
        "panel_models": List[str],
        "judge_model": str,
        "synthesis_mode": Literal["MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS", "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL"],
        "preset": Literal["MODEL_FUSION_PRESET_GENERAL", "MODEL_FUSION_PRESET_QUALITY", "MODEL_FUSION_PRESET_BUDGET", "MODEL_FUSION_PRESET_CODE", "MODEL_FUSION_PRESET_SAFETY"],
        "orchestrator_model": Optional[str],
        "web_tools": bool,
        "max_tool_calls": int,
        "feed_raw_to_synth": bool,
        "enabled": bool,
        "created_at": str,
        "updated_at": str,
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  modelFusion: {
    modelFusionId: string;
    key: string;
    modelRef: string;
    panelModels: string[];
    judgeModel: string;
    synthesisMode: "MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS" | "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL";
    preset: "MODEL_FUSION_PRESET_GENERAL" | "MODEL_FUSION_PRESET_QUALITY" | "MODEL_FUSION_PRESET_BUDGET" | "MODEL_FUSION_PRESET_CODE" | "MODEL_FUSION_PRESET_SAFETY";
    orchestratorModel?: string;
    webTools: boolean;
    maxToolCalls: number;
    feedRawToSynth: boolean;
    enabled: boolean;
    createdAt: Date;
    updatedAt: Date;
  };
}
```

### Retrieve a ModelFusion

Retrieves a Model Fusion by ID within the caller's workspace.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.model_fusions.get(model_fusion_id="<id>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.modelFusions.get({
    modelFusionId: "<id>",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "model_fusion_id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  modelFusionId: string;  // required
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "model_fusion": {
        "model_fusion_id": str,
        "key": str,
        "model_ref": str,
        "panel_models": List[str],
        "judge_model": str,
        "synthesis_mode": Literal["MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS", "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL"],
        "preset": Literal["MODEL_FUSION_PRESET_GENERAL", "MODEL_FUSION_PRESET_QUALITY", "MODEL_FUSION_PRESET_BUDGET", "MODEL_FUSION_PRESET_CODE", "MODEL_FUSION_PRESET_SAFETY"],
        "orchestrator_model": Optional[str],
        "web_tools": bool,
        "max_tool_calls": int,
        "feed_raw_to_synth": bool,
        "enabled": bool,
        "created_at": str,
        "updated_at": str,
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  modelFusion: {
    modelFusionId: string;
    key: string;
    modelRef: string;
    panelModels: string[];
    judgeModel: string;
    synthesisMode: "MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS" | "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL";
    preset: "MODEL_FUSION_PRESET_GENERAL" | "MODEL_FUSION_PRESET_QUALITY" | "MODEL_FUSION_PRESET_BUDGET" | "MODEL_FUSION_PRESET_CODE" | "MODEL_FUSION_PRESET_SAFETY";
    orchestratorModel?: string;
    webTools: boolean;
    maxToolCalls: number;
    feedRawToSynth: boolean;
    enabled: boolean;
    createdAt: Date;
    updatedAt: Date;
  };
}
```

### Update a ModelFusion

Replaces the complete Fusion configuration. The key is immutable.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.model_fusions.update(model_fusion_id="<id>", panel_models=["openai/gpt-6-astra", "openai/gpt-5.6-luna"], judge_model="openai/gpt-6-luna", synthesis_mode="MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL", preset="MODEL_FUSION_PRESET_QUALITY", web_tools=True, max_tool_calls=5, feed_raw_to_synth=True)

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.modelFusions.update({
    modelFusionId: "<id>",
    updateModelFusionRequest: {
      panelModels: ["openai/gpt-6-astra", "openai/gpt-5.6-luna"],
      judgeModel: "openai/gpt-6-luna",
      synthesisMode: "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL",
      preset: "MODEL_FUSION_PRESET_QUALITY",
      webTools: true,
      maxToolCalls: 5,
      feedRawToSynth: true,
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "model_fusion_id": str,  # required
    "panel_models": List[str],  # required
    "judge_model": str,  # required
    "synthesis_mode": Literal["MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS", "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL"],  # required
    "preset": Literal["MODEL_FUSION_PRESET_GENERAL", "MODEL_FUSION_PRESET_QUALITY", "MODEL_FUSION_PRESET_BUDGET", "MODEL_FUSION_PRESET_CODE", "MODEL_FUSION_PRESET_SAFETY"],  # required
    "web_tools": bool,  # required
    "max_tool_calls": int,  # required
    "feed_raw_to_synth": bool,  # required
    "orchestrator_model": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  modelFusionId: string;  // required
  updateModelFusionRequest: {  // required
    panelModels: string[];  // required
    judgeModel: string;  // required
    synthesisMode: "MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS" | "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL";  // required
    preset: "MODEL_FUSION_PRESET_GENERAL" | "MODEL_FUSION_PRESET_QUALITY" | "MODEL_FUSION_PRESET_BUDGET" | "MODEL_FUSION_PRESET_CODE" | "MODEL_FUSION_PRESET_SAFETY";  // required
    orchestratorModel?: string;
    webTools: boolean;  // required
    maxToolCalls: number;  // required
    feedRawToSynth: boolean;  // required
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "model_fusion": {
        "model_fusion_id": str,
        "key": str,
        "model_ref": str,
        "panel_models": List[str],
        "judge_model": str,
        "synthesis_mode": Literal["MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS", "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL"],
        "preset": Literal["MODEL_FUSION_PRESET_GENERAL", "MODEL_FUSION_PRESET_QUALITY", "MODEL_FUSION_PRESET_BUDGET", "MODEL_FUSION_PRESET_CODE", "MODEL_FUSION_PRESET_SAFETY"],
        "orchestrator_model": Optional[str],
        "web_tools": bool,
        "max_tool_calls": int,
        "feed_raw_to_synth": bool,
        "enabled": bool,
        "created_at": str,
        "updated_at": str,
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  modelFusion: {
    modelFusionId: string;
    key: string;
    modelRef: string;
    panelModels: string[];
    judgeModel: string;
    synthesisMode: "MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS" | "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL";
    preset: "MODEL_FUSION_PRESET_GENERAL" | "MODEL_FUSION_PRESET_QUALITY" | "MODEL_FUSION_PRESET_BUDGET" | "MODEL_FUSION_PRESET_CODE" | "MODEL_FUSION_PRESET_SAFETY";
    orchestratorModel?: string;
    webTools: boolean;
    maxToolCalls: number;
    feedRawToSynth: boolean;
    enabled: boolean;
    createdAt: Date;
    updatedAt: Date;
  };
}
```

### Delete a ModelFusion

Permanently deletes a Model Fusion and removes its gateway model configuration.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.model_fusions.delete(model_fusion_id="<id>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.modelFusions.delete({
    modelFusionId: "<id>",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "model_fusion_id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  modelFusionId: string;  // required
}
```

### Set Enabled

Controls whether a Model Fusion is available to gateway requests in the workspace.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.model_fusions.set_enabled(model_fusion_id="<id>", enabled=False)

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.modelFusions.setEnabled({
    modelFusionId: "<id>",
    setModelFusionEnabledRequest: {
      enabled: false,
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "model_fusion_id": str,  # required
    "enabled": bool,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  modelFusionId: string;  // required
  setModelFusionEnabledRequest: {  // required
    enabled: boolean;  // required
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "model_fusion": {
        "model_fusion_id": str,
        "key": str,
        "model_ref": str,
        "panel_models": List[str],
        "judge_model": str,
        "synthesis_mode": Literal["MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS", "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL"],
        "preset": Literal["MODEL_FUSION_PRESET_GENERAL", "MODEL_FUSION_PRESET_QUALITY", "MODEL_FUSION_PRESET_BUDGET", "MODEL_FUSION_PRESET_CODE", "MODEL_FUSION_PRESET_SAFETY"],
        "orchestrator_model": Optional[str],
        "web_tools": bool,
        "max_tool_calls": int,
        "feed_raw_to_synth": bool,
        "enabled": bool,
        "created_at": str,
        "updated_at": str,
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  modelFusion: {
    modelFusionId: string;
    key: string;
    modelRef: string;
    panelModels: string[];
    judgeModel: string;
    synthesisMode: "MODEL_FUSION_SYNTHESIS_MODE_ANALYSIS" | "MODEL_FUSION_SYNTHESIS_MODE_JUDGE_WRITES_FINAL";
    preset: "MODEL_FUSION_PRESET_GENERAL" | "MODEL_FUSION_PRESET_QUALITY" | "MODEL_FUSION_PRESET_BUDGET" | "MODEL_FUSION_PRESET_CODE" | "MODEL_FUSION_PRESET_SAFETY";
    orchestratorModel?: string;
    webTools: boolean;
    maxToolCalls: number;
    feedRawToSynth: boolean;
    enabled: boolean;
    createdAt: Date;
    updatedAt: Date;
  };
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.