Repository navigation
refactor(providers): deslop model provider plugins - #158403
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. |
|
@clawsweeper re-review The cold-catalog import regression from the previous head is repaired and the existing contract suite passes. The comment-only edit to |
|
🦞👀 Re-review progress:
|
|
Codex review: blocked before merge. Reviewed September 26, 2026, 1:32 AM ET / 05:32 UTC (Revision 6). ClawSweeper reviewWhat this changesThe branch consolidates catalog, authentication, request, and media helpers across bundled provider plugins, with focused test and lint-baseline updates intended to preserve existing behavior. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: current main does not contain this provider cleanup. The introduced changes remain useful, no actionable defect was identified, and the recorded published-updater result addresses the prior Talk migration concern. Priority: P3 Review scores
Verification
How this fits togetherBundled provider plugins turn agent and Talk requests into provider-specific model or media calls. Doctor prepares older saved Talk settings before those plugins consume the current configuration. flowchart LR
Settings[Saved settings] --> Doctor[Doctor migration]
Doctor --> Plugin[Provider plugin]
Request[Agent or Talk request] --> Plugin
Plugin --> Choice[Auth and model selection]
Choice --> API[Provider API]
API --> Result[Model or media result]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep provider-specific decisions in their plugins and shared mechanics in the Plugin SDK while preserving existing catalog, authentication, request, and Talk upgrade behavior. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is a refactor without a reported current-main bug. Preservation is checked through the provider fixtures, exact-head CI, and recorded upgrade run. Is this the best way to solve the issue? Yes: the branch uses existing plugin-local owners and Plugin SDK helpers for duplicated behavior, while the reviewed migration and published Plugin API floor preserve the relevant upgrade paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d919bfbb4d89. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
Keep promise construction local on cold catalog paths to avoid loading logging redaction through extension-shared. Withdraw the unrelated ElevenLabs header-only edit.
ba6843b to
e6aa550
Compare
|
@clawsweeper re-review The published-updater × candidate migration proof requested in revision 2 is complete for unchanged head The verified registry Before standalone Doctor, the cell verified all five legacy fields migrated, authored voice/model precedence, exact SecretRef and model-selection preservation, unchanged workspace data, and original config bytes in native private backups. The second standalone Doctor pass is byte-identical; config validation passes. The first standalone pass only records skill availability and the wizard timestamp. The initial fixture-permission failure is retained separately; the fresh private-state run succeeded without source or guard changes. Provider: Blacksmith Testbox, lease |
|
🦞👀 Re-review progress:
|
* refactor(providers): deslop model provider plugins * refactor(providers): finish validation cleanup * fix(openai): preserve cold provider catalog imports Keep promise construction local on cold catalog paths to avoid loading logging redaction through extension-shared. Withdraw the unrelated ElevenLabs header-only edit.
What Problem This Solves
Provider plugins duplicated model projection, capability/auth metadata, request lifecycle handling, and normalization already owned by their plugin family or the Plugin SDK.
User Impact
No intended user-visible change. Model IDs/catalogs, auth and SecretRef precedence, request bytes, streaming/reasoning/tool mappings, usage accounting, failover classification, manifests, config keys, and onboarding choices remain the same. No new SDK exports, schema changes, dependencies, or operator actions.
Why This Change Was Made
Removes 1,376 net production lines across 14 provider plugins. The sweep also read ONNX and retained its distinct process, artifact-integrity, and tensor contracts.
Simplifications and their owners
>=2026.9.6Plugin API floor; that published host already exports the shared runner.Fixes found along the way
The first hosted plugin-contract run caught a cold-import regression introduced by this sweep: importing the generic deferred helper through
extension-sharedpulled logging redaction into the capability catalog. The cold-path promise cleanup was withdrawn; the existing catalog contract now passes all 18 tests without test changes, and the four-file repair received a fresh P0–P2 scoped-clean review. Runtime-only helper use remains behind its existing lazy boundary.A separate ClawSweeper input scan flagged an unchanged synthetic credential-URL example in an ElevenLabs file whose only edit removed a narration header. That edit was withdrawn, leaving the file byte-identical to the base. Scanner policy and the example are unchanged.
Evidence
Completed:
pnpm test:extensions:batch <plugin>for amazon-bedrock, anthropic, deepinfra, elevenlabs, fal, github-copilot, google, llama-cpp, lmstudio, microsoft-foundry, minimax, openai, opencode, and openrouter; six cross-shard consumer files across three shards; fullpnpm build(602.07 seconds on the refreshed base); 273 tests in nine strengthened fixture files against the originaldb03af64bb23base across four shards (63.80 seconds). The baseline fixture worktree was removed through Git. The original-base changed gate exposed a pre-existing team-reports test import failure, fixed on main by7c4866c73b31f9a4e4ee24d2323f179aa7c531ff. The patch was rebased unchanged ontoe952abb4aff; the full 14-plugin batch set, cross-shard consumers, and build passed again for7ca465607c35. The final lint-correctedcheck-changedpassed in 667.01 seconds; MiniMax and the captured device-code request fixture passed again after those last edits.All heavy commands ran through
scripts/crabbox-wrapper.mjson Blacksmith Testbox. The initial and refreshed-base campaigns usedtbx_01m3czaah5ywxtherzcm4bq40kandtbx_01m3d59dvrhhm3whms65bzwz7x. Cold-import repair proof usedtbx_01m3df2mkmhpj9z7q01rrmt8vg: the 18-test regression passed in 2.83 seconds, all 1,157 plugin-contract tests passed in 73.40 seconds, and the OpenAI batch passed 1,434 tests (one existing skip) in 58.17 seconds. Its connection failed with exit 255 during changed checks; native downloads recovered an advancing log through the final import-cycle guard, but no completion receipt or build result. Those incomplete gates were rerun on the replacement Testbox,tbx_01m3dmdb0qa2he9shz9math5n5:node scripts/check-changed.mjs --base e952abb4aff82081b54291c70c8dc235ec615629passed in 747.94 seconds, andpnpm buildpassed in 469.87 seconds, with wrapper exit 0. An earlier lease,tbx_01m3dcw1wbtbsf62e96kzq93g1, expired during local preparation before any remote proof. All five earlier leases are stopped. Environment: Linux / Node 24.19.0 / pnpm 12.4.2. The wrapper attested the source, and the final payload verified 189 changed-file hashes. Live provider calls were not required or run.Final head
e6aa5503eb450009858d5d2b8164f0b53f15c089rebases the three commits onto the landed main repair5be36d37cb73a4f9ddf23ed9ab4fe51a3797e25c.git range-diffreports all three patches identical, and a separate comparison confirms zero production provider changes from the rebase. Existing provider proof is retained; fresh exact-head CI validates the incorporated main context and its upstream test consolidation.Codex source audit used the exact sibling checkout at
8f38d5a877da8c5c2c0b5158e72bb5f2290a3157: model-list fields, device-code exchange, and realtime session messages.ClawSweeper reviewed exact head
e6aa5503eb4with no actionable code or security findings and requested published-updater proof for the ElevenLabs migration. That cell now passes on Blacksmith Testbox run 36217384860, leasetbx_01m3dyxabkdw9k2325j0kv5na9. The published[email protected]payload was verified against registry integrity and source commiteb377ac59e6c9fd6c7705028034812becf00271b; it ranopenclaw update --channel stable --tag file:<candidate.tgz> --yes --json --no-restartinto this exact candidate. Both packages report 2026.9.6, so the proof compares every immutable application payload file, not just the version. Candidate tarball SHA-256:7df625cb11e2aed279689a54144ddcac951855b3efd7429f4d7b277929de9327.The published update returned
status=ok, modenpm, and exit 0 in 74.485 seconds. Canonical package-install/package-swap steps and the installed candidate's Doctor step all passed; Doctor explicitly reported atalkconfig change with no write refusal. Before standalone Doctor, assertions verified removal of all five legacy Talk fields, preservation of the authored provider voice/model, exact SecretRef, Anthropic primary/OpenAI fallback selection, and workspace sentinel. Original config bytes remained in nativeopenclaw.json.bak.3and.pre-updatebackups with private permissions. Two real candidate Doctor runs passed; the first recorded skill availability and the wizard timestamp, while the second was byte-identical. Config validation passed. No live provider turn or service restart was run.pnpm release:checkpassed in 1147.756 seconds before packing the candidate. A first package-preflight attempt used build-artifacts leasetbx_01m3dw8peyxs7b8hty6r11jagkand was canceled by that workflow's fixed 35-minute ceiling before the updater ran. On the longer check lease, the first actual update reached candidate Doctor but failed final temp-workspace verification because the synthetic fixture inherited group-write permission. A fresh published-driver specimen used private0700directories and reused the integrity-verified tarball; the full update then passed. Product guards and source code were unchanged. All seven task leases are stopped.The final exact-head ClawSweeper review marks proof sufficient / real behavior verified and reports no actionable code or security findings. Compatibility assessment is complete: this patch introduces no schema, config key, default, storage-format, or migration-policy change. Full source inventory, passing generated release checks, provider fixtures, and the published-driver preservation/backup/idempotence cell address the remaining general config-compatibility reminder. No new operator action is required by the refactor. The complete paginated GitHub inventory contains 189 unique files, no manifests or schema files, and only the two shrink-only lint ratchets outside the provider plugins; its truncated-file-list marker is not an observed storage-format change.
The Testbox workflow appears canceled because the lease was explicitly stopped after the remote wrapper reported exit 0 and the receipt was downloaded. The successful upgrade invocation, both Doctor invocations, config validation, and package-identity checks each returned exit 0. This lifecycle cleanup is distinct from the earlier build-artifacts workflow timeout.
Independent Codex review completed. Findings were evaluated against their canonical owners: the OpenAI classifier rejects HTTP; the Claude probe clears inherited credentials; and the existing llama-cpp package already requires Plugin API >=2026.9.6. The published v2026.9.6 SDK exports
runLiveProviderCatalog, while v2026.9.2 install code enforces the package API floor. These findings were rejected on that source evidence. The final four-file lint cleanup received a fresh P0–P2 scoped-clean review.The changed gate required exact shrink-only assertion baseline updates, including existing Bedrock count drift, then caught widened string-array inference in the new Google music capability helper; its return type now uses the existing SDK capability contract. Lint then required mutating freshly allocated MiniMax metadata with
Object.assign, using native BodyInit serialization in the request-byte fixture, and removing the now-unused Foundry max-lines suppression and its exact baseline entry. The first Anthropic batch exposed two tests tied to the retired private helper arguments; the replacement tests prove the actual spawned command/environment through registered methods.Changed test costs on Testbox
Testbox wall time is measured with
pnpm test <file> --maxWorkers=1, including imports. CI seconds sum the reported per-test durations in the final green run and exclude transformation/import startup; they are not isolated file wall times.extensions/anthropic/cli-shared.test.tsextensions/elevenlabs/tts.test.tsextensions/github-copilot/stream.test.tsextensions/llama-cpp/src/external-server/provider.test.tsextensions/lmstudio/src/models.test.tsextensions/openai/base-url.test.tsextensions/openai/index.test.tsextensions/openai/openai-chatgpt-device-code.test.tsextensions/openai/openai-chatgpt-provider.test.tsextensions/openai/openai-provider.test.tsextensions/openai/realtime-quicksilver-media.runtime.test.tsextensions/openai/realtime-voice-bridge-connection.test.tsextensions/opencode/media-understanding-provider.test.tsextensions/anthropic/cli-migration.test.tsHosted CI on
ba6843b67b3(run36207633666) hit an unrelated merge-ref type error:projectHarnessTaskContentForPersistenceis undefined atsrc/plugin-sdk/agent-harness-task-runtime.ts:332,347. The provider patch does not edit that file. The regression was introduced byd16cdc55154796e421a87e124f70cb329d004092and fixed by #158520 at5be36d37cb73a4f9ddf23ed9ab4fe51a3797e25c, now included in the final base. Fail-fast canceled the provider contract and test jobs, so that failed run supplies no completed provider-test timing. The final exact-head CI run passed one6aa5503eb450009858d5d2b8164f0b53f15c089: 113 successful jobs and 22 expected skips. The final PR check summary has no failed or pending check.