Repository navigation
refactor(providers): deslop small provider plugins - #158437
Conversation
|
🦞👀 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: blocked before merge. Reviewed September 26, 2026, 12:23 AM ET / 04:23 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch consolidates bundled provider setup, catalog, search, speech, and media code, adds Moonshot and Tencent inherited-key regressions, and reduces assertion allowances. Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open. Current main still has the two inherited-key defects, and the branch contains useful work that is not merged. The updated evidence addresses the prior review’s validation request; this review found no confirmed blocking defect. Priority: P3 Review scores
Verification
How this fits togetherBundled provider plugins connect OpenClaw configuration, credentials, and agent requests to model, search, speech, and media services. Their catalogs guide provider selection, while their runtime adapters send requests and return results. flowchart LR
A[Configuration and credentials] --> B[Bundled provider plugins]
B --> C[Catalog and setup]
B --> D[Runtime adapters]
C --> E[Model selection]
D --> F[Vendor services]
F --> G[Agent results]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep generic coercion and catalog construction with their existing SDK owners, while provider plugins retain vendor policy and public exports. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main’s Moonshot and Tencent lookups accept inherited keys, and the PR adds registered-provider regression cases. This read-only review did not execute them. Is this the best way to solve the issue? Yes. The own-key checks address the localized defects, while the cleanup reuses existing SDK and provider owners without expanding the public contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4aa852f5b49c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
What Problem This Solves
Maintainer-requested cleanup of the long tail of small provider plugins, following #157819. These plugins retain duplicated projections, local copies of SDK coercion, and forwarding layers with no separate invariant.
User Impact
Provider IDs, catalogs/defaults, manifests, credentials and SecretRefs, configuration, onboarding text, and request/response contracts are preserved. Two inherited-object-key bugs are fixed: Moonshot no longer treats names such as
constructoras known thinking models, and Tencent ignores inherited effort-map keys instead of overwriting valid shared effort handling.Why This Change Was Made
The sweep read all 64 in-scope provider plugins and changes 53. Production TypeScript shrinks by 1,263 net lines (+781/-2,044); tests grow by 298 lines. No SDK export or manifest changes.
Fixes found along the way
Moonshot's model table used
in, and Tencent indexed an ordinary object without checking ownership. Both accepted inherited Object.prototype keys. Own-key checks retain normal model/effort behavior; regressions exercise registered provider boundaries.Evidence
Exact-head CI passed on
7ff1c1963ffe25dbbaa77bd6531c9ef8085a4f3e: 111 successful jobs, 22 skips. Independent Codex reviews passed through P2 for the full implementation and the fixture/ratchet follow-ups.All repository tests, checks, and builds ran remotely through
scripts/crabbox-wrapper.mjson blacksmith-testbox, with frozen dependencies and verified source:pnpm test:extensions:batch <plugin>passed for all 53 touched plugins, totaling 2,194 passing test executions. The first 28 completed batches were retained; production files are byte-identical between that tested revision and the final head.node scripts/run-vitest.mjs <consumer files>passed 316 tests in 18 files across seven shards, covering registration, discovery, catalog/auth, speech/Talk, search credentials/errors/signals, and simple-completion transport.node scripts/check-changed.mjs --base origin/mainpassed the selected formatting, lint/types, ratchets, dead-export and boundary checks, and runtime-cycle checks in 763.05 s.pnpm buildpassed in 475.56 s, including verification of all 158 public Plugin SDK subpaths.pnpm test <file> --maxWorkers=1; timings are below.Preservation fixtures also passed against the original production implementation: 486 tests across 20 files. Four intentional bug-regression cases were excluded from that preservation run, then failed separately on the original code for the intended reasons (two Moonshot cases and two Tencent cases). They pass on the repaired candidate. Wire-adjacent changes retain literal request/URL/header fixtures, including provider-generated dynamic fields where applicable.
Validation caught a Vertex test mock still attached to the former API reexport; it now mocks the unchanged ADC decision owner. Exa's wire fixture now reuses its existing string-body guard instead of coercing a generic request body. CI also required exact shrink-only maintenance: 27 assertion allowances removed across 15 entries. Comfy retains its stronger literal-byte assertion and drops the duplicate parsed-object assertion. These corrections preserve the tested behavior.
The two live-test edits only relocate private imports (Featherless and Mistral). Those suites were type-checked; authenticated live tests were not run. Catalogs, manifests, public plugin exports, configuration and stored-data shapes remain unchanged; no update or migration procedure changes.
Changed-test cost
Testbox wall time includes the full single-file command and its startup/cleanup. CI seconds sum the reported test-case durations in the exact-head run; they exclude transform/setup overhead. Paths below are relative to
extensions/.anthropic-vertex/index.test.tsamazon-bedrock-mantle/mantle-anthropic.runtime.test.tsarcee/index.test.tsazure-speech/speech-provider.test.tsbrave/src/brave-web-search-provider.test.tscloudflare-ai-gateway/index.test.tscomfy/image-generation-provider.test.tsexa/src/exa-web-search-provider.test.tsfish-audio-speech/speech-provider.test.tsinworld/speech-provider.test.tsmicrosoft/speech-provider.test.tsmistral/realtime-transcription-provider.test.tsmoonshot/index.test.tsnvidia/provider-catalog.test.tsparallel/src/parallel-web-search-provider.test.tspixverse/video-generation-provider.test.tsqwen/index.test.tsqwen/stream.test.tsrunway/video-generation-provider.test.tstencent/index.test.tsvoyage/embedding-batch.test.tsTestbox execution and recovery
One active command ran per lease. Linked Actions runs are bootstrap jobs; wrapper command exits establish the proof, and stopping a lease can cancel its bootstrap workflow. All leases are stopped.
tbx_01m3d8rpghv59v14taeg3rvx53tbx_01m3dbcyz96cz7a39reh04vfjgtbx_01m3deysfxnh680fk207kb4zed65d5166963b; preservation/negative controls and 28 completed plugin batches retained. SSH interruption was reconciled from the remote process state and recovered logs; unfinished work resumed.tbx_01m3dtedckbhh4vav4bpd17m5c7ff1c1963ff; remaining/corrected 25 batches, consumers, 21 file timings, changed checks and build all exited 0. Wrapper exited 0.