Skip to content

refactor(providers): deslop small provider plugins - #158437

Merged
steipete merged 3 commits into
mainfrom
deslop/l59-tiny-providers
Sep 26, 2026
Merged

steipete merged 3 commits into
mainfrom
deslop/l59-tiny-providers

Conversation

@steipete

@steipete steipete commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

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 constructor as 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.

  • Catalog/setup: existing SDK manifest builders and coercion own common work; remove private Cerebras, Meta, and Featherless forwarding modules while preserving public API exports. Qwen's four regional/plan auth methods share one descriptor builder with the same execution owner and text.
  • Runtime policy: consolidate OpenCode Go's three error-event builders, Vertex catalog defaults/regional pricing, and typed DeepSeek metadata hydration; remove redundant stream/timer and provider-lookup forwarding.
  • Search: Parallel's existing MCP transport owns HTTP failures once; Brave shares mode selection; existing SDK helpers replace repeated config, result, and string normalization. Vendor validation order, diagnostics, cache keys, and transport differences remain.
  • Speech/embeddings: shared coercion owns Talk string patches and Fish voice lists; Voyage imports canonical batch/client types. Mistral registers its existing injected factory directly, and Deepgram has one transcript flush owner.
  • Generation: Comfy's runtime prepares shared asset metadata; PixVerse shares region aliases with setup; Vydra's existing operation owner handles polling directly. Smaller normalization and forwarding cleanup preserves wire fixtures and media lifecycle behavior.

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.mjs on 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/main passed the selected formatting, lint/types, ratchets, dead-export and boundary checks, and runtime-cycle checks in 763.05 s.
  • pnpm build passed in 475.56 s, including verification of all 158 public Plugin SDK subpaths.
  • The 21 changed unit-test files passed 530 tests when measured individually with 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/.

Test file Testbox wall (s) Reported CI test time (s)
anthropic-vertex/index.test.ts 17.30 1.273
amazon-bedrock-mantle/mantle-anthropic.runtime.test.ts 16.17 1.609
arcee/index.test.ts 17.01 2.456
azure-speech/speech-provider.test.ts 16.03 0.181
brave/src/brave-web-search-provider.test.ts 2.20 0.188
cloudflare-ai-gateway/index.test.ts 16.46 0.006
comfy/image-generation-provider.test.ts 17.56 3.074
exa/src/exa-web-search-provider.test.ts 1.86 0.093
fish-audio-speech/speech-provider.test.ts 15.87 0.144
inworld/speech-provider.test.ts 1.70 0.048
microsoft/speech-provider.test.ts 16.34 0.374
mistral/realtime-transcription-provider.test.ts 14.28 0.760
moonshot/index.test.ts 18.45 0.054
nvidia/provider-catalog.test.ts 13.79 0.057
parallel/src/parallel-web-search-provider.test.ts 15.61 6.702
pixverse/video-generation-provider.test.ts 17.74 0.063
qwen/index.test.ts 17.75 1.285
qwen/stream.test.ts 2.15 0.193
runway/video-generation-provider.test.ts 17.40 0.067
tencent/index.test.ts 17.53 1.600
voyage/embedding-batch.test.ts 15.71 0.395
Testbox 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.

Lease Result Bootstrap
tbx_01m3d8rpghv59v14taeg3rvx53 Expired during local preparation; no tests executed. run
tbx_01m3dbcyz96cz7a39reh04vfjg Source-freeze guard rejected an index change; no tests executed. run
tbx_01m3deysfxnh680fk207kb4zed Verified source 65d5166963b; preservation/negative controls and 28 completed plugin batches retained. SSH interruption was reconciled from the remote process state and recovered logs; unfinished work resumed. run
tbx_01m3dtedckbhh4vav4bpd17m5c Verified final source 7ff1c1963ff; remaining/corrected 25 batches, consumers, 21 file timings, changed checks and build all exited 0. Wrapper exited 0. run

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 25, 2026 23:42
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 26, 2026, 12:23 AM ET / 04:23 UTC (Revision 4).

ClawSweeper review

What this changes

The 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
Reviewed head: 7ff1c1963ffe25dbbaa77bd6531c9ef8085a4f3e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The refactor has broad but coherent scope, substantial preservation evidence, and no confirmed blocking defect; live vendor behavior was not exercised.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The contributor proof gate does not apply to this MEMBER-authored PR. The changed owners are bundled provider catalogs and runtimes; the PR reports registered-provider and transport-fixture checks on Testbox plus exact-head CI, but no authenticated vendor live run. No stored-data contract change was identified.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The contributor proof gate does not apply to this MEMBER-authored PR. The changed owners are bundled provider catalogs and runtimes; the PR reports registered-provider and transport-fixture checks on Testbox plus exact-head CI, but no authenticated vendor live run. No stored-data contract change was identified.
Evidence reviewed 9 items Pinned branch scope: The introduced merge-base-to-head diff changes bundled provider code, tests, and a shrink-only assertion baseline; it does not change Plugin SDK files, manifests, dependencies, or workflows.
Moonshot fix remains needed: Current main uses in for the model table lookup, which accepts inherited object keys. The PR uses an own-key check.
Tencent fix remains needed: Current main indexes an ordinary effort-map object with an unverified key; the PR guards ownership and limits its override to the hy3 model.
Findings None None.
Security None None.

How this fits together

Bundled 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]
Loading

Before merge

  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Reported preservation checks 53 provider batches; 316 consumer tests The updated PR body records the final-head validation requested in the previous review.

Stored data model

Persistent data-model change detected: unknown-data-model-change: extensions/voyage/embedding-batch.ts, unknown-truncated-pull-files, vector/embedding metadata: extensions/voyage/embedding-batch.ts, vector/embedding metadata: extensions/voyage/embedding-provider.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best 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.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove merge-risk: 🚨 auth-provider: Current PR review selected no merge-risk labels.

Label justifications:

  • P3: This is primarily maintenance cleanup with localized fixes and no demonstrated urgent user-facing regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The contributor proof gate does not apply to this MEMBER-authored PR. The changed owners are bundled provider catalogs and runtimes; the PR reports registered-provider and transport-fixture checks on Testbox plus exact-head CI, but no authenticated vendor live run. No stored-data contract change was identified.

Evidence

What I checked:

  • Pinned branch scope: The introduced merge-base-to-head diff changes bundled provider code, tests, and a shrink-only assertion baseline; it does not change Plugin SDK files, manifests, dependencies, or workflows. (7ff1c1963ffe)
  • Moonshot fix remains needed: Current main uses in for the model table lookup, which accepts inherited object keys. The PR uses an own-key check. (extensions/moonshot/provider-policy-api.ts:37, 4aa852f5b49c)
  • Tencent fix remains needed: Current main indexes an ordinary effort-map object with an unverified key; the PR guards ownership and limits its override to the hy3 model. (extensions/tencent/stream.ts:59, 4aa852f5b49c)
  • Provider boundary: The existing Plugin SDK builds a provider catalog from manifest metadata when no custom builder is supplied, supporting the Meta cleanup without a new SDK contract. (src/plugin-sdk/provider-entry.ts:458, 7ff1c1963ffe)
  • Security-sensitive path: The Chutes OAuth refactor shares the manual prompt path while retaining state parsing, callback abort handling, and the existing token exchange. (extensions/chutes/oauth.ts:296, 7ff1c1963ffe)
  • Reported validation and prior review: The captured PR body for head 7ff1c19 reports completed batches for 53 touched plugins, 316 consumer tests, changed checks, a build, and exact-head CI. This addresses the prior completed ClawSweeper review’s concrete rank-up request; the remote Testbox commands were not rerun in this read-only review.

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-25T23:53:04.009Z sha 65d5166 :: blocked before merge. :: [P2] Split the growing Comfy test suite before merge
  • reviewed 2026-09-26T02:15:12.503Z sha 8a67068 :: blocked before merge. :: none
  • reviewed 2026-09-26T02:52:26.059Z sha 7ff1c19 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 26, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Sep 26, 2026
@steipete
steipete enabled auto-merge (squash) September 26, 2026 07:32
@steipete
steipete merged commit b9c5d19 into main Sep 26, 2026
205 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: alibaba extensions: amazon-bedrock-mantle extensions: anthropic-vertex extensions: apple-fm extensions: arcee extensions: brave extensions: byteplus extensions: cerebras extensions: chutes extensions: clawrouter Extension: clawrouter extensions: cloudflare-ai-gateway extensions: cohere extensions: comfy extensions: deepgram extensions: deepseek extensions: duckduckgo extensions: exa extensions: featherless extensions: firecrawl extensions: fireworks extensions: fish-audio Extension: fish-audio extensions: gradium extensions: huggingface extensions: inworld Extension: inworld extensions: kilocode extensions: kimi-coding extensions: longcat LongCat provider plugin extensions: meta Extension: meta extensions: microsoft extensions: mistral extensions: moonshot extensions: nvidia extensions: opencode-go extensions: parallel extensions: perplexity extensions: qianfan extensions: qwen extensions: runway extensions: searxng extensions: senseaudio extensions: stepfun extensions: tavily extensions: tencent extensions: together extensions: tts-local-cli extensions: vercel-ai-gateway extensions: volcengine extensions: voyage extensions: vydra extensions: xiaomi extensions: zai P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: azure-speech Azure Speech plugin plugin: pixverse rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant