Skip to content

feat(components): Devin Fusion builder for advertised lead+sidekick pairs - #2760

Open
EventHorizonXT wants to merge 1 commit into
LodyAI:mainfrom
EventHorizonXT:feat/devin-fusion-builder
Open

EventHorizonXT wants to merge 1 commit into
LodyAI:mainfrom
EventHorizonXT:feat/devin-fusion-builder

Conversation

@EventHorizonXT

Copy link
Copy Markdown

Related issue

Closes #2758

Problem / pressure

Devin's Fusion models reach Lody as ~90 flat entries inside the single model ACP config option, each label encoding lead, lead effort, sidekick and Fast support (e.g. Fusion (Claude Opus 5.5 Medium Thinking + SWE-2 Medium)). There is no way to compose a pair like in Devin Desktop, and per-pair capabilities (which effort ladder applies, whether Fast exists) are invisible until after selection.

Protocol verification against the official runtime (Devin CLI 3000.12.28 via the pinned acp-extension-devin adapter; real session/new and session/set_config_option probes) established that ACP exposes no independent Lead or Sidekick wire controls — only one flat model select plus per-pair thought_level/speed — and that unadvertised model values are rejected with -32602. Any honest implementation must therefore apply one of the advertised fusion-* values, never a composed id.

Summary

  • lib/devin-fusion.ts: parses advertised fusion-* model options into a lead/sidekick catalog (label normalization, pair lookup), resolves each pair's own thought_level/speed controls, and turns a draft into composer edits — always exactly one advertised model value, never constructed.
  • fusion-builder-dialog.tsx: Devin Fusion dialog with Lead, Lead effort, Sidekick and Fast Mode; unadvertised pairs disabled with reason; "not declared" vs "not loaded" distinguished; runtime confirmation compares against acpRuntimeConfig only — pending edits say so instead of claiming applied state.
  • desktop-run-config-menu.tsx + plumbing in session-chat-interface.tsx, session-chat-input-area.tsx, chat-landing.tsx: a Fusion row between Model and Reasoning, gated to builtin Devin with a parseable catalog; session edits apply from the next message, landing-page edits at conversation start.
  • Selector plumbing (also submitted separately as the smaller feat(components): per-model selector lookup and Devin speed as Fast #2759 for easier review): builtin Devin's speed select normalized as the per-model Fast control; useAcpModelSelectorResolver exposes per-model selectors as selectorsForModel.
  • i18n (en + zh_CN), Storybook coverage for the dialog and the Devin menu path, behavior tests, and a bilingual Agent Note recording the protocol evidence and limits.

This change is intentionally kept as one reviewable artifact here; if maintainers prefer the ≤1000-line community split it is already staged as a sequence starting with #2759 (selector plumbing → lib + tests → UI → docs).

Visual explanation

Run config menu ── Fusion row (builtin Devin only, catalog parsed)
      │
      ▼
FusionBuilderDialog                    lib/devin-fusion.ts
  Lead ▼ ───────► draft ──► findFusionPair(lead, sidekick)
  Sidekick ▼            │        │ pair advertised?
  Lead effort ▼         │   no ──┴─► disabled + reason
  Fast ☐                │   yes ─► modelValue (as advertised)
      │                 │
      ▼ Apply           ▼
  model edit (exact advertised value)
  + thought_level / speed edits ──► composer (next message / conversation start)
      │
      ▼
  acpRuntimeConfig comparison ──► "Devin confirmed…" | "pending until next message"

parseFusionCatalog only decomposes values Devin already advertised; fusionApplyEdits emits the untouched value string. Nothing in this path can send a model id Devin did not publish.

Before / after

Before After
Run config shows the model row only; Fusion appears as ~90 flat fusion-* labels in the shared model list A Fusion row opens a builder with Lead / Lead effort / Sidekick / Fast controls over only advertised pairs; unavailable pairs disabled with reason; runtime-confirmed state shown

Storybook states were verified visually for: confirmed pair, pair without Fast (Fast disabled with reason), runtime differs (pending banner), non-Fusion model, unknown controls, and the full menu → dialog → lead dropdown → apply round trip. The Storybook DevinFusion story on DesktopRunConfigMenu reproduces all of them.

Test plan

  • pnpm check — full suite green on the branch commit (typecheck, lint, i18n, all boundary checks, test:ci across the workspace incl. components 4585 tests).
  • tests/fusion-builder.test.tsx (23) + tests/acp-selector-options.test.ts additions — parse, legal/illegal pairs, per-pair control resolution, pair-change reset, exact apply edits, runtime confirmation, dialog render, menu gating, Devin speed behavior.
  • Real adapter probes: session/new catalog (145 values / 88 fusion-*), set_config_option for model + thought_level + speed, unadvertised value rejected -32602 with state unchanged.
  • Admission-boundary prompt: with a Fusion pair applied, session/prompt reached the runtime's quota gate; the agent-reported modelLabel rendered the applied model, effort and speed (Fusion (GPT-6 Sol Medium Thinking Fast + SWE-2 Medium)).
  • Not run: a paid live Fusion turn (quota-bound); desktop app against a live Devin session verified through the config layer only. Both noted in the Agent Note.

Context handoff

Original user prompt

Show original prompt
你是专门处理高复杂度软件工程任务的高级执行 Agent。

适用场景包括:
- 跨模块复杂重构
- 长链路故障排查
- 多步骤系统实现
- 常规执行 Agent 无法解决的技术问题
- 需要主模型与 Sidekick 协作的复杂任务

优先利用 Fusion 内部已有的主模型与助手分工,不进行重复设计或冗余委派。

接收边界明确的子问题后,独立完成分析、实现与测试,并向总工汇报可验证结果。

未经用户明确批准,不得自动升级到更高费用的模型或开启额外付费执行。

重要:本会话必须运行在 Devin 的 Fusion 模型(fusion-* 系列)上。如果当前会话实际未使用 Fusion,请先声明该事实并请求确认,不要用 SWE-2 冒充 Fusion。

请读取我附上的两份 Markdown 文件,按照完整开发计划书实施 Lody 的 Devin Fusion 自定义组合功能。

先完成 G0 协议能力核验,确认官方 Devin ACP 能否独立设置 Lead 和 Sidekick。确认可行后,直接在本地开发分支实现、测试并验证功能。

目标是实际可用、能向 Lody 上游提交的高质量代码,不是演示界面。请遵守仓库的 AGENTS.md 和贡献规范,优先复用现有架构。遇到上游协议阻塞时,提供真实证据及可交付的降级方案。

完成后向我汇报实际效果、测试结果、代码变更及 PR 方案。未经我批准,不要向远程仓库推送或提交 PR。

Shared conversation

Status: shared
Link: https://share.lody.ai/s/r17fb89p3ppc0qj99rkbb566z98j5ypd#access=v1.33791ff0455b99e33f50af2f1d22541dc0fa58c70b61266a0b3e3303df06f4b1

…ck pairs

Devin's ACP exposes Fusion as one flat `model` select whose `fusion-*`
values each encode a lead+sidekick pair; it has no independent Lead or
Sidekick wire controls. The desktop run-config menu gains a Fusion row
(builtin Devin only) opening a dialog that decomposes the advertised
values into Lead, Lead effort, Sidekick and Fast Mode controls.

Apply writes exactly one advertised model value plus that pair's own
`thought_level`/`speed` options through the existing composer edits, so
the next turn applies them and the agent-reported runtime config is the
confirmation — never a composed model id. Unadvertised combinations stay
disabled, controls a model does not declare are told apart from controls
not yet loaded, and Devin's `speed` select normalizes as the per-model
Fast control only for builtin Devin.

Model: swe-2-max

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@github-actions github-actions Bot added scope: components status:needs-pr-attention External PR needs contributor attention before review labels Nov 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@EventHorizonXT, this pull request needs updates before review.

It is marked status:needs-pr-attention. Address the findings below by 2026-11-20 22:33:29 UTC. The label and this comment are removed automatically after the PR passes validation.

If the PR remains invalid for 7 days, it will be closed and marked status:pr-policy-expired. Continue afterward by opening a new pull request with the current template.

Policy findings
PR does not meet Lody contribution requirements:

- PR changes 1978 lines; community PRs over 1000 lines require a maintainer assignment on the linked Issue before review.

See `CONTRIBUTING.md` and `.github/PULL_REQUEST_TEMPLATE.md`.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: components status:needs-pr-attention External PR needs contributor attention before review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Devin Fusion custom pair builder in run configuration

1 participant