Skip to content

feat(components): per-model selector lookup and Devin speed as Fast - #2759

Draft
EventHorizonXT wants to merge 1 commit into
LodyAI:mainfrom
EventHorizonXT:pr/devin-speed-and-resolver
Draft

EventHorizonXT wants to merge 1 commit into
LodyAI:mainfrom
EventHorizonXT:pr/devin-speed-and-resolver

Conversation

@EventHorizonXT

Copy link
Copy Markdown

Related issue

Refs #2758

Problem / pressure

Two gaps in the ACP selector plumbing block any per-model configuration picker
(the Devin Fusion builder in #2758 is the first consumer):

  1. Devin carries Fast Mode on a speed config select rather than a boolean
    fast-mode toggle like Codex/Claude. normalizeFastModeSelectors neither
    recognized that select as an existing Fast control nor filtered it for
    models whose declaration omits Fast, so the Fast state leaked across Devin
    models with different capabilities.
  2. There was no way to ask "which config options would model X show" without
    changing the current selection. A picker that compares controls across
    models had to borrow the selected model's selectors, mixing capabilities.

Summary

  • acp-selector-options.ts: treat builtin Devin's speed select as the
    per-model Fast control inside the existing normalizeFastModeSelectors
    pass — kept when the model declares fastMode, filtered when it does not,
    gated to builtin Devin only via BUILTIN_SELECT_FAST_CONFIG_IDS.
  • use-acp-selector-options.ts: add useAcpModelSelectorResolver, a pure
    lookup returning the selectors, source and adapter declaration an arbitrary
    model id would get, without touching the current selection.
  • use-session-acp-selector-context.ts: expose it as selectorsForModel.
  • Tests: Devin speed normalization covered in
    tests/acp-selector-options.test.ts (offered → kept, not offered →
    filtered, non-Devin agents untouched).

Visual explanation

useSessionAcpSelectorContext ──► selectorOptions  (selected model, as before)
                             └─► selectorsForModel  [NEW] ──► useAcpModelSelectorResolver(modelId)
                                                                 └─► buildAcpSelectorOptions({selectedModelId: modelId})
                                                                       └─► normalizeFastModeSelectors
                                                                             └─► Devin `speed` select = Fast control (builtin only)

Before / after

Before After
Devin speed select ignored by Fast normalization; models without declared Fast kept showing it speed treated exactly like the Fast toggles: kept when declared, filtered when not, builtin Devin only
No per-model selector lookup; callers could only read the selected model's options selectorsForModel(modelId) resolves any model's selectors, source and declaration without changing selection

Test plan

  • pnpm --filter @lody/components exec vitest run tests/acp-selector-options.test.ts — 36 tests pass, including the new Devin speed cases.
  • pnpm --filter @lody/components typecheck — clean.
  • pnpm check on the full feature branch — clean; this PR is the first slice of it.

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

Two pieces of ACP selector plumbing needed by per-model config pickers
(Refs LodyAI#2758): builtin Devin carries Fast on a `speed` select
rather than a fast-mode toggle, so normalize it the same way — keep the
select when the model declares Fast and filter it when it does not. And
add `useAcpModelSelectorResolver`, exposed as `selectorsForModel` on the
session selector context, so callers can resolve the config options an
arbitrary model would show without changing the current selection.

Model: swe-2-max

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant