@felan-ai/ext-fusion

中文文档
0.4.1发布于 2026/11/13MITTypeScriptES Module构建来源已验证近 30 天下载 2455

Review parallel model answers and explicitly fuse them with a selected model

原始使用文档
文档目录3 节
  1. Configuration and model selection
  2. Commands and review
  3. Host API

@felan-ai/ext-fusion

Runs the same explicit prompt against 2–8 authenticated, session-allowed chat models in parallel, automatically compares their answers, and lets the user review each answer before explicitly requesting a synthesis. It is provider neutral and uses the configured Core Models service; OpenRouter models work through their normal configured provider. It does not call OpenRouter's beta Fusion server tool.

Configuration and model selection

The default entry uses pi.ui forms, model-list views, progress and paged review documents. It does not require a TUI, client-specific hint or injected Fusion host. /fusion-models searches names and provider/model references, pages through the catalogue, toggles participants and selects the comparison model. Saving is explicit; cancelling leaves the previous lineup unchanged.

Configured extensionConfig.fusion values provide the initial lineup. Picker choices are saved in the current session branch as felan.fusion-lineup.v1 and restored when reopening commands or reloading the extension. Saving also awaits pi.updateConfig({ participants, fusionModel }) to persist global settings through the host-owned writer. If that writer is unavailable or rejects the update, the session copy is retained, an explicit error is shown, and the picker remains open for retry or cancellation. No global save is silently assumed.

{
  "extensionConfig": {
    "fusion": {
      "participants": ["openrouter/anthropic/claude-sonnet-4", "openai/gpt-5"],
      "fusionModel": "openrouter/anthropic/claude-sonnet-4",
      "concurrency": 4,
      "timeoutSeconds": 120,
      "maxOutputChars": 12000,
      "thinking": "off"
    }
  }
}

participants defaults to []; a run never silently chooses models. Configure 2–8 distinct provider/model-id references. The picker displays only authenticated models in the active session's allowed scope. The fusion model must also be authenticated and in that scope. Nested IDs such as openrouter/anthropic/claude-sonnet-4 are supported.

Commands and review

  • /fusion <prompt> asks every participant the same prompt in a fresh, tool-free model request, then asks the selected fusion model for a comparison of agreements, disagreements, unique contributions, and uncertainty.
  • /fusion reopens the latest unfinished review on the active session branch. After synthesis, it asks for a new prompt and starts a new run.
  • /fusion-models searches and updates the participant and comparison model lineup; canceling leaves the saved lineup unchanged.
  • Review full originals and comparison through document paging. Synthesis is offered only after comparison succeeds, with optional instructions and an explicit available provider/model override. Separate actions retry failed participants, comparison or synthesis. Closing/reopening does not repeat requests. A separate progress element can cancel an in-flight stage even while its review action is awaiting completion.

With N participants, comparison uses N+1 requests. Choosing Fuse makes one additional model request; retries make the requests they explicitly repeat. The confirmation form discloses this count before each new comparison run. Review documents show provider-reported usage and estimated cost when supplied, plus latency; these estimates are not provider invoices and missing pricing is not free usage.

Fusion sends only the /fusion prompt and bounded source answers—not the session transcript, project files, or the active model's tools. The prompt and bounded answers/comparison are saved as a custom entry in the current session branch for review and recovery. Model outputs and the comparison are untrusted evidence; agreement is not verification. The fused result is added to the transcript only after explicit user action. Provider cancellation is best effort and a request already received by a provider may still incur charges.

The comparison stage never writes files or automatically fuses. Execution remains with the extension and configured Models provider, not the UI client. Cancellation and shutdown join outstanding provider calls, including providers that return after their abort signal fires. Late results cannot publish a successful review or transcript message.

The catalogue limit is 10000 models, with 40 visible rows per page. References must fit 300 UTF-8 bytes. Prompts are limited to 20000 characters; form input also obeys the protocol's 32-KiB field limit. Review documents use 24000-byte pages; the existing 240000-byte saved-review limit remains. Unsupported data is rejected rather than silently omitted. Model-output bounding still follows maxOutputChars and is explicitly disclosed.

Host API

The package root's default export is the service-backed execution entry. It declares optional Core MODELS_SERVICE (felan.models@1). Without a provider, both commands remain registered but warn that Models is unavailable; no inference runs. UI unavailability or a cancelled/deferred confirmation does not approve a request. The root entry retains FUSION_CONFIG metadata for configuration discovery.

import { MODELS_SERVICE } from '@felan-ai/agent-core';

services.set(MODELS_SERVICE, modelsService);

Inference uses ModelsService.getAvailable and completeSimple, with fresh availability checks before dispatch. There is no ambient credential discovery or direct HTTP client. The pure runFusion, compareFusionAnswers and synthesizeFusion APIs remain unchanged.

Hosts supply CreateAgentCoreSessionOptions.updateExtensionConfig(packageName, patch) for global settings persistence. Core binds the package identity and validates writable declared fields; the host owns policy and durable storage. The extension's resolved pi.config snapshot changes on reload, not during the persistence callback.

The named createFusionExtension(host?) factory accepts an explicit FusionHost. Configured hosts should use the service-backed default for generic UI across clients. The package exports no TUI entrypoint.

pnpm --filter @felan-ai/ext-fusion build
pnpm --filter @felan-ai/ext-fusion type-check
pnpm --filter @felan-ai/ext-fusion test

The new npm package requires a maintainer's manual 0.0.0 bootstrap and trusted-publisher setup before its intended CI release; see docs/maintainers/releasing.md. Local verification does not publish the package.

版本与发布记录

@felan-ai/ext-fusion 共发布 14 个版本,首次发布于 2026/10/10;过去 12 个月发布了 14 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.4.1latest2026/11/131 天前
0.4.02026/11/059 天前
0.3.52026/11/0212 天前
0.3.42026/10/3015 天前
0.3.32026/10/3015 天前
0.3.22026/10/2322 天前

其他发布通道:bootstrap → 0.0.0。

关于 @felan-ai/ext-fusion 的常见问题

@felan-ai/ext-fusion 是什么?

Review parallel model answers and explicitly fuse them with a selected model

如何安装 @felan-ai/ext-fusion?

在项目目录运行 npm install @felan-ai/ext-fusion,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@felan-ai/agent-core(^0.15.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@felan-ai/ext-fusion 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@felan-ai/ext-fusion 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@felan-ai/ext-fusion 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@felan-ai/ext-fusion 可以商用吗?

@felan-ai/ext-fusion 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@felan-ai/ext-fusion 的下载量有多少?

根据 npm 官方下载统计,@felan-ai/ext-fusion 在 2026/10/15 – 2026/11/13 这 30 天内被下载 2,455 次,日均约 82 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@felan-ai/ext-fusion 还在维护吗?

最新版本 0.4.1 发布于 2026/11/13(1 天前);至今共发布 14 个版本,其中过去 12 个月发布了 14 个;首次发布于 2026/10/10。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。