Skip to content

fix(devin-cli): honor SWE-2 effort in ACP model selection - #4416

Closed
Smartnewb wants to merge 1 commit into
lidge-jun:devfrom
Smartnewb:fix/swe2-acp-effort
Closed

fix(devin-cli): honor SWE-2 effort in ACP model selection#4416
Smartnewb wants to merge 1 commit into
lidge-jun:devfrom
Smartnewb:fix/swe2-acp-effort

Conversation

@Smartnewb

@Smartnewb Smartnewb commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary

The local ACP adapter can run SWE-2 High even when a client requests Medium: Devin CLI 3000.10.21 ignores the non-standard session/new.model field, and the adapter starts devin acp without a model argument. Pass the selected model through --model, map SWE-2 reasoning effort to the native medium/high/max variant, and reject an advertised mismatched selection before sending user content.

This affects custom-named providers using adapter: "devin-cli". It does not change the built-in devin-cli account provider's newer cloud transport. Explicit effort overrides a SWE-2 suffix; omitted effort preserves the requested id. Other model families retain their ids. Medium/Max are also included in the ACP roster with the existing SWE-2 context window.

Verification

  • bun test tests/providers/devin-cli-adapter.test.ts: 22 passed, 0 failed.
  • Regression check: restoring the original adapter while retaining the new tests fails; restoring the fix passes.
  • bun run typecheck: passed.
  • bun run structure:check: passed.
  • bun run privacy:scan: passed.
  • cd docs-site && bun install --frozen-lockfile && bun run build: passed, 425 pages.
  • Real installed CLI, handshake only (no user prompt, tool execution, or private transcript):
Selection method Requested Acknowledged
Existing session/new.model swe-2-medium swe-2-high
devin acp --model swe-2-medium swe-2-medium
devin acp --model swe-2-high swe-2-high
devin acp --model swe-2-max swe-2-max
  • bun scripts/test.ts --changed=origin/dev: did not complete; the Bun changed-selection child remained idle for over eight minutes and was terminated. This is not a passing changed/full-suite claim. Opening as a draft for maintainer review.
  • AI-assisted implementation and verification. No credentials, local app configuration, or private conversation traces are included.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Sep 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • review readiness checklist open (0/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 0/4).

Review readiness checklist

  • ⬜ All CI tests are green on my local testing.
  • ⬜ I pushed my PR to the latest dev commit.
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

0/4 boxes ticked.

This PR stays in draft until every box above is ticked.

@lidge-jun

lidge-jun commented Sep 12, 2026

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 24 / 80

이 PR은 Devin CLI의 ACP 어댑터에서 SWE-2 노력(effort)을 제대로 고르게 하려는 수정입니다. 요지는 session/new.model 만으로는 CLI가 Medium을 High로 무시해 버리는 문제를, devin acp --model 로 넘기고 Medium/High/Max를 맞춘 뒤, 광고한 모델과 다르면 사용자 내용을 보내기 전에 거절하자는 것입니다. 작성자(Smartnewb)도 본문에 커스텀 adapter: "devin-cli" 쪽에 해당하고, 내장 devin-cli 의 새 클라우드 전송은 건드리지 않는다고 적어 두었습니다.

그런데 지금 dev HEAD(213065e30)에는 이미 #4415가 들어와 있습니다. #4415는 src/adapters/devin-cli/ 아래 ACP 스택(acp.ts, adapter.ts, binary.ts, models.ts)과 tests/providers/devin-cli-adapter.test.ts통째로 지우고, Devin을 src/adapters/devin.ts 의 공유(클라우드) 어댑터로 모은 뒤 buildNonOpenAIToolCatalogNudgeForTools 로 도구 목록 안내만 붙입니다. 어댑터 레지스트리에서도 별도 ACP 구현 등록이 빠졌습니다. 인증/자격 증명 쪽에는 devin-cli id가 남을 수 있지만, 이 PR이 고치려던 로컬 ACP 모델 선택 경로 자체는 코드베이스에서 사라졌습니다.

그래서 이 PR의 핵심 변경 파일(src/adapters/devin-cli/adapter.ts, src/adapters/devin-cli/models.ts, tests/providers/devin-cli-adapter.test.ts)은 현재 dev 에 존재하지 않습니다. rebase를 해도 없는 파일에 SWE-2 effort를 넣는 작업이 되고, #4415의 방향(ACP 폐기 후 공유 어댑터)과 정면으로 어긋납니다. 문서(docs-site/.../adapters.md, structure/adapters/registry.md 등) 손질도 ACP 전제라면 같은 이유로 지금 dev 와 맞지 않습니다.

실사용 관점에서도, ACP로 돌리던 SWE-2 Medium/High/Max 맞춤은 더 이상 그 어댑터 경로로 전달되지 않습니다. 비슷한 의도(노력/모델 선택)를 살리고 싶다면 공유 Devin 어댑터 + 카탈로그/모델 선택 쪽에서 새로 설계해야 하고, 이 PR을 이어 붙이는 방식이 아닙니다. types/config 분할 때와 같이, 이미 dev 에 무효화된 가지면 리베이스보다 닫는 쪽이 맞습니다.

src/adapters/devin-cli/adapter.ts - #4415로 파일이 삭제됨. SWE-2 --model / effort 매핑을 넣을 대상이 없음
src/adapters/devin-cli/models.ts - 동일하게 삭제됨. ACP 로스터 Medium/Max 추가가 현재 트리에 적용되지 않음
tests/providers/devin-cli-adapter.test.ts - 테스트 파일 자체도 #4415에서 제거됨. 22개 통과 검증은 옛 ACP 스택 기준
경로 adapter: "devin-cli" (ACP) - 공유 src/adapters/devin.ts + tool-catalog nudge로 대체됨. 이 PR 범위의 동작 계약이 사라짐
docs-site / structure 문서 수정 - ACP 전제라면 #4415 이후 문서와 충돌·중복 위험이 큼

메인테이너의 판단이 필요한 지점

  • SWE-2 effort를 공유 Devin(클라우드) 경로에서도 다시 맞출 새 이슈/PR을 열지, 아니면 당분간 카탈로그 nudge만으로 둘지
  • 기여자에게 ACP 폐기(refactor(devin): retire the ACP adapter and give the shared adapter the tool-catalog nudge #4415) 때문에 닫는다는 한 줄 안내를 남길지(권장, 이미 닫힘 코멘트 있음)
  • devin-cli 자격 증명 id만 남은 상태에서 커스텀 프로바이더 문서에 옛 ACP 안내가 남아 있지 않은지 한 번 더 훑을지

너의 추천

이 댓글은 grok-bot이 작성했습니다

@lidge-jun

Copy link
Copy Markdown
Owner

Closing as superseded/invalidated by #4415 (ACP/devin-cli adapter stack removed on dev at 213065e). Please do not rebase — if SWE-2 effort still matters on the shared Devin adapter, open a fresh PR against src/adapters/devin.ts.

@lidge-jun lidge-jun closed this Sep 12, 2026
lidge-jun added a commit that referenced this pull request Sep 13, 2026
Carry #4420 from 6a456fb onto 7ca00ff.

Cognition spells SWE-2 effort as the model id rather than a separate field,
and resolveWireModelUid returned early whenever the id already carried an
effort suffix. Asking for swe-2-high at medium therefore stayed swe-2-high
and the caller was silently ignored. Resolve an explicit SWE-2 effort to the
native medium/high/max UID before that shortcut runs. none, off, minimal and
low select Medium, since SWE-2 has no lane below it and rounding down to
nothing would quietly disable its reasoning; xhigh, ultra and max select Max.
Omitted or unknown effort preserves the variant, and other model families
keep their existing suffix precedence.

Two deliberate differences from the source PR. The effort map is a named
table instead of an inline branch, because EFFORT_SUFFIXES does not carry
ultra, off or minimal and the two would drift apart silently. And matching is
case-insensitive, so a caller sending HIGH reaches the same lane as high.

The resolver is exposed to tests through resolveWireModelUidForTests rather
than by exporting its bare name, mirroring
sanitizeToolDescriptionForCognitionForTests: it is an async helper that
reaches the catalog and does not belong in the adapter public API.

Ownership is recorded in structure/adapters/registry.md and the user-facing
adapters page. The source PR also pasted the same sentence into six unrelated
structure files; those hunks are omitted, and the structure gate checks path
mentions rather than behavioral prose, so the omission is safe.

This is the post-ACP landing of closed #4416 and does not restore ACP.

Local product tests, typecheck, build and install: NOT RUN.
Hosted exact-head CI on this PR is the merge proof.

Co-authored-by: Smartnewb <159137930+Smartnewb@users.noreply.github.com>
lidge-jun added a commit that referenced this pull request Sep 13, 2026
Carry #4420 from 6a456fb onto 7ca00ff.

Cognition spells SWE-2 effort as the model id rather than a separate field,
and resolveWireModelUid returned early whenever the id already carried an
effort suffix. Asking for swe-2-high at medium therefore stayed swe-2-high
and the caller was silently ignored. Resolve an explicit SWE-2 effort to the
native medium/high/max UID before that shortcut runs. none, off, minimal and
low select Medium, since SWE-2 has no lane below it and rounding down to
nothing would quietly disable its reasoning; xhigh, ultra and max select Max.
Omitted or unknown effort preserves the variant, and other model families
keep their existing suffix precedence.

Two deliberate differences from the source PR. The effort map is a named
table instead of an inline branch, because EFFORT_SUFFIXES does not carry
ultra, off or minimal and the two would drift apart silently. And matching is
case-insensitive, so a caller sending HIGH reaches the same lane as high.

The resolver is exposed to tests through resolveWireModelUidForTests rather
than by exporting its bare name, mirroring
sanitizeToolDescriptionForCognitionForTests: it is an async helper that
reaches the catalog and does not belong in the adapter public API.

Ownership is recorded in structure/adapters/registry.md and the user-facing
adapters page. The source PR also pasted the same sentence into six unrelated
structure files; those hunks are omitted, and the structure gate checks path
mentions rather than behavioral prose, so the omission is safe.

This is the post-ACP landing of closed #4416 and does not restore ACP.

Local product tests, typecheck, build and install: NOT RUN.
Hosted exact-head CI on this PR is the merge proof.

Co-authored-by: Smartnewb <159137930+Smartnewb@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants