Repository navigation
fix(agents): keep exact model transports in harness selection - #147849
Conversation
Keep API, endpoint, and request override facts tied to the selected configured model. Reuse the existing configured-row resolver and remove duplicate prefix stripping and normalized-row merging from harness support. Preserve literal legacy selection, legacy-only fallback, and same-spelling duplicate semantics. Registered-harness regressions fail in both conflicting row orders before the fix; 203 focused tests, the changed-file gate, and independent review pass. Related: #130706, #143822.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 12:24 AM ET / 04:24 UTC. ClawSweeper reviewWhat this changesThe PR makes agent runtime selection use the exact configured model’s transport settings, adds registered-harness regression coverage, and documents row precedence. Merge readiness✅ Ready for maintainer review This remains a useful, focused repair: current main still combines conflicting model rows when building harness support facts. No actionable defect was found in the introduced patch. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw selects an agent runtime by asking registered harnesses whether they support the chosen provider and model. The support context supplies API, endpoint, and request-override facts that determine whether a plugin runtime or the embedded runtime handles the request. flowchart TD
A[Provider and model configuration] --> B[Configured model row resolver]
C[Prepared route facts] --> D[Harness support context]
B --> D
D --> E[Registered harness support checks]
E --> F[Selected plugin runtime]
E --> G[Embedded runtime]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -14, Tests +84, Docs +4. Total +74 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep harness transport and request-override facts tied to the existing configured-row owner, preserving literal selection, legacy fallback, and duplicate semantics. Do we have a high-confidence way to reproduce the issue? Yes, from source: configure exact and legacy-prefixed rows with conflicting transport fields and register a harness that supports only the exact route. Current main merges those rows; the added tests exercise both orders. No runtime reproduction was executed here. Is this the best way to solve the issue? Yes. Reusing the resolver already responsible for request-override selection removes the competing selection rule without changing its public contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 28dd17e8a15e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit 'e3d8d0078369b21223c70028c4502c89f1420897': (51 commits) fix: background requests delay opening chats (#147845) chore(i18n): refresh native locales (#147899) feat: start remote sessions without a repository (#147773) fix(slack): retire probe sockets after timeout (#147846) refactor(agents): share theme ANSI color encoding (#147838) improve(memory): bound vector recall decision counts (#147900) improve(browser): narrow dashboard lifetime rechecks (#147892) test(discord): compact lifecycle matrices (#147855) fix(agents): use exact model rows for harness support (#147849) test(agents): compact embedded lifecycle matrices (#147856) test(agents): compact embedded admission matrices (#147853) test(cli): compact node management matrices (#147854) feat(artifacts): select assistant-delivered files by run (#147682) improve: reduce event-loop work when recording prompts (#147876) fix: preserve readable generated image and video filenames (#147833) fix(ci): skip SDK rendering for identical revisions (#147572) fix: prevent false process failures and stalled background waits (#147871) fix(ui): restore live updates when retrying chat history (#147865) fix(ui): preserve text and image order in assistant replies (#147731) refactor(qa-lab): reuse approval result formatter (#147867) ...
Keep API, endpoint, and request override facts tied to the selected configured model. Reuse the existing configured-row resolver and remove duplicate prefix stripping and normalized-row merging from harness support. Preserve literal legacy selection, legacy-only fallback, and same-spelling duplicate semantics. Registered-harness regressions fail in both conflicting row orders before the fix; 203 focused tests, the changed-file gate, and independent review pass. Related: openclaw#130706, openclaw#143822.
Related: #130706, #143822.
What Problem This Solves
Fixes: a registered harness can reject an otherwise supported configured model because a legacy row supplies the wrong API or endpoint to its support check.
User Impact
User impact: harnesses receive transport and request-override facts from the selected model row. Exact IDs keep their provider defaults without inheriting unrelated legacy-row fields; literal legacy selections, legacy-only fallback, and same-spelling duplicates retain their existing behavior.
Why This Change Was Made
Harness support now uses the existing configured-row resolver, removing its separate prefix-stripping and normalized-row merge. Production code decreases by 14 lines. Existing configuration remains valid; no SDK, loader, updater, schema, or migration contract changes.
Evidence
df0c530a1aa469e36548e33bc0fa2e794852f57d, 203 focused tests, the full changed-file gate, independent P2 review, and one normal build passed.pnpm openclaw row-proofcommands exercised real synthetic plugin registration and the existing publiccommand-auth-nativeSDK. The selected runtime, API, endpoint, and override facts matched every case. All 50 recorded Node processes and their groups closed, persistent observed modules and 14,109 checked regular build files stayed unchanged, and temporary plugin output was captured before normal loader cleanup.