fix(devin): apply explicit SWE-2 effort before model suffix - #4420
fix(devin): apply explicit SWE-2 effort before model suffix#4420Smartnewb 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. |
리뷰 · 우선순위 64 / 80이 PR은 #4416에서 하려던 SWE-2 effort 고정을, ACP가 사라진 뒤의 공유 Devin 어댑터( 라인 (~95–110, 라인 (테스트의 structure/* 여러 파일 · docs-site adapters.md - 같은 문장(“공유 Devin 어댑터가 SWE-2 model effort selection을 소유한다”)이 registry 외에 inbound-compat·chat-compat·cursor·runtime·transports 등 관련 薄い 문서에도 복붙됩니다. structure 게이트를 통과하려는 흔적으로 보이지만, 실제 계약 문서는 draft readiness 체크리스트 - CI 로컬 전부·최신 정규식 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 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>
|
Landed on |
Summary
Fix SWE-2 effort selection in the shared Devin adapter: requesting
swe-2-highwith explicitmediumreasoning currently returnsswe-2-highimmediately because the existing suffix wins. Resolve explicit SWE-2 effort to its native medium/high/max UID before that suffix shortcut.This follows the maintainer's guidance on #4416 after #4415 removed ACP. It changes
src/adapters/devin.ts, shared bydevinanddevin-cli, and does not restore any ACP implementation. Omitted or unknown effort preserves an explicit variant; other model families retain their existing suffix precedence. Lower-than-medium labels map to Medium andxhigh/ultramap to Max.Verification
bun test tests/providers/devin-adapter.test.ts tests/providers/devin-hardening.test.ts: 37 passed, 0 failed, 144 assertions. Covers each explicit effort against base/suffixed ids, aliases, omission, and other model families.bun run typecheck: passed.bun run structure:checkandbun run privacy:scan: passed.cd docs-site && bun install --frozen-lockfile && bun run build: passed, 425 pages.swe-2-medium,swe-2-high, andswe-2-maxare present and enabled. Only these model facts are reported; no credential or private catalog dump is committed. This verifies available UIDs, not a live inference run of the modified shared adapter.git diff --check: passed. No full-suite success claim; submitted as a focused draft. AI-assisted implementation and verification.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.