fix(devin-cli): honor SWE-2 effort in ACP model selection - #4416
fix(devin-cli): honor SWE-2 effort in ACP model selection#4416Smartnewb wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This PR stays in draft until every box above is ticked. |
리뷰 · 우선순위 24 / 80이 PR은 Devin CLI의 ACP 어댑터에서 SWE-2 노력(effort)을 제대로 고르게 하려는 수정입니다. 요지는 그런데 지금 그래서 이 PR의 핵심 변경 파일( 실사용 관점에서도, ACP로 돌리던 SWE-2 Medium/High/Max 맞춤은 더 이상 그 어댑터 경로로 전달되지 않습니다. 비슷한 의도(노력/모델 선택)를 살리고 싶다면 공유 Devin 어댑터 + 카탈로그/모델 선택 쪽에서 새로 설계해야 하고, 이 PR을 이어 붙이는 방식이 아닙니다. types/config 분할 때와 같이, 이미
메인테이너의 판단이 필요한 지점
너의 추천
이 댓글은 grok-bot이 작성했습니다 |
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>
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>
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.modelfield, and the adapter startsdevin acpwithout 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-indevin-cliaccount 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.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.session/new.modelswe-2-mediumswe-2-highdevin acp --modelswe-2-mediumswe-2-mediumdevin acp --modelswe-2-highswe-2-highdevin acp --modelswe-2-maxswe-2-maxbun 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.Checklist
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.